Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Scheme in JavaScript.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 psyntax
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
Octocat-spinner-32 dependencies.js
Octocat-spinner-32 grammar.js
Octocat-spinner-32 preparse.ss
README
FoxScheme

FoxScheme is a Scheme interpreter written in JavaScript.

Some key points include:

  * Proper support for recursion
    FoxScheme does not use the native JavaScript stack, which is often too
    small for interesting recursive problems. Tail calls are handled properly.

  * Minimal native (primitive) procedures
    Only procedures that must be implemented in JS out of necessity (cons) or
    obvious performance reasons (expt) are native. The rest is expected to be
    implemented in pure Scheme, which means fewer errors in native code.
 
  * Cleanliness and clarity
    FoxScheme is split into many discrete files, each being reasonably
    self-contained. The code attempts to be easily-readable where possible, and
    commented where not, allowing for easy modification and extension.
 
  * Self-containment
    FoxScheme attempts to be software in its own right, and does not rely on
    external libraries such as jQuery or Prototype.js. FoxScheme does its best
    not to pollute the global namespace or otherwise interfere with other JS
    software. There is no dependence on a browser; for example, early
    development was done using Rhino. This makes FoxScheme easy to embed in a
    web page.
 
  * Error-checking
    FoxScheme attempts to error-check as much of the user input as is
    reasonable. Many JS Schemes happily accept invalid syntax and other invalid
    input, which can be confusing to the user.

  * Unit testing
    FoxScheme has a growing unit-test suite using JSSpec that is run after
    every atomic change to the codebase.

Known issues:
 
  * No arithmetic stack
    All numeric computation is done with JavaScript numbers, which are 64-bit
    floating-point numbers.
 
  * Incomplete
    Currently, only a few native procedures are implemented for things like
    pairs, strings, vectors, and other basic values. There is currently no
    support for modules, macros, and so on. Stay tuned.

Contact:

    Eric Jiang <erjiang@indiana.edu>

Acknowledgements and References:

    Special thanks to Adam Foltzer and the people who frequent #scheme on
    FreeNode. BiwaScheme, by Yutaka Hara and the other BiwaScheme contributors,
    was an important inspiration and reference. Kent Dybvig's Petite Chez Scheme
    system and his assorted papers have been tremendously helpful. Also notable
    are Alex Yakovlev's jsScheme, Mark Probst's JScreme, and Jason Orendorff's
    Try Scheme, although no code from them was ultimately used. And, of course,
    The nice web-based REPL is Chris Done's jQuery Console.

  * #scheme on FreeNode
    irc://freenode.net/scheme

  * BiwaScheme
    http://www.biwascheme.org/
    http://github.com/yhara/biwascheme

  * Chez Scheme
    http://scheme.com/

  * R. Kent Dybvig
    http://www.cs.indiana.edu/~dyb/

  * jsScheme
    http://web.archive.org/web/20080119020130/http://alex.ability.ru/scheme.html 
    http://www.bluishcoder.co.nz/2006/05/scheme-implementation-in-javascript.html

  * JScreme
    http://schani.wordpress.com/2010/01/01/jscreme/

  * Try Scheme
    http://tryscheme.sourceforge.net/

  * jQuery Console
    https://github.com/chrisdone/jquery-console
Something went wrong with that request. Please try again.