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
300
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
170
BEAM: The Perfect Fit for Networks
whatyouhide
1
150
Update from the Elixir team - 2022
whatyouhide
0
360
Testing Asynchronous OTP
whatyouhide
0
470
Elixir Sightseeing Tour
whatyouhide
0
380
Mint - Disrupting HTTP clients
whatyouhide
0
220
BEAM Architecture Handbook
whatyouhide
7
2.7k
The Evolution of a Language
whatyouhide
0
120
Papers we love: Elixir edition
whatyouhide
5
1k
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
たのしいparse.y
ydah
3
120
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
1
120
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Jakarta EE meets AI
ivargrimstad
0
230
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
CSC509 Lecture 14
javiergs
PRO
0
140
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Symfony Mapper Component
soyuka
2
730
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Building Applications with DynamoDB
mza
91
6.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
GitHub's CSS Performance
jonrohan
1030
460k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
GraphQLとの向き合い方2022年版
quramy
44
13k
Adopting Sorbet at Scale
ufuk
73
9.1k
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