My adventure with Elm
summary
Elm demo builds a playable Snake: keyboard arrows sampled at 20 frames per second feed foldp signals to produce a stream of full game states, a random seed spawns cherries, eating one appends a segment and collision with window.dimensions ends the game. The implementation compiles to JS/HTML, runs in the browser and grows correctly, but the time-traveling debugger accumulates 20 events/sec and Elm pre-1.0 breaking changes have broken demos in updates. Performance is reported comparable to top JS frameworks.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 1:34Functional Reactive Programming
- 3:34Managing Complexity
- 7:14State of Transformation
- 10:52Inspiration
- 20:29Union types
- 22:59Nested functions
- 24:43First signal
- 27:44Snake demo
- 28:17Standard rules
- 28:50Standard template
- 29:40Default user input
- 30:24Game state
- 31:10Map values
- 31:42Snake dimension
- 32:08Sheree
- 33:23Coordinates
- 33:50Sherry
- 34:25State Transition
- 34:53Pattern Matching
- 36:09Window Dimension
- 36:44Input Dimension
- 37:30Random Number Generation
- 38:39New Sherry
- 40:28The Snake
related talks
53mAdventures in Elm: Events, Reproducibility, and Kindness
37mElm and game development, a perfect fit
47mElm or how I learned to love front end development
26m"Building a Music Learning Game with Elm, Web MIDI, and SVG Animation"
18mEmulating the Nintendo Game Boy CPU with Elm
45mFunctional Reactive Programming in Elm
24mBuilding a Music Learning Game with Elm, Web MIDI, and SVG Animation
36mBuilding a Graphical IDE in Elm (...)
