Immutability, interactivity & JavaScript
summary
Claims that JavaScript engines' fast mutation enables persistent Vectors built from trees of arrays, with a 32-branching bitmapped vector trie that reaches ~34 billion indices in seven hops and updates by cloning only seven arrays. Implements this approach in Om (ClojureScript) + React and exposes it to JS via Mori library. Demonstrations: undo/redo for a todo app in a handful of lines, a 64×64 pixel editor with fast previews, and a memory test showing 1,000 saved frames as ~1.7 MB instead of ~210 MB.
AI-written summary · about
chapters (6)
- 0:00Start
- 7:46Functional Programming and Data
- 9:40Sharing structure
- 9:56Phil Bagwell
- 10:12Bitmapped Vector Trie
- 11:03Persistent Vector
related talks
33mImmutable data structures for functional JS
27mImmutable data structures for functional JS
45mJavaScript Immutability - "Don't Go Changing"
54mClojurescript and Om - Pragmatic functional programming in the Javascript Land
31mImmutable Data and React
41mThe ReactJS Landscape
24mmö.js - explaining js vm in js
36mRelevance of ClojureScript
