Re: Antti-Ville Tuuainen passes his midterm evaulations for GSoC 2012

2012-07-14 Thread deadalnix
On 12/07/2012 22:49, dsimcha wrote: Congratulations to Antti-Ville Tuuainen for passing the GSoC 2012 midterm evaluation! Despite going through a steep learning curve to learn D's template metaprogramming system, Antti-Ville has precise heap scanning for the garbage collector close to working

Re: Some guidance on writing a Deimos C library interface

2012-07-14 Thread Johannes Pfau
Am Sat, 14 Jul 2012 05:24:50 +0200 schrieb Jens Mueller jens.k.muel...@gmx.de: * const T* should be replaced with const(T)* When it's a function parameter you could even make it const(T*): void hello(const char *name); -- extern(C) void hello(const(char*) name); as the pointer itself is passed

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 12:31 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/13/12 3:49 PM, Gor Gyolchanyan wrote: On Fri, Jul 13, 2012 at 11:41 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:SeeWebsiteForEmail@**erdani.orgseewebsiteforem...@erdani.org

Re: Move semantics for D

2012-07-14 Thread monarch_dodra
On Friday, 13 July 2012 at 22:27:01 UTC, Jonathan M Davis wrote: On Friday, July 13, 2012 14:11:44 monarch_dodra wrote: But I still feel that the internal call to opSlice/copy is really a just trap disguised as a safety net... Yeah. Kind of. The thing is that there's no way around the fact

Re: FYI: Ceylon

