Hi Austin,
> I would like to know:
> - What should I read?
Since Scheme is an old language the literature on Scheme compilers is
surprisingly rich.
Some of the classics (can't recommend these enough):
"Lisp in Small Pieces" by Christian Queinnec
This book is a delight to read - and even includes a chapter on
compiling to C.
"Three Implementation Models for Scheme" by R. Kent Dybvig
Dybvig's thesis. Very clear explanations. Explains how to implement
using a stack of frames (like C).
> - Expressing Scheme types in C data structures
Take a look at how Larceny represents Scheme values. The approach is fairly
typical.
http://www.larcenists.org/Documentation/Documentation0.97/LarcenyNotes/note2-repr.html
> Garbage collection vs. reference counting
Reference counting has problems with cyclic data that becomes dead.
A simple stop-copy garbage collector would be a good place to start.
"Programming Languages: Application and Interpretation" (PLAI( by Shriram
Krishnamurthi
has a chapter on memory management:
http://cs.brown.edu/courses/cs173/2012/book/Memory_Management.html
(There is a nice language for implementation garbage collectors available.
See http://blog.brownplt.org/2013/02/19/teaching-gc.html .
I can't find the linked exercises - have they moved?)
> Parsing input from characters & type of algorithm used
The Scheme Compiler Workshop has a section on writing a scanner and parser:
http://www.cs.indiana.edu/eip/compile/scanparse.html
--
Jens Axel Søgaard
2017-03-05 14:16 GMT+01:00 Austin T <[email protected]>:
> Hello,
>
> I am currently the lead developer on a student project that is doing an
> independent implementation of *R7RS* Scheme in C++11. I am looking at
> other Scheme implementations as we are currently tackling the first of the
> primitive expressions, and I would love to see how other people do it.
>
> We are taking a pointer-based tree model as our implementation for
> simplicity. One of our tentative and internal goals for the project is to
> create great documentation so that those that are looking into implementing
> languages can begin to learn by looking at a simple evaluation model.
>
> I would like to know:
>
> - What should I read? I tried reading some of the Racket Manifesto,
> but I care much more about the systems evaluation parts of the
> implemnetation for C. Namely:
> - Expressing Scheme types in C data structures
> - Disjoint types as defined by some specification of Scheme
> - Garbage collection vs. reference counting (we are using C++11's
> *std::shared_ptr* for now for reference counting)
> - Paradigms to storing and handling arbitrary lists and expressions
> - Parsing input from characters & type of algorithm used
> - What should be improved about the design of the C-based systems?
> - I am also looking at Chez Scheme. I've taken a look at Chibi as
> well, but it's really quite hard to find the design bits in the comments
> and documentation.
> - It's be great if I could find some presentations!
>
> If you're gotten here, thank you for reading! We are a small group at the
> University of Hawaii, and we would be glad to receive any sort of advice or
> help!
>
> Thank you,
> Austin Tasato
> UH Manoa Transpiler Project
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/racket-dev/964a694a-ef98-4327-b687-1b3f6f64f726%40googlegroups.com
> <https://groups.google.com/d/msgid/racket-dev/964a694a-ef98-4327-b687-1b3f6f64f726%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
--
Jens Axel Søgaard
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/CABefVgzpNj5n9Xbgamiwn0siWCTrz5PGKD73ZwQAVavbJ76RCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.