:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We p...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
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".
There are several options available for installing Cyclone:
Cyclone can be run from a Docker Image:
docker run -it cyclonescm/cyclone bash
Mac (and Linux!) users wanting to use Homebrew can do the following.
Note if Homebrew is not already installed: follow the instructions at https://brew.sh/ to install the homebrew package manager.
brew tap cyclone-scheme/cyclone brew install cyclone-scheme/cyclone/cyclone-bootstrap
Arch Linux users can install using the AUR:
git clone https://aur.archlinux.org/cyclone-scheme.git cd cyclone-scheme makepkg -si
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.
After installing you can run the
cyclonecommand to compile a single Scheme file:
$ cyclone examples/fac.scm $ examples/fac 3628800
icyccommand to start an interactive interpreter. Note you can use
rlwrapto make the interpreter more friendly, EG:
:@ @@@ @@@@: `@@@@@+ [email protected]@@[email protected]@@ @@ @@ Cyclone Scheme->C compiler ,@ http://justinethier.github.io/cyclone/ '@ [email protected] @@ #@ (c) 2014-2019 Justin Ethier `@@@#@@@. Version 0.11 #@@@@@ [email protected]@@+ @@# `@.
cyclone> (write 'hello-world) hello-world
Read the documentation below for more information on how to use Cyclone.
cyclone-windspackage manager provides the ability to install packaged libraries and programs for Cyclone. See the cyclone-winds site for more information.
The Cyclone-Winds wiki contains a full list of packages with documentation.
The User Manual covers in detail how to use Cyclone and provides information on the Scheme language features implemented by Cyclone.
An API Reference is available for all libraries provided by Cyclone, including a complete alphabetical listing.
If you need a resource to start learning the Scheme language you may want to try a classic textbook such as Structure and Interpretation of Computer Programs.
Cyclone provides several example programs, including:
Tail Call Optimization - A simple example of Scheme tail call optimization; this program runs forever, calling into two mutually recursive functions.
Threading - Various examples of multi-threaded programs.
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).
icyc.scmto create executables for Cyclone's compiler and interpreter.
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.
Copyright (C) 2014 Justin Ethier.
Cyclone is available under the MIT license.