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
920
O case da Plataformatec com o Elixir - Como uma empresa brasileira criou uma linguagem que é usada no mundo inteiro @ QCon SP 2018
plataformatec
1
220
Elixir @ iMasters Intercon 2016
plataformatec
1
260
GenStage and Flow by @josevalim at ElixirConf
plataformatec
17
2.7k
Elixir: Programação Funcional e Pragmática @ 2º Tech Day Curitiba
plataformatec
2
290
Elixir: Programação Funcional e Pragmática @ Encontro Locaweb 2016
plataformatec
4
270
What's ahead for Elixir: v1.2 and GenRouter
plataformatec
15
2k
Arquiteturas Comuns de Apps Rails @ RubyConf BR 2015
plataformatec
6
370
Pirâmide de testes, escrevendo testes com qualidade @ RubyConf 2015
plataformatec
10
2.3k
Other Decks in Technology
See All in Technology
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
130
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.3k
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
ハイテク休憩
sat
PRO
2
150
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
260
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
100
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Adopting Sorbet at Scale
ufuk
73
9.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Rails Girls Zürich Keynote
gr2m
94
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
The World Runs on Bad Software
bkeepers
PRO
65
11k
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