Composing UNIX with Effect Handlers: A Case Study in Effect Handler Oriented Programming
summary
Implements a miniature UNIX in Links using algebraic effect handlers: defines a write operation and a basic_io handler that returns the accumulated file as a string, a status handler modeling exit codes, a session manager layering dynamic binding for su, a nondeterminism handler for fork returning lists of answers, and an interrupt+write wrapper to force time‑sharing. Six runnable examples (example0–example5) demonstrate concatenated outputs, short‑circuiting on exit, user switching, forked processes, and finally interleaved output — the handlers compose and the examples work as claimed.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:17Basic IO
- 6:39Premature Process Termination
- 9:45User Environments
- 12:09Substitute User Operations
- 15:27Multitasking
- 18:31Interrupt
- 21:49Injecting interrupts
related talks
14mTowards Cumulative Abstract Semantics via Handlers (Short Paper)
39mDesigning software with effects systems
34mLessons from Unix History
34mWhat UNIX Cost Us
51mTechniques for Wielding Data and Behaviors
33mExtensible Effects: A Leaner Cake for Purely Functional Code
01h 16mPolymorphism, Cohesion, and Coupling in C++
46mPractical Functional Programming in C++
