April 29, 2015
On Tuesday, 28 April 2015 at 21:19:53 UTC, Vladimir Panteleev wrote:
> On Tuesday, 28 April 2015 at 10:24:27 UTC, Andrea Fontana wrote:
>> Trying on d.godbolt.com it seems a lot of extra-code is generated for the first version.
>
> d.godbolt.com is dead, use asm.dlang.org

d.godbolt.org (note .org not .com) works fine and will be updated to the latest GDC shortly. asm.dlang.org only has DMD.
April 29, 2015
On 29 Apr 2015 09:05, "John Colvin via Digitalmars-d" < digitalmars-d@puremagic.com> wrote:
>
> On Tuesday, 28 April 2015 at 21:19:53 UTC, Vladimir Panteleev wrote:
>>
>> On Tuesday, 28 April 2015 at 10:24:27 UTC, Andrea Fontana wrote:
>>>
>>> Trying on d.godbolt.com it seems a lot of extra-code is generated for
the first version.
>>
>>
>> d.godbolt.com is dead, use asm.dlang.org
>
>
> d.godbolt.org (note .org not .com) works fine and will be updated to the
latest GDC shortly. asm.dlang.org only has DMD.

Well it's using frontend 2.055, which I guess would put it at gdc-4.6 in Debian repos.


April 29, 2015
On Tuesday, 28 April 2015 at 22:29:40 UTC, Steven Schveighoffer wrote:
> On 4/28/15 6:00 PM, Vladimir Panteleev wrote:
>> On Tuesday, 28 April 2015 at 21:42:04 UTC, Steven Schveighoffer wrote:
>>> On 4/27/15 10:36 PM, Vladimir Panteleev wrote:
>>>> http://blog.thecybershadow.net/2015/04/28/the-amazing-template-which-does-nothing/
>>>>
>>>>
>>>
>>> Very cool.
>>>
>>> Just a grammar nit, "an UFCS" should be "a UFCS".
>>
>> Fixed, thanks. (I always found this rule counter-intuitive... "u" is a
>> vowel dangit!)
>
> And in most cases, 'an' is correct. It's only when it makes a "you" sound (and if you spell out your acronyms, 'U' does), when you want to use 'a' :)
>
> an upsetting rule ('uh')
> an uber-cool language ('oo')
> a unique grammar problem ('you')
>
> -Steve

Yeah, because the sound in `you` or the letter <u> is not a full vowel but a semi-vowel /j/ (cf. German `ja`), also: a "voiced palatal approximant":

https://en.wikipedia.org/wiki/Palatal_approximant

Whenever a phonetic /u(:)/ becomes a /ju(:)/ (for whatever reason), rules for vowels no longer apply, simply because it is (phonetically speaking) no longer vowel, e.g. an + V => a + /j/. Cf

a utilitarian point of view (*an utilitarian) /juː/

The spelling rule upsets you, because there is a mismatch between what you see on the page and how you pronounce it (vowel vs. consonant/semi-vowel). It also works the other way around:

- an STL expert
- a PhD student

<s> describes a consonant but is pronounced with a vowel here /es/. Thus, you have to write `an`.

Just follow your natural way of speaking and you'll be fine. Read it out to yourself. And let's be honest, it sounds really crap when you read "an UFCS", bahhh!
April 29, 2015
On Wednesday, 29 April 2015 at 06:56:37 UTC, Nikolay wrote:
> On Tuesday, 28 April 2015 at 02:36:38 UTC, Vladimir Panteleev wrote:
>> http://blog.thecybershadow.net/2015/04/28/the-amazing-template-which-does-nothing/
>
> Thanks for good article
>
> little mistake: return from void function:
>
> /// Search a website for something, and parse the
> /// first search result's webpage.
> void getItemInfo(string itemName)
> {
>     // Let's go! First, construct the URL.
>     return ("http://www.example.com/search?q=" ~ encodeComponent(itemName))
>      .......

Fixed, thanks. Though, you technically still can use "return expression" in a void function, as long as expression's type is void :)
April 29, 2015
On Wednesday, 29 April 2015 at 09:44:27 UTC, Chris wrote:
> Just follow your natural way of speaking and you'll be fine. Read it out to yourself. And let's be honest, it sounds really crap when you read "an UFCS", bahhh!

Yes, well, the problem is that "an U" sounds completely fine in my head!

The way you pronounce the U letter in the English alphabet is the same (not sure if identical) as the Russian letter Ю, which is considered a vowel in Russian.
April 29, 2015
On Wednesday, 29 April 2015 at 09:57:01 UTC, Vladimir Panteleev wrote:
> On Wednesday, 29 April 2015 at 09:44:27 UTC, Chris wrote:
>> Just follow your natural way of speaking and you'll be fine. Read it out to yourself. And let's be honest, it sounds really crap when you read "an UFCS", bahhh!
>
> Yes, well, the problem is that "an U" sounds completely fine in my head!
>
> The way you pronounce the U letter in the English alphabet is the same (not sure if identical) as the Russian letter Ю, which is considered a vowel in Russian.

In that case you'll just have to learn the rule: if it's a single letter, it has to be `an`. Sorry, I didn't realize that /j/ is treated as a vowel in Russian. I was thinking of languages I'm familiar with, and there /j/ is always treated as a consonant. Is the Russian sound a fricative or a pure vowel without any friction (= obstruction)?
April 29, 2015
On Wednesday, 29 April 2015 at 10:09:39 UTC, Chris wrote:
> On Wednesday, 29 April 2015 at 09:57:01 UTC, Vladimir Panteleev wrote:
>> On Wednesday, 29 April 2015 at 09:44:27 UTC, Chris wrote:
>>> Just follow your natural way of speaking and you'll be fine. Read it out to yourself. And let's be honest, it sounds really crap when you read "an UFCS", bahhh!
>>
>> Yes, well, the problem is that "an U" sounds completely fine in my head!
>>
>> The way you pronounce the U letter in the English alphabet is the same (not sure if identical) as the Russian letter Ю, which is considered a vowel in Russian.
>
> In that case you'll just have to learn the rule: if it's a single letter, it has to be `an`. Sorry, I didn't realize that /j/ is treated as a vowel in Russian. I was thinking of languages I'm familiar with, and there /j/ is always treated as a consonant. Is the Russian sound a fricative or a pure vowel without any friction (= obstruction)?

Can't answer that question, but <Ю> is actually [ju] in isolation, that is, a glide + a vowel. When preceded by a consonant, that glide is not pronounced, instead the consonant gets palatalized. Thus it would be better to say that /ju/ is treated as a vowel, not /j/.
April 29, 2015
On Wednesday, 29 April 2015 at 07:49:34 UTC, Iain Buclaw wrote:
> On 29 Apr 2015 09:05, "John Colvin via Digitalmars-d" <
> digitalmars-d@puremagic.com> wrote:
>>
>> On Tuesday, 28 April 2015 at 21:19:53 UTC, Vladimir Panteleev wrote:
>>>
>>> On Tuesday, 28 April 2015 at 10:24:27 UTC, Andrea Fontana wrote:
>>>>
>>>> Trying on d.godbolt.com it seems a lot of extra-code is generated for
> the first version.
>>>
>>>
>>> d.godbolt.com is dead, use asm.dlang.org
>>
>>
>> d.godbolt.org (note .org not .com) works fine and will be updated to the
> latest GDC shortly. asm.dlang.org only has DMD.
>
> Well it's using frontend 2.055, which I guess would put it at gdc-4.6 in
> Debian repos.

Did you check the dropdown menu? There's 4.9 in there.

Hopefully the latest release from gdcproject.org will be added in the next couple of days
April 29, 2015
On 29 April 2015 at 12:16, John Colvin via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Wednesday, 29 April 2015 at 07:49:34 UTC, Iain Buclaw wrote:
>>
>> On 29 Apr 2015 09:05, "John Colvin via Digitalmars-d" < digitalmars-d@puremagic.com> wrote:
>>>
>>>
>>> On Tuesday, 28 April 2015 at 21:19:53 UTC, Vladimir Panteleev wrote:
>>>>
>>>>
>>>> On Tuesday, 28 April 2015 at 10:24:27 UTC, Andrea Fontana wrote:
>>>>>
>>>>>
>>>>> Trying on d.godbolt.com it seems a lot of extra-code is generated for
>>
>> the first version.
>>>>
>>>>
>>>>
>>>> d.godbolt.com is dead, use asm.dlang.org
>>>
>>>
>>>
>>> d.godbolt.org (note .org not .com) works fine and will be updated to the
>>
>> latest GDC shortly. asm.dlang.org only has DMD.
>>
>> Well it's using frontend 2.055, which I guess would put it at gdc-4.6 in Debian repos.
>
>
> Did you check the dropdown menu? There's 4.9 in there.
>
> Hopefully the latest release from gdcproject.org will be added in the next couple of days

Ah!  I was on my phone and didn't notice. :-O
April 29, 2015
On Wednesday, 29 April 2015 at 10:15:52 UTC, Marc Schütz wrote:
> On Wednesday, 29 April 2015 at 10:09:39 UTC, Chris wrote:
>> On Wednesday, 29 April 2015 at 09:57:01 UTC, Vladimir Panteleev wrote:
>>> On Wednesday, 29 April 2015 at 09:44:27 UTC, Chris wrote:
>>>> Just follow your natural way of speaking and you'll be fine. Read it out to yourself. And let's be honest, it sounds really crap when you read "an UFCS", bahhh!
>>>
>>> Yes, well, the problem is that "an U" sounds completely fine in my head!
>>>
>>> The way you pronounce the U letter in the English alphabet is the same (not sure if identical) as the Russian letter Ю, which is considered a vowel in Russian.
>>
>> In that case you'll just have to learn the rule: if it's a single letter, it has to be `an`. Sorry, I didn't realize that /j/ is treated as a vowel in Russian. I was thinking of languages I'm familiar with, and there /j/ is always treated as a consonant. Is the Russian sound a fricative or a pure vowel without any friction (= obstruction)?
>
> Can't answer that question, but <Ю> is actually [ju] in isolation, that is, a glide + a vowel. When preceded by a consonant, that glide is not pronounced, instead the consonant gets palatalized. Thus it would be better to say that /ju/ is treated as a vowel, not /j/.

Hm, a glide is not necessarily a fricative. In English the /j/ sometimes comes close to /ç/, as in German `ich`. A glide would be more like /ɪu/, however, in this environment glides tend to have some sort of friction, it's almost unavoidable. Interesting, though, how the same sounds are perceived differently in different languages.