Code from the live session I did for my Substack paid subscribers on 14th December on implementing a bytecode compiler and VM for a tiny subset of Python in Python.
We could only get to adding support for these features in 3 hours:
- Handling constants
- Handling assignments
- Handling binary ops
But it gave an overview of the general design of a bytecode compiler and VM, and how they work underneath.