Fixing the slib mess

2012-10-21 Thread Mikael Djurfeldt
Dear Guile hackers, What nice work you are doing! For those who don't know me, I'm a Guile developer who has been doing other stuff for some time. When trying to use guile 2 for logic programming I discovered that the slib interface is again broken (and has been for quite some time). This easily

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: regexp-split for Guile

2012-10-21 Thread Chris K. Jester-Young
On Sun, Oct 21, 2012 at 04:20:09PM +0800, Daniel Hartwig wrote: > Yes. Keep it simple. Operations like trim-whitespace and > drop-empty-strings-from-the-result (mentioned in the previous > discussion) are so easy to do outside of regexp-split, why complicate > the semantics? "So easy", but so ve

Re: regexp-split for Guile

2012-10-21 Thread Chris K. Jester-Young
On Sat, Oct 20, 2012 at 10:16:49AM -0400, Mark H Weaver wrote: > Sorry, that last example is wrong of course, but both of these examples > raise an interesting question about how #:limit and #:trim should > interact. To my mind, the top example above is correct. I think the > last result should b

Re: regexp-split for Guile

2012-10-21 Thread Daniel Hartwig
On 20 October 2012 22:16, Mark H Weaver wrote: > Honestly, this question makes me wonder if the proposed 'regexp-split' > is too complicated. If you want to trim whitespace, how about using > 'string-trim-right' or 'string-trim-both' before splitting? It seems > more likely to do what I would ex