Elixir

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(文档)
(Allen移动Elixir programming language页面至Elixir)
(未显示1个用户的22个中间版本)
第1行: 第1行:
 
{{SeeWikipedia|Elixir (programming language)}}
 
{{SeeWikipedia|Elixir (programming language)}}
 
+
[[文件:Elixir-logo.png‎|right]]
 
Elixir 是一个基于 [[Erlang]] 虚拟机的函数式、面向并行的通用编程语言(Apache v2许可协议)。Elixir 以 Erlang 为基础,支持分布式、高容错、实时应用程序的开发,同时亦对其进行扩展使之借助宏实现元编程,并通过协议支持多态。
 
Elixir 是一个基于 [[Erlang]] 虚拟机的函数式、面向并行的通用编程语言(Apache v2许可协议)。Elixir 以 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://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.
  
 
==特性==
 
==特性==
第17行: 第28行:
  
 
==指南==
 
==指南==
 +
下载安装包
 +
[https://www.erlang-solutions.com/downloads/ Elixir Packages Download]
 
OS X
 
OS X
  brew install elixir 或者
+
  brew install elixir
 +
brew upgrade elixir 或者
 
  sudo port install elixir // [http://packages.macports.org/elixir MacPorts elixir 包]
 
  sudo port install elixir // [http://packages.macports.org/elixir MacPorts elixir 包]
 
Linux
 
Linux
第39行: 第53行:
 
  Hello world
 
  Hello world
 
  from Elixir
 
  from Elixir
 +
 +
==Emacs==
 +
*[https://github.com/elixir-lang/emacs-elixir Emacs major mode for Elixir]
  
 
==项目==
 
==项目==
 +
*[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/falood/maru Maru] Elixir [[REST|RESTful]] Framework
 +
*[https://github.com/garyf/json_web_token_ex JSON Web Token]
 +
*[https://github.com/ericmj/mongodb MongoDB driver for Elixir]
 +
*[https://github.com/ntrepid8/ex_crypto ExCrypto]
 +
*[https://github.com/checkiz/elixir-bson elixir-bson] [http://www.bsonspec.org/ BSON] implementation for Elixir Language
 +
*[https://github.com/graphql-elixir/graphql GraphQL Elixir]
 +
*[https://github.com/chvanikoff/apns4ex APNS for Elixir]
 +
*[https://github.com/carnivalmobile/gcm Elixir library to send pushes through GCM]
 +
*[https://github.com/codedge-llc/pigeon pigeon] [[iOS]] and [[Android]] push notifications for Elixir 
 +
*[https://github.com/hamiltop/rethinkdb-elixir rethinkdb-elixir] [[RethinkDB]] driver for Elixir
 +
*[https://github.com/kafkaex/kafka_ex KafkaEx] Apache Kafka client for Elixir/[[Erlang]].
 +
*[https://github.com/SenecaSystems/imagineer imagineer] Image parsing in Elixir, No external dependencies.
 +
*[https://github.com/reset/hash-ring-ex HashRing] A consistent hash ring implemention for Elixir
 +
*[https://github.com/edgurgel/tentacat Tentacat] Simple Elixir wrapper for the [http://developer.github.com/ GitHub API].
 +
*[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/supabase/realtime Supabase Realtime] Listen to your to [[PostgreSQL]] database in realtime via [[WebSocket]]. Built with Elixir.
  
 
==文档==
 
==文档==
 +
*[http://docs.huihoo.com/elixir/Elixir-March-2013.pdf Elixir介绍,Elixir作者José Valim]
 
*[http://docs.huihoo.com/erlang/conference/sfbay2014/distributed-robots-in-elixir.pdf Distributed Robots in Elixir]
 
*[http://docs.huihoo.com/erlang/conference/sfbay2014/distributed-robots-in-elixir.pdf Distributed Robots in Elixir]
 
*[http://docs.huihoo.com/erlang/conference/sfbay2014/bitcoin-elixir-living-the-cutting-edge.pdf Bitcoin & Elixir:Living the cutting edge]
 
*[http://docs.huihoo.com/erlang/conference/sfbay2014/bitcoin-elixir-living-the-cutting-edge.pdf Bitcoin & Elixir:Living the cutting edge]
 +
 +
==用户==
 +
[https://elixir-companies.com Elixir Companies]
  
 
==图集==
 
==图集==
 
<gallery>
 
<gallery>
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 +
image:elixir-credo.png|credo静态分析
 
</gallery>
 
</gallery>
  
第60行: 第105行:
  
 
[[category:erlang]]
 
[[category:erlang]]
 +
[[category:elixir]]
 
[[category:programming language]]
 
[[category:programming language]]
 
[[category:functional programming]]
 
[[category:functional programming]]

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

图集

链接

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

变换
操作
导航
工具箱