Hacker News new | ask | show | jobs
by pat_shaughnessy 4898 days ago
Absolutely - it is a pleasure to read. Someday I'd like to learn how another language is implemented, maybe JavaScript or something like Haskell, but I'm afraid the language source code will be much more difficult to understand than Ruby's is.
3 comments

You can maybe start with a Scheme parser, it's quite simple.
Interesting idea - thanks for the suggestion!
SICP - chapter 4.

http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-25.html...

One of the best chapters in any book I've ever read. So mindblowing.

Or if you prefer the video form, here:

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

http://ocw.mit.edu/courses/electrical-engineering-and-comput...

Yup, (re)reading SICP is definitely on my list!
Once you can read some C, I'd recommend reading over another bytecode interpreter, like mawk (Mike's AWK): http://invisible-island.net/mawk/ . Another good read is the TinyCC compiler (originally by Fabrice Bellard, who did QEMU among other things): http://savannah.nongnu.org/projects/tinycc . It's a small, mostly readable, fully functional C compiler.
Awesome links - thank you!