Subject: Re: No C!
From: (Rob Warnock)
Date: Sat, 26 Jul 2008 09:33:07 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
verec  <> wrote:
| Over the past few days I've been Googling away looking for either
| a scheme or CL native compiler implementation that would not
| use *any* C "kernel". ... what I'm looking for is the source code
| of an implementation written in some lisp dialect that:
| - uses lisp to write a "bootstrap executable" file in whatever
| native format the host OS supports (ELF, Mach-o, exe/dll ...)
| - runs that bootstrap and augments is with the whole missing
| shebang so as to reach a miniumn level of usability.

Have a look at this paper:
    "An Incremental Approach to Compiler Construction"
    Abdulaziz Ghuloum
    2006 Scheme and Functional Programming Workshop

He incrementally develops a compiler from Scheme to x86 assembler,
and in "24 small steps" ends up with "a compiler powerful enough
to compile an interactive evaluator". [Which, if you fed it the
source of the compiler...]

He does peripherally use a C compiler, but only as a tool to
see what assembler code given sample bits of C generate --
esepcially subroutine calling sequences -- thus avoiding having
to actually *learn* x86 assembler!  ;-}

And he does use a 3-line C program as the top-level "main()"
to call his compiled programs. But one could eliminate *that*
as well by running "gcc -S" on it once, and then just cloning
the assembler for "main()" into each program compiled.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607