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 a Language for the Future
Search
João Moura
June 23, 2017
Programming
0
110
Elixir a Language for the Future
João Moura
June 23, 2017
Tweet
Share
More Decks by João Moura
See All by João Moura
State Machines in Elixir
joaomdmoura
0
290
Spreading my love for Elixir and State Machines
joaomdmoura
0
53
Unboxing Data Science (Short Verison)
joaomdmoura
0
79
Tackling Authentication with Phoenix
joaomdmoura
2
470
Desenvolvendo Produtos além das Metodologias Ágeis
joaomdmoura
1
55
Graph Theory Behind Immutable JS
joaomdmoura
0
490
E agora mobile?
joaomdmoura
0
62
(short version) Elixir By A Rubyist
joaomdmoura
0
190
Elixir by a Rubyist
joaomdmoura
5
380
Other Decks in Programming
See All in Programming
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
WebDriver BiDiとは何なのか
yotahada3
1
140
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
120
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
Writing documentation can be fun with plugin system
okuramasafumi
0
120
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
140
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
BBQ
matthewcrist
87
9.5k
Into the Great Unknown - MozCon
thekraken
35
1.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
We Have a Design System, Now What?
morganepeng
51
7.4k
Adopting Sorbet at Scale
ufuk
74
9.2k
Typedesign – Prime Four
hannesfritz
40
2.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fireside Chat
paigeccino
34
3.2k
Optimizing for Happiness
mojombo
376
70k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Transcript
elixir elixir elixir A language for the future
1,000,000,000
None
None
None
None
None
None
None
largest city in the Americas the most populous city of
the southern hemisphere
None
None
None
Programming Languages
None
Elixir
?
João Moura @joaomdmoura
初⼼
beginner's mind
None
None
beginner's mind
EXPERTS
EXPERTS
None
The rules for software are CHANGING
None
None
None
None
The future is DYNAMIC 1.
1,000,000,000 ~
2 177 mm2
The future is Concurrent 2.
Threads, Processes and cores
multi-thread
None
Process
SHARED Memory
SHARED Memory
None
Cores
None
None
RaceConditions
None
None
None
Highly Concurrent
Easily distributable
Really fast (real time)
Almost no downtime
Self-healing and fault tolerant
Erlang
Erlang VM
Actor Model
FREAKING 30 YEARS
downtime A YEAR 31ms
ruby +
ruby + Erlang +
ruby + Erlang +Steroids
elixir elixir elixir
Functional “doing the same thing over and over again and
expecting different results” Albert Einstein
- Clear code - Transparency - Parallelization - Modularity -
Easier debugging
EXAMPLE I
a = 0 def increment a += 1 end RUBY
def increment(a) return a + 1 end RUBY
EXAMPLE II
indexes = [1, 2, 3] indexes << 4 indexes #
[1,2,3,4] RUBY
indexes = [1, 2, 3] new_indexes = indexes ++ [4]
Elixir
EXAMPLE III
result = func1(a, b) + func2(a, c)
func1(a, b) func2(a, c)
func1(a, b) func2(a, c) } parallelization
ELIXIR
PIPE OPERATOR
Ruby
Ruby
Ruby
Ruby
Elixir
Match Operator
Ruby
Ruby
Elixir
Elixir
Pattern Matching
Elixir
Elixir
Elixir
Elixir
Modules
Ruby
Ruby
Ruby
Elixir
Putting together
Elixir
Elixir
Elixir
Elixir
Elixir
Elixir
Elixir
Elixir
Elixir
Elixir "
Elixir
Elixir
Elixir
None
# OF PROCESSES
# OF PROCESSES # CALL FOR SPAWN AND BLOCKER
# OF PROCESSES # CALL FOR SPAWN AND BLOCKER #
SPAWN NEW PROCESSES
# OF PROCESSES # CALL FOR SPAWN AND BLOCKER #
SPAWN NEW PROCESSES # FUNCTION THE PROCESS EXECUTE
# OF PROCESSES # CALL FOR SPAWN AND BLOCKER #
SPAWN NEW PROCESSES # FUNCTION THE PROCESS EXECUTE # BLOCKER THAT GETS THE MESSAGE
None
1.500.000
None
WEB!
Rake + bundler
mix
mix test
mix phoenix.new
mix deps.get
gemfile.rb
mix.ex
None
Rails: req/s: 1,140.53 Stdev: 18.96ms Max latency: 159.43ms
Rails: req/s: 1,140.53 Stdev: 18.96ms Max latency: 159.43ms Pheonix: req/s:
12,120.00 Stdev: 3.35ms Max latency:43.30ms
Rails: req/s: 1 140 530 Stdev: 18.96ms Max latency: 159.43ms
Pheonix: req/s: 12 120 000 Stdev: 3.35ms Max latency:43.30ms
10.63x more throughput
This is good shit. “ “ Co-creator of Erlang Joe
Armstrong
The future is DYNAMIC
The future is Concurrent
Erlang VM
elixir elixir elixir
None
None
None
None
None
None
None
joaomdmoura.com #ElixirWithaRubyist @joaomdmoura