[ann] Minimal Python project

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Sun Jan 12 16:42:36 EST 2003


Neil Schemenauer <nas-usenet at arctrix.com> writes:
> >> In my dreams we'd have a completely self-hosted Python implementation
> >> that compiles to native code on the fly, sort of like the Yale T system.
> > 
> > Never heard of this, but this is my dream, too.
> 
> The history of T:
> 
>     http://www.paulgraham.com/thist.html

That's an interesting article--I hadn't seen it.  The remark about
lexical scope being less efficient than dynamic scope of course
applies only to interpreters and not compilers (the whole point of
Scheme).  RMS of course understood that since he implemented lexical
scope in Lisp Machine Lisp.  And Steele understood it too--Scheme was
designed from the start to be compiled.  (Emacs Lisp is just an
editing extension language and having a native-code compiler for it
would have been crazy).

The T history article may make it sound like a self-hosted system has
to be a massive undertaking, but I don't believe that's true, if
you're not trying to build an ultra-high-powered optimizing compiler.
The T source code is rather good inspirational reading (I'm sure you
can still download it from somewhere).

IIRC the etymology of Scheme-48 is that 48 is 84 spelled backwards--it
was supposed to be a simple implementation of Scheme-84.

I wish that some Lisp implementation gurus could get involved in
Python.  A lot of Python semantics map very naturally onto Lisp, and
bringing Lisp compiler techniques to Python could make Python code
run blazing fast.  

CMU Common Lisp's compiler, by complete coincidence, happens to be
called Python (maybe inspired by Rabbit, the name of the first Scheme
compiler).  Another dream I have is to adapt CMUCL's Python compiler
to compiling the Python language, if for no other reason than to enjoy
the confusion that the name collision would cause ;-).




More information about the Python-list mailing list