<div>(dear ml, please see the question to you highlighted in green below)</div><div><br></div><div><div class="gmail_quote">2012/6/8 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mikael.  Sorry for the long silence... I've been rather busy lately.<br>
<br>
As you might expect documenting all of the inner workings of Gambit is a major endeavor.  You will find in my publications some of the most important design strategies that were used while building Gambit.  I know that it doesn't cover all aspects, and some important things are yet to be published.<br>



<br>
Currently I don't have time for an open-ended documentation effort.  However, I am willing to invest a few hours a week to explain the design strategies that users care to know about.<br>
<br>
So how about this...  someone should create a wiki page with an ordered wish list of specific things to document.  Every week I will pick the next thing off of the list and reply to the ML.<br></blockquote><div><br></div>

<div><div>Cool, great!</div><br class="Apple-interchange-newline"></div>
<div>The way you propose sounds like it makes a lot of sense.</div><div><br></div><div>I intend to put something like this together soon. If others would make sth like this I suppose just kind of merging the two would be fine.</div>

<div><br></div><div><span style="background-color:rgb(153,255,153)">Anyone please feel free to suggest questions or angles on subjects that should be addressed in this document, so that these will be covered too.</span></div>

<div><span style="background-color:rgb(153,255,153)"><br></span></div><div><span style="background-color:rgb(153,255,153)">So basically, what about Gambit have you always wanted to get a good understanding of (and which is not quite obvious from looking at Gambit's sourcecode), and what are the questions that would take you to getting this understanding?</span></div>

<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By the way, in the list of publications you forgot to put my PhD which documents the implementation of futures (<a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyPhD.pdf" target="_blank">http://www.iro.umontreal.ca/~feeley/papers/FeeleyPhD.pdf</a>).<br>

</blockquote><div><br></div><div>Ah right, current Gambit has a the |future| form so it's clearly in the current version indeed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Marc<br></blockquote><div><br></div><div>Brgds, Mikael</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
<br>
On 2012-05-27, at 10:13 AM, Mikael wrote:<br>
<br>
> Hi,<br>
><br>
> In the purpose of making it clear and easy-enough for the unintroduced to understand the inner workings of Gambit in its current version, it'd be great to know what strategies/philosophies, papers  and other reference documents underly Gambit - its compiler, environment and so on, beyond the Scheme (R5RS etc.) and SRFI specs.<br>



><br>
> I'd be happy to make a Wiki page, Theory and papers, or alike, of this.<br>
><br>
> My best understanding is that compilation to C/asm of Scheme with callcc support generally is perceived as a process that's intricate and of an abstract nature, asking this quite a lot therefore. :-)<br>
><br>
><br>
> The papers I'm aware of are basically those on Marc's homepage and those listed by Alex below. And, beyond knowing which they are, it'd be great to have a clue of how central the respective paper is in Gambit's particular design / how strictly it was adhered to, on the scale from directly/being implemented as it is to indirectly/used rather for inspiration.<br>



><br>
> Things whose answers can be found in the papers would include:<br>
>  * How the internal value, object, procedure and closure representations look and fit together<br>
>    Closures effectively special-purpose vectors of boxes?<br>
>    All values and object references are internally native-size integers with a number of reserved bytes describing the value type, what about them?<br>
>  * Value and object allocations, made how and what optimizations for fast dead object detection and subsequent reclaim are there<br>
>  * The layout of the asm/C-level stack and trampolines and how the GC resolves the locations of all object reference, anatomy of a procedure call and return<br>
>  * How the CPS transformation works<br>
>  * What optimizations are made, in terms of register use optimizations, compile-time pre-evaluation or deductions of datatype<br>
>    At some point I got that generally |cdr| is translated to +1 in asm/c, for instance<br>
>  * What does the internal form of interpreted code actually look/work like<br>
>  * Interrupt checks, made provenly at what granularity<br>
>  * Code debuggability, made in compiled code on what basis<br>
>  * Motivations for the GVM code's design<br>
>  * Hashtable algorithm<br>
>  * Number handling<br>
><br>
> I suppose there's key areas beyond these also. And, I suppose quite possibly, some key things are not described in any paper.<br>
><br>
> Find below an attempt to figure out which of Marc's papers are in use for these respects of Gambit today.<br>
><br>
> If you know such papers/docs or you see areas beyond those listed above that ought to be considered as in the scope too, please tell.<br>
><br>
> Kind regards,<br>
> Mikael<br>
><br>
>  * Marc Feeley. Speculative inlining of predefined procedures in an R5RS Scheme to C compiler. In Olaf Chitil, Zoltán Horváth, and Viktória Zsók, editors, Implementation and Application of Functional Languages (IFL'07), volume 5083 of Lecture Notes in Computer Science, pages 237-253, 2008. [PDF]<br>



>  * Fernanda Kri and Marc Feeley. Genetic instruction scheduling and register allocation. In International Conference on the Quantitative Evaluation of Systems (QEST'04), pages 76-83, 2004. [PDF]<br>
>  * Marc Feeley. A better API for first-class continuations. In Scheme and Functional Programming Workshop (SFPW'01), pages 1-3, September 2001. [PDF]<br>
>  * Danny Dubé and Marc Feeley. Demand-driven type analysis: an introduction. In Scheme and Functional Programming Workshop (SFPW'01), pages 21-32, September 2001. [PDF]<br>
>  * Marc Feeley. A portable implementation of first-class continuations for unrestricted interoperability with C in a multithreaded Scheme. In Scheme and Functional Programming Workshop (SFPW'00), pages 65-66, September 2000. [PDF]<br>



>  * Mauricio Solar and Marc Feeley. Scheduling algorithm considering latency time on a shared-memory machine. In XVI World Computer Congress, International Conference on Software: Theory and Practice, August 2000.<br>



>  * Marc Feeley, James S. Miller, Guillermo J. Rozas, and Jason A. Wilson. Compiling higher-order languages into fully tail-recursive portable C. Technical Report 1078, département d'informatique et r.o., Université de Montréal, August 1997. [PDF]<br>



>  * Dominique Boucher and Marc Feeley. Abstract compilation: a new implementation paradigm for static analysis. In International Conference on Compiler Construction (CC'96), pages 192-207, April 1996.[PDF]<br>
>  * Manuel Serrano and Marc Feeley. Storage use analysis and its applications. In ACM SIGPLAN International Conference on Functional Programming (ICFP'96), pages 50-61, May 1996. [PDF]<br>
>  * Marc Feeley. Polling efficiently on stock hardware. In ACM Conference on Functional Programming Languages and Computer Architecture (FPCA'93), pages 179-187, 1993. [PDF]<br>
>  * Marc Feeley and Guy Lapalme. Closure generation based on viewing LAMBDA as EPSILON plus COMPILE. Computer Languages, 17(4):251-267, 1992. [PDF]<br>
> Marc Feeley and Guy Lapalme. Using closures for code generation. Computer Languages, 12(1):47-66, 1987. [PDF]<br>
>  * Marc Feeley. Deux approches ŕ l'implantation du language Scheme. Master's thesis, Université de Montréal, May 1986. [PDF]<br>
><br>
> 2011/6/9 Alex Queiroz<br>
> Hallo,<br>
><br>
> On Wed, Jun 8, 2011 at 11:14 PM, Jason E. Aten <<a href="mailto:j.e.aten@gmail.com" target="_blank">j.e.aten@gmail.com</a>> wrote:<br>
> ><br>
> > If others on the list have pointers to papers as well, I'd enjoy reading<br>
> > about the best thoughts on how to implement continuations.<br>
> ><br>
><br>
> "Representing Control in the Presence of First-Class Continuations"<br>
> <a href="http://www.cs.indiana.edu/~dyb/papers/stack.ps" target="_blank">http://www.cs.indiana.edu/~dyb/papers/stack.ps</a><br>
><br>
> "A portable implementation of first-class continuations for<br>
> unrestricted interoperability with C in a multithreaded Scheme"<br>
> <a href="http://repository.readscheme.org/ftp/papers/sw2000/feeley.pdf" target="_blank">http://repository.readscheme.org/ftp/papers/sw2000/feeley.pdf</a><br>
><br>
> "Implementation strategies for first-class continuations"<br>
> <a href="http://www.springerlink.com/content/h5808n962434j275/fulltext.pdf" target="_blank">http://www.springerlink.com/content/h5808n962434j275/fulltext.pdf</a><br>
><br>
> More in:<br>
> <a href="http://library.readscheme.org/page6.html" target="_blank">http://library.readscheme.org/page6.html</a><br>
><br>
> Cheers,<br>
> --<br>
> -alex<br>
><br>
</div></div>> _______________________________________________<br>
> Gambit-list mailing list<br>
> <a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
> <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br>
</blockquote></div><br></div>