Mechanics of Sophie
This chapter contains notes on the design and implementation of nontrivial subsystems. I’ll add notes as they seem necessary while the overall system fills out.
Note
If you just want to use Sophie, you can skip this section. If you want to make Sophie better, or apply Sophie ideas in your own language, read on.
Contents:
- Respectable Error Messages
- Resolving Imports
- High-Order Type Checking (HOT)
- Tree-Walking Evaluation with Modules
- Division by Zero and Other Stories
- The Message Queue
- The Original and Current Naive Message Queue
- The Obvious, But Incomplete, Next Step
- Actors Are Not Threads!
- A Simple Approach:
- Shutting Down
- Pinning Actors to Particular Threads
- Naked Procedures
- Something More Sophisticated?
- Honor Among Thieves: A Kinder, Gentler Work-Stealing Scheduler
- Pinned Actors and Work-Stealing
- Work-Stealing and Shut-Down
- Fairness in a Work-Stealing Environment
- Conclusions
- How the Runtime Casts Actors
- Strictness and Volatility
- Sophie’s Virtual Machine
- Garbage Collection
- Garbage Collection - The Next Generation
- NaN Boxing
- Graphics in Sophie’s VM
- Laziness and the Virtual Machine
- Actors and the Virtual Machine
- Representing an AST Efficiently