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
320
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
gen_statem - OTP's Unsung Hero
whatyouhide
1
210
The World is a Network (and We Are Just Nodes)
whatyouhide
1
200
BEAM: The Perfect Fit for Networks
whatyouhide
1
190
Update from the Elixir team - 2022
whatyouhide
0
390
Testing Asynchronous OTP
whatyouhide
1
510
Elixir Sightseeing Tour
whatyouhide
0
410
Mint - Disrupting HTTP clients
whatyouhide
0
240
BEAM Architecture Handbook
whatyouhide
7
2.8k
The Evolution of a Language
whatyouhide
0
140
Other Decks in Programming
See All in Programming
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
110
Building Scalable Mobile Projects: Fast Builds, High Reusability and Clear Ownership
cyrilmottier
2
300
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
160
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
410
DataStoreをテストする
mkeeda
0
290
プロフェッショナルとしての成長「問題の深掘り」が導く真のスキルアップ / issue-analysis-and-skill-up
minodriven
7
1.5k
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
14
6.2k
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
490
SwiftUI API Design Lessons
niw
1
290
Make Parsers Compatible Using Automata Learning
makenowjust
2
5.2k
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
500
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.5k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Gamification - CAS2011
davidbonilla
81
5.2k
Code Reviewing Like a Champion
maltzj
522
40k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Fireside Chat
paigeccino
37
3.4k
Site-Speed That Sticks
csswizardry
5
500
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
The Cost Of JavaScript in 2023
addyosmani
49
7.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
104
19k
Statistics for Hackers
jakevdp
798
220k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
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