Skip to content

Comment on Making a Python interpreter in 1024 bytesparent

Comments

but using the source itself as the target of function calls and loops is new to me

This was standard practice on interpreters for 8-bit microcomputers; with only a 64K total address space, creating an AST first seems immensely wasteful, so you interpret from the source directly.

I believe shells still do this when you run shell scripts; I know the DOS COMMAND.COM definitely does.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.