Cyclone Scheme is a brand-new compiler that allows real-world application development using the R7RS Scheme Language standard. We provide modern features and a stable system capable of generating fast native binaries.
Cheney on the MTA is used by Cyclone's runtime to implement full tail recursion, continuations, and generational garbage collection. In addition, the Cheney on the MTA concept has been extended to allow execution of multiple native threads. An on-the-fly garbage collector is used to manage the second-generation heap and perform major collections without "stopping the world".
Features
Support for the majority of the Scheme language as specified by the latest R<sup>7</sup>RS standard.
New features from R7RS including libraries, exceptions, and record types.
Built-in support for Unicode strings and characters.
Hygienic macros based on syntax-rules
Low-level explicit renaming macros
Guaranteed tail call optimizations
Native multithreading support
A foreign function interface that allows easy integration with C
A concurrent, generational garbage collector based on Cheney on the MTA
git clone https://aur.archlinux.org/cyclone-scheme.git
cd cyclone-scheme
makepkg -si
Build from Source
To install Cyclone on your machine for the first time on Linux, Windows, FreeBSD, and for Mac users wanting to install without using Homebrew, use cyclone-bootstrap to build a set of binaries. Instructions are provided for Linux, Mac, Windows (via MSYS), and FreeBSD 12.
Getting Started
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. Note you can use rlwrap to make the interpreter more friendly, EG: rlwrap icyc:
Game of Life PNG Image Generator - A modified version of game of life that uses libpng to create an image of each iteration instead of writing it to console. This example also demonstrates basic usage of the C Foreign Function Interface (FFI).
Finally, the largest program is the compiler itself. Most of the code is contained in a series of libraries which are used by cyclone.scm and icyc.scm to create executables for Cyclone's compiler and interpreter.
Compiler Internals
Writing the Cyclone Scheme Compiler provides high-level details on how the compiler was written and how it works.
There is a Development Guide with instructions for common tasks when hacking on the compiler itself.
Cyclone's Garbage Collector is documented at a high-level. This document includes details on extending Cheney on the MTA to support multiple stacks and fusing that approach with a tri-color marking collector.
The garbage collector was subsequently enhanced to support Lazy Sweeping which improves performance for a wide range of applications.