2012-07-14 Thread Alex Rønne Petersen
On 14-07-2012 07:00, Nick Sabalausky wrote: On Fri, 13 Jul 2012 16:49:03 -0700 H. S. Teohhst...@quickfur.ath.cx wrote: On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote: I took a quick look at the Ceylon language (http://ceylon-lang.org/) [...] They also have couple of

Re: nested class inheritance

2012-07-14 Thread Guillaume Chatelet
On 07/13/12 21:41, Andrei Alexandrescu wrote: On 7/13/12 3:36 PM, Gor Gyolchanyan wrote: The initial question was: why does DMD 2.059 reject this if this makes sense? It's not even a new feature. It's a (possibly) new (and apparently sensible) use case of an existing feature. I think the

Re: nested class inheritance

2012-07-14 Thread Vladimir Panteleev
On Friday, 13 July 2012 at 18:00:05 UTC, Gor Gyolchanyan wrote: Which doesn't make sense, IMO. What do you guys think about this? Who makes more sense me or DMD 2.059? http://d.puremagic.com/issues/show_bug.cgi?id=1175 https://github.com/D-Programming-Language/dmd/pull/889

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 1:36 PM, Guillaume Chatelet chatelet.guilla...@gmail.com wrote: On 07/13/12 21:41, Andrei Alexandrescu wrote: On 7/13/12 3:36 PM, Gor Gyolchanyan wrote: The initial question was: why does DMD 2.059 reject this if this makes sense? It's not even a new feature.

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 1:41 PM, Vladimir Panteleev vladi...@thecybershadow.net wrote: On Friday, 13 July 2012 at 18:00:05 UTC, Gor Gyolchanyan wrote: Which doesn't make sense, IMO. What do you guys think about this? Who makes more sense me or DMD 2.059?

Re: nested class inheritance

2012-07-14 Thread Jonathan M Davis
On Saturday, July 14, 2012 13:47:29 Gor Gyolchanyan wrote: I see it's already merged. I presume this will end up in DMD 2.060, right? Anything and everything which has already been merged on github will end up in the next release of dmd unless it's reverted or altered by another commit prior

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 1:56 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Saturday, July 14, 2012 13:47:29 Gor Gyolchanyan wrote: I see it's already merged. I presume this will end up in DMD 2.060, right? Anything and everything which has already been merged on github will end up in

Re: nested class inheritance

2012-07-14 Thread Jonathan M Davis
On Saturday, July 14, 2012 14:00:14 Gor Gyolchanyan wrote: That's great. That means, I don't have to work around it and I can just wait a bit until DMD 2.060 comes out. Btw, when will it happen? No idea. Normally, releases have been happening every 2 months or so, but we're at just passed 3

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 2:04 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Saturday, July 14, 2012 14:00:14 Gor Gyolchanyan wrote: That's great. That means, I don't have to work around it and I can just wait a bit until DMD 2.060 comes out. Btw, when will it happen? No idea. Normally,

Re: nested class inheritance

2012-07-14 Thread Jonathan M Davis
On Saturday, July 14, 2012 14:21:01 Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 2:04 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Saturday, July 14, 2012 14:00:14 Gor Gyolchanyan wrote: That's great. That means, I don't have to work around it and I can just wait a bit until DMD

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 2:35 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Saturday, July 14, 2012 14:21:01 Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 2:04 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Saturday, July 14, 2012 14:00:14 Gor Gyolchanyan wrote: That's great.

D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This means, having the back-end as a library solution. This would automatically provide 100% compile-time code introspection. This

Re: nested class inheritance

2012-07-14 Thread Paulo Pinto
Am 14.07.2012 11:45, schrieb Gor Gyolchanyan: On Sat, Jul 14, 2012 at 1:36 PM, Guillaume Chatelet chatelet.guilla...@gmail.com mailto:chatelet.guilla...@gmail.com wrote: On 07/13/12 21:41, Andrei Alexandrescu wrote: On 7/13/12 3:36 PM, Gor Gyolchanyan wrote: The initial question

Re: FYI: Ceylon

2012-07-14 Thread Paulo Pinto
Am 14.07.2012 07:13, schrieb H. S. Teoh: On Sat, Jul 14, 2012 at 01:00:18AM -0400, Nick Sabalausky wrote: On Fri, 13 Jul 2012 16:49:03 -0700 H. S. Teohhst...@quickfur.ath.cx wrote: On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote: I took a quick look at the Ceylon language

Re: D front-end in D for D

2012-07-14 Thread Paulo Pinto
Am 14.07.2012 12:48, schrieb Gor Gyolchanyan: I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This means, having the back-end as a library solution. This would automatically

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 3:16 PM, Paulo Pinto pj...@progtools.org wrote: Am 14.07.2012 12:48, schrieb Gor Gyolchanyan: I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This

Re: FYI: Ceylon

2012-07-14 Thread Timon Gehr
On 07/14/2012 07:13 AM, H. S. Teoh wrote: What boggles my mind is the fact that they have '===' *and* 'is'. I don't think I want to know what's the difference between them. 'is' is not a binary operator. It is the equivalent of 'instanceof' in Java. is Type object

Re: nested class inheritance

2012-07-14 Thread Andrei Alexandrescu
On 7/14/12 5:36 AM, Guillaume Chatelet wrote: class Fruit { class Seed { } } class Apple extends Fruit { class AppleSeed extends Fruit.Seed { Apple getOuter() { return Apple.this; } } } class Main { public static void main(String[] args)

Re: nested class inheritance

2012-07-14 Thread Guillaume Chatelet
On 07/14/12 13:51, Andrei Alexandrescu wrote: On 7/14/12 5:36 AM, Guillaume Chatelet wrote: class Fruit { class Seed { } } class Apple extends Fruit { class AppleSeed extends Fruit.Seed { Apple getOuter() { return Apple.this; } } }

Re: nested class inheritance

2012-07-14 Thread Guillaume Chatelet
On 07/14/12 11:41, Vladimir Panteleev wrote: On Friday, 13 July 2012 at 18:00:05 UTC, Gor Gyolchanyan wrote: Which doesn't make sense, IMO. What do you guys think about this? Who makes more sense me or DMD 2.059? http://d.puremagic.com/issues/show_bug.cgi?id=1175

Re: D front-end in D for D

2012-07-14 Thread Timon Gehr
On 07/14/2012 01:29 PM, Gor Gyolchanyan wrote: It would also make run-time mixins possible, which is absolutely amazing. It is amazingly unsafe, because at runtime there is no distinction between strings generated by the program and strings created from input to the program.

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 4:17 PM, Guillaume Chatelet chatelet.guilla...@gmail.com wrote: On 07/14/12 11:41, Vladimir Panteleev wrote: On Friday, 13 July 2012 at 18:00:05 UTC, Gor Gyolchanyan wrote: Which doesn't make sense, IMO. What do you guys think about this? Who makes more sense me

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 4:52 PM, Timon Gehr timon.g...@gmx.ch wrote: On 07/14/2012 01:29 PM, Gor Gyolchanyan wrote: It would also make run-time mixins possible, which is absolutely amazing. It is amazingly unsafe, because at runtime there is no distinction between strings generated by the

Re: D front-end in D for D

2012-07-14 Thread David
Run-time mixins can be used for incredibly powerful stuff, yet the same run-time mixins can be used for incredibly dangerous stuff. Just don't use them if you don't know exactly what you're doing. :-) I don't see any case where a runtime-mixin is the only solution (it's definitly the unsafest)

Re: D front-end in D for D

2012-07-14 Thread Kevin Cox
On Jul 14, 2012 9:15 AM, David d...@dav1d.de wrote: Run-time mixins can be used for incredibly powerful stuff, yet the same run-time mixins can be used for incredibly dangerous stuff. Just don't use them if you don't know exactly what you're doing. :-) I don't see any case where a

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 5:23 PM, Kevin Cox kevincox...@gmail.com wrote: On Jul 14, 2012 9:15 AM, David d...@dav1d.de wrote: Run-time mixins can be used for incredibly powerful stuff, yet the same run-time mixins can be used for incredibly dangerous stuff. Just don't use them if you

Re: Making uniform function call syntax more complete a feature

2012-07-14 Thread Simen Kjaeraas
On Thu, 12 Jul 2012 16:31:34 +0200, Christophe Travert trav...@phare.normalesup.org wrote: By the way, would it be possible to implement an opCmp that returns a double, to allow it to return a NaN ? That may allow to create values that are neither superior, nor inferior to other value, like

Re: D front-end in D for D

2012-07-14 Thread Alex Rønne Petersen
On 14-07-2012 12:48, Gor Gyolchanyan wrote: I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This means, having the back-end as a library solution. This would automatically

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 6:35 PM, Alex Rønne Petersen a...@lycus.org wrote: On 14-07-2012 12:48, Gor Gyolchanyan wrote: I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This

Re: D front-end in D for D

2012-07-14 Thread dennis luehring
Am 14.07.2012 14:52, schrieb Timon Gehr: On 07/14/2012 01:29 PM, Gor Gyolchanyan wrote: It would also make run-time mixins possible, which is absolutely amazing. It is amazingly unsafe, because at runtime there is no distinction between strings generated by the program and strings created

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 6:47 PM, dennis luehring dl.so...@gmx.net wrote: Am 14.07.2012 14:52, schrieb Timon Gehr: On 07/14/2012 01:29 PM, Gor Gyolchanyan wrote: It would also make run-time mixins possible, which is absolutely amazing. It is amazingly unsafe, because at runtime there is

Re: D front-end in D for D

2012-07-14 Thread dennis luehring
Am 14.07.2012 15:23, schrieb Kevin Cox: On Jul 14, 2012 9:15 AM, David d...@dav1d.de wrote: Run-time mixins can be used for incredibly powerful stuff, yet the same run-time mixins can be used for incredibly dangerous stuff. Just don't use them if you don't know exactly what you're doing. :-)

Re: D front-end in D for D

2012-07-14 Thread Timon Gehr
On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 6:35 PM, Alex Rønne Petersen a...@lycus.org mailto:a...@lycus.org wrote: On 14-07-2012 12:48, Gor Gyolchanyan wrote: I just got an amazing thought. If we end up getting a D front-end in D, I

Re: D front-end in D for D

2012-07-14 Thread David Piepgrass
On Saturday, 14 July 2012 at 10:48:56 UTC, Gor Gyolchanyan wrote: I just got an amazing thought. If we end up getting a D front-end in D, I think it would be possible to make the back-end in the same space as the code being compiled. This means, having the back-end as a library solution. This

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch wrote: On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 6:35 PM, Alex Rønne Petersen a...@lycus.org mailto:a...@lycus.org wrote: On 14-07-2012 12:48, Gor Gyolchanyan wrote: I just got an

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch wrote: On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 6:35 PM, Alex Rønne Petersen a...@lycus.org mailto:a...@lycus.org wrote: On 14-07-2012 12:48, Gor Gyolchanyan wrote: I just got an

Re: D front-end in D for D

2012-07-14 Thread Timon Gehr
On 07/14/2012 05:24 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: ... For instance, everybody seems to love hard-wiring the syntax into the

Re: D front-end in D for D

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 7:36 PM, Timon Gehr timon.g...@gmx.ch wrote: On 07/14/2012 05:24 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: ... For

Re: D front-end in D for D

2012-07-14 Thread Timon Gehr
On 07/14/2012 05:28 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 07/14/2012 04:44 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 6:35 PM, Alex Rønne Petersen a...@lycus.org

Re: D front-end in D for D

2012-07-14 Thread Timon Gehr
On 07/14/2012 05:42 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 7:36 PM, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 07/14/2012 05:24 PM, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 7:15 PM, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch

Re: nested class inheritance

2012-07-14 Thread deadalnix
On 13/07/2012 21:10, Andrei Alexandrescu wrote: On 7/13/12 3:07 PM, Gor Gyolchanyan wrote: On Fri, Jul 13, 2012 at 11:03 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:seewebsiteforem...@erdani.org wrote: On 7/13/12 2:30 PM, Gor Gyolchanyan wrote: The whole point is to have it

Re: nested class inheritance

2012-07-14 Thread deadalnix
On 14/07/2012 08:27, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 12:31 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:seewebsiteforem...@erdani.org wrote: On 7/13/12 3:49 PM, Gor Gyolchanyan wrote: On Fri, Jul 13, 2012 at 11:41 PM, Andrei Alexandrescu

Re: D front-end in D for D

2012-07-14 Thread deadalnix
On 14/07/2012 15:33, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 5:23 PM, Kevin Cox kevincox...@gmail.com mailto:kevincox...@gmail.com wrote: On Jul 14, 2012 9:15 AM, David d...@dav1d.de mailto:d...@dav1d.de wrote: Run-time mixins can be used for incredibly powerful stuff,

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 8:17 PM, deadalnix deadal...@gmail.com wrote: On 14/07/2012 08:27, Gor Gyolchanyan wrote: On Sat, Jul 14, 2012 at 12:31 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:SeeWebsiteForEmail@**erdani.orgseewebsiteforem...@erdani.org wrote: On

Re: nested class inheritance

2012-07-14 Thread Benjamin Thaut
The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) { this.outer = fruit; } } } class Apple: Fruit { void AppleOnlyMethod(){ ... } class AppleSeed: Fruit.Seed { void DoSomething() { AppleOnlyMethod(); } } auto

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 9:12 PM, Benjamin Thaut c...@benjamin-thaut.dewrote: The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) { this.outer = fruit; } } } class Apple: Fruit { void AppleOnlyMethod(){ ... } class

Re: Some guidance on writing a Deimos C library interface

2012-07-14 Thread Jacob Carlborg
On 2012-07-14 05:24, Jens Mueller wrote: Hi, there is some documentation on writing a Deimos interface. E.g. http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP12 http://dlang.org/interfaceToC.html I'd like to get a list of rules that one has to follow. First you have to convert the

Re: nested class inheritance

2012-07-14 Thread kenji hara
2012/7/15 Benjamin Thaut c...@benjamin-thaut.de: The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) { this.outer = fruit; Setting to pseudo variable 'outer' should be rejected in compilation. Please report it to bugzilla. } } }

