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
130
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
330
Spreading my love for Elixir and State Machines
joaomdmoura
0
75
Unboxing Data Science (Short Verison)
joaomdmoura
0
96
Tackling Authentication with Phoenix
joaomdmoura
2
510
Desenvolvendo Produtos além das Metodologias Ágeis
joaomdmoura
1
75
Graph Theory Behind Immutable JS
joaomdmoura
0
670
E agora mobile?
joaomdmoura
0
76
(short version) Elixir By A Rubyist
joaomdmoura
0
230
Elixir by a Rubyist
joaomdmoura
5
410
Other Decks in Programming
See All in Programming
Oxlint JS plugins
kazupon
1
1.2k
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
2.2k
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
460
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
380
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
340
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
7.3k
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
530
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
AI巻き込み型コードレビューのススメ
nealle
2
2.5k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
Event Storming
hschwentner
3
1.3k
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
85
The Pragmatic Product Professional
lauravandoore
37
7.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The SEO Collaboration Effect
kristinabergwall1
0
380
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
300
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
The Language of Interfaces
destraynor
162
26k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
760
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
220
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
190
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