Software: Shoe - a Scheme driver
Fredrik Noring
R5RS

Shoe is a Scheme driver written by Fredrik Noring. It aims towards compliance. Many features are implemented, as well as a few extensions.

How can I get it?

Shoe can be fetched in two basic ways:

Shoe has been successfully compiled on the following operating systems: AIX 4.2, Digital Unix 4.0, Freebsd 3.2, HPUX 10.20, Irix 6.3, Linux Debian, Linux Redhat 6.0 and Solaris 2.5.1/2.6/7.

Shoe is distributed under the GNU General Public License.

What is Scheme? Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language. It was designed to have an exceptionally clear and simple semantics. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme.

What is ? is the ``Revised5 Report on the Algorithmic Language Scheme'' which describes the Scheme language.

How does it compare to Shoe? Shoe implements a large portion of . There are also a few additions:

  • Unicode, UTF8 and wide-strings are supported (very crudely so far).
  • Arbitrary precision integers are supported if GMP GMP is installed.
  • Vectors (and mappings) do not have to quoted, and unlike Guile, they are not implicitly quoted. Instead all values in a vector (and a mapping respectively) are evaluated. Example: #((+ 1 2 3 4) 42 'foo) ---> #(10 42 foo)
  • A new datatype called mapping. It behaves almost lika vectors, except that you may reference it using other types than integers. Mappings are in many cases almost as fast as vectors. Syntax: %(key1 : value2 key2 : value2 key3 : value3 ...) Subset of operations (similar to vectors): mapping-ref, mapping-set! mapping-remove!, mapping-length, mapping->list, list->mapping, mapping?, mapping-keys, mapping-values, mapping-copy

    Example:

    (define m %("flowers" : '(hepatica tulip) "planets" : '#(mercury venus earth) 'shoe : "Shoe is a Scheme driver" 4711 : "some value")) (mapping-ref m "flowers") ---> (hepatica lily) (mapping-ref m 4711) ---> "some value" (mapping-set! m 4711 42) (mapping-ref m 4711) ---> 42 (mapping-ref m "fruits") ---> #f (mapping-remove! m "flowers") (mapping-ref m "flowers") ---> #f m ---> %("planets" : #(mercury venus earth) 'shoe : "Shoe is a Scheme driver" 4711 : 42)

Some parts of will probably not be implemented:

  • Dynamic-wind is not supported.
  • Identifiers are case sensitive.
  • Strings are always immutable, e.i. `string-set!' and `string-fill!' are replaced with their non-destructive variants represented by `string-set' and `string-fill' respectively--both which return a newly allocated string.

Other technical details

  • The compiler is, almost, two-pass.
  • Strings and symbols are shared.
  • Eval compiles its expression before evaluating it.
  • Mappings are self-resizable, i.e. you don't have to worry about them being too small or too big.
  • The number notation of is supported and exceeded. You can for example type a binary float like `#b10.11e10'.
  • Exceptions using throw and catch are implemented.
  • The memory is managed using a combined mark-and-sweep and stop-and-copy garbage collector. The heap can both grow and shrink as needed.