chapter two challenges

> 1. Pick an open source implementation of a language you like. Download the
> source code and poke around in it. Try to find the code that implements the
> scanner and parser. Are they handwritten, or generated using tools like Lex
> and Yacc? (.l or .y files usually imply the latter.)

Of course, I have to pick out Ruby's [parse.y][parse.y]. The file is 14k lines
long, so I have no idea where the scanner and parser are, and I think that
Bison is used for Ruby's YACC?

[parse.y]: https://github.com/ruby/ruby/blob/master/parse.y

> 2. Just-in-time compilation tends to be the fastest way to implement
> dynamically typed languages, but not all of them use it. What reasons are
> there to not JIT?

Probably simplicity first and foremost? I assume there's also at least slight
negative tradeoffs for runtime/memory as well.

> 3. Most Lisp implementations that compile to C also contain an interpreter
> that lets them execute Lisp code on the fly as well. Why?

Is this because Lisp has such a heavy REPL history/culture?

FossilOrigin-Name: 7177648dc716668fe15ac77d3f1ad1c03e5a3d7f6180415ee78de6b61fd9e0e9
private
alpha 2 years ago
parent ab87a04e02
commit fc55b0e6ee

Diff Content Not Available