New kid on the block / introduction

Tom Novelli tnovelli at
Sat Nov 4 07:46:30 PST 2006

On 11/4/06, Armin Rigo <arigo at> wrote:

Hey, Armin... just the guy we need to talk to!

> Newsgroups like comp.lang.python are full of statements like "just
> implement Python in Lisp and everything will be great".  By now, you'd
> think that someone would really have tried, but there is no such
> implementation showing great results - even as a prototype.
> It doesn't work.  There are several reasons for that.  One reason (try
> google for more detailled answers) is that Python, Ruby, etc. are 3%
> syntax, and 97% semantics defined by a large library.  It's trivial to
> translate the AST of these languages to S-exps, e.g. with a Ruby-to-Lisp
> parser.  Then you only solve 3% of the problem.  The difficult and
> tedious bit is to implement the semantics and library and object model,
> and Lisp compilers are not going to magically make these 97%
> super-efficient.  (I should add that I consider the 3% the boring bit;
> parser generation stuff was solved decades ago, but sadly many compiler
> construction lectures still focus mostly on that.)

I figured as much.  I just noticed that Python's lexical scope rules
are incompatible with Lisp, and broken, IMHO.  In LISP, I could have
defined a few nested functions, but in Python there's no way to modify
the outer function's local variables from the inner functions.

Is anyone looking at the big picture?  LISP seems to have a mature,
well-designed semantic model, while these script languages just have
ad-hoc semantics cobbled together over the years, still changing every
year, and borrowing more and more from LISP.  Has anyone tried to
define a variant of Python (or Ruby, ECMAscript, etc.) that's
compatible with the Lisp/Scheme model?  I ask because I'm interested
in doing that, and I wouldn't want to waste my time if it's already
been done, especially if it's not promising!

I hope I'm not asking too many dumb questions... I didn't paid much
attention to these issues until a year or two ago, and I have a lot of
catching up to do.  Hopefully the new TUNES CMS will help us summarize
this knowledge... and it'll look good on my resume.  I'm not sure I
*want* to give up surveying for a programming career, but it would
allow me to devote more effort to this stuff.

Let's talk about Python sometime, after I've read up on PyPy etc.

 - Tom

More information about the TUNES mailing list