Hacker News new | ask | show | jobs
by simen 2936 days ago
You could begin with 500 lines or less: http://www.aosabook.org/en/500L/a-python-interpreter-written...

It implements a naive, simplified Python VM in Python. Of course, that is only a very high-level overview. By necessity it handwaves a ton by just relying on the underlying Python (like GC). For a more in-depth look, you can check out PyPy's dev docs (http://doc.pypy.org/en/latest/). PyPy is an alternative to CPython, so it does many things very differently (some in a way that have never been done in prog lang implementation before), but the docs do make comparisons to CPython.