debug | ||
docs | ||
examples | ||
include/cyclone | ||
scheme | ||
tests | ||
.gitignore | ||
cyclone.scm | ||
generate-c.scm | ||
icyc.scm | ||
LICENSE | ||
Makefile | ||
Makefile.config | ||
README.md | ||
runtime.c | ||
test.scm | ||
test2.scm | ||
TODO |
Cyclone is an experimental Scheme-to-C compiler that uses the Cheney on the MTA technique to implement full tail recursion, continuations, and generational garbage collection.
Getting Started
-
To install Cyclone on your machine for the first time use cyclone-bootstrap to build a set of binaries.
-
After installing you can run the
cyclone
command to compile a single Scheme file:$ cyclone examples/fac.scm $ examples/fac 3628800
And the
icyc
command to start an interactive interpreter:$ icyc :@ @@@ @@@@: `@@@@@+ .@@@+@@@ Cyclone @@ @@ An experimental Scheme compiler ,@ https://github.com/justinethier/cyclone '@ .@ @@ #@ (c) 2014 Justin Ethier `@@@#@@@. Version 0.0.1 (Pre-release) #@@@@@ +@@@+ @@# `@. cyclone> (write 'hello-world) hello-world
You can use
rlwrap
to make the interpreter more friendly, EG:rlwrap icyc
. -
If you need help learning the Scheme language try a classic textbook such as Structure and Interpretation of Computer Programs.
Also, check out the features page for a list of language features currently implemented.
Documentation
Features is a list of the language features implemented so far. For more information about the Scheme language implemented by Cyclone, see the R7RS Scheme Specification.
The Development Guide contains instructions for hacking on Cyclone.
Writing the Cyclone Scheme Compiler provides high-level details on how the compiler was written and how it works.
References
- CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A., by Henry Baker
- CHICKEN Scheme
- Chibi Scheme
- Compiling Scheme to C with closure conversion, by Matt Might
- Lisp in Small Pieces, by Christian Queinnec
- R5RS Scheme Specification
- R7RS Scheme Specification
- Structure and Interpretation of Computer Programs, by Harold Abelson and Gerald Jay Sussman
- The 90 minute Scheme to C compiler, by Marc Feeley
License
Copyright (C) 2014 Justin Ethier.
Cyclone is available under the MIT license.