write-bytevector, write & co. Lassi Kortela (16 Aug 2020 10:24 UTC)
Re: write-bytevector, write & co. Marc Nieper-Wißkirchen (16 Aug 2020 10:33 UTC)
Re: write-bytevector, write & co. Daphne Preston-Kendal (16 Aug 2020 10:37 UTC)
Re: write-bytevector, write & co. Marc Nieper-Wißkirchen (16 Aug 2020 10:44 UTC)
Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 11:04 UTC)
Re: Configuring read and write for syntax extensions Shiro Kawai (16 Aug 2020 11:46 UTC)
Re: Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 11:55 UTC)
Re: Configuring read and write for syntax extensions Marc Nieper-Wißkirchen (16 Aug 2020 11:59 UTC)
Re: Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 12:06 UTC)
Re: Configuring read and write for syntax extensions Marc Nieper-Wißkirchen (16 Aug 2020 12:25 UTC)
User-defined writers and recursive write Lassi Kortela (16 Aug 2020 12:38 UTC)
(missing)
(missing)
Re: User-defined writers and recursive write Marc Nieper-Wißkirchen (16 Aug 2020 13:32 UTC)
Re: Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 12:26 UTC)
Re: Configuring read and write for syntax extensions Marc Nieper-Wißkirchen (16 Aug 2020 12:33 UTC)
Re: Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 12:50 UTC)
Re: Configuring read and write for syntax extensions Shiro Kawai (16 Aug 2020 12:32 UTC)
Re: Configuring read and write for syntax extensions Marc Nieper-Wißkirchen (16 Aug 2020 12:35 UTC)
Re: Configuring read and write for syntax extensions Lassi Kortela (16 Aug 2020 12:44 UTC)
Re: Configuring read and write for syntax extensions Shiro Kawai (16 Aug 2020 12:53 UTC)
Re: Configuring read and write for syntax extensions John Cowan (17 Aug 2020 16:58 UTC)

Re: Configuring read and write for syntax extensions Lassi Kortela 16 Aug 2020 12:44 UTC

>> A port can be accessed from multiple threads, so it might be better to make port flags either port-and-thread-specific, or having (with-port-flag thunk) that locks the port.
>
> Thread-specific port flags would be wrong (this is also not true for
> the implicit "fold-case" flag of R7RS). If one thread switches the
> mode and writes some directive to a given port, the writer of the
> other thread needs to know that this directive is active on that port.
> Otherwise, the resulting data may be garbage.

Yes, each thread's syntax would be consistent but the output file's
syntax would be inconsistent. Well, if `write` automatically writes any
changed #! flags, then I guess consistency is maintained.

As a similar issue, one thread can seek the port and confuse another
thread's idea about the port position. It's sounds too difficult to
guard all port state against interfering threads.