News for hackers. Stuff that matters.
Re:A Python Interpreter Written in Python (2016) by kazinator on Tuesday April 10, 2018 @02:26AM (#16799449)
You just need it to be a Lisp in order to do it in such a way that you get confused whether you're in the interpreted language or the host one.
Re:A Python Interpreter Written in Python (2016) by yorwba on Tuesday April 10, 2018 @04:08AM (#16799829)
Byterun confuses host and interpreter in plenty of places.

It uses the host Python for attribute resolution (all code in getters and setters runs on the host), exception handling (which combines with the previous point to make some NameErrors impossible to catch) and even function calls (but all functions are wrapped so that their _call__ switches back to byterun as the interpreter).

Because of that confusion, byterun isn't very useful if you want to be really independent from the host interpreter; it's just too easy to escape from the VM. As a learning exercise however, it is helpful for understanding Python's innards at a level higher than C.

Re:A Python Interpreter Written in Python (2016) by kazinator on Tuesday April 10, 2018 @09:57AM (#16801367)
I mean actually getting confused.