View on GitHub

Cyclone

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

Download this project as a .zip file Download this project as a tar.gz file

Cyclone is an experimental Scheme-to-C compiler that uses a variant of the Cheney on the MTA technique to implement full tail recursion, continuations, and generational garbage collection. Unlike previous Cheney on the MTA compilers, Cyclone also allows 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".

Getting Started

  1. To install Cyclone on your machine for the first time use cyclone-bootstrap to build a set of binaries.

  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
           @@     @@     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.

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

Documentation

Example Programs

Cyclone provides several example programs, including:

License

Copyright (C) 2014 Justin Ethier.

Cyclone is available under the MIT license.