Cyclone

Cheney on the M.T.A. with native threads.

Cyclone is a brand-new Scheme-to-C compiler that allows practical application development using R7RS Scheme. 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”.

Cyclone is the first compiler written entirely in the latest R7RS Scheme language standard, and the intent is to support as much of that language as possible.

Features

Getting Started

  1. To install Cyclone on your machine for the first time on Linux and Windows, 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, and Windows (via MSYS).

    Mac users wanting to use Homebrew can do the following:

    • 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

    Arch Linux users can install using the AUR.

  2. 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 Scheme->C compiler
           ,@             http://justinethier.github.io/cyclone/
           '@
           .@
            @@     #@     (c) 2014-2019 Justin Ethier
            `@@@#@@@.     Version 0.11
             #@@@@@
             +@@@+
             @@#
           `@.
        
     cyclone> (write 'hello-world)
     hello-world
    

    You can use rlwrap to make the interpreter more friendly, EG: rlwrap icyc.

  3. Read the documentation below for more information on how to use Cyclone.

Documentation

Example Programs

Cyclone provides several example programs, including:

Compiler Internals

Recent News

Released Cyclone Scheme 0.11.1

May 25, 2019
This release adds support for immutable objects.

Released Cyclone Scheme 0.11

April 16, 2019
This release includes updated build instructions for Mac as well as continued improvements to compiler performance and code validation.

Released Cyclone Scheme 0.10

March 28, 2019
This release improves performance of most compiled code.