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
BEAM: The Perfect Fit for Networks
whatyouhide
1
120
Update from the Elixir team - 2022
whatyouhide
0
330
Testing Asynchronous OTP
whatyouhide
0
440
Elixir Sightseeing Tour
whatyouhide
0
320
Mint - Disrupting HTTP clients
whatyouhide
0
200
BEAM Architecture Handbook
whatyouhide
7
2.5k
The Evolution of a Language
whatyouhide
0
110
Papers we love: Elixir edition
whatyouhide
5
960
Update from the Elixir team - 2018
whatyouhide
2
4.4k
Other Decks in Programming
See All in Programming
try! Swift Tokyo 2024のLT枠に採択されたプロポーザルを出すときに考えていたこと
ski
0
340
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
280
Elm Form Validation
bkuhlmann
0
500
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
120
Designing for tomorrow's programming workflows
honnibal
PRO
2
110
Ruby Pattern Matching
bkuhlmann
0
920
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
350
Ruby Function Composition
bkuhlmann
1
330
Tailwind CSSを本気でカスタマイズする方法
fsubal
2
240
pixivアプリでマルチモジュールを実現するまで
gatosyocora
1
130
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Web development in the modern age
philhawksworth
202
10k
The Language of Interfaces
destraynor
151
23k
Designing for Performance
lara
601
67k
KATA
mclloyd
14
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
Building a Scalable Design System with Sketch
lauravandoore
455
32k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.5k
Faster Mobile Websites
deanohume
297
30k
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