Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Elixir
Search
Plataformatec
November 18, 2012
Technology
17
11k
Elixir
This talk highlights the reason, goals and roadmap behind Elixir,
http://elixir-lang.org
Plataformatec
November 18, 2012
Tweet
Share
More Decks by Plataformatec
See All by Plataformatec
O case da Plataformatec com o Elixir - Como uma empresa brasileira criou uma linguagem que é usada no mundo inteiro @ Elixir Brasil 2019
plataformatec
5
870
O case da Plataformatec com o Elixir - Como uma empresa brasileira criou uma linguagem que é usada no mundo inteiro @ QCon SP 2018
plataformatec
1
210
Elixir @ iMasters Intercon 2016
plataformatec
1
250
GenStage and Flow by @josevalim at ElixirConf
plataformatec
17
2.7k
Elixir: Programação Funcional e Pragmática @ 2º Tech Day Curitiba
plataformatec
2
270
Elixir: Programação Funcional e Pragmática @ Encontro Locaweb 2016
plataformatec
4
260
What's ahead for Elixir: v1.2 and GenRouter
plataformatec
15
1.9k
Arquiteturas Comuns de Apps Rails @ RubyConf BR 2015
plataformatec
6
360
Pirâmide de testes, escrevendo testes com qualidade @ RubyConf 2015
plataformatec
10
2.2k
Other Decks in Technology
See All in Technology
Evolving DevOps Teams and Flexible Organizational Culture
kakehashi
1
260
LLVM/ASMを使った有限体の高速実装
herumi
0
120
AWS SAW を広めたい @四国クラウドお遍路
kazzpapa3
0
230
ビジネスとエンジニアリングを繋ぐプロダクトを中心とした組織づくりの実践
sansantech
PRO
1
180
Google CloudのLLM活用の選択肢を広げるVertex AIのパートナーモデル
nayuts
0
120
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
120
AIで変わるテスト自動化:最新ツールの多様なアプローチ/ 20240910 Takahiro Kaneyama
shift_evolve
0
200
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
なぜクラウドサービスで Web コンソールを提供するのか
shuta13
4
2k
PdMはどのように全てのスピードを上げられるか ~ 非連続進化のための具体的な取り組み ~
sansantech
PRO
3
930
20240906_JAWS_Yamanashi_#1_leap_beyond_the_AWS_all_certifications
tsumita
1
280
Segment Anything Model 2
tenten0727
3
650
Featured
See All Featured
BBQ
matthewcrist
83
9.1k
Ruby is Unlike a Banana
tanoku
96
11k
Building Flexible Design Systems
yeseniaperezcruz
325
37k
Design by the Numbers
sachag
277
19k
A Modern Web Designer's Workflow
chriscoyier
691
190k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
The World Runs on Bad Software
bkeepers
PRO
64
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
157
15k
A Tale of Four Properties
chriscoyier
155
22k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Transcript
@elixirlang / elixir-lang.org Monday, November 19, 2012
@josevalim Monday, November 19, 2012
Monday, November 19, 2012
Why? Monday, November 19, 2012
case #1 Monday, November 19, 2012
Switch Switch Monday, November 19, 2012
Switch Browser Endpoint Server Monday, November 19, 2012
Server Browser Monday, November 19, 2012
•Web sockets •API streaming •Server sent events Server Monday, November
19, 2012
case #2 Multi-core Monday, November 19, 2012
Server Server Server Server Monday, November 19, 2012
50 cores $2600 Monday, November 19, 2012
Server Monday, November 19, 2012
case #3 Doing it live! Monday, November 19, 2012
http://blog.whatsapp.com/index.php/2012/01/1-million-is-so-2011/ 2 million connections on a single node Monday, November
19, 2012
http://stackoverflow.com/questions/1636455/where-is-erlang-used-and-why Monday, November 19, 2012
Goals Monday, November 19, 2012
goal #1 Productivity Monday, November 19, 2012
Everything is an expression Monday, November 19, 2012
-module(my_module). some_function(Foo) -> % ... other_function(Bar) -> % ... erlang
Monday, November 19, 2012
-module(my_module). % won’t compile io:put_chars("hello"). some_function(Foo) -> % ... other_function(Bar)
-> % ... erlang Monday, November 19, 2012
defmodule MyModule do def some_function(foo) do # ... end IO.puts
"hello" def other_function(bar) do # ... end end elixir Monday, November 19, 2012
Macros Monday, November 19, 2012
:foo - atoms/symbols { 1, 2, 3 } - tuples
[ 1, 2, 3 ] - lists Monday, November 19, 2012
is_atom(:foo) function line args atom { :is_atom, 1, [:foo] }
Monday, November 19, 2012
1 + 2 function line args { :+, 1, [1,2]
} Monday, November 19, 2012
defmacro unless(expr, opts) do quote do if(!unquote(expr), unquote(opts)) end end
unless(true, do: exit()) elixir Monday, November 19, 2012
Domain Specific Languages Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case test "basic operations" do assert
1 + 1 == 2 end end elixir Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case def test_basic_operations do assert 1
+ 1 == 2 :ok end end elixir Monday, November 19, 2012
assert 1 + 1 == 2 { :==, 5, [1
+ 1, 2] } function line args Monday, November 19, 2012
# assert 1 + 1 == 2 defmacro assert({ :=~,
line, [l,r] }) do # ... end defmacro assert({ :==, line, [l,r] }) do # ... end defmacro assert(default) do # ... end Monday, November 19, 2012
goal #2 Extensibility Monday, November 19, 2012
-module(json). to_json(Item) when is_list(Item) -> % ... to_json(Item) when is_binary(Item)
-> % ... to_json(Item) when is_number(Item) -> % ... erlang Monday, November 19, 2012
Protocols Monday, November 19, 2012
defprotocol JSON do def to_json(item) end JSON.to_json(item) elixir Monday, November
19, 2012
defimpl JSON, for: List do # ... end elixir defimpl
JSON, for: Binary do # ... end defimpl JSON, for: Number do # ... end Monday, November 19, 2012
defimpl JSON, for: Array do # ... end elixir Monday,
November 19, 2012
goal #3 Compatibility Monday, November 19, 2012
Monday, November 19, 2012
DISTRIBUTED FAULT-TOLERANT APPLICATIONS WITH HOT-CODE SWAPPING Monday, November 19, 2012
There is no conversion cost for calling Erlang from Elixir
and vice-versa Monday, November 19, 2012
• UTF-8 binaries strings • Keyword arguments • First-class documentation
• First-class regular expressions • Zero-index access • ... Monday, November 19, 2012
Example Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case, async: true test "basic operations"
do assert 1 + 1 == 2 end end elixir Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner done ExUnit. Formatter info Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter run Monday, November 19, 2012
127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...
5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...
5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter ExUnit. Supervisor Monday, November 19, 2012
Roadmap Monday, November 19, 2012
• v0.6 (Aug/12) Erlang language compatibility • v0.8 (Dec/12) Erlang
apps support • Dynamo (xx/13) Web framework • v0 (Jan/11) Monday, November 19, 2012
Monday, November 19, 2012
@elixirlang / elixir-lang.org Monday, November 19, 2012