Re: Accented Characters and Counting Syllables

2014-12-07 Thread anonymous via Digitalmars-d-learn
On Saturday, 6 December 2014 at 22:37:19 UTC, Nordlöw wrote: Given the fact that static assert(é.length == 2); I was surprised that static assert(é.byCodeUnit.length == 2); static assert(é.byCodePoint.length == 2); string already iterates over code points. So byCodePoint doesn't

Re: Sorted Array Wrapper Range

2014-12-07 Thread Tobias Pankrath via Digitalmars-d-learn
On Saturday, 6 December 2014 at 14:50:02 UTC, Nordlöw wrote: On Saturday, 6 December 2014 at 14:14:18 UTC, Tobias Pankrath wrote: Because a RandomAccessRange has no means to grow in general. Compare your proposed wrapper to http://dlang.org/phobos/std_container.html#.BinaryHeap So what

Re: Accented Characters and Counting Syllables

2014-12-07 Thread via Digitalmars-d-learn
On Saturday, 6 December 2014 at 22:37:19 UTC, Nordlöw wrote: static assert(é.byCodePoint.length == 2); Huh? Why is byCodePoint.length even defined?

Re: Accented Characters and Counting Syllables

2014-12-07 Thread John Colvin via Digitalmars-d-learn
On Sunday, 7 December 2014 at 13:24:28 UTC, Marc Schütz wrote: On Saturday, 6 December 2014 at 22:37:19 UTC, Nordlöw wrote: static assert(é.byCodePoint.length == 2); Huh? Why is byCodePoint.length even defined? because string has ElementType dchar (i.e. it already iterates by

Re: Accented Characters and Counting Syllables

2014-12-07 Thread via Digitalmars-d-learn
On Sunday, 7 December 2014 at 13:24:28 UTC, Marc Schütz wrote: On Saturday, 6 December 2014 at 22:37:19 UTC, Nordlöw wrote: static assert(é.byCodePoint.length == 2); Huh? Why is byCodePoint.length even defined? import std.uni; pragma(msg, typeof(é.byCodePoint)); = string Something's

Re: Accented Characters and Counting Syllables

2014-12-07 Thread Nordlöw
On Saturday, 6 December 2014 at 23:11:49 UTC, H. S. Teoh via Digitalmars-d-learn wrote: This is a Unicode issue. What you want is neither byCodeUnit nor byCodePoint, but byGrapheme. A grapheme is the Unicode equivalent of what lay people would call a character. A Unicode character (or more

Re: Accented Characters and Counting Syllables

2014-12-07 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Dec 07, 2014 at 02:30:13PM +, Nordlöw via Digitalmars-d-learn wrote: On Saturday, 6 December 2014 at 23:11:49 UTC, H. S. Teoh via Digitalmars-d-learn wrote: This is a Unicode issue. What you want is neither byCodeUnit nor byCodePoint, but byGrapheme. A grapheme is the Unicode

Re: threading issues with D - C - Python

2014-12-07 Thread Michael via Digitalmars-d-learn
On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data. But you aren't really passing anything

Re: threading issues with D - C - Python

2014-12-07 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/07/2014 03:12 PM, Michael wrote: On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data.