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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
João Moura
June 23, 2017
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir a Language for the Future
João Moura
June 23, 2017
More Decks by João Moura
See All by João Moura
State Machines in Elixir
joaomdmoura
0
340
Spreading my love for Elixir and State Machines
joaomdmoura
0
85
Unboxing Data Science (Short Verison)
joaomdmoura
0
110
Tackling Authentication with Phoenix
joaomdmoura
2
530
Desenvolvendo Produtos além das Metodologias Ágeis
joaomdmoura
1
92
Graph Theory Behind Immutable JS
joaomdmoura
0
690
E agora mobile?
joaomdmoura
0
97
(short version) Elixir By A Rubyist
joaomdmoura
0
240
Elixir by a Rubyist
joaomdmoura
5
420
Other Decks in Programming
See All in Programming
AIで効率化できた業務・日常
ochtum
0
140
1B+ /day規模のログを管理する技術
broadleaf
0
100
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
890
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
350
Inside Stream API
skrb
1
740
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.3k
ふつうのFeature Flag実践入門
irof
8
4.1k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
Oxcを導入して開発体験が向上した話
yug1224
4
320
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Side Projects
sachag
455
43k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
Building AI with AI
inesmontani
PRO
1
1.1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Designing for humans not robots
tammielis
254
26k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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