HN Hall of Fame Weekly email

A Python Interpreter Written in Python (2016)

aosabook.org Books & learning Tutorials & guides Computer science Candidate
Screenshot of aosabook.org captured 2026-07-20
Page preview · captured 2026-07-20

The originally submitted URL now redirects to the address above. Updating the destination does not change the item’s HN history, Hall membership, or rank.

Resurfaced independently across 7 calendar years, with breakout response in 2 of them.

submissions
7
submitters
7
observed span
2015–2026
peak thread · 54 comments
181 pts
latest 20+ return · 2026-04-13
157 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

I found this code very useful. I've been spelunking in CPython and mostly I understand it, and can find my way around. But ceval.c is another beast entirely, being full of macros and gotos, not to mention being 5000 lines long. The interpreter loop starts here: https://github.com/python/cpython/blob/master/Python/ceval.c... So I appreciate seeing the algorithm laid out in Python. In particular it clarifies that there are three separate stacks: 1. call stack 2. block stack for try/except, loops, etc. 3. value stack…

chubot·181-point thread·

> Byterun is a Python interpreter written in Python. This may strike you as odd, but it's no more odd than writing a C compiler in C. I'm not so sure. The difference between a self-hosted compiler and a circular interpreter is that the compiler has a binary artifact that you can store. With an interpreter, you still need some binary to run your interpreter, which will probably be CPython, making the new interpreter redundant. And if you add a…

BoppreH·157-point thread·

What an excellent 500 lines introduction to the byterun bytecode interpreter / virtual machine: https://github.com/nedbat/byterun Also, proceeds from optional purchases of the AOSA books go to Amnesty International. https://aosabook.org/

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
353

reference only — not used in Hall rules or ranking

Total comments
96

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2015-11-26500 Lines or Less – A Python Interpreter Written in Pythonleephillips30
2016-04-16A Python Interpreter Written in Python0xmohit30
2017-04-11A Python Interpreter Written in Pythoncristoperb40
2018-04-09A Python Interpreter Written in Python (2016)First breakout · Best threadjstrieb18141
2019-09-21A Python Interpreter Written in Pythonnnnmnten21
2024-02-18A Python Interpreter in 500 lines of Pythontosh30
2026-04-13A Python Interpreter Written in PythonLatest 20+ point returnxk315754