🌀 A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
Find a file
2016-04-07 23:49:34 -04:00
debug WIP 2016-03-12 00:13:27 -05:00
docs Relocated 2016-04-06 11:44:48 -04:00
examples Generalized 2016-04-01 00:31:39 -04:00
include/cyclone Support zero or one arg to numeric operations 2016-04-06 22:30:15 -04:00
scheme Added safety check 2016-04-06 14:59:37 -04:00
srfi Let collector know mutator is blocking 2016-02-23 20:09:51 -05:00
test-lib New test file 2015-08-14 01:48:14 -04:00
tests Do not have (write) automatically output a newline 2016-03-28 21:53:38 -04:00
.gitignore Initial file 2015-02-21 22:25:06 -05:00
AUTHORS initial file 2016-02-11 22:54:41 -05:00
bytevector-tests.scm Added bytevector-copy 2016-03-24 02:02:04 -04:00
cyclone.scm Use lib:idb 2016-03-30 01:00:43 -04:00
debug.sh Added temporary file 2016-02-23 20:01:02 -05:00
gc.c Refactoring 2016-04-01 21:48:01 -04:00
generate-c.scm Added header comment block. 2016-02-14 22:35:04 -05:00
icyc.scm Include libraries module 2016-03-29 22:10:42 -04:00
LICENSE Updated year 2015-07-22 21:30:15 -04:00
macro-testing.scm Stubs for parameter objects 2016-02-13 22:58:12 -05:00
Makefile Added (scheme complex) 2016-04-01 03:57:20 -04:00
Makefile.config Use separate configs for X86 / ARM (pi 2) 2015-12-29 23:14:09 -05:00
Makefile.config.raspberry-pi-2 Use separate configs for X86 / ARM (pi 2) 2015-12-29 23:14:09 -05:00
README.md Revisions 2016-04-06 22:45:58 -04:00
runtime.c Better handling of index fields 2016-04-07 23:49:13 -04:00
sync.sh Initial file 2016-01-30 22:35:20 -05:00
TODO Updated compiler benchmark 2016-04-07 01:44:37 -04:00

cyclone-scheme

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

The User Manual covers in detail how to use Cyclone, and provides information and API documentation on the Scheme language features implemented by Cyclone.

Writing the Cyclone Scheme Compiler provides high-level details on how the compiler was written and how it works.

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.

Finally, if you need another resource to start learning the Scheme language please try a classic textbook such as Structure and Interpretation of Computer Programs.

Benchmarks

The following benchmarks from Larceny give an indication how well Cyclone performs compared with other R7RS Schemes.

These benchmarks were recorded on a system with an Intel Core i5 CPU @ 2.20 GHz and indicate elapsed time. A longer bar indicates worse performance - however if there is no bar at all it means the benchmark could not be completed in a reasonable amount of time.

License

Copyright (C) 2014 Justin Ethier.

Cyclone is available under the MIT license.