[LMH]Re: Various questions

Tim Moore moore@bricoworks.com
Wed Apr 24 13:29:01 2002


On 24 Apr 2002, James A. Crippen wrote:

> Tim Moore <moore@bricoworks.com> writes:
> 
> > In defense of C and C++, a CPU emulator is mostly an exercise in
> > moving bits and bytes around, and C is very good at that, especially
> > when the bytes are in 32 bit chunks.  That said, we could probably
> > generate a bunch of C/C++ from Lisp, especially as we have
> > interesting TI Lisp source code.
> 
> And Lisp doesn't exist on every platform.
> 
> I would like to see in the future the capability to generate C/C++ as
> output from the Explorer Lisp Compiler.  This will probably be the
> first step in adding multiple back ends to the compiler, that it may
> generate code for x86, Sparc, etc, besides the LispM.
> 
> Why?  So you can write hardware drivers in Lisp.  And then just patch
> the code objects into the backend of the system.  Eventually the whole
> emulator could be bootstrapping.  And should be, I think.  But the
> necessity of having the C/C++ back end is to maintain portability.

You don't need to generate C to write device drivers in Lisp.  Assuming
the macrocode VM is running in kernel mode or on bare hardware, you can
could use the physical memory primitives directly from Lisp (compiled to
macrocodes).  Assuming a system that understands the memory map of the
target machine, which is some ways in the future :)  Anyway, small systems
written in Forth behave like this, more or less.

> 
> > Complexity is a means to an end, not an end in itself :)
> 
> Really?  Then where does Miscrosoft get off?  Office 2000 seems like
> its goal is pure complexity.

Is that something you want to emulate? :)

Tim