Lisp Reader & Tools

"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]> Wed, 27 May 2026 11:28:43 -0700
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Turns out Richard Gabriel was hiding something in his "Worse is Better”. Lisp, and I suspect many other ancient languages, made use of some grand assumptions based on the 1-char lookahead. And they assumed that tools like text-editors could discern important boundaries via simple regular expression matching.

This is not the very best that can be had, contrary to the MIT Thesis put forth by Gabriel. Lisp, it turns out, makes many assumptions about inputs, just like Forth does. It works well for properly formed inputs. But all bets are off otherwise.

And this worked marvelously well for now near 75 years. But I have found its limits.

I wanted to extend the reader syntax to allow for angle input formats like you see printed in the ephemerides, 1°23’13”.234

And I can almost get away with it, except for the “ mark on the arc-seconds portion.

Similar things happen with reader macros that inhale arbitrary chars when they run into things like | (vbar) and \ (backslash). The reader macros handle it just fine, but the text editors do not.

A more modern approach would chop up the incoming text through a lexical analyzer into tokens. And the edits would be applied to tokens, not regex matches.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html