Re: nested class inheritance

2012-07-14 Thread Benjamin Thaut
Am 14.07.2012 19:21, schrieb kenji hara: 2012/7/15 Benjamin Thaut c...@benjamin-thaut.de: The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) { this.outer = fruit; Setting to pseudo variable 'outer' should be rejected in compilation.

Re: nested class inheritance

2012-07-14 Thread Benjamin Thaut
Am 14.07.2012 19:18, schrieb Gor Gyolchanyan: On Sat, Jul 14, 2012 at 9:12 PM, Benjamin Thaut c...@benjamin-thaut.de mailto:c...@benjamin-thaut.de wrote: The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) {

Re: nested class inheritance

2012-07-14 Thread Gor Gyolchanyan
On Sat, Jul 14, 2012 at 9:23 PM, Benjamin Thaut c...@benjamin-thaut.dewrote: Am 14.07.2012 19:21, schrieb kenji hara: 2012/7/15 Benjamin Thaut c...@benjamin-thaut.de: The only problem about this is: class Fruit { class Seed { void SetFruit(Fruit fruit) {

Re: D versionning

2012-07-14 Thread Wouter Verhelst
Roman D. Boiko r...@d-coding.com writes: On Friday, 13 July 2012 at 06:52:25 UTC, Adam Wilson wrote: I hope Walter isn't against this, because I'm not seeing much community disagreement with this... I would not be against having development and stable versions, but the price is not trivial:

Re: nested class inheritance

2012-07-14 Thread Benjamin Thaut
Am 14.07.2012 19:30, schrieb Gor Gyolchanyan: On Sat, Jul 14, 2012 at 9:23 PM, Benjamin Thaut c...@benjamin-thaut.de mailto:c...@benjamin-thaut.de wrote: Am 14.07.2012 19:21, schrieb kenji hara: 2012/7/15 Benjamin Thaut c...@benjamin-thaut.de mailto:c...@benjamin-thaut.de:

Re: D versionning

2012-07-14 Thread Walter Bright
On 7/13/2012 9:58 AM, Jonathan M Davis wrote: All that being the case, I don't know what this proposal actually buys us. I tend to agree.

Re: nested class inheritance

2012-07-14 Thread Timon Gehr
On 07/15/2012 12:55 AM, Benjamin Thaut wrote: Am 14.07.2012 19:30, schrieb Gor Gyolchanyan: On Sat, Jul 14, 2012 at 9:23 PM, Benjamin Thaut c...@benjamin-thaut.de mailto:c...@benjamin-thaut.de wrote: Am 14.07.2012 19:21, schrieb kenji hara: 2012/7/15 Benjamin Thaut c...@benjamin-thaut.de

Re: Move semantics for D

2012-07-14 Thread Ali Çehreli
On 07/13/2012 09:45 PM, Mehrdad wrote: On Saturday, 14 July 2012 at 03:16:20 UTC, Andrei Alexandrescu wrote: https://www.facebook.com/video/video.php?v=10151094464083109 Andrei Still though, I feel calling it imperfect is kinda strong. It doesn't have any _problems_ per se, just

Re: D versionning

2012-07-14 Thread Adam Wilson
On Sat, 14 Jul 2012 16:56:50 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/13/2012 9:58 AM, Jonathan M Davis wrote: All that being the case, I don't know what this proposal actually buys us. I tend to agree. If this was the case; 2.059 would not be three months old with

caller trouble

2012-07-14 Thread captaindet
i need a discreet handle on the calling/instantiating source file (module). using __FILE__, it is surprisingly easy for functions (via argument) and templated functions (via template parameter) but i cannot get it working for templated classes. how can i make them aware of the calling module?

Re: caller trouble

2012-07-14 Thread Jonathan M Davis
On Saturday, July 14, 2012 01:53:34 captaindet wrote: i need a discreet handle on the calling/instantiating source file (module). using __FILE__, it is surprisingly easy for functions (via argument) and templated functions (via template parameter) but i cannot get it working for templated

Re: Creating a shared reference type

2012-07-14 Thread Minas Mina
Thanks, I've got another problem: void f() { sema.wait(); ++x; sema.notify(); } sema is the global shared Semaphore (as above) main.d(29): Error: function core.sync.semaphore.Semaphore.wait () is not callable using argument types () shared

Re: Creating a shared reference type

2012-07-14 Thread David Nadlinger
On Saturday, 14 July 2012 at 09:15:55 UTC, Minas Mina wrote: Isn't this the way shared is used (or should be used)? Should be used: probably yes. But functions/methods which are able to act on shared data must be marked so, and unfortunately, the druntime primitives are not yet annotated

Re: Immutable array initialization in shared static this

2012-07-14 Thread Tommi
On Friday, 13 July 2012 at 18:09:59 UTC, Era Scarecrow wrote: I would think the best solution is to create a mutable local version, and then assign the immutable global one when you are done. Thanks for the workaround. But I'm actually more interested in whether or not this is a compiler

ICFP2012

2012-07-14 Thread bearophile
Maybe someone is interested in participating: http://icfpcontest2012.wordpress.com/task/ Bye, bearophile

Re: ICFP2012

2012-07-14 Thread Daniel
On Saturday, 14 July 2012 at 11:01:06 UTC, bearophile wrote: Maybe someone is interested in participating: http://icfpcontest2012.wordpress.com/task/ Bye, bearophile I already am! With D aswell, but you ran away from the #d too fast for me to reply. Wouldn't mind some D help on a few

Re: Creating a shared reference type

2012-07-14 Thread Minas Mina
On Saturday, 14 July 2012 at 09:21:27 UTC, David Nadlinger wrote: On Saturday, 14 July 2012 at 09:15:55 UTC, Minas Mina wrote: Isn't this the way shared is used (or should be used)? Should be used: probably yes. But functions/methods which are able to act on shared data must be marked so,

Re: deimos libX11 undefined reference

2012-07-14 Thread Minas Mina
Try -L-lX11

Re: caller trouble

2012-07-14 Thread captaindet
On 2012-07-14 02:12, Jonathan M Davis wrote: [..] I believe that __FILE__ and __LINE__ are treated specially with functions in order for them to be filled in at the call site rather than the declaration site. If it's not working with classes, then that probably means that whatever special logic

Re: caller trouble

2012-07-14 Thread Jonathan M Davis
On Saturday, July 14, 2012 13:30:03 captaindet wrote: IIRC, __FILE__ is a template itself It's not. It's a special symbol recognized by the compiler, and ends up in several places in the grammar. - Jonathan M Davis

Re: caller trouble

2012-07-14 Thread Timon Gehr
On 07/14/2012 08:53 AM, captaindet wrote: i need a discreet handle on the calling/instantiating source file (module). using __FILE__, it is surprisingly easy for functions (via argument) and templated functions (via template parameter) but i cannot get it working for templated classes. how can i

Re: caller trouble

2012-07-14 Thread captaindet
auto _fun = fun(); //_fun == main.d auto _tfun = tfun(); //_tfun == main.d auto _tclass = new tclass!(); //_tclass.from == other.d !!! //this works but i do not want to provide __FILE__ explicitly: auto _tclassx = new tclass!(__FILE__)(); //_tclass.from == main.d //and why do i get 2 different

Re: deimos libX11 undefined reference

2012-07-14 Thread cal
On Saturday, 14 July 2012 at 12:55:21 UTC, Minas Mina wrote: Try -L-lX11 Yeah I was already linking X11. The problem was the binding, it defined a function that was never defined in the original c header, so it would not be able to find the function anywhere. Commenting the defs out in the

ufcs and integer params

2012-07-14 Thread Jay Norwood
I was looking at the xtend example 4 Distances here, and see that their new generation capability includes ability to do 3.cm 10.mm , and these result in calls to cm(3) and mm(10). http://blog.efftinge.de/ I see that similar capability was discussed for D previously at the link below.

Re: ufcs and integer params

2012-07-14 Thread Jay Norwood
I see from this other discussions that it looks like 2.059 ( or maybe 2.060) does support something like 3.cm(). Not sure from the discussion if it would also accept 3.cm as in the xtext/xtend example. http://forum.dlang.org/thread/smoniukqfxerutqrj...@forum.dlang.org

Re: ufcs and integer params

2012-07-14 Thread Jonathan M Davis
On Sunday, July 15, 2012 05:30:55 Jay Norwood wrote: I see from this other discussions that it looks like 2.059 ( or maybe 2.060) does support something like 3.cm(). Not sure from the discussion if it would also accept 3.cm as in the xtext/xtend example.

[Issue 8389] New: Classes, nested in the same base class cannot be derived from.

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8389 Summary: Classes, nested in the same base class cannot be derived from. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity:

[Issue 8388] std.traits.MemberFunctionsTuple doesn't work with constructors or destructors

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8388 --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2012-07-13 23:33:57 PDT --- It looks like MermberFunctionsTuple only grabs virtual functions. This code import std.stdio; import std.traits; class C { void foo()() {} void

[Issue 4957] std.concurrency does not allow to pass Tid in struct fields

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4957 Johan Hernandez thepumpkin1...@gmail.com changed: What|Removed |Added CC|

[Issue 7973] BigInt %= long/ulong gives wrong value

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7973 --- Comment #4 from github-bugzi...@puremagic.com 2012-07-14 03:55:37 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 8389] Classes, nested in the same base class cannot be derived from.

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8389 Guillaume Chatelet chatelet.guilla...@gmail.com changed: What|Removed |Added CC|

[Issue 8389] Classes, nested in the same base class cannot be derived from.

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8389 Guillaume Chatelet chatelet.guilla...@gmail.com changed: What|Removed |Added Status|NEW

[Issue 1175] nested class inheritance

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1175 Guillaume Chatelet chatelet.guilla...@gmail.com changed: What|Removed |Added CC|

[Issue 6999] parsing error for inout method/ wrong headergen

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6999 --- Comment #2 from github-bugzi...@puremagic.com 2012-07-14 06:13:44 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6999] parsing error for inout method/ wrong headergen

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6999 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, rejects-valid

[Issue 4662] Array ops on const arrays

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4662 --- Comment #4 from github-bugzi...@puremagic.com 2012-07-14 07:19:24 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 7385] Bad error message missing line number on invalid array op that isn't special cased

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7385 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-07-14 07:40:38 PDT --- (In reply to comment #1) This bug also bypasses gagging: void main() { immutable double[] nums = [1.0, 2.0]; static assert(!is(typeof({ nums[] /=

[Issue 7385] Bad error message missing line number on invalid array op that isn't special cased

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7385 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #4

[Issue 4662] Array ops on const arrays

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4662 --- Comment #5 from Kenji Hara k.hara...@gmail.com 2012-07-14 08:11:15 PDT --- Additional fix for yebblies's patch: https://github.com/D-Programming-Language/dmd/pull/1046 -- Configure issuemail:

[Issue 5403] foreach requires front to be a function in a range

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5403 --- Comment #3 from github-bugzi...@puremagic.com 2012-07-14 08:55:19 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 7385] Bad error message missing line number on invalid array op that isn't special cased

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7385 --- Comment #5 from github-bugzi...@puremagic.com 2012-07-14 11:42:13 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 7385] Bad error message missing line number on invalid array op that isn't special cased

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7385 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7894] [CTFE] - goto within ForStatement restarts loop

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7894 --- Comment #2 from github-bugzi...@puremagic.com 2012-07-14 13:03:37 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 7894] [CTFE] - goto within ForStatement restarts loop

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7894 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8354] Some missing import std.math to use ^^ operator error messages

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8354 Masahiro Nakagawa repeate...@gmail.com changed: What|Removed |Added CC|

[Issue 5403] foreach requires front to be a function in a range

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5403 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6497] [safeD] Can take address of local variable through ?:

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6497 --- Comment #2 from github-bugzi...@puremagic.com 2012-07-14 20:12:56 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6497] [safeD] Can take address of local variable through ?:

2012-07-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6497 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

  1   2   >