Re: Using libunistring for string comparisons et al

2011-03-12 Thread Ludovic Courtès
Hello! Mark H Weaver m...@netris.org writes: I claim that any reasonable code which currently uses string-ref and string-set! could be more cleanly written using string ports or string-{fold,unfold}{,-right}. I agree, and we should encourage this. However... I find Cowan’s proposal for

Re: Using libunistring for string comparisons et al

2011-03-12 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: I find Cowan’s proposal for string iteration and the R6RS editors response interesting: http://www.r6rs.org/formal-comments/comment-235.txt Cowan was proposing a complex new API. I am not, nor did Gauche. An efficient implementation of string ports is

Re: Using libunistring for string comparisons et al

2011-03-12 Thread Mike Gran
From:Mark H Weaver m...@netris.org l...@gnu.org (Ludovic Courtès) writes: I find Cowan’s proposal for string iteration and the R6RS editors response interesting:   http://www.r6rs.org/formal-comments/comment-235.txt Cowan was proposing a complex new API.  I am not, nor did Gauche.

O(1) accessors for UTF-8 backed strings

2011-03-12 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: I also think strings should remain what they currently are, with O(1) random access. I just realized that it is possible to implement O(1) accessors for UTF-8 backed strings. The simplest solution is to break the stringbuf into chunks, where each chunk

Re: O(1) accessors for UTF-8 backed strings

2011-03-12 Thread Alex Shinn
On Sun, Mar 13, 2011 at 1:05 PM, Mark H Weaver m...@netris.org wrote: l...@gnu.org (Ludovic Courtès) writes: I also think strings should remain what they currently are, with O(1) random access. I just realized that it is possible to implement O(1) accessors for UTF-8 backed strings. It's