Elixir

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(Allen移动Elixir programming language页面至Elixir)
(指南)
 
(未显示1个用户的20个中间版本)
第4行: 第4行:
  
 
==简介==
 
==简介==
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] 编写,是除 Erlang 以外,[[Erlang VM]] 平台语言最强大的存在。
  
 
*[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]
 
*[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?]
  
 
==版本==
 
==版本==
第15行: 第18行:
  
 
==特性==
 
==特性==
*基于 Erlang 虚拟机(BEAM)之上;
+
*基于 [[Erlang VM|Erlang 虚拟机]](BEAM)之上;
 
*与 Erlang 语言的无缝衔接,与 Erlang 的互调几乎无任何额外开销;
 
*与 Erlang 语言的无缝衔接,与 Erlang 的互调几乎无任何额外开销;
 
*基于宏的元编程能力,语言的抽象语法树作为头等公民;
 
*基于宏的元编程能力,语言的抽象语法树作为头等公民;
第26行: 第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]  
 
  [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  
第58行: 第70行:
  
 
==项目==
 
==项目==
 +
[[文件:ecto-logo.png|right|ecto]]
 +
[[文件:pleroma-logo.png|right|Pleroma]]
 
*[https://github.com/h4cc/awesome-elixir Awesome Elixir] [[image:awesome.png]]   
 
*[https://github.com/h4cc/awesome-elixir Awesome Elixir] [[image:awesome.png]]   
 
*[[erlang ecosystem]]
 
*[[erlang ecosystem]]
 +
*[https://github.com/elixir-lang/elixir/ Elixir @ GitHub]
 
*[[phoenix framework]]
 
*[[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/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/thoughtbot/ex_machina ExMachina] Create test data for Elixir applications  
第81行: 第100行:
 
*[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.
+
*[https://github.com/coryodaniel/bonny Bonny] [[Kubernetes]] Development Framework
 +
*[https://github.com/coryodaniel/k8s K8s] [[Kubernetes]] API Client for Elixir
  
 
==文档==
 
==文档==
第90行: 第110行:
 
==用户==
 
==用户==
 
[https://elixir-companies.com Elixir Companies]
 
[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>
 
<gallery>
 +
image:Elixir-in-the-Type-System-Quadrant.png|Elixir在类型系统象限
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 
image:ejabberd+elixir.jpg|ejabberd+elixir
 
image:elixir-credo.png|credo静态分析
 
image:elixir-credo.png|credo静态分析
第98行: 第121行:
  
 
==链接==
 
==链接==
*[http://elixir-lang.org/ Elixir官网]
+
*[http://elixir-lang.org/ Elixir 官网]
*[https://github.com/elixir-lang/elixir/ Elixir @ GitHub]
+
 
*[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/elixir-sips-ejabberd-with-elixir-part-1/ Elixir Sips: ejabberd with Elixir – Part 1]
第108行: 第130行:
 
[[category:programming language]]
 
[[category:programming language]]
 
[[category:functional programming]]
 
[[category:functional programming]]
 +
[[category:Huihoo Foundation]]

2023年6月13日 (二) 08:06的最后版本

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

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

目录

[编辑] 简介

Elixir 语言的核心由 Erlang 编写,是除 Erlang 以外,Erlang VM 平台语言最强大的存在。

[编辑] 新闻

[编辑] 版本

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 字符串。

6 Reasons Why Elixir Is Better Than Ruby

[编辑] 包管理

hex.pm

[编辑] 指南

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

[编辑] 项目

ecto
Pleroma

[编辑] 文档

[编辑] 用户

Elixir Companies

[编辑] 图集

[编辑] 链接

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

变换
操作
导航
工具箱