mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 14:49:17 +02:00
129 lines
7.2 KiB
HTML
129 lines
7.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Cyclone Scheme: README</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Cyclone Scheme
|
|
 <span id="projectnumber">0.4</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">README </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p><a href="http://github.com/justinethier/cyclone"></a></p>
|
|
<p>Cyclone is a brand-new Scheme-to-C compiler that allows practical application development using R<sup>7</sup>RS Scheme. <a href="http://www.pipeline.com/~hbaker1/CheneyMTA.html">Cheney on the MTA</a> 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".</p>
|
|
<p>Cyclone is the first compiler written entirely in the latest R<sup>7</sup>RS Scheme language standard, with the intent to support as much of that language as possible.</p>
|
|
<h2>Getting Started </h2>
|
|
<ol type="1">
|
|
<li>To install Cyclone on your machine for the first time use <a href="https://github.com/justinethier/cyclone-bootstrap"><b>cyclone-bootstrap</b></a> to build a set of binaries.</li>
|
|
<li><p class="startli">After installing you can run the <code>cyclone</code> command to compile a single Scheme file: </p><pre class="fragment"> $ cyclone examples/fac.scm
|
|
$ examples/fac
|
|
3628800
|
|
</pre><p class="startli">And the <code>icyc</code> command to start an interactive interpreter: </p><pre class="fragment">$ 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
|
|
</pre><p class="startli">You can use <a href="http://linux.die.net/man/1/rlwrap"><code>rlwrap</code></a> to make the interpreter more friendly, EG: <code>rlwrap icyc</code>.</p>
|
|
</li>
|
|
<li>Read the documentation below for more information on how to use Cyclone.</li>
|
|
</ol>
|
|
<h2>Documentation </h2>
|
|
<ul>
|
|
<li>The User Manual covers in detail how to use Cyclone, and provides information and API documentation on the Scheme language features implemented by Cyclone.</li>
|
|
<li>docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017.md "Writing the Cyclone Scheme Compiler" provides high-level details on how the compiler was written and how it works.</li>
|
|
<li>There is a Development Guide with instructions for common tasks when hacking on the compiler itself.</li>
|
|
<li>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.</li>
|
|
<li>This <a href="http://ecraven.github.io/r7rs-benchmarks/benchmark.html">Benchmarks</a> page by <a href="https://github.com/ecraven">ecraven</a> compares the performance of Cyclone with other R<sup>7</sup>RS and R<sup>6</sup>RS Schemes using a common set of benchmarks.</li>
|
|
<li>Finally, if you need another resource to start learning the Scheme language you may want to try a classic textbook such as <a href="https://mitpress.mit.edu/sicp/full-text/book/book.html">Structure and Interpretation of Computer Programs</a>.</li>
|
|
</ul>
|
|
<h2>Example Programs </h2>
|
|
<p>Cyclone provides several example programs, including:</p>
|
|
<ul>
|
|
<li><a href="examples/tail-call-optimization.scm">Tail Call Optimization</a> - A simple example of Scheme tail call optimization; this program runs forever, calling into two mutually recursive functions.</li>
|
|
<li><a href="examples/threading">Threading</a> - Various examples of multi-threaded programs.</li>
|
|
<li><a href="examples/game-of-life">Game of Life</a> - The <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway's game of life</a> example program and libraries from R<sup>7</sup>RS.</li>
|
|
<li><a href="examples/game-of-life-png">Game of Life PNG Image Generator</a> - 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).</li>
|
|
<li>Finally, the largest program is the compiler itself. Most of the code is contained in a series of libraries which are used by <a href="cyclone.scm"><code>cyclone.scm</code></a> and <a href="icyc.scm"><code>icyc.scm</code></a> to create executables for Cyclone's compiler and interpreter.</li>
|
|
</ul>
|
|
<h2>License </h2>
|
|
<p>Copyright (C) 2014 <a href="http://github.com/justinethier">Justin Ethier</a>.</p>
|
|
<p>Cyclone is available under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>. </p>
|
|
</div></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|