

Undo-Redo and Persistent State with Tom Ballinger
Jul 12, 2024
Tom Ballinger discusses undo and redo in REPLs, stateful systems, hot code loading, and database query planning. Topics include using Redis for undo operations, managing persistent state in a REPL environment, enabling time-rewind mechanisms in games, maintaining determinism in software projects, and cache invalidation in web applications.
AI Snips
Chapters
Transcript
Episode notes
Undo in REPLs
- Tom Ballinger introduced undo functionality to REPLs like IRB and Python using fork.
- He demonstrated this at BangBangCon but hasn't productionized it due to memory overhead.
Copy-on-Write Semantics
- The OS's copy-on-write semantics at the page level enable memory sharing after forking.
- Memory is only copied when a process modifies a shared page, impacting write performance.
Shared Memory for REPL State
- Richard Feldman suggests storing REPL state in shared memory for persistence across forked processes.
- This approach would preserve history and other REPL states after undo operations.