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
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
150
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
350
Mint - Disrupting HTTP clients
whatyouhide
0
210
BEAM Architecture Handbook
whatyouhide
7
2.6k
The Evolution of a Language
whatyouhide
0
120
Papers we love: Elixir edition
whatyouhide
5
1k
Other Decks in Programming
See All in Programming
Rubyのobject_id
qnighy
6
1.3k
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
110
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
100
dotfiles について話したい #湘なんか
stefafafan
2
280
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
610
マルチモジュールにおけるテスト最適化
fxwx23
0
110
デザインシステムとコンポーネント指向によるフロントエンド開発プロセスの革新 / Innovation in Frontend Development Processes through Design Systems and Component-Oriented Architecture
nrslib
7
5k
LangGraphでのHuman-in-the-Loopの実装
os1ma
3
550
数値を文字列に整形する際の落とし穴とその解決策(iOSDC2024 ルーキーズLT) / iOSDC Japan 2024 Formatting Floating-Point Numbers
glassfiber
0
250
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
840
快適な開発と高セキュリティを実現するCryptoKitを活用したCoreDataのデータ暗号化術
grandbig
1
300
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
1
1.8k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
359
18k
Documentation Writing (for coders)
carmenintech
65
4.3k
Thoughts on Productivity
jonyablonski
65
4.2k
Being A Developer After 40
akosma
82
580k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
42
2k
Designing Experiences People Love
moore
138
23k
Music & Morning Musume
bryan
46
6k
Visualization
eitanlees
142
15k
Facilitating Awesome Meetings
lara
49
5.9k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
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