

Heist: a Scheme interpreter written in Ruby - swombat
http://github.com/jcoglan/heist/tree/master

======
kqr2
There is also bus scheme which is written in ruby:

[http://www.rubyinside.com/busscheme-ruby-scheme-
interpreter-...](http://www.rubyinside.com/busscheme-ruby-scheme-
interpreter-756.html)

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

~~~
lsb
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.

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

------
dasil003
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.

~~~
jcoglan
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.

------
metaguri
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.

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

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

------
dangrover
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.

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

~~~
jcoglan
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.

------
joe_the_user
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...

~~~
omouse
Or in Smalltalk? <http://ruby.gemstone.com/>

