Live Session: Live Coding a Bytecode Interpreter for Python
I will be redoing this session because the previous one had to be cancelled. Those who registered for the previous version are already aware of it and I will automatically add them to the list, they should receive their invites shortly.
Session Agenda
The goal of the session is quite ambitious. I want to live code a working compiler and VM for a very limited subset of Python in Python. The emphasis will be on the compiler and the VM, so we will reuse Python’s ast module for parsing.
I will have a bunch of unit tests consisting of small Python programs. At the beginning the tests will fail but we will incrementally implement features in the compiler and the VM to make those tests green one by one. I will discuss the relevant design of the compiler for each big feature. My goal is to be able to execute a program like this:
def add_1(x):
return x + 1
def make_42(x):
while x < 42:
x = add_1()
return x
x = 10
y = make_42(x)
print(y)
This means we will support these syntactic features:
Local and global scope variables
Function calls
If conditions
While loops
Comparison and arithmetic operators
The session length is capped at 2.5 hours, we will cover as much as we can in that time. It’s possible we might not be able to do everything promised above, but it will still be interesting.
Prerequisites
To get the most out of it, you should be proficient in programming, we will use recursion heavily. Familiarity with Python syntax will be helpful because all the code will be in Python.
Session Date & Time
December 14th, from 15:30 UTC to 18:00 UTC (or 21:00 pm to 11:30 pm Indian standard time).
How to Attend
Paid subscribers can RSVP at the link in the RSVP section below. If you are not a paid subscriber, simply upgrade to attend. But please RSVP only if you will be able to join live because there is no recording.
If you are interested in just this one session, then please consider buying a one time ticket instead of upgrading for one month.
Recording
I will not be uploading the recording anywhere, I will be happy to share it with the attendees for their reference. If you cannot attend this time, I might repeat in the future if there is demand.
RSVP Link
If you are a paid subscriber, you can register at the below link.