Elixir

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(简介)
(Allen移动Elixir programming language页面至Elixir)
(未显示1个用户的10个中间版本)
第6行: 第6行:
 
Elixir语言的核心由[https://github.com/elixir-lang/elixir/tree/master/lib/elixir/src Erlang]编写。
 
Elixir语言的核心由[https://github.com/elixir-lang/elixir/tree/master/lib/elixir/src Erlang]编写。
  
[https://github.com/oldratlee/translations/tree/master/a-week-with-elixir Erlang之父学习Elixir语言的一周]
+
*[https://github.com/oldratlee/translations/tree/master/a-week-with-elixir Erlang之父学习Elixir语言的一周]
 +
*[https://www.foxbox.com/blog/elixir-vs-ruby How Switching From Ruby to Elixir Made Our Team Happier and More Productive]
 +
 
 +
==版本==
 +
[[文件:elixir-20190227.png|right|thumb|Elixir 2.0]]
 +
*Elixir 2.0 没有新的计划,也许到了该放假的时候。如果你想为 Elixir 做贡献,请参与 [[Erlang]]。
 +
*Elixir v1.12 requires Erlang 22.0 or later.
  
 
==特性==
 
==特性==
第22行: 第28行:
  
 
==指南==
 
==指南==
 +
下载安装包
 +
[https://www.erlang-solutions.com/downloads/ Elixir Packages Download]
 
OS X
 
OS X
 
  brew install elixir  
 
  brew install elixir  
第51行: 第59行:
 
==项目==
 
==项目==
 
*[https://github.com/h4cc/awesome-elixir Awesome Elixir] [[image:awesome.png]]   
 
*[https://github.com/h4cc/awesome-elixir Awesome Elixir] [[image:awesome.png]]   
 +
*[[erlang ecosystem]]
 
*[[phoenix framework]]
 
*[[phoenix framework]]
 +
*[https://github.com/rrrene/credo Credo] is a static code analysis tool for the Elixir language with a focus on teaching and code consistency.
 +
*[https://github.com/thoughtbot/ex_machina ExMachina] Create test data for Elixir applications
 +
*[https://github.com/elixirscript/elixirscript ElixirScript] Converts Elixir to JavaScript
 
*[https://github.com/riverrun/openmaize openmaize] Authentication library for Plug-based applications in Elixir
 
*[https://github.com/riverrun/openmaize openmaize] Authentication library for Plug-based applications in Elixir
 
*[https://github.com/falood/maru Maru] Elixir [[REST|RESTful]] Framework
 
*[https://github.com/falood/maru Maru] Elixir [[REST|RESTful]] Framework
第69行: 第81行:
 
*[https://github.com/jeffweiss/plug_statsd PlugStatsd] Send connection response time and count to statsd
 
*[https://github.com/jeffweiss/plug_statsd PlugStatsd] Send connection response time and count to statsd
 
*[https://github.com/nerves-project/nerves Nerves]  Create firmware for embedded devices like Raspberry Pi, BeagleBone Black, and more
 
*[https://github.com/nerves-project/nerves Nerves]  Create firmware for embedded devices like Raspberry Pi, BeagleBone Black, and more
 +
*[https://github.com/supabase/realtime Supabase Realtime] Listen to your to [[PostgreSQL]] database in realtime via [[WebSocket]]. Built with Elixir.
  
 
==文档==
 
==文档==
第81行: 第94行:
 
<gallery>
 
<gallery>
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 +
image:elixir-credo.png|credo静态分析
 
</gallery>
 
</gallery>
  

2021年12月1日 (三) 07:01的版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Elixir Thanks, Wikipedia.
Elixir-logo.png

Elixir 是一个基于 Erlang 虚拟机的函数式、面向并行的通用编程语言(Apache v2许可协议)。Elixir 以 Erlang 为基础,支持分布式、高容错、实时应用程序的开发,同时亦对其进行扩展使之借助宏实现元编程,并通过协议支持多态。

目录

简介

Elixir语言的核心由Erlang编写。

版本

Elixir 2.0
  • Elixir 2.0 没有新的计划,也许到了该放假的时候。如果你想为 Elixir 做贡献,请参与 Erlang
  • Elixir v1.12 requires Erlang 22.0 or later.

特性

  • 基于 Erlang 虚拟机(BEAM)之上;
  • 与 Erlang 语言的无缝衔接,与 Erlang 的互调几乎无任何额外开销;
  • 基于宏的元编程能力,语言的抽象语法树作为头等公民;
  • 基于协议的多态实现,启发自Clojure
  • 完善的文档支持;
  • 通过消息传递(参与者模式)支持 Shared-nothing 并行事务;
  • 强调利用递归和高阶函数的函数式编程胜过基于副作用和循环的命令式编程;
  • 一切均为表达式;
  • 惰性求值,拥有诸如 futures 和 promises 一类的异步流数据类型;
  • 模式匹配;
  • Unicode 支持,UTF-8 字符串。

指南

下载安装包

Elixir Packages Download 

OS X

brew install elixir 
brew upgrade elixir 或者
sudo port install elixir // MacPorts elixir 包

Linux

yum install elixir
sudo apt-get install elixir

FreeBSD

pkg install elixir

交互

elixir -v
iex
iex> 1 + 1
2
iex> "hello" <> " world"
"hello world"

脚本

$ vim simple.exs
IO.puts "Hello world
from Elixir"
$ elixir simple.exs 
Hello world
from Elixir

Emacs

项目

文档

用户

Elixir Companies

图集

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