Unicode lambda Lassi Kortela (12 May 2019 10:19 UTC)
Re: Unicode lambda Shiro Kawai (12 May 2019 11:18 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 11:40 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 11:50 UTC)
Re: Unicode lambda Shiro Kawai (12 May 2019 12:06 UTC)
Re: Unicode lambda Marc Nieper-Wißkirchen (12 May 2019 12:11 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 12:23 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 13:23 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 13:46 UTC)
Re: Unicode lambda John Cowan (12 May 2019 14:20 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 14:38 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 14:55 UTC)
Re: Unicode lambda John Cowan (12 May 2019 15:00 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 15:20 UTC)
Re: Unicode lambda Shiro Kawai (12 May 2019 18:42 UTC)
Re: Unicode lambda Lassi Kortela (12 May 2019 19:43 UTC)
Re: Unicode lambda John Cowan (12 May 2019 22:29 UTC)
Re: Unicode lambda Shiro Kawai (13 May 2019 10:48 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 08:25 UTC)
Re: Unicode lambda Marc Nieper-Wißkirchen (14 May 2019 08:50 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 10:10 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 10:59 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 12:35 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 13:09 UTC)
Re: Unicode lambda Lassi Kortela (14 May 2019 14:04 UTC)
Re: Unicode lambda Shiro Kawai (14 May 2019 19:18 UTC)
Re: Unicode lambda Vincent Manis (14 May 2019 22:01 UTC)
Re: Unicode lambda Lassi Kortela (20 May 2019 09:21 UTC)
Re: Unicode lambda Marc Nieper-Wißkirchen (21 Oct 2019 14:20 UTC)
Re: Unicode lambda Shiro Kawai (21 Oct 2019 17:19 UTC)
Re: Unicode lambda John Cowan (21 Oct 2019 17:39 UTC)
Re: Unicode lambda Marc Nieper-Wißkirchen (21 Oct 2019 18:43 UTC)
Re: Unicode lambda John Cowan (21 Oct 2019 23:27 UTC)
Encoding declarations Lassi Kortela (22 Oct 2019 08:39 UTC)
Re: Encoding declarations John Cowan (22 Oct 2019 20:52 UTC)
#! directives, general and specific Lassi Kortela (22 Oct 2019 09:11 UTC)
Re: #! directives, general and specific John Cowan (22 Oct 2019 20:27 UTC)
Re: #! directives, general and specific Lassi Kortela (22 Oct 2019 20:43 UTC)
Re: Unicode lambda Marc Nieper-Wißkirchen (13 May 2019 08:50 UTC)
Re: Unicode lambda Lassi Kortela (13 May 2019 10:27 UTC)
Re: Unicode lambda Per Bothner (12 May 2019 14:17 UTC)
Re: Unicode lambda Peter (12 May 2019 15:06 UTC)

Re: Unicode lambda Lassi Kortela 20 May 2019 09:21 UTC

> I like the idea of allowing arbitrary s-exps following "#!" (i.e.
> "#!(precision 25)" instead of "#!precision=25") so that "#!" can be
> parsed as datum comments "#;".

John hasn't had the chance to post to srfi-discuss but sent detailed
comments about the #! proposal. Here they are verbatim:

----------------------------------------------------------------------

1) I would like to stick to the pattern “#!foo” where “foo” is any valid
Scheme identifier.

2) Depending on the value of foo, the reader may take specific action:

· For “#!encoding”, read the next S-expression (which must be a symbol),
set the encoding, and either rewind (skipping the encoding this time) or
carry on if you can change encodings in midstream (lots of systems cannot).

· For “#!fold-case” and “#!no-fold-case”, read nothing and set the
port’s case-folding flag;

· For “#!r6rs” (in R6RS systems), read nothing and set the port’s
strict-R6RS mode if the implementation has one (Larceny does, Guile
doesn’t);

· For “#!” followed by an identifier beginning with “/”, treat the whole
line as a comment.

3) Using the format “#!foo some-s-expression-depending-on-foo” allows
different values of foo to be registered and treated separately with
different rules for each, rather than aggregating them into a single
alist or such.

4) Having a procedure to set the interpretation of “#!foo” for a
specific “foo” is fine if all you want to do is affect the `read`
procedure.  But if you want to affect the compiler, you have to have a
way to run that code *in the compiler*.  Scheme has never messed about
with `eval-when`, and for very good reason.  (This issue also affects
SRFI 10, and is exactly analogous to the phasing problem in R6RS.)  So I
am in favor of standardizing new #!foo directives only by SRFI.  I have
an alternative approach from SRFI 10 in pre-SRFI form at
<https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/LexmacsCowan.md>.

5) In particular, one directive I’d like to have eventually is “#!lang”,
which is followed by a module path.  The compiler/REPL dynamically
imports the module named in the path and uses the `read` procedure
exported from that module in place of its own `read`.  This allows
arbitrary other languages to be compiled/interpreted with any conforming
Scheme system.  It is similar to Racket’s “#lang”, but simpler.  (I
don’t like “#lang” because if we introduce “#l” for some new kind of
external syntax, it might be read as “#l ang”.