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 pr...
Search
Andrea Leopardi
October 26, 2018
Programming
2
340
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 Umbrella and the Range
whatyouhide
0
14
gen_statem - OTP's Unsung Hero
whatyouhide
2
260
The World is a Network (and We Are Just Nodes)
whatyouhide
1
220
BEAM: The Perfect Fit for Networks
whatyouhide
1
200
Update from the Elixir team - 2022
whatyouhide
0
410
Testing Asynchronous OTP
whatyouhide
1
530
Elixir Sightseeing Tour
whatyouhide
0
440
Mint - Disrupting HTTP clients
whatyouhide
0
260
BEAM Architecture Handbook
whatyouhide
7
2.8k
Other Decks in Programming
See All in Programming
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
430
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.2k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
21
5.6k
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
630
私の後悔をAWS DMSで解決した話
hiramax
4
210
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
200
Namespace and Its Future
tagomoris
6
700
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
480
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
100
アセットのコンパイルについて
ojun9
0
120
print("Hello, World")
eddie
1
520
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Visualization
eitanlees
148
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Faster Mobile Websites
deanohume
309
31k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Docker and Python
trallard
45
3.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Designing Experiences People Love
moore
142
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
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