Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
another dirty Scheme interpreter
C Scheme Other
tree: 25f9aa5384

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
lib
periodic
profile
sicp
test
.gitignore
LICENSE
README.md
boolean.c
character.c
charcache.c
charcache.h
compound.c
config.h
cont.c
cont.h
env.c
env.h
eof.c
eval.c
eval.h
fixnum.c
flonum.c
frame.c
gc.c
gc.h
hashtbl.c
hashtbl.h
init_obj.c
intcache.c
intcache.h
ioproc.c
ioproc.h
list.c
loc
log.h
macro.c
main.c
makefile
mathproc.c
mathproc.h
mem.c
mem.h
object.h
objstream.c
objstream.h
port.c
primitive.c
procdef.c
procdef.h
reader.c
reader.h
repl.c
repl.h
sform.c
sform.h
sstream.c
sstream.h
stack.c
stack.h
string.c
strproc.c
strproc.h
symbol.c
vecproc.c
vecproc.h
vector.c
write.c
write.h

README.md

Another Dirty Scheme Interpreter

"We were actually trying to build something complicated and discovered, serendipitously, that we had accidentally designed something that met all our goals but was much simpler than we had intended....we realized that the lambda calculus--a small, simple formalism--could serve as the core of a powerful and expressive programming language." -- Sussman and Steele

Writing a Scheme interpreter is easy, and more importantly, it is fun.

Features currently included:

  • lambda, of course
  • integer(32 bit), floating-point numbers, string, symbol, boolean, character, pair, vector
  • basic number/mathematical functions
  • basic input/output support
  • basic string/character procedures
  • vector procedures in R5RS
  • most list procedures in MIT Scheme
  • cond, if, let, begin, and, or, define, set!, apply, eval...
  • var-arg
  • mark-sweep garbage collector
  • continuation
  • macro(define-macro)
  • promise(delay, force)

Install:

make
sudo make install
asc

Documentation:

If you already know Scheme, just start typing code in the REPL. Or you can read the R5RS. here

Todo list:

  • rename files, remove "sc" prefix [DONE]
  • add gc support [DONE]
  • add cache for integer objects [DONE]
  • add cache for character objects [DONE]
  • add floating point support [DONE]
  • add var-arg support [DONE]
  • improve logger [DONE]
  • modify equal? eq? eqv? [DONE]
  • add / primitive procedure [DONE]
  • add math primitive functions [DONE]
  • add character procedures [DONE]
  • add gcd, lcm procedures [DONE]
  • add (runtime) procedure [DONE]
  • add more list procedures [DONE]
  • add string functions [DONE]
  • add (display) procedure [DONE]
  • improve io support [DONE]
  • add vector support [DONE]
  • rewrite environment using rbtree(variable lookup is too slow) [DONE] ~2x speedup
  • call/cc [DONE]
  • macro support [DONE]
  • command line options [DONE]
  • make install [DONE]

Thanks for Peter Michaux's excellent introduction series.

Something went wrong with that request. Please try again.