Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Scheme in Ruby. (github.com/jcoglan)
50 points by speek on July 9, 2010 | hide | past | favorite | 7 comments


I wrote a lengthy post about this earlier but it seems like i have closed the browser before posting :-/

Long story short, this one is exceptionally well done and the author seems like an actual Schemer, which is a major plus.

The interpreter doesn't have a prompt, so it looks stuck ;-)

I would use it if I was stuck in a Ruby shop; this is industrial strength stuff.


Heist is definitely one of the better-designed interpreter I've seen. I've been a James Coglan-fan ever since I stumbled upon it!

He also has an excellent video where he creates a Scheme interpreter in 15 minutes (no sound unfortunately): http://vimeo.com/4339116


Wow, that seems...backwards.


That was funny, the comment got upvoted and then downvoted. So perhaps I'm not the only one who would be interested to hear examples of situations in which one would want a Scheme interpreter implemented in Ruby. There isn't much of a rationale in the README. On the other hand, a Ruby interpreter implemented in Scheme would be interesting as an attempt to nail down the ever-elusive semantics of Ruby, if nothing else.

If, as another commenter mentioned, there are "Ruby shops" where one would have to sneak Scheme in through this mechanism, then I guess Ruby has truly reached the mainstream.


The rationale is that I wanted to learn how to write an interpreter, particularly some of the more challenging parts like tail recursion, macros, continuations and laziness. It's in Ruby because that's what I know best; it's not intended for production use as a replacement for Ruby, though I have used it myself to do a little code transformation and testing in Ruby apps.

So basically it's a toy, but one that I hope others can learn something from.


(

(

  (

    (

      (cool)

    )

   )

  )

)


Your parentheses look lonely :(.




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

Search: