Re: Needed: per-port reader options

2012-10-21 Thread Ludovic Courtès
Hi, Mark H Weaver skribis: > Section 2.1 of the R7RS (draft 6) explicitly says "The #!fold-case > directive causes the read procedure to case-fold [...] each identifier > and character name subsequently read from the same port." OK, this is more precise than SRFI-105, and definitely per-port (t

Re: Needed: per-port reader options

2012-10-18 Thread Mark H Weaver
Section 2.1 of the R7RS (draft 6) explicitly says "The #!fold-case directive causes the read procedure to case-fold [...] each identifier and character name subsequently read from the same port." Here's the relevant excerpt: The following directives give explicit control over case folding.

Re: Needed: per-port reader options

2012-10-18 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Hi Mark! > > Mark H Weaver skribis: > >> l...@gnu.org (Ludovic Courtès) writes: > > [...] > >>> Of course. I just meant that, if you can call ‘make-reader’ with >>> whatever options you’re interested in, instead of globally changing the >>> reader’s optio

Re: Needed: per-port reader options

2012-10-18 Thread Ludovic Courtès
Hi Mark! Mark H Weaver skribis: > l...@gnu.org (Ludovic Courtès) writes: [...] >> Of course. I just meant that, if you can call ‘make-reader’ with >> whatever options you’re interested in, instead of globally changing the >> reader’s option as is currently the case, then you’re halfway throug

Re: Needed: per-port reader options

2012-10-16 Thread Mark H Weaver
Hi Ludovic! l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: >> l...@gnu.org (Ludovic Courtès) writes: >>> Mark H Weaver skribis: >>> I recently tried to implement reader directives, e.g.: #!fold-case (from R7RS) #!no-fold-case (from R7RS) #!cur

Re: Needed: per-port reader options

2012-10-16 Thread Ludovic Courtès
Hi Noah, Noah Lavine skribis: > I might not understand this correctly, but aren't the reader flags > only supposed to affect the specific file they're reading from? That's > why we need a different set of reader options for each port. Of > course, there could be one global reader that has a > po

Re: Needed: per-port reader options

2012-10-16 Thread Noah Lavine
Hello, On Tue, Oct 16, 2012 at 5:39 PM, Ludovic Courtès wrote: > I think ‘current-reader’ should remove the need to have a port-to-reader > mapping, no? > > Thanks for looking into this! > > Ludo’. > I might not understand this correctly, but aren't the reader flags only supposed to affect the s

Re: Needed: per-port reader options

2012-10-16 Thread Ludovic Courtès
Hi Mark, Mark H Weaver skribis: > l...@gnu.org (Ludovic Courtès) writes: >> Mark H Weaver skribis: >> >>> I recently tried to implement reader directives, e.g.: >>> >>> #!fold-case (from R7RS) >>> #!no-fold-case (from R7RS) >>> #!curly-infix (from SRFI-105) >>> >>> However, I ran i

Re: Needed: per-port reader options

2012-10-16 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> I recently tried to implement reader directives, e.g.: >> >> #!fold-case (from R7RS) >> #!no-fold-case (from R7RS) >> #!curly-infix (from SRFI-105) >> >> However, I ran into a rather serious problem. Guile's reader

Re: Needed: per-port reader options

2012-10-16 Thread Ludovic Courtès
Hi, Mark H Weaver skribis: > I recently tried to implement reader directives, e.g.: > > #!fold-case (from R7RS) > #!no-fold-case (from R7RS) > #!curly-infix (from SRFI-105) > > However, I ran into a rather serious problem. Guile's reader options > are global to the entire process,

Needed: per-port reader options

2012-10-13 Thread Mark H Weaver
I recently tried to implement reader directives, e.g.: #!fold-case (from R7RS) #!no-fold-case (from R7RS) #!curly-infix (from SRFI-105) However, I ran into a rather serious problem. Guile's reader options are global to the entire process, but clearly these reader directives should a