Re: Lisp Reader & Tools

"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]> Wed, 27 May 2026 22:00:54 +0200
Newsgroups gmane.lisp.lispworks.general
Message-ID <CAG0Nw2kOwfznEdEuNQ7tHBqbAYeCsYg3wdSiYvAta2x__E8xNQ@mail.gmail.com>
I am pretty sure that you can convince at least LW and SBCL to play nice
with UNICODE characters.

MA

On Wed, May 27, 2026 at 8:45 PM David McClain <[email protected]>
wrote:

> Thanks, that’s a really cool idea!!
>
> But the Lisp tools still suffer from assumptions like I mentioned. You
> have to insert comments in your code at strategic places to put in a “ or a
> \ or a | to make the editor and REPL happy. Otherwise they refuse to allow
> you to compile or exectue a sexpr because a lone char is preset in the
> sexpr text.
>
> On May 27, 2026, at 11:41, Marco Antoniotti <[email protected]>
> wrote:
>
> 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/
>
>
>

-- 
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/