欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Elixir
来自开放百科 - 灰狐
(版本间的差异)
小 (→指南) |
小 (→指南) |
||
(未显示1个用户的48个中间版本) | |||
第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] 编写,是除 Erlang 以外,[[Erlang VM]] 平台语言最强大的存在。 | ||
+ | |||
+ | *[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] | ||
+ | |||
+ | ==新闻== | ||
+ | *[https://www.monterail.com/blog/ruby-vs-elixir Ruby vs Elixir — Which One to Choose in 2022?] | ||
+ | |||
+ | ==版本== | ||
+ | [[文件:elixir-20190227.png|right|thumb|Elixir 2.0]] | ||
+ | *Elixir 2.0 没有新的计划,也许到了该放假的时候。如果你想为 Elixir 做贡献,请参与 [[Erlang]]。 | ||
+ | *Elixir v1.12 requires Erlang 22.0 or later. | ||
==特性== | ==特性== | ||
− | *基于 Erlang | + | *基于 [[Erlang VM|Erlang 虚拟机]](BEAM)之上; |
*与 Erlang 语言的无缝衔接,与 Erlang 的互调几乎无任何额外开销; | *与 Erlang 语言的无缝衔接,与 Erlang 的互调几乎无任何额外开销; | ||
*基于宏的元编程能力,语言的抽象语法树作为头等公民; | *基于宏的元编程能力,语言的抽象语法树作为头等公民; | ||
第15行: | 第29行: | ||
*模式匹配; | *模式匹配; | ||
*Unicode 支持,UTF-8 字符串。 | *Unicode 支持,UTF-8 字符串。 | ||
+ | |||
+ | [https://betterprogramming.pub/6-reasons-why-elixir-is-better-than-ruby-8f5ef8edc40e 6 Reasons Why Elixir Is Better Than Ruby] | ||
+ | |||
+ | ==包管理== | ||
+ | [[hex|hex.pm]] | ||
==指南== | ==指南== | ||
+ | [https://github.com/asdf-vm/asdf asdf] - install and manage different Elixir and [[Erlang]] versions | ||
+ | |||
+ | 下载安装包 | ||
+ | [https://www.erlang-solutions.com/downloads/ Elixir Packages Download] | ||
+ | Windows | ||
+ | [https://github.com/elixir-lang/elixir-windows-setup elixir-windows-setup] | ||
OS X | OS X | ||
− | brew install elixir | + | brew install elixir |
− | sudo port install elixir | + | brew upgrade elixir 或者 |
+ | sudo port install elixir // [http://packages.macports.org/elixir MacPorts elixir 包] | ||
Linux | Linux | ||
yum install elixir | yum install elixir | ||
第39行: | 第65行: | ||
Hello world | Hello world | ||
from Elixir | from Elixir | ||
+ | |||
+ | ==Emacs== | ||
+ | *[https://github.com/elixir-lang/emacs-elixir Emacs major mode for Elixir] | ||
+ | |||
+ | ==项目== | ||
+ | [[文件:ecto-logo.png|right|ecto]] | ||
+ | [[文件:pleroma-logo.png|right|Pleroma]] | ||
+ | *[https://github.com/h4cc/awesome-elixir Awesome Elixir] [[image:awesome.png]] | ||
+ | *[[erlang ecosystem]] | ||
+ | *[https://github.com/elixir-lang/elixir/ Elixir @ GitHub] | ||
+ | *[[phoenix framework]] | ||
+ | *[https://github.com/plausible/analytics Plausible Analytics] alternative to Google Analytics. | ||
+ | *[https://github.com/elixir-ecto/ecto ecto] | ||
+ | *[https://pleroma.social/ Pleroma] is a federated social networking platform, compatible with [[Mastodon]], [[GNU social]] and other ActivityPub implementations, written in Elixir. | ||
+ | *[https://github.com/supabase/realtime Supabase Realtime] Listen to your to [[PostgreSQL]] database in realtime via [[WebSocket]]. Built with Elixir. | ||
+ | *[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/coryodaniel/bonny Bonny] [[Kubernetes]] Development Framework | ||
+ | *[https://github.com/coryodaniel/k8s K8s] [[Kubernetes]] API Client for 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] | ||
+ | *[https://elixir-lang.org/blog/2021/06/02/social-virtual-spaces-with-elixir-at-mozilla/ Social virtual spaces with Elixir at Mozilla] | ||
+ | *[https://serokell.io/blog/elixir-companies 8 Companies That Use Elixir in Production] [https://discordapp.com/ Discord] [https://www.square-enix.com/ Square Enix] [https://www.pepsico.com/ PepsiCo] [[Aeternity]], [https://www.sketch.com/ Sketch] [[Moodle]], [[WeChat]], [[WhatsApp]], [[Facebook]], [https://www.klarna.com Klarna] | ||
+ | |||
+ | ==图集== | ||
+ | <gallery> | ||
+ | image:Elixir-in-the-Type-System-Quadrant.png|Elixir在类型系统象限 | ||
+ | image:ejabberd+elixir.jpg|ejabberd+elixir | ||
+ | image:elixir-credo.png|credo静态分析 | ||
+ | </gallery> | ||
==链接== | ==链接== | ||
− | *[http://elixir-lang.org | + | *[http://elixir-lang.org/ Elixir 官网] |
− | + | ||
*[https://blog.process-one.net/ejabberd-joins-the-elixir-revolution/ ejabberd joins the Elixir revolution] | *[https://blog.process-one.net/ejabberd-joins-the-elixir-revolution/ ejabberd joins the Elixir revolution] | ||
+ | *[https://blog.process-one.net/elixir-sips-ejabberd-with-elixir-part-1/ Elixir Sips: ejabberd with Elixir – Part 1] | ||
+ | *[https://blog.process-one.net/ejabberd-with-elixir-packet-filters/ Elixir Sips: ejabberd with Elixir – Part 2] | ||
[[category:erlang]] | [[category:erlang]] | ||
+ | [[category:elixir]] | ||
[[category:programming language]] | [[category:programming language]] | ||
+ | [[category:functional programming]] | ||
+ | [[category:Huihoo Foundation]] |
2023年6月13日 (二) 08:06的最后版本
您可以在Wikipedia上了解到此条目的英文信息 Elixir Thanks, Wikipedia. |
Elixir 是一个基于 Erlang 虚拟机的函数式、面向并行的通用编程语言(Apache v2许可协议)。Elixir 以 Erlang 为基础,支持分布式、高容错、实时应用程序的开发,同时亦对其进行扩展使之借助宏实现元编程,并通过协议支持多态。
目录 |
[编辑] 简介
Elixir 语言的核心由 Erlang 编写,是除 Erlang 以外,Erlang VM 平台语言最强大的存在。
[编辑] 新闻
[编辑] 版本
- 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 字符串。
6 Reasons Why Elixir Is Better Than Ruby
[编辑] 包管理
[编辑] 指南
asdf - install and manage different Elixir and Erlang versions
下载安装包
Elixir Packages Download
Windows
elixir-windows-setup
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
[编辑] 项目
- Awesome Elixir
- erlang ecosystem
- Elixir @ GitHub
- phoenix framework
- Plausible Analytics alternative to Google Analytics.
- ecto
- Pleroma is a federated social networking platform, compatible with Mastodon, GNU social and other ActivityPub implementations, written in Elixir.
- Supabase Realtime Listen to your to PostgreSQL database in realtime via WebSocket. Built with Elixir.
- Credo is a static code analysis tool for the Elixir language with a focus on teaching and code consistency.
- ExMachina Create test data for Elixir applications
- ElixirScript Converts Elixir to JavaScript
- openmaize Authentication library for Plug-based applications in Elixir
- Maru Elixir RESTful Framework
- JSON Web Token
- MongoDB driver for Elixir
- ExCrypto
- elixir-bson BSON implementation for Elixir Language
- GraphQL Elixir
- APNS for Elixir
- Elixir library to send pushes through GCM
- pigeon iOS and Android push notifications for Elixir
- rethinkdb-elixir RethinkDB driver for Elixir
- KafkaEx Apache Kafka client for Elixir/Erlang.
- imagineer Image parsing in Elixir, No external dependencies.
- HashRing A consistent hash ring implemention for Elixir
- Tentacat Simple Elixir wrapper for the GitHub API.
- PlugStatsd Send connection response time and count to statsd
- Nerves Create firmware for embedded devices like Raspberry Pi, BeagleBone Black, and more
- Bonny Kubernetes Development Framework
- K8s Kubernetes API Client for Elixir
[编辑] 文档
[编辑] 用户
- Social virtual spaces with Elixir at Mozilla
- 8 Companies That Use Elixir in Production Discord Square Enix PepsiCo Aeternity, Sketch Moodle, WeChat, WhatsApp, Facebook, Klarna
[编辑] 图集
[编辑] 链接
分享您的观点