An implementation of Scheme subset written in Ruby. It's based on the Stack-Based model introduced in Three Implementation Models for Scheme by R. Kent Dybvig. The model is implemented by a compiler and virtual machine.
- first class closures
- global variables
- integers/symbols/cons cell/true/false
- variadic function
- call/cc(limitation exists)
- if
- basic arithmetic functions(+ - * /)
- set!
- tail call optimization
$ gem install rb-scheme
$ rb-scheme
You can use rlwrap for readline
$ rlwrap rb-scheme
$ rb-scheme examples/nqueen.scm
- numeric(
+
,-
,*
,/
) - predicate(
=
,<
,>
,null?
) - lisp operations(
cons
,car
,cdr
,list
) - print(
display
,newline
,print
)
see examples
folder
$ bundle install
$ rake test
The gem is available as open source under the terms of the MIT License.