[asdf-devel] Make the CL syntax predictable

Faré fahree at gmail.com
Sat Mar 15 02:44:29 UTC 2014

Dear Anton,

> Fare, I wonder, why ironclad fails with your patch.
> I have checked the source, ironclad.asd creates new *ironclad-readtable*
> and binds cl:*readable* to it in the :around method for compile-op
> (like a home-made around hook)
> So, it looks like ironclad does not modify any global behavior.
> What your patch does?
My patch was enforcing read-only syntax tables around not just the
.asd file, but each and every Lisp file.

Since that obviously is too strict, the next thing to try is one set
of tables per system, and if that still fails,
updating said tables after every action on the system, i.e. initialize
the system's readtable,
and around every action have (let ((*table* (saved-table)))
(call-next-method) (setf (saved-table) *table*)).
Problem is: what when you re-compile the system after some of it has changed?
New readtable, or modify the same old? Also, to preserve the fasl-op
linking model,
there shouldn't be anything around load-op, or maybe something
stricter, or, I don't know.
This is all quite tricky.

> I would never write a library which modifies global
> *readtable* during load, it's of course a bad style
> (when ASDF around hooks provide an easy instrument for my code to
> use custom readtable without affecting global readtable)
It's in practice a very bad idea indeed. We need to fix systems that do it.

> Should ASDF fail the libraries which modify global readtable - I doubt it's ASDF role.
Yes it is, see my paper:

> Should ASDF provide libraries with clean readtable when they are build - seems like a good service,
> so doesn't matter what I did in REPL, (ql:quickload :any-library) always works the same way.
Yes, it is very important to make it safe to call ASDF while at the REPL.
At the very least, ASDF should bind *readtable* around operate, if not
around each action.
Otherwise, bad thing will happen, and I've been bitten in the past.

> But I am not sure 100%, this is a complex issue, more intensive consideration is needed.
Indeed. And testing.

But systems that modify the readtable should still be fixed.
I shamefully admit I had some systems that used to do it up until last
year or so.

> It's rational to collect the information we already have into a ticket,
> and consider it more detailed when other currently active issues are closed,
> as Robert suggests.
Who's game for it? :-(
At the very least, find the URL for the discussion on some web
archive, and link to that in the bug report.


—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Two possibilities exist: Either we are alone in the Universe or we are not.
Both are equally terrifying. — Arthur C. Clarke

More information about the asdf-devel mailing list