[gambit-list] getting started with gambit source code

Christian Jaeger christian at pflanze.mine.nu
Tue Jun 3 00:42:31 EDT 2008

Andrew I. Schein wrote:
> Hi -
> I recently downloaded the source for gambit v4.2.8 with the idea of
> looking at how it fits together.  I am a little bit baffled... there
> are quite a few (~33) files with a "_" prefix that seem to be
> generated C code as well as 9 normal looking C files.
> Can someone provide pointers on the tool that generates the C

The tool is the Gambit compiler, gsc; when bootstrapping (make 
bootstrap), a gsc binary is generated and placed as "gsc-comp" binary in 
the toplevel directory of the sources.

> or more
> generally about where to start in looking at the source?

For those autogenerated C files, there is a corresponding .scm file from 
which it has been compiled. Look at the .scm file.

Check the wiki for a few insights into the system, as well as a few 
papers from Marc (check his homepage and/or the mailing list archives, 
for example "Paper on the compiler"; there's a search form for the 
mailing list on http://scheme.mine.nu/gambit/). You should try to get a 
general understanding of Gambit, first, like how namespaces are being 
handled, what define-type does (it's the same as define-structure, but 
not all features which are being used by the Gambit sources are 
documented in the manual).


More information about the Gambit-list mailing list