Attempt at a stack of data formats to make everyone happy Lassi Kortela (19 Sep 2019 17:28 UTC)
Sketching the format stack Lassi Kortela (19 Sep 2019 18:07 UTC)
Re: Attempt at a stack of data formats to make everyone happy Arthur A. Gleckler (20 Sep 2019 22:19 UTC)
Re: Attempt at a stack of data formats to make everyone happy Alaric Snell-Pym (24 Sep 2019 09:02 UTC)
Core S-expression and binary formats John Cowan (24 Sep 2019 14:49 UTC)
Re: Core S-expression and binary formats John Cowan (25 Sep 2019 02:14 UTC)
Sharpsign syntax for hashtables, sets, bytevectors, etc. Lassi Kortela (25 Sep 2019 08:26 UTC)
Bytevector literals Lassi Kortela (25 Sep 2019 08:38 UTC)
Re: Sharpsign syntax for hashtables, sets, bytevectors, etc. Alaric Snell-Pym (25 Sep 2019 09:33 UTC)
Re: Sharpsign syntax for hashtables, sets, bytevectors, etc. Lassi Kortela (25 Sep 2019 09:53 UTC)
Re: Sharpsign syntax for hashtables, sets, bytevectors, etc. Alaric Snell-Pym (25 Sep 2019 10:32 UTC)
String literals inside bytevector literals Lassi Kortela (25 Sep 2019 10:46 UTC)
A S-expression syntax that can carry all this stuff Lassi Kortela (19 Sep 2019 20:01 UTC)

A S-expression syntax that can carry all this stuff Lassi Kortela 19 Sep 2019 20:01 UTC

Replying as a separate subthread:

> A very very rough sketch of my idea for extending S-expressions smoothly:
>
> On input, a list whose car is a symbol beginning with "." is mapped through
> a procedure associated with that symbol by the caller, and whatever the
> procedure returns replaces that part of the input.  This is effectively
> macroexpansion at the lexical level.  On output, you need a mapping from
> type predicates to such lists.  The virtue of this design is that it works
> *on top of* `read` and `write`, and therefore is portable, except to people
> who use symbols with dots in front (hopefully few to none, but substitute
> another symbol character if you want, just not colon).  Yes, it's a kludge.
>
> The alternative is to use SRFI-10 syntax:  #.(list).  This is safe,
> requires modifications to read and write, and is inherently unportable.
> (The associated predicate set-reader-ctor! is inappropriately global and
> shouldn't be used.)

Both seem like reasonable ideas to me. I don't have much of an opinion
on this.

Common Lisp's, and to some extent Racket's, approach is to sprout all
syntax extensions by tacking new characters onto sharpsign (#). That may
be reasonable but in our case it's not enough to tack on new characters
- we need new words :)

I think compatibility (beyond the Platonic ideal of S-expressions) is
ultimately unattainable and will limit our imagination if we strive for
it. It's good for lists, symbols, strings and numbers to have familiar
syntax but beyond that there are going to be incompatibilities with soem
dialects no matter what we do.