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 - functional, concurrent, distributed programming for the rest of us
Search
Andrea Leopardi
October 26, 2018
Programming
2
290
Elixir - functional, concurrent, distributed programming for the rest of us
Andrea Leopardi
October 26, 2018
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
The World is a Network (and We Are Just Nodes)
whatyouhide
0
140
BEAM: The Perfect Fit for Networks
whatyouhide
1
140
Update from the Elixir team - 2022
whatyouhide
0
340
Testing Asynchronous OTP
whatyouhide
0
460
Elixir Sightseeing Tour
whatyouhide
0
340
Mint - Disrupting HTTP clients
whatyouhide
0
210
BEAM Architecture Handbook
whatyouhide
7
2.6k
The Evolution of a Language
whatyouhide
0
110
Papers we love: Elixir edition
whatyouhide
5
1k
Other Decks in Programming
See All in Programming
3 Effective Rules for Success with Signals in Angular
manfredsteyer
PRO
0
120
AHC035解説
terryu16
0
710
日付と正規化
megmogmog1965
0
140
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
190
MIERUNE BBQにおけるユーザー中心設計()
mierune
PRO
1
110
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
CSC307 Lecture 05
javiergs
PRO
0
210
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
リハビリmruby
kishima
1
160
TiDB Serverless ~理想のServerless DBを考える~
soso_15315
1
160
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
360
22k
Making Projects Easy
brettharned
111
5.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
RailsConf 2023
tenderlove
16
720
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Optimizing for Happiness
mojombo
373
69k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
12
3.8k
KATA
mclloyd
20
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
39
47k
Why Our Code Smells
bkeepers
PRO
332
56k
The Cost Of JavaScript in 2023
addyosmani
31
4.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
224
21k
Transcript
functional, concurrent, distributed programming for the rest of us ELIXIR
@whatyouhide
None
None
None
None
functional, concurrent, distributed programming for the rest of us ELIXIR
LET'S BUILD A LANGUAGE
Language for modern systems
None
concurrent distributed fault-tolerant extensible
don't give to devs, enable devs
VM
NO TYPE SYSTEM
CONCURRENCY
threads are heavy
schedulers VM processes
memory memory
IMMUTABLE DATA
MESSAGE PASSING
send(pid, message) receive do ... end +
None
pattern matching
{1, _} = some_tuple
receive do {1, _} -> ... {_, _} -> ...
end
None
case expression do pattern1 -> ... pattern2 -> ... _
-> ... end
ISOLATED MEMORY MESSAGE PASSING +
None
def loop(state) do receive do new_state -> loop(new_state) end end
DISTRIBUTION
node 1 node 2
FAULT TOLERANCE
acceptor
acceptor
None
None
link
link
link
link trap crash
link trap crash trap crash
None
None
SUPERVISORS
None
None
None
None
SYNTAX
github.com/josevalim/lego-lang
def(double_sum(a, b), do: ( =(c, +(a, b)) *(c, 2) ))
def(double_sum(a, b), do: ( =(c, +(a, b)) *(c, 2) ))
def(double_sum(a, b), do: ( =(c, +(a, b)) *(c, 2) ))
def(double_sum(a, b), do: ( =(c, +(a, b)) *(c, 2) ))
if(>(a, b), do: a, else: b)
macros functions +
less parens?
def(double_sum(a, b), do: ( =(c, +(a, b)) *(c, 2) ))
def(double_sum(a, b), do: ( c = a + b c
* 2 ))
def double_sum(a, b), do: ( c = a + b
c * 2 )
def double_sum(a, b) do c = a + b c
* 2 end
if a > b do a else b end
literals and containers
[1, 2, 3] [](1, 2, 3)
macros functions +
def add(a, b), do: a + b
defmacro def(call, keywords) add(a, b) do: (a + b)
case expression do true -> branch1 else -> branch2 end
defmacro if(condition, do: branch1, else: branch2) do quote do case
unquote(condition) do true -> unquote(branch1) false -> unquote(branch2) end end end
CONLCLUSION
PLOT TWIST... we built ELIXIR
concurrent distrubuted fault-tolerant extensible
elixir-lang.org @whatyouhide