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
54
Unboxing Data Science (Short Verison)
joaomdmoura
0
80
Tackling Authentication with Phoenix
joaomdmoura
2
480
Desenvolvendo Produtos além das Metodologias Ágeis
joaomdmoura
1
59
Graph Theory Behind Immutable JS
joaomdmoura
0
530
E agora mobile?
joaomdmoura
0
64
(short version) Elixir By A Rubyist
joaomdmoura
0
200
Elixir by a Rubyist
joaomdmoura
5
390
Other Decks in Programming
See All in Programming
事業KPIを基に価値の解像度を上げる
nealle
0
160
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
0
130
Носок на сок
bo0om
0
1.5k
型安全なDrag and Dropの設計を考える
yudppp
4
270
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
150
“技術カンファレンスで何か変わる?” ──RubyKaigi後の自分とチームを振り返る
ssagara00
0
170
SwiftDataのカスタムデータストアを試してみた
1mash0
0
150
Proxmoxをまとめて管理できるコンソール作ってみました
karugamo
0
140
Live Coding: Migrating an Application to Signals
manfredsteyer
PRO
0
130
ドメイン駆動設計とXPで支える子どもの未来 / Domain-Driven Design and XP Supporting Children's Future
nrslib
0
330
파급효과: From AI to Android Development
l2hyunwoo
0
170
generative-ai-use-cases(GenU)の推しポイント ~2025年4月版~
hideg
1
440
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Documentation Writing (for coders)
carmenintech
71
4.8k
Scaling GitHub
holman
459
140k
Building Applications with DynamoDB
mza
94
6.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Side Projects
sachag
453
42k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
A better future with KSS
kneath
239
17k
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