Re: Why 2 ^^ 1 ^^ 2 = 2?

2017-10-26 Thread Kagamin via Digitalmars-d-learn
On Sunday, 22 October 2017 at 22:28:48 UTC, Ivan Kazmenko wrote: Yeah, and a height-3 tower $a^{b^c}$ (TEX notation) actually means "a to the power of (b to the power of c)", not the other way around. Because you have explicit braces there. Math doesn't have precedence for exponentiation oper

Re: Why 2 ^^ 1 ^^ 2 = 2?

2017-10-26 Thread Kagamin via Digitalmars-d-learn
On Sunday, 22 October 2017 at 22:28:48 UTC, Ivan Kazmenko wrote: Yeah, and a height-3 tower $a^{b^c}$ (TEX notation) Is $a^{b^c}$ the same as ${a^b}^c$ ? They are drawn slightly differently, so I suppose it's ambiguous indeed.

Empty UDA for classes not allowed?

2017-10-26 Thread bauss via Digitalmars-d-learn
Why is it not allowed to have empty UDAs for classes? Let's say we have an UDA like this: struct Exclude { } Then we want to put it on a class like: @Exclude class Foo { ... } This will fail with the following error: Error: type Exclude has no value But on everything else we can place an

DateTime trying to do it at compile time.

2017-10-26 Thread Mr. Jonse via Digitalmars-d-learn
C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2395): Error: variable lock cannot be modified at compile time C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2422): called from here: initOnceLock() C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2422): c

Re: DateTime trying to do it at compile time.

2017-10-26 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 26 October 2017 at 17:55:05 UTC, Mr. Jonse wrote: when calling Clock.currTime() in a this() in a class. I have no idea why it is trying to do it at compile time and failing. I thought if ctfe couldn't compile it would do it at run time anyways? Seems like a bug. I suspect you're

Re: DateTime trying to do it at compile time.

2017-10-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, October 26, 2017 17:55:05 Mr. Jonse via Digitalmars-d-learn wrote: > C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2395): > Error: variable lock cannot be modified at compile time > C:\D\dmd2\windows\bin\..\..\src\phobos\std\concurrency.d(2422): > called from here: in

Re: Empty UDA for classes not allowed?

2017-10-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, October 26, 2017 15:09:48 bauss via Digitalmars-d-learn wrote: > Why is it not allowed to have empty UDAs for classes? > > Let's say we have an UDA like this: > struct Exclude { } > > Then we want to put it on a class like: > > @Exclude class Foo > { > ... > } > > This will fail w

Re: Empty UDA for classes not allowed?

2017-10-26 Thread bauss via Digitalmars-d-learn
On Thursday, 26 October 2017 at 21:24:43 UTC, Jonathan M Davis wrote: On Thursday, October 26, 2017 15:09:48 bauss via Digitalmars-d-learn wrote: [...] It worked just fine when I just tried it on my machine - both with dmd master and with 2.076.1. Are you using an older version of the compil

The website dlang.org load slowly in China

2017-10-26 Thread netmou (come from china) via Digitalmars-d-learn
Great wall prevent browser to load resource from some IP (eg:google.com) So the best way is remove CDN resource

Re: Empty UDA for classes not allowed?

2017-10-26 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 26 October 2017 at 15:09:48 UTC, bauss wrote: Why is it not allowed to have empty UDAs for classes? Let's say we have an UDA like this: struct Exclude { } Then we want to put it on a class like: @Exclude class Foo { ... } This will fail with the following error: Error: type E