[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Axiom's Sane redesign musings

From: Tim Daly
Subject: Re: [Axiom-developer] Axiom's Sane redesign musings
Date: Sat, 20 Jul 2019 22:55:21 -0400

I've discovered something pleasant about CLOS development.

Normal compiler development is top=down, from the syntax to
the intermediate representation to the target machine. By its
nature the intermediate representation is usually a hairy data

However, CLOS is both a surface syntax and an intermediate
representation. I can write the categories in CLOS directly
compile them, and execute them. The surface syntax is just
a "cover" over the CLOS.

Working from the "middle out" like this makes it easy to
construct the categories in the REPL. And since CLOS is
dynamic I can experiement and fix issues "on the fly" and
port the solution back to the file.

Since printing (print-object) can completely control the way an
object is printed it turns out to be nearly trivial to construct the
spad source file from the CLOS representation.

No databases are necessary. Generating Spad vs Logic syntax
is a simple parameter. Comment syntax can be changed by a
single parameter (hyperdoc, latex, user-level, etc).

I taught compilers years before CLOS was created. I wish I knew
then what I know now. It is so much easier "middle-out" with the
right tools.


On 7/20/19, Tim Daly <address@hidden> wrote:
> When injured, I often use the phrase "Well, learning occurred".
> I just spent the last day chasing a circular reference problem
> in the meta-object protocol (MOP) which is the basis of the
> Common Lisp Object System (CLOS). It turns out that the
> "circular reference" is a REALLY bad error message. It won't
> bore you with the deails but it the usual "Wow, I found a bug
> in the system" thing.
> But I'm too experienced ("old") to believe that. After a day of
> creating ever-smaller versions of the input I finally cornered it.
> That's when I found a one-line paragraph in the MOP that
> tells me when "finalize-inheritance" will be called. After much
> Omphaloskepsis I translated that to "that's obvious, so it must
> be my bug"... (spoiler alert) ... which it was.
> Well, learning occurred.
> So I'm going to concentrate REALLY hard on making Sane
> give, not only an error message, but a likely thing to check.
> The error message should also include references into the
> literate documentation for a deeper explanation.
> Tim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]