Heist
Yesterday I stumbled upon this: Heist, a Scheme interpreter in Ruby.
It looks pretty good; it’s certainly more advanced than my attempt at a Scheme interpreter in Python (which is, in turn, more advanced than Psyche, and will be released eventually, once I backport some of the dollop code to it). Apparently it supports (among other things) hygienic macros and continuations, features that haven’t yet made it into my interpreter.
On a side note, it’s interesting to see how different the Ruby code looks compared to Python code. Five years ago I would have said (and did say :-) that Python and Ruby are much more alike than unalike. They still are, but they surely encourage (and discourage) different programming practices and idioms.
nes said,
June 16, 2009 @ 12:37 pm
Ah a cliffhanger! Seriously, would you mind giving some examples of practices and idioms you found interesting when comparing?
Hans Nowak said,
June 16, 2009 @ 7:09 pm
Hm, well, the heavy use of DSLs would be one of them… also, Ruby allows for several constructs that are generally considered gratuitous/redundant in the Python world, like “unless”, “x if y”, the use of (arguably) non-intuitive operators rather than descriptive method names, etc. And Ruby likes functional idioms more than Python does (or rather, Guido ;-).
I’m not saying these are bad things, just that they allow for a different programming style.
(In fact, I might consider using Ruby more, if I wasn’t already too deep into exploring Lisp variants… :-)