Re: regexp-split for Guile

2012-09-18 Thread nalaginrut
On Tue, 2012-09-18 at 15:55 -0400, Chris K. Jester-Young wrote: > On Tue, Sep 18, 2012 at 08:59:33PM +0800, nalaginrut wrote: > > Anyway, if there're so many people like this nice thing, why not we add > > it (at any option of these three implementations) into ice-9? > > Oh noes! This is where th

Re: regexp-split for Guile

2012-09-18 Thread Chris K. Jester-Young
Here's a revised version, implementing Thien-Thi Nguyen's comments. I added line breaks for the "cons" and the bottom "if" (I feel that the top "if" is still simple enough to keep on the same line). Cheers, Chris. * * * (define (regexp-split-fold match prev)

Re: regexp-split for Guile

2012-09-18 Thread Chris K. Jester-Young
On Tue, Sep 18, 2012 at 08:59:33PM +0800, nalaginrut wrote: > Anyway, if there're so many people like this nice thing, why not we add > it (at any option of these three implementations) into ice-9? Oh noes! This is where the bikeshedding begins. ;-) Seriously, I do think having a regexp-split in

Re: regexp-split for Guile

2012-09-18 Thread Chris K. Jester-Young
On Tue, Sep 18, 2012 at 09:06:55AM +0200, Sjoerd van Leent Privé wrote: > It might just be me, but would it not be more sensible for scheme to > just perform the opposite. Return the same amount of fields at most, > but starting from the end, thus: > > (regexp-split ":" "foo:bar:baz:qux:" -3) > =>

propose deprecation of generalized-vector-*

2012-09-18 Thread Daniel Llorens
Hello, today I filed a bug on generalized-vector->list http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12465 I remember similar bugs in the past, and I'm thinking that these functions are redundant since we have array-ref, array->list, and so on, which also work on strings, uniform vectors, etc.

Re: regexp-split for Guile

2012-09-18 Thread nalaginrut
I had the same topic before: http://lists.gnu.org/archive/html/guile-devel/2011-12/msg00247.html Actually, there's an older thread than mine before: http://old.nabble.com/regex-split-for-Guile-td31093245.html Anyway, if there're so many people like this nice thing, why not we add it (at any option

Re: regexp-split for Guile

2012-09-18 Thread Sjoerd van Leent Privé
Hi Chris, I have been following your thread about regexp-split. I do have some thoughts about this to make the interface more versalite. So, basically, the Perl split's limit is used this way: 1. Positive limit: Return this many fields at most: (regexp-split ":" "foo:bar:baz:qux:" 3)