Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!uunet!sytex!smcl
From: smcl@sytex.com (Scott McLoughlin)
Subject: Re: R4RS, section 6.5.5, round
Message-ID: <sDHNTc1w165w@sytex.com>
Sender: bbs@sytex.com
Organization: Sytex Access Ltd.
References: <36q3jl$m2t@agate.berkeley.edu>
Date: Tue, 4 Oct 1994 02:42:39 GMT
Lines: 47

nweaver@madrone.CS.Berkeley.EDU (Nicholas C. Weaver) writes:

> In article <B51mTc2w165w@sytex.com>, Scott McLoughlin <smcl@sytex.com> wrote:
> }it compiles a "Stupid Lisp", not necessarily a that it is a 
> }"Stupid Compiler". It's sort of a "Lisp Meets the Dragon Book" project -
> }much fun.
> 
> 	What sort of changes are made to make a "Stupid Lisp"?  I assume no
> call/cc (waahhh).  But how is lambda affected?  Multiple value handling?
> Etc?  How dumbed down does a lisp have to be for really efficient compiled
> code?
> -- 

Howdy,
        Ok, since you asked... ;-)
        Remember, this is just an ongoing weekend hobby project. I 
welcome all comments, suggestions, but spare flames.
        Here is the design as it stands:

o types: nil,integer,character,pair,string,vector,symbol,port
o primitives: type tests, getters/setters, arithmetic, buffer
        (string) i/o, constructors
o symbols have a plist
o lambda,begin,if,or,and,tagbody,set!,quote,defmacro
o batch compilation to *.asm files.
o primops don't error check, can't redefine primops

There it is as it stands.
        Of course, I'm considering other features, especially
"inlining" of functions and a sort of generalization of
(catch) (throw) I read about in Lisp Pointers ("first class
top levels" or some such).
        Once again, the exercise is largely pedagogical: can
we take a simple Lisp like language and write a compiler for
it that (1) generates fast code, (2) is readily comprehensible
"at a glance" given little knowledge of Lisp, lisp compilation,
etc. -- e.g., could any decent C hacker say "Oh yeah, I could've
done that." (3) can compile itself in the style of many Forth
systems, Small C, etc.
        If this can be accomplished, then we have a sort of
low level "bootstrap" Lisp for writing more ambitious systems,
interpreters, etc. I, for one, have coded enough "Lisp in C".

=============================================
Scott McLoughlin
Conscious Computing
=============================================
