Loading...

slow human interpreter


about

Slow Human Interpreter is a python interpreter like CPython, PyPy, or micropython... but much slower. It runs python code. Well, no it doesn't. It compiles python into printable instructions for a human to execute by hand. You have to actually do the computing.

The instructions are printed, cut, and arranged. The human performs operations on a stack (of index cards) based system.

It's sort of like setting up a complex board game.

Slow Human Interpreter only supports a very small subset of Python, and no includes or modules.

For your convenience, a human simulator has been provided. "Simulate Human" will compile the instructions and feed them back into a script that executes the code the same way as the printed instructions.

okay but why?

This tool was created by Hunter Dyar for use as an in-classroom activity.

CPUs, Virtual Machines, Bytecode, and what a program is doing when it executes are challenging concepts to grasp. The act of slowly, tediously, but carefully performing the acts of am interpreter/VM makes the acts a computer does extremely tangible.

Plus, it's fun! Well, depending on what code you choose to run. Once this activity stops being magical, and you start to notice that there are not any compiler optimizations, or you start to predict what the instructions will do... then you're learning!

Lastly, I love that it's real. It's impractical and silly, but it is real. As an educator, I could have animated these concepts or relied on my whiteboard. There's something that extra bit satisfying running code that you yourself wrote. (...so long as you didn't choose fibonacci!)


source and technical details. GPL-3.0 License.

This webpage runs entirely in your browser (via PyScript). No information is transferred to a server besides non-ad supported analytics, and downloading PyScript from a CDN.