<div dir="ltr"><div>Hi Matt,</div><div><br></div><div>All of Gambit's primitives for compilation, linking etc. already supports specification of output path, and Gambit itself is free of a packaging abstraction and leaves all of that for the user code (such as a specific user-implemented macro expander like one for syntax-case, even if bundled as an optional together with the Gambit distro) to implement atop Gambit's primitives.</div>

<div><br></div><div>Therefore there should be no need of changing Gambit's behavior with regard to what directories it outputs c/object/library/executable files into -</div><div><br></div><div>Perhaps this was what you meant already?</div>

<div><br></div><div><br></div><div>Metadata such as macros can be stored in one or more files specific your macro expander/module system, or if desired you can include such metadata as a predefined global or procedure call inside your output code and that way get it included in your output object files. For instance Black Hole does this.</div>

<div><br></div><div>For my reference, what's the visit/revisit about?</div><div><br></div><div>Best regards,</div><div>Mikael</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/22 Matt Hastie <span dir="ltr"><<a href="mailto:matthastie@gmail.com" target="_blank">matthastie@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div class="im"><div>On Oct 22, 2013, at 8:43 AM, Marc Feeley <<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>> wrote:</div>

<br><blockquote type="cite"><span style="font-family:Avenir;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">The main problem I see is one of *packaging*. </span></blockquote>

<div><br></div></div><div>Yes, exactly. Compiled standards mode essentially forces a "cfront-style" repository of sources ... and this irreversibly alters Gambit in one way or another, so careful community planning and consultation is needed.</div>

<div class="im"><br><blockquote type="cite"><span style="font-family:Avenir;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">How to attach meta information (macros, etc) to a compiled file?  An interesting approach would be to put the result of compilation in a directory with subfiles with standardized names for the various parts.</span></blockquote>

<div><br></div></div><div>I think this is an excellent idea, so long as GNU make et al can continue to get dependency analysis right. To effect this, it may be necessary to treat the directory creation as "atomic-as-possible" to prevent the creation of directory artifacts of various ages.</div>

<div class="im"><br><blockquote type="cite"><span style="font-family:Avenir;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">  For example, "gsc foo.scm" would create the directory foo.o1 containing the "normal" foo.o1 shared lib and foo.c (useful for Scheme level linking) and other files for the visit and revisit information.</span></blockquote>

</div></div><div><br></div><div>Do you see this alteration as something for gambit mode too, or just standards mode? Even in gambit mode, it'd be nice to place the .c and _.c files in a .o<n> folder. Any migration of the .c and _.c will regress existing build art.</div>

<div><br></div><div>For standards mode, the win of compiled syntax may offset the loss of backwards compatibility with existing build systems - is this also true for gambit mode?</div><div><br></div><div>It is desirable to introduce a flag to denote 'new packaging' mode to minimize community disturbance?</div>

<div><br></div><div>For standards-mode, such a directory may contain as many as five files:</div><div><br></div><div>foo.scm -> foo.o1/{foo.o1,foo.c,foo_.c,foo.visit.scm,foo.revisit.scm}</div><div><br></div><div>Code changes shouldn't be too tough (that is, mechanical, not innovative), but the test matrix is the cross-product of:</div>

<div><br></div><div>{ Windows, UNIX } x { gambit-mode, standards-mode } x { exe, incremental link, flat link } x { visit/revisit test suite }</div><div><br></div><div>I should also check to see how the various other backends, javascript et al, work with this proposal.</div>

<div><br></div><div>In the meantime, I'll work towards a patch in conjunction with specification that comes from this thread.</div><div><br></div><div>Kind regards,</div><div>Matt.</div><div><br></div></div><br>_______________________________________________<br>


Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">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>