Re: D1: Error: duplicate union initialization for size

2014-08-28 Thread Jacob Carlborg via Digitalmars-d-learn
On 27/08/14 23:48, jicman wrote: On Wednesday, 27 August 2014 at 06:20:24 UTC, Jacob Carlborg wrote: On 23/08/14 19:50, jicman wrote: This is line 7634: const Size DEFAULT_SCALE = { 5, 13 }; What does the error say and how can I fix it? Thanks. Does the following make any difference?

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread ketmar via Digitalmars-d-learn
On Wed, 27 Aug 2014 20:17:10 + Brian Schott via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: It would be nice if we could at least allow both nothrow and @nothrow. here it is, another useless patch: https://issues.dlang.org/show_bug.cgi?id=13388 i'm sure that it will never

C++ namespaces

2014-08-28 Thread Vasileios Anagnostopoulos via Digitalmars-d-learn
Hi, in the 2.066 changelog I saw something for supporting c++ namespaces. I thought this was not possible. Which implementation does this refer? (compiler/architecture) thank you very much. -- Dr. Vasileios Anagnostopoulos (MSc,PhD) Researcher/Developer ICCS/NTUA 9 Heroon Polytechneiou

Re: Learning D the GTK+ way [was Learning D]

2014-08-28 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2014-08-27 at 13:25 +, Ryan via Digitalmars-d-learn wrote: […] I'm thinking I will probably create a more in depth GTK+ hello world that attempts to covers some of the current D landscape. Exactly what I am doing :-) For instance I now understand how DMD and RDMD work and how

Re: sdlang-d can not link after updating to dmd 2.066

2014-08-28 Thread Puming via Digitalmars-d-learn
I updated dub to 0.9.22 and still got the same error... THis is the output of `dub build --force`: --- output --- ## Warning for package sdlang-d ## The following compiler flags have been specified in the package description file. They are handled by DUB and direct use in packages is

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 21:43:40 UTC, bearophile wrote: rcor: I've tried to express my problem in a mostly minimal example here: https://gist.github.com/murphyslaw480/d4a5f857a104bcf62de1 The class Point has an alias this to its own property 'feature()', which returns a reference to

How to cast to void*, while bypassing alias this or opCast

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
I'm investigating a phobos regression. From doesPointTo: // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*) source; // Basically, given a pointer like structure, I want the void* equivalent. I really don't care about how S

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:38:12 UTC, monarch_dodra wrote: On Wednesday, 27 August 2014 at 21:43:40 UTC, bearophile wrote: rcor: It compiles if you use: @property auto feature() const pure nothrow { return _feature; } Otherwise I get strange errors like:

Re: How to cast to void*, while bypassing alias this or opCast

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:45:52 UTC, monarch_dodra wrote: I'm investigating a phobos regression. From doesPointTo: // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*) source; // Basically, given a pointer like structure,

Re: How to cast to void*, while bypassing alias this or opCast

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 11:02:03 UTC, anonymous wrote: On Thursday, 28 August 2014 at 10:45:52 UTC, monarch_dodra wrote: I'm investigating a phobos regression. From doesPointTo: // static if (isPointer!S || is(S == class) || is(S == interface)) { const m = cast(void*)

Re: Issue with dmd 2.066, alias this, and sort

2014-08-28 Thread monarch_dodra via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:54:47 UTC, monarch_dodra wrote: Phobos issue: http://forum.dlang.org/thread/uignsankcumgmhwpo...@forum.dlang.org#post-uignsankcumgmhwpoead:40forum.dlang.org https://github.com/D-Programming-Language/phobos/pull/2472

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Aerolite via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 20:17:11 UTC, Brian Schott wrote: It would be nice if we could at least allow both nothrow and @nothrow. Because nothrow is already a keyword there's no possibility of a UDA overriding it. This would at least give people the option of making their code look

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread ketmar via Digitalmars-d-learn
On Thu, 28 Aug 2014 11:50:48 + Aerolite via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: So no chance even of this? already done: https://issues.dlang.org/show_bug.cgi?id=13388 signature.asc Description: PGP signature

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
Brian Schott wrote in message news:pbfgiwaxsdxdxetpi...@forum.dlang.org... The delete keyword is deprecated[1] and making that decision never broke any code. [1] http://dlang.org/deprecate.html#delete If you look at the table up the top, delete hasn't actually been deprecated yet. If

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread Gary Willoughby via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 20:41:47 UTC, Marc Schütz wrote: On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? This is bizarre... I tried

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? That's because when not mixed into a class, Proxy did import std.traits: static if

