Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good question. I guess by "right" here I mean an implementation that I was happy with. Not nessesarily standards compliant or complete.

In my early attempts it was things like parsing which tripped me up. I'd implement something that broke the bracketed lists up into a list of tokens and then get stuck nesting those lists into an ast. Abandon an implementation for a while and then try again at the problem, often with a fresh implementation.

Then is was evaluating expressions, when to evaluate the arguments and exploring different approaches (fexprs).

I'd do these iterations across months and with different languages. First python then JavaScript, Ruby, C.

My favourite was the JavaScript implementation. Lisp code is literate and I bootstrapped most of the built in functions by exposing the environment as a cons tree (and working with cons trees internally in the interpreter).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: