Re: D's Auto Decoding and You

2016-06-03 Thread Steven Schveighoffer via Digitalmars-d-announce
On 6/2/16 5:33 PM, Andrei Alexandrescu wrote: On 6/2/16 5:27 PM, Steven Schveighoffer wrote: On 6/2/16 5:21 PM, jmh530 wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: If you think there should be any more information included in the article, please let me know so I can ad

Re: D's Auto Decoding and You

2016-06-03 Thread Rory McGuire via Digitalmars-d-announce
On Fri, Jun 3, 2016 at 8:58 AM, tsbockman via Digitalmars-d-announce wrote: > On Friday, 3 June 2016 at 06:37:59 UTC, Rory McGuire wrote: >> >> This dpaste shows a couple of issues with combining chars in D. >> >> https://dpaste.dzfl.pl/4b006959c5c0 >> >> The compiler actually can't handle a combi

Re: D's Auto Decoding and You

2016-06-03 Thread tsbockman via Digitalmars-d-announce
On Friday, 3 June 2016 at 06:37:59 UTC, Rory McGuire wrote: This dpaste shows a couple of issues with combining chars in D. https://dpaste.dzfl.pl/4b006959c5c0 The compiler actually can't handle a combining character literal either. see line 10. Your paste behaves as expected: the "character

Re: D's Auto Decoding and You

2016-06-02 Thread tsbockman via Digitalmars-d-announce
On Friday, 3 June 2016 at 03:16:33 UTC, jmh530 wrote: I'm just looking over std.uni's section on normalization and realizing that I had basically no idea what it is or what's going on. The wikipedia page on unicode equivalence is a bit clearer. This might help a bit, as well: https://dpas

Re: D's Auto Decoding and You

2016-06-02 Thread Rory McGuire via Digitalmars-d-announce
On Fri, Jun 3, 2016 at 5:16 AM, jmh530 via Digitalmars-d-announce wrote: > On Thursday, 2 June 2016 at 21:33:02 UTC, Andrei Alexandrescu wrote: >> >> >> Should I assume some normalization occurred on the way? >> > > I'm just looking over std.uni's section on normalization and realizing that > I ha

Re: D's Auto Decoding and You

2016-06-02 Thread jmh530 via Digitalmars-d-announce
On Thursday, 2 June 2016 at 21:33:02 UTC, Andrei Alexandrescu wrote: Should I assume some normalization occurred on the way? I'm just looking over std.uni's section on normalization and realizing that I had basically no idea what it is or what's going on. The wikipedia page on unicode equiv

Re: D's Auto Decoding and You

2016-06-02 Thread jmh530 via Digitalmars-d-announce
On Thursday, 2 June 2016 at 21:31:39 UTC, Jack Stouffer wrote: On Thursday, 2 June 2016 at 21:21:50 UTC, jmh530 wrote: I was a little confused by something in the main autodecoding thread, so I read your article again. Unfortunately, I don't think my confusion is resolved. I was trying one of y

Re: D's Auto Decoding and You

2016-06-02 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/2/16 5:27 PM, Steven Schveighoffer wrote: On 6/2/16 5:21 PM, jmh530 wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: If you think there should be any more information included in the article, please let me know so I can add it. I was a little confused by something in

Re: D's Auto Decoding and You

2016-06-02 Thread Steven Schveighoffer via Digitalmars-d-announce
On 6/2/16 5:21 PM, jmh530 wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: If you think there should be any more information included in the article, please let me know so I can add it. I was a little confused by something in the main autodecoding thread, so I read your ar

Re: D's Auto Decoding and You

2016-06-02 Thread Jack Stouffer via Digitalmars-d-announce
On Thursday, 2 June 2016 at 21:21:50 UTC, jmh530 wrote: I was a little confused by something in the main autodecoding thread, so I read your article again. Unfortunately, I don't think my confusion is resolved. I was trying one of your examples (full code I used below). You claim it works, but

Re: D's Auto Decoding and You

2016-06-02 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: If you think there should be any more information included in the article, please let me know so I can add it. I was a little confused by something in the main autodecoding thread, so I read your article again. Unfortunately, I do

Re: D's Auto Decoding and You

2016-05-20 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: Related discussion https://trello.com/c/4XmFdcp6/163-rediscuss-redundant-utf-8-string-validation.

Re: D's Auto Decoding and You

2016-05-20 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, May 19, 2016 13:11:47 jmh530 via Digitalmars-d-announce wrote: > On Thursday, 19 May 2016 at 12:10:36 UTC, Jonathan M Davis wrote: > > [snip] > > Very informative, as always. > > I had not realized the implication of front being called without > parens, such as front being something th

Re: D's Auto Decoding and You

2016-05-19 Thread John Carter via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html There are lots of places where invalid Unicode is either commonplace or legal, e.g. Linux file names, and therefore auto decoding cannot be used. It turns out in the wild th

Re: D's Auto Decoding and You

2016-05-19 Thread Jack Stouffer via Digitalmars-d-announce
On Thursday, 19 May 2016 at 17:16:54 UTC, Taylor Hillegeist wrote: If people want auto coding behavior shouldn't they just use or convert to dchar? No, they need to _decode_ to dchar. I don't know if you miss-typed, but if you didn't, this is exactly what I was talking about in the article:

Re: D's Auto Decoding and You

2016-05-19 Thread Taylor Hillegeist via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Based on the recent thread in General, I wrote this blog post that's designed to be part beginner tutorial, part objective record of the debate over it, and finally my opinio

Re: D's Auto Decoding and You

2016-05-19 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, May 19, 2016 at 09:21:40AM -0400, Steven Schveighoffer via Digitalmars-d-announce wrote: > On 5/17/16 8:36 PM, H. S. Teoh via Digitalmars-d-announce wrote: > > On Tue, May 17, 2016 at 08:19:48PM +, Vladimir Panteleev via > > Digitalmars-d-announce wrote: > > > On Tuesday, 17 May 2016

Re: D's Auto Decoding and You

2016-05-19 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/17/16 8:36 PM, H. S. Teoh via Digitalmars-d-announce wrote: On Tue, May 17, 2016 at 08:19:48PM +, Vladimir Panteleev via Digitalmars-d-announce wrote: On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: However, it's perfectly legal for a front function not to be tagg

Re: D's Auto Decoding and You

2016-05-19 Thread jmh530 via Digitalmars-d-announce
On Thursday, 19 May 2016 at 12:10:36 UTC, Jonathan M Davis wrote: [snip] Very informative, as always. I had not realized the implication of front being called without parens, such as front being something that isn't an @property function (esp. variable). Are there any ranges in phobos (you

Re: D's Auto Decoding and You

2016-05-19 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, May 19, 2016 09:05:53 Kagamin via Digitalmars-d-announce wrote: > On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote: > > So, while we do have enforcement of how ranges _can_ be used, > > we don't have enforcement of how they _are_ used, and I don't > > expect that we'll

Re: D's Auto Decoding and You

2016-05-19 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, May 18, 2016 22:23:45 jmh530 via Digitalmars-d-announce wrote: > On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote: > > At this point, if anyone ever calls front with parens, they're > > doing it wrong. > > Is this true of all @property functions? Should this be noted

Re: D's Auto Decoding and You

2016-05-19 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote: So, while we do have enforcement of how ranges _can_ be used, we don't have enforcement of how they _are_ used, and I don't expect that we'll ever get that. It would help if there was documented standard testing procedure (and

Re: D's Auto Decoding and You

2016-05-18 Thread Jack Stouffer via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 22:23:45 UTC, jmh530 wrote: Is this true of all @property functions? No, this is purely a range thing where it's legal to have your front be a public member variable rather than a getter function. Should this be noted in the spec? While somewhat supported in t

Re: D's Auto Decoding and You

2016-05-18 Thread Jack Stouffer via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote: At this point, if anyone ever calls front with parens, they're doing it wrong. $ cd ~/dlang/phobos && grep -r "\.front()" * | wc -l 3 Not bad. One is commented out and the other two look intentional.

Re: D's Auto Decoding and You

2016-05-18 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote: At this point, if anyone ever calls front with parens, they're doing it wrong. Is this true of all @property functions? Should this be noted in the spec? Should it be an error? If it shouldn't be an error, is it really such

Re: D's Auto Decoding and You

2016-05-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, May 17, 2016 17:36:44 H. S. Teoh via Digitalmars-d-announce wrote: > On Tue, May 17, 2016 at 08:19:48PM +, Vladimir Panteleev via Digitalmars-d-announce wrote: > > On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: > > >However, it's perfectly legal for a front fu

Re: D's Auto Decoding and You

2016-05-17 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 16:24:31 UTC, jmh530 wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Based on the recent thread in General, I wrote this blog post that's designed to be part beginner tutorial, part object

Re: D's Auto Decoding and You

2016-05-17 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, May 17, 2016 at 02:06:37PM +, Jack Stouffer via Digitalmars-d-announce wrote: > http://jackstouffer.com/blog/d_auto_decoding_and_you.html [...] Thanks for writing up this article! T -- What did the alien say to Schubert? "Take me to your lieder."

Re: D's Auto Decoding and You

2016-05-17 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, May 17, 2016 at 08:19:48PM +, Vladimir Panteleev via Digitalmars-d-announce wrote: > On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: > >However, it's perfectly legal for a front function not to be tagged > >@property. > > BTW, where is this coming from? Is it simp

Re: D's Auto Decoding and You

2016-05-17 Thread Vladimir Panteleev via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: However, it's perfectly legal for a front function not to be tagged @property. BTW, where is this coming from? Is it simply an emergent property of the existing implementations of isInputRange and ElementType, or is it actua

Re: D's Auto Decoding and You

2016-05-17 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/17/16 2:23 PM, Vladimir Panteleev wrote: On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: On 5/17/16 1:18 PM, Vladimir Panteleev wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Thanks for

Re: D's Auto Decoding and You

2016-05-17 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/17/16 1:49 PM, Rory McGuire via Digitalmars-d-announce wrote: On 17 May 2016 16:21, "Steven Schveighoffer via Digitalmars-d-announce" mailto:digitalmars-d-announce@puremagic.com>> wrote: > > On 5/17/16 10:06 AM, Jack Stouffer wrote: >> >> http://jackstouffer.com/blog/d_auto_decoding_and

Re: D's Auto Decoding and You

2016-05-17 Thread Vladimir Panteleev via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 17:26:59 UTC, Steven Schveighoffer wrote: On 5/17/16 1:18 PM, Vladimir Panteleev wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Thanks for writing this. Great article. Some remarks:

Re: D's Auto Decoding and You

2016-05-17 Thread Rory McGuire via Digitalmars-d-announce
On 17 May 2016 16:21, "Steven Schveighoffer via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > > On 5/17/16 10:06 AM, Jack Stouffer wrote: >> >> http://jackstouffer.com/blog/d_auto_decoding_and_you.html >> >> Based on the recent thread in General, I wrote this blog post th

Re: D's Auto Decoding and You

2016-05-17 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/17/16 1:18 PM, Vladimir Panteleev wrote: On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Thanks for writing this. Great article. Some remarks: static assert(is(typeof(s.front()) == dchar)); I believe .front is

Re: D's Auto Decoding and You

2016-05-17 Thread Vladimir Panteleev via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Thanks for writing this. Great article. Some remarks: static assert(is(typeof(s.front()) == dchar)); I believe .front is a property (so some ranges can implement it a

Re: D's Auto Decoding and You

2016-05-17 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:06:37 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Based on the recent thread in General, I wrote this blog post that's designed to be part beginner tutorial, part objective record of the debate over it, and finally my opinio

Re: D's Auto Decoding and You

2016-05-17 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:44:06 UTC, Steven Schveighoffer wrote: ... Thanks, fixed all issues. Like the article, pretty much sums up my thoughts too. Thanks!

Re: D's Auto Decoding and You

2016-05-17 Thread Steven Schveighoffer via Digitalmars-d-announce
Grammar: "This will tie in later because the string types front has special behavior" ...because for string types, front has... Content: "For C style strings, you can use ubyte[] and call std.string.assumeUTF where necessary" Actually, C style strings are ASCII, no? UTF8 includes ASCII. And

Re: D's Auto Decoding and You

2016-05-17 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:16:48 UTC, Steven Schveighoffer wrote: Starting to read it, see errors in your examples: is(s[0] == immutable char) -> is(typeof(s[0]) == immutable(char)) is(s.front == dchar) -> is(typeof(s.front()) == dchar) Thanks, fixed.

Re: D's Auto Decoding and You

2016-05-17 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/17/16 10:06 AM, Jack Stouffer wrote: http://jackstouffer.com/blog/d_auto_decoding_and_you.html Based on the recent thread in General, I wrote this blog post that's designed to be part beginner tutorial, part objective record of the debate over it, and finally my opinions on the matter. Whe

D's Auto Decoding and You

2016-05-17 Thread Jack Stouffer via Digitalmars-d-announce
http://jackstouffer.com/blog/d_auto_decoding_and_you.html Based on the recent thread in General, I wrote this blog post that's designed to be part beginner tutorial, part objective record of the debate over it, and finally my opinions on the matter. When I first learned about auto-decoding,