Re: Is this a bug when creating proxies in classes?

2014-08-28 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 28 August 2014 at 16:23:48 UTC, anonymous wrote: On Tuesday, 26 August 2014 at 18:13:52 UTC, Gary Willoughby wrote: With that in mind what is strange is that if in my example you change the class for a struct everything works as expected. Why is that? That's because when not

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, 28 August 2014 at 15:01:58 UTC, Daniel Murphy wrote: Brian Schott wrote in message news:pbfgiwaxsdxdxetpi...@forum.dlang.org... The delete keyword is deprecated[1] and making that decision never broke any code. [1] http://dlang.org/deprecate.html#delete If you look at the

Re: DIP64 - Regarding 'pure' and 'nothrow'

2014-08-28 Thread Daniel Murphy via Digitalmars-d-learn
Jonathan M Davis wrote in message news:xjmfhegvanqdivhbt...@forum.dlang.org... AFAIK, the only reason that it's not deprecated is that no one has bothered to make the change (and you didn't want to deprecate it when you went through all of those and updated their status a while back).

Building library

2014-08-28 Thread papaboo via Digitalmars-d-learn
Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module layout is test.d src/math/vector.d - module dragonfly.math.vector

Re: Building library

2014-08-28 Thread Cassio Butrico via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module

Re: Building library

2014-08-28 Thread anonymous via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: My current file and module layout is test.d src/math/vector.d - module dragonfly.math.vector src/math/quaternion.d - module dragonfly.math.quaternion Compiling with $ dmd test.d src/math/vector.d src/math/quaternion.d ./test works

Re: C++ namespaces

2014-08-28 Thread Dicebot via Digitalmars-d-learn
On Friday, 29 August 2014 at 02:10:56 UTC, Vasileios Anagnostopoulos via Digitalmars-d-learn wrote: Hi, in the 2.066 changelog I saw something for supporting c++ namespaces. I thought this was not possible. Which implementation does this refer? (compiler/architecture) thank you very

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Andrew Godfrey via Digitalmars-d-learn
On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via Digitalmars-d-learn wrote: In D you just use '.' throughout and it Just Works(tm). Unless the property you're accessing is also a pointer property, like sizeof. Then you have to be careful. The below prints 4 then 8 (on 32-bit):

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via Digitalmars-d-learn wrote: On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via Digitalmars-d-learn wrote: In D you just use '.' throughout and it Just Works(tm). Unless the property you're accessing is also a pointer

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Andrew Godfrey via Digitalmars-d-learn
On Friday, 29 August 2014 at 05:05:55 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via Digitalmars-d-learn wrote: Unless the property you're accessing is also a pointer property, like sizeof. Then you have to be careful. True. Though

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Aug 29, 2014 at 05:28:12AM +, Andrew Godfrey via Digitalmars-d-learn wrote: On Friday, 29 August 2014 at 05:05:55 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Aug 29, 2014 at 04:37:37AM +, Andrew Godfrey via Digitalmars-d-learn wrote: Unless the property you're

Re: Does D provide automatic dereferencing for accessing members through pointers?

2014-08-28 Thread Ali Çehreli via Digitalmars-d-learn
On 08/28/2014 09:37 PM, Andrew Godfrey wrote: On Friday, 29 August 2014 at 02:10:46 UTC, H. S. Teoh via Digitalmars-d-learn wrote: In D you just use '.' throughout and it Just Works(tm). Unless the property you're accessing is also a pointer property, like sizeof. Then you have to be