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
Building a game with Elixir and Elm
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Paulo Diniz
September 08, 2017
Programming
0
70
Building a game with Elixir and Elm
Building a game with Elixir and Elm
Paulo Diniz
September 08, 2017
Tweet
Share
More Decks by Paulo Diniz
See All by Paulo Diniz
Functional Programming in FrontEnd
paulodiniz
0
130
Vim + tmux for Brazilian Training Center
paulodiniz
1
52
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
690
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
AI & Enginnering
codelynx
0
120
Grafana:建立系統全知視角的捷徑
blueswen
0
330
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Raku Raku Notion 20260128
hareyakayuruyaka
0
350
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
180
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
210
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
CSC307 Lecture 02
javiergs
PRO
1
780
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
2.7k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Un-Boring Meetings
codingconduct
0
200
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Done Done
chrislema
186
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
76
WENDY [Excerpt]
tessaabrams
9
36k
[SF Ruby Conf 2025] Rails X
palkan
1
760
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Transcript
Hi ! I'm Paulo
Born
Live
Work
Like
Like
Like
Like
Functional Programming Fits my mental map Many languages have it
It feels right for me
Elixir Enum.map(["1", "2", "3"], &(String.to_integer &1)) => [1, 2, 3]
Ruby ['1', '2', '3'].map(&:to_i) => [1, 2, 3]
Javascript ['1', '2', '3'].map(parseInt) => [ 1, NaN, NaN ]
Couldn't apply my mental models directly ! Note: Javascript community
❤ Note2: Underscore.js ❤ Note3: Ramda ❤ Note4: React ❤
Maybe I should try to use another language? Elm Clojurescript
PureScript ElixirScript
I used Elm to make a game
None
Elixir on server Phoenix websockets OTP Also matched my mental
model
updateFlappy : Game -> ( Game, Cmd Msg ) updateFlappy
game = game |> gravity |> physics |> upperLimit |> checkPipeColision |> updatePipes |> updateScore
updateScore : Game -> ( Game, Cmd Msg ) updateScore
game = let score = game.pipes |> List.filter (\pipe -> pipe.passed == True) |> List.length |> (\x -> x // 2) in if (game.score == score) then ( game, Cmd.none ) else { game | score = score } |> update SendScore
Server top_players = players |> Enum.sort(fn(p1, p2) -> p1.score >
p2.score end) |> Enum.take(3)
Wrapping up I'm not confortable with JS If you're also
not, try other languages Make games, they're awesome https://paulodiniz.github.io/flappy-bird/
Thank you twitter: @paulodiniz github: paulodiniz