Skip to content
Hacker News front page

A Python interpreter in 1024 bytes of C

Making a Python interpreter in 1024 bytes

Austin Henley hand-wrote a Python interpreter in 1024 bytes of C. It parses and executes source directly, no bytecode or AST. Supports def, if, while, for, print, integer math, and single-char variables. Loops and functions work by jumping back to source positions and re-parsing. The post doesn't spell out the full syntax subset, but it runs FizzBuzz.

Read the original ↗Export Markdown