Re: Lisp Reader & Tools
"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]> Wed, 27 May 2026 20:41:25 +0200
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <CAG0Nw2nmG0-30b=-cruXJ5NXTDSfRbC2Fx0g3KLpCQkDoFYdJw@mail.gmail.com> |
Kludgy workaround: use a #\FUNKY-UNICODE-NOT-ANSI-SINGLE-QUOTE and a #\FUNKY-UNICODE-NOT-ANSI-DOUBLE-QUOTE to define reader macros on. I am sure such characters are there in UNICODE. MA On Wed, May 27, 2026 at 8:30 PM David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote: > 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 > -- Marco Antoniotti, Professor, Director tel. +39 - 02 64 48 79 01 DISCo, University of Milan-Bicocca U14 2043 http://dcb.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY REGAINS: https://regains.disco.unimib.it/