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
370
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir - functional, concurrent, distributed programming for the rest of us
Andrea Leopardi
October 26, 2018
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Agentic Elixir
whatyouhide
0
480
The Umbrella and the Range
whatyouhide
0
64
gen_statem - OTP's Unsung Hero
whatyouhide
2
350
The World is a Network (and We Are Just Nodes)
whatyouhide
1
260
BEAM: The Perfect Fit for Networks
whatyouhide
1
260
Update from the Elixir team - 2022
whatyouhide
0
460
Testing Asynchronous OTP
whatyouhide
1
580
Elixir Sightseeing Tour
whatyouhide
0
490
Mint - Disrupting HTTP clients
whatyouhide
0
300
Other Decks in Programming
See All in Programming
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
450
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
110
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.6k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
150
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
350
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
140
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
2.4k
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
320
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
120
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.7k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
210
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Producing Creativity
orderedlist
PRO
348
40k
Designing Experiences People Love
moore
143
24k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
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