Hacker News new | past | comments | ask | show | jobs | submit login
Heist: a Scheme interpreter written in Ruby (github.com/jcoglan)
38 points by swombat on Feb 26, 2009 | hide | past | favorite | 14 comments



There is also bus scheme which is written in ruby:

http://www.rubyinside.com/busscheme-ruby-scheme-interpreter-...


Bus Scheme doesn't have continuations or macros; Heist has both. It also has tail recursion optimisation, which Bus Scheme is missing.


So, one of the new things about Scheme in the late 70s was having TCO in the spec. Strictly speaking, it's not Scheme (though it may be just another lisp1) if tail-recursion isn't baked in.


Another case of scheme in name only. Why does everyone call new lisp-1's scheme instead of lisp-1?


This looks like a very cool project and I'll definitely play around with it.

But I would be remiss if I didn't also mention that my expectations on the performance and memory characteristics of such a project terrify me a little.


You'd be right to be terrified, it's not exactly zippy. It's a toy, but I'm releasing it because it's got a couple of nice features (friendly REPL, lazy evaluation) and it's more complete in some areas than other toy Schemes I've tried. Also I figured it might be a nice example implementation for people who know Ruby. If you have optimisation suggestions or links to stuff I should read on the subject I'd be delighted.


Bravo. I am definitely going to try this out. A big barrier to entry for Scheme is getting a nice environment set up (you either have to tinker a lot, or just "trust" a pre-configured all-in-one environment and be at the mercy of the maintainer).

I think it could make having a simple, portable development environment for scheme much easier. Then you have a production environment for testing and deployment.


"A big barrier to entry for Scheme is getting a nice environment set up"

Dunno: DrScheme is very nice out-of-the-box.


There's a chapter in the Topher Cyll book "Practical Ruby Projects" on how to write a Scheme interpreter. Haven't gotten around to it yet though.


Would be nice if there were comments so you could use this as a learning tool.


Rest assured it will have more thorough documentation at some point, for my own benefit as much as anyone else's. Right now it's all very new and its internals are not that stable, so the only comments tend to be for stuff that followed a long debugging session to remind me why certain things are there. When it's more stable I'll do a better job of writing up how it works.


There's a toy prolog interpretter written in Ruby as well (http://eigenclass.org/hiki.rb?tiny+prolog+in+ruby).

What I'd really like to see is a Ruby interpretter written in Scheme - or Forth or Erlang or one of those other cool languages...


Or in Smalltalk? http://ruby.gemstone.com/


What about Clojure?

http://gist.github.com/55921




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

Search: