From b2fceeeaa87d4561e19d2a97826b4a751bf01fd9 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 4 Jan 2017 21:07:48 -0500 Subject: [PATCH 01/13] Added TODO's --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 5005497c..520ce1fa 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -236,8 +236,11 @@ Heap objects are not relocated, making it easier for the runtime to support nati It took a long time to research and plan out all of this before it could be implemented. There was a noticeable lull in Github contributions during that time: +TODO: get rid of top graph +TODO: create a development section with 7 phases of compiler dev + Anyway, more details are available in a separate [Garbage Collector](Garbage-Collector.md) document. ### Heap Data Structures @@ -339,6 +342,8 @@ Cyclone targets the [R7RS-small specification](https://github.com/jus Some items to consider in the future are: +TODO: gambit GC (parallel with multiple collector threads) + - Implement more of r7rs-large, have started on data structures - Implement more libraries (TODO: industria for r7rs??) - Way to support eggs or other existing libraries? Is that possible or even worth the effort? From cfef93fd2a872a0003082530b95c874180357b01 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 4 Jan 2017 22:38:16 -0500 Subject: [PATCH 02/13] Updated image --- docs/images/cyclone-contribs.png | Bin 15841 -> 3703 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/images/cyclone-contribs.png b/docs/images/cyclone-contribs.png index 2cbbd3dabf1426cf3b06ce520ac3fe22f3b2756a..357ff3f1002cfd01ce1ecd798409800ae40ed175 100644 GIT binary patch literal 3703 zcmd5(%EMpsE553&n)yPv>8Y4?W$c!)} z={BJ0LzQ3J*$noeiVEm-Q(4 zOx{lR=Om z`Z%-{xwXk``}3IdFJd$S0AiAQ)51rgQOOnUD?GiUA7MKKiNBNye!wSeop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@X5m`baP zyc8L6EmNu&tk`XESQ%zFYDeRj@{JHt2Eka@qB70nK!=NIi0k)!xL`+ zpFpG;Evb(hsnW5|B=u-=H9hmeh(+gqO?V_{=hL^9;8tBsYhV$APnQ>#b0bjpC z0%ePG|MXTr zy(OwjYA|tkC768YajxuSNaO2IeWCgOZXJ$>4x!9=T94YQ9@mBW$I<7MfeagPRmeGT z#H4`tspNsq4N!%nuf-4vqg4XzGCLgT`fZ?k(8kC)FB-;7?iau$)711pv*p-@bK_B4 zdACc?b%R3Be-qIAUpRrF1DU)Q=*t*R)6eZJo(g0j!vuw4H;Sd?W5+|yUA7kuRQKIF zx$LS`cq0R&iaa*C=5a+Fuq5QTt%|OzQs+;A{10!F|9|)Yc82gIfV7|od;|a_4RqkW z2X`BQHCF)`8XD-|EO*imf&uvsfsZO96xRZ3_Wr*(fcf8?13AYd*rHYQ=pfqe9&)O< PGT`({%M*FWU2gv`tM4Fi From 451a2bbabb90bb74defeb54986289c451a773467 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 4 Jan 2017 22:40:04 -0500 Subject: [PATCH 03/13] WIP --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 520ce1fa..93a5729c 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -236,10 +236,17 @@ Heap objects are not relocated, making it easier for the runtime to support nati It took a long time to research and plan out all of this before it could be implemented. There was a noticeable lull in Github contributions during that time: -TODO: get rid of top graph TODO: create a development section with 7 phases of compiler dev +Phase 1 (gc-dev) - Add gc.h, make sure it compiles. +Phase 2 (gc-dev2) - Change how strings are allocated, to clean up the code and be compatible with a new GC algorithm. +Phase 3 (gc-dev3) - Change from using a Cheney-style copying collector to a naive mark&sweep algorithm. +Phase 4 (gc-dev4) - Integrating new tracing GC algorithm, added new thread data argument to runtime. +Phase 5 (gc-dev5) - Require pthreads library, stand cyclone back up using new GC algorithm. +Phase 6 (gc-dev6) - Multiple mutators (application threads) +Phase 7 (TBD) - Sharing of variables between threads (ideally without limitation, but that might not be realistic) + Anyway, more details are available in a separate [Garbage Collector](Garbage-Collector.md) document. From 14d62f57b02092d45c7a4d4c8c62e8bb6d29cf15 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 00:32:29 -0500 Subject: [PATCH 04/13] WIP --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 93a5729c..0662f6ff 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -311,9 +311,7 @@ Each thread has its own instance of the thread data structure and its own stack ### Call History -TODO: this is kind of a mess, need to rewrite this paragraph: - -Each thread maintains a circular buffer of call history that is used to provide debug information in the event of an error. The buffer consists of an array of pointers-to-strings and the compiler generates calls to `Cyc_st_add` to perform runtime updates. This function needs to be fast as this function is called all the time! So it does the bare minimum and adds a call by updating the pointer at the current buffer index and incrementing that index. +Each thread maintains a circular buffer of call history that is used to provide debug information in the event of an error. The buffer itself consists of an array of pointers-to-strings. Cyclone generates calls to runtime function `Cyc_st_add` as part of the compiled code to populate the buffer. This function must be fast as it is called all the time! So it does the bare minimum: update the pointer at the current buffer index and increment the index. ### Exception Handling From c770a21645da2c87b360a716f1550dc5899be70d Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 02:31:56 -0500 Subject: [PATCH 05/13] cleanup --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 0662f6ff..fc8ff271 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -301,9 +301,9 @@ At runtime Cyclone passes the current continuation, number of arguments, and a t - Thread state - Stack boundaries -- Jump buffer +- Cheney on the MTA jump buffer - List of mutated objects detected by the minor GC write barrier -- Major GC parameters - mark buffer, last read/write, etc (see next sections) +- Parameters for major GC - Call history buffer - Exception handler stack From 2d7c9ae0aa841b776ad379c7ace59585a1e125aa Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 02:36:52 -0500 Subject: [PATCH 06/13] Mention nanopass --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index fc8ff271..a9c3b6b1 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -109,7 +109,7 @@ Most of the transformations follow a similar pattern of recursively examining an ((app? exp) (reduce union (map search exp) '())) (else (error "unknown expression: " exp)))) -TODO: mention nanopass, which seems to be a better approach but is R6RS so not really an option for this project :( +The [Nanopass Framework](https://github.com/nanopass/nanopass-framework-scheme) was created to make it easier to write this type of code. Unfortunately Nanopass is written in R6RS and could not be used for this project. ### Macro Expansion From a56a32d02a4626ec4679a1d8fdd165ef2b345c01 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 02:42:05 -0500 Subject: [PATCH 07/13] Revisions --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index a9c3b6b1..56cf7ddd 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -87,7 +87,7 @@ The 90-minute compiler ultimately compiles the code down to a single function an To make Cyclone easier to maintain a separate pass is made for each transformation. This allows Cyclone's code to be as simple as possible and minimizes dependencies so there is less chance of changes to one transformation breaking the code for another. -Most of the transformations follow a similar pattern of recursively examining an expression. This is efficient as long as each sub-expression is only visited a single time. Here is a short example that searches for free variables. The point is not to show exactly what is going on here, but rather to present the pattern used by each of the transformations: +Most of the transformations follow a similar pattern of recursively examining an expression, which is efficient as long as each sub-expression is only visited a single time. Here is a short example that demonstrates the code structure: (define (search exp) (cond From ca5b0c8e80e6b2ea3ec7f8c29c0a27799042832e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:13:03 -0500 Subject: [PATCH 08/13] Revisions --- ...-the-Cyclone-Scheme-Compiler-Revision-1.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 56cf7ddd..7081949b 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -228,7 +228,7 @@ Here is a snippet demonstrating how C functions may be written using Baker's app Baker's technique uses a copying collector for both the minor and major generations of collection. One of the drawbacks of using a copying collector for major GC is that it relocates all the live objects during collection. This is problematic for supporting native threads because an object can be relocated at any time, invalidating any references to the object. To prevent this either all threads must be stopped while major GC is running or a read barrier must be used each time an object is accessed. Both options add a potentially significant overhead so instead Cyclone uses another type of collector for the second generation. -To that end, Cyclone supports uses a tri-color tracing collector based on the Doligez-Leroy-Gonthier (DLG) algorithm for major collections. The DLG algorithm was selected in part because many state-of-the-art collectors are built on top of DLG such as Chicken, Clover, and Schism. So this may allow for enhancements down the road. +To that end, Cyclone supports uses a tri-color tracing collector based on the Doligez-Leroy-Gonthier (DLG) algorithm for major collections. The DLG algorithm was selected in part because many state-of-the-art collectors are built on top of DLG such as Chicken, Clover, and Schism. So this may allow for further enhancements down the road. Under Cyclone's runtime each thread contains its own stack that is used for private thread allocations. Thread stacks are managed independently using Cheney on the MTA. Each object that survives one of these minor collections is copied from the stack to a newly-allocated slot on the heap. @@ -238,17 +238,17 @@ It took a long time to research and plan out all of this before it could be impl -TODO: create a development section with 7 phases of compiler dev -Phase 1 (gc-dev) - Add gc.h, make sure it compiles. -Phase 2 (gc-dev2) - Change how strings are allocated, to clean up the code and be compatible with a new GC algorithm. -Phase 3 (gc-dev3) - Change from using a Cheney-style copying collector to a naive mark&sweep algorithm. -Phase 4 (gc-dev4) - Integrating new tracing GC algorithm, added new thread data argument to runtime. -Phase 5 (gc-dev5) - Require pthreads library, stand cyclone back up using new GC algorithm. -Phase 6 (gc-dev6) - Multiple mutators (application threads) -Phase 7 (TBD) - Sharing of variables between threads (ideally without limitation, but that might not be realistic) +The actual development consisted of several distinct phases: +- Phase - Started with a runtime using a basic Cheney-style copying collector. +- Phase 1 - Added new definitions via `gc.h` and make sure everything compiles. +- Phase 2 - Changed how strings are allocated to clean up the code and be compatible with the new GC algorithm. This was mainly just an exercise in cleaning up cruft in the old Cyclone implementation. +- Phase 3 - Changed from using a Cheney-style copying collector to a naive mark&sweep algorithm. The new algorithm was based on code from Chibi Scheme, so it was already debugged and a solid foundation for future work. +- Phase 4 - Integrated a new tracing GC algorithm but do not activate it yet. Added a new thread data argument to all of the necessary runtime functions. +- Phase 5 - Required the pthreads library, and stood Cyclone back up using new GC algorithm. +- Phase 6 - Added SRFI 18 to support multiple application threads. -Anyway, more details are available in a separate [Garbage Collector](Garbage-Collector.md) document. +More details are available in a separate [Garbage Collector](Garbage-Collector.md) document. ### Heap Data Structures From 6736f5513718a2d235837f10522bd5f00d0b0547 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:15:55 -0500 Subject: [PATCH 09/13] Added new subsection --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 7081949b..9ccd6694 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -25,6 +25,7 @@ In addition, developing [Husk Scheme](http://justinethier.github.io/husk-scheme) - [Garbage Collector](#garbage-collector) - [Background: Cheney on the MTA](#background-cheney-on-the-mta) - [Cyclone's Hybrid Collector](#cyclones-hybrid-collector) + - [Developing the New Collector](#developing-the-new-collector) - [Heap Data Structures](#heap-data-structures) - [C Runtime](#c-runtime) - [Data Types](#data-types) @@ -234,7 +235,11 @@ Under Cyclone's runtime each thread contains its own stack that is used for priv Heap objects are not relocated, making it easier for the runtime to support native threads. In addition major GC uses a collector thread that executes asynchronously so application threads can continue to run concurrently even during collections. -It took a long time to research and plan out all of this before it could be implemented. There was a noticeable lull in Github contributions during that time: +More details are available in a separate [Garbage Collector](Garbage-Collector.md) document. + +### Developing the New Collector + +It took a long time to research and plan out the new GC before it could be implemented. There was a noticeable lull in Github contributions during that time: @@ -248,8 +253,6 @@ The actual development consisted of several distinct phases: - Phase 5 - Required the pthreads library, and stood Cyclone back up using new GC algorithm. - Phase 6 - Added SRFI 18 to support multiple application threads. -More details are available in a separate [Garbage Collector](Garbage-Collector.md) document. - ### Heap Data Structures Cyclone allocates heap data one page at a time. Each page is several megabytes in size and can store multiple Scheme objects. Cyclone will start with a small initial page size and gradually allocate larger pages using the Fibonnaci Sequence until reaching a maximum size. From c988950feccc8c63b8bcb6d9a8af734d0e0dc909 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:16:31 -0500 Subject: [PATCH 10/13] Start at 0 --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 9ccd6694..eb204f9f 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -245,7 +245,7 @@ It took a long time to research and plan out the new GC before it could be imple The actual development consisted of several distinct phases: -- Phase - Started with a runtime using a basic Cheney-style copying collector. +- Phase 0 - Started with a runtime using a basic Cheney-style copying collector. - Phase 1 - Added new definitions via `gc.h` and make sure everything compiles. - Phase 2 - Changed how strings are allocated to clean up the code and be compatible with the new GC algorithm. This was mainly just an exercise in cleaning up cruft in the old Cyclone implementation. - Phase 3 - Changed from using a Cheney-style copying collector to a naive mark&sweep algorithm. The new algorithm was based on code from Chibi Scheme, so it was already debugged and a solid foundation for future work. From 341881ef03abe876287cb65489e99fa1d35910f8 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:18:24 -0500 Subject: [PATCH 11/13] Revisions --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index eb204f9f..055489e7 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -246,11 +246,11 @@ It took a long time to research and plan out the new GC before it could be imple The actual development consisted of several distinct phases: - Phase 0 - Started with a runtime using a basic Cheney-style copying collector. -- Phase 1 - Added new definitions via `gc.h` and make sure everything compiles. +- Phase 1 - Added new definitions via `gc.h` and made sure everything compiles. - Phase 2 - Changed how strings are allocated to clean up the code and be compatible with the new GC algorithm. This was mainly just an exercise in cleaning up cruft in the old Cyclone implementation. -- Phase 3 - Changed from using a Cheney-style copying collector to a naive mark&sweep algorithm. The new algorithm was based on code from Chibi Scheme, so it was already debugged and a solid foundation for future work. +- Phase 3 - Changed from using a Cheney-style copying collector to a naive mark-and-sweep algorithm. The new algorithm was based on code from Chibi Scheme, so it was already debugged and a solid foundation for future work. - Phase 4 - Integrated a new tracing GC algorithm but do not activate it yet. Added a new thread data argument to all of the necessary runtime functions. -- Phase 5 - Required the pthreads library, and stood Cyclone back up using new GC algorithm. +- Phase 5 - Required the pthreads library, and stood Cyclone back up using the new GC algorithm for the first time. - Phase 6 - Added SRFI 18 to support multiple application threads. ### Heap Data Structures From 62aba2798c12ed1605e82e288310f854e5b6e490 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:19:52 -0500 Subject: [PATCH 12/13] Relocated paragraph --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 055489e7..3d71cfa0 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -8,8 +8,6 @@ This write-up is an attempt to provide a constructive background on the various Before we get started, I want to say **Thank You** to all of the contributors to the Scheme community. Cyclone is based on the community's latest revision of the Scheme language and wherever possible existing code was reused or repurposed for this project, instead of starting from scratch. At the end of this document is a list of helpful online resources. Without high quality Scheme resources like these the Cyclone project would not have been possible. -In addition, developing [Husk Scheme](http://justinethier.github.io/husk-scheme) helped me gather much of the knowledge that would later be used to create Cyclone. In fact the primary motivation in building Cyclone was to go a step further and understand how to build a full, free-standing Scheme system. At this point Cyclone has eclipsed the speed and functionality of Husk and it is not clear if Husk will receive much more than bug fixes going forward. Maybe if there is an interest from the community some of this work can be ported back to that project. - ## Table of Contents - [Overview](#overview) @@ -359,6 +357,8 @@ TODO: gambit GC (parallel with multiple collector threads) Andrew Appel used a similar runtime for [Standard ML of New Jersey](http://www.smlnj.org/) which is referenced by Baker's paper. Appel's book [Compiling with Continuations](http://www.amazon.com/Compiling-Continuations-Andrew-W-Appel/dp/052103311X) includes a section on how to implement compiler optimizations - many of which could still be applied to Cyclone. +In addition, developing [Husk Scheme](http://justinethier.github.io/husk-scheme) helped me gather much of the knowledge that would later be used to create Cyclone. In fact the primary motivation in building Cyclone was to go a step further and understand how to build a full, free-standing Scheme system. At this point Cyclone has eclipsed the speed and functionality of Husk and it is not clear if Husk will receive much more than bug fixes going forward. Perhaps if there is interest from the community some of this work can be ported back to that project. + ## Conclusion TODO: this section is completely out of date, a better reference would be benchmark results from r7rs-benchmarks From 979bc7b2c2f7f04f1e03a29c2582db9f7351c83a Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 5 Jan 2017 04:21:00 -0500 Subject: [PATCH 13/13] WIP --- docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 3d71cfa0..7a991b04 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -4,7 +4,7 @@ ###### by [Justin Ethier](https://github.com/justinethier) -This write-up is an attempt to provide a constructive background on the various components of Cyclone and how they were written. It is a revision of the [original write-up](Writing-the-Cyclone-Scheme-Compiler.md), written over a year ago in August 2015, when the compiler was self hosting but before the new garbage collector was written. So much time has passed that I thought it would be worthwhile to provide a brain dump of sort for everything that has happened in the last year and half. +This write-up is an attempt to provide a constructive background on the various components of Cyclone and how they were written. It is a revision of the [original write-up](Writing-the-Cyclone-Scheme-Compiler.md), written over a year ago in August 2015, when the compiler was self hosting but before the new garbage collector was written. So much time has passed that I thought it would be worthwhile to provide a brain dump of sorts for everything that has happened in the last year and half. Before we get started, I want to say **Thank You** to all of the contributors to the Scheme community. Cyclone is based on the community's latest revision of the Scheme language and wherever possible existing code was reused or repurposed for this project, instead of starting from scratch. At the end of this document is a list of helpful online resources. Without high quality Scheme resources like these the Cyclone project would not have been possible.