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
300
Spreading my love for Elixir and State Machines
joaomdmoura
0
56
Unboxing Data Science (Short Verison)
joaomdmoura
0
83
Tackling Authentication with Phoenix
joaomdmoura
2
480
Desenvolvendo Produtos além das Metodologias Ágeis
joaomdmoura
1
62
Graph Theory Behind Immutable JS
joaomdmoura
0
540
E agora mobile?
joaomdmoura
0
68
(short version) Elixir By A Rubyist
joaomdmoura
0
200
Elixir by a Rubyist
joaomdmoura
5
390
Other Decks in Programming
See All in Programming
5つのアンチパターンから学ぶLT設計
narihara
1
140
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
530
Result型で“失敗”を型にするPHPコードの書き方
kajitack
4
560
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
290
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
470
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
0
230
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
570
RailsGirls IZUMO スポンサーLT
16bitidol
0
130
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
690
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Ace a Technical Interview
jacobian
277
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Building Applications with DynamoDB
mza
95
6.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Adopting Sorbet at Scale
ufuk
77
9.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Thoughts on Productivity
jonyablonski
69
4.7k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
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