A detailed walkthrough of building a toy implementation of the BEAM virtual machine from first principles. Covers implementing core primitives like process spawning, message passing with selective receive, preemptive scheduling using reduction budgets, and process linking. Written in Elm using continuation-passing style to avoid building a full compiler, focusing on the scheduler's main loop and demonstrating how BEAM's concurrency features work together.
Table of contents
AST representationInstruction: EndInstruction: WorkInstruction: SpawnReduction budgetInstruction: SendInstruction: ReceiveInstruction: Crash , LinkConclusionSort: