183 points · by gkst · 10y ago · 45 comments
I can't find the sources for this.
Incomplete, no .lisp file: http://www.s2.org/~chery/projects/lisp500/
Doesn't connect: http://modeemi.cs.tut.fi/~chery/lisp500/
The most accessible source for this currently seems to be a "lisp5000" project in GitHub: https://github.com/jackpal/lisp5000
This is a derivative work whose C code has been blown up to 1600+ lines.
1: https://web.archive.org/web/20040305005602/http://modeemi.cs...
If you use that kind of deception too often, people won't take you seriously any more very quickly.
import sys
if sys.version_info.major >= 3: raw_input = input
eval(raw_input())
Or, better, just use the six package.
Wrote this for fun a while back.
Say for instance you want to implement "printf". What's stopping you from just using printf?
Initially of course, a shortcut way is to leverage as much of the host language's features as possible, then eventually, as you move further into the bootstrap process, you will want to remove reliance on the host language.
Python by no means has the monopoly in elegant implementations of itself.
This is a pretty standard stack-based virtual machine. It is not particularly elegant, nor is the underlying language designed to be particularly elegant, much less have a monopoly on such. It's designed more for clarity and practicality.
For something on the same lines which is meant to be an elegant stack-based VM, see Forth. The description at http://yosefk.com/blog/my-history-with-forth-stack-machines.... is frequently cited on HN.
What makes this impressive is the medium of expression, like when an artist blows you away with a Biro drawing.
If someone wrote this in assembly in 500 lines or less (if that's even possible), it would be incredible.
It looks like a bog-standard stack VM to me. Why do you think it would be harder than this?