https://github.com/justinethier/cyclone Skip to content Sign up * Why GitHub? Features - + Code review + Project management + Integrations + Actions + Packages + Security + Team management + Hosting + Mobile + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics + Collections + Trending + Learning Lab + Open source guides Connect with others + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing Plans - + Compare plans + Contact Sales + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} justinethier / cyclone * Sponsor Sponsor justinethier/cyclone * Watch 27 * Star 598 * Fork 32 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. justinethier.github.io/cyclone/ MIT License 598 stars 32 forks Star Watch * Code * Issues 69 * Pull requests 0 * Discussions * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Wiki * Security * Insights master 152 branches 69 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/j] Use Git or checkout with SVN using the web URL. [gh repo clone justin] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @justinethier justinethier Issue #412 - Support cond-expand when importing deps ... c18ca25 Jan 3, 2021 Issue #412 - Support cond-expand when importing deps c18ca25 Git stats * 5,388 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Create FUNDING.yml Jul 21, 2019 docs Added release/package step Jan 2, 2021 examples Issue #412 - Fix expand within a cond-expand Sep 28, 2020 include/cyclone Allow (vector?) to recognize and disregard record types Dec 22, 2020 libs Renamed 'cvoid' to 'c-void' Jul 5, 2020 scheme Issue #412 - Support cond-expand when importing deps Jan 4, 2021 scripts Process new libs directory Jul 3, 2019 srfi Issue #428 - Removed obsolete (srfi 9) Dec 30, 2020 tests Issue #414 - Add tests for SRFI 128 / 162 Sep 30, 2020 third-party/libtommath-1.2.0 Remove unused file Oct 23, 2019 .gitignore Fixing .gitignore so that test.txt doesn't get added to git tree Feb 3, 2017 .travis.yml Avoid syntax errors Nov 18, 2020 AUTHORS Revise notes for upcoming release Dec 29, 2020 CHANGELOG.md Issue #412 - Support cond-expand when importing deps Jan 4, 2021 CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jul 2, 2017 Dockerfile Prep for new release Jan 2, 2021 Doxyfile Update version number Aug 14, 2020 DoxygenLayout.xml New file Feb 24, 2017 FUTURE Removed all traces of array-list from core May 27, 2020 LICENSE Updated year Jul 23, 2015 Makefile Issue #428 - Removed obsolete (srfi 9) Dec 30, 2020 Makefile.config Issue #351 - Prevent warnings when compiling with clang Feb 28, 2020 Makefile.config.raspberry-pi-2 Use our local library Oct 17, 2019 README.md Update elevator pitch Jul 1, 2020 cyclone.scm Recompute library dep tree after macro expansion Nov 19, 2020 ffi.c Cleanup comments Aug 14, 2020 gc.c Added record_tag Dec 21, 2020 generate-c.scm Added header comment block. Feb 15, 2016 hashset.c Initial file Dec 19, 2018 icyc.scm Missing parenthesis in let* May 30, 2020 mstreams.c Remove extraneous chars Oct 9, 2019 runtime.c Issue #430 - Ensure collection of vector fill Dec 24, 2020 sync.sh Successfuly installed and tested Cyclone on FreeBSD 12.0 with clang 6... Jul 29, 2019 test-lib-dep.scm Build out recompilation logic Jan 3, 2020 View code README.md Cyclone Scheme Travis CI Github CI - Linux Github CI - MacOS Github CI - MacOS Homebrew Github CI - Windows Cyclone Scheme is a brand-new compiler that allows real-world application development using the R^7RS 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^7RS standard. * New features from R^7RS 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 * Includes an optimizing Scheme-to-C compiler, * ... as well as an interpreter for debugging * A Package Manager and a growing list of packages. * Support for many popular SRFI's * Online user manual and API documentation * Support for Linux, Windows, FreeBSD, and Mac platforms. * Known to run on x86-64, x86, and Arm (Raspberry Pi) architectures. Installation There are several options available for installing Cyclone: Docker Docker Cyclone can be run from a Docker Image: docker run -it cyclonescm/cyclone bash Homebrew Homebrew 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 Arch Linux Arch Linux users can install using the AUR: git clone https://aur.archlinux.org/cyclone-scheme.git cd cyclone-scheme makepkg -si Build from Source 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: $ icyc :@ @@@ @@@@: `@@@@@+ .@@@+@@@ @@ @@ Cyclone Scheme->C compiler ,@ http://justinethier.github.io/cyclone/ '@ .@ @@ #@ (c) 2014-2019 Justin Ethier `@@@#@@@. Version 0.11 #@@@@@ +@@@+ @@# `@. cyclone> (write 'hello-world) hello-world Read the documentation below for more information on how to use Cyclone. Package Manager Cyclone Winds The cyclone-winds package 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. 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. * Finally, this benchmarks page by ecraven compares the performance of Cyclone with other Schemes. Example 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 - The Conway's game of life example program and libraries from R^7RS. * 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. License Copyright (C) 2014 Justin Ethier. Cyclone is available under the MIT license. About 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. justinethier.github.io/cyclone/ Topics scheme r7rs compiler c garbage-collector cyclone-scheme Resources Readme License MIT License Releases 69 tags Sponsor this project * https://www.paypal.me/justinethiermd Packages 0 No packages published Contributors 12 * @justinethier * @arthurmaciel * @ararslan * @adamfeuer * @ofosos * @jasonmacduffie * @yurapyon * @seepel * @lassik * @wasamasa * @lluixhi * @0-8-15 Languages * Scheme 60.1% * C 39.5% * Other 0.4% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Help * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.