Re: Server downtime

2012-08-28 Thread mta`chrono
Am 28.08.2012 00:53, schrieb Walter Bright: Jan Knepper is going to be upgrading the digitalmars server to new hardware over the next couple days. This will result in some downtime. Is this only related to the digitalmars website or to this newsgroup, too?

Re: Visitor pattern revisited in D

2012-08-28 Thread Timon Gehr
On 08/27/2012 05:00 PM, deadalnix wrote: /!\ Shameless autopromotion incoming /!\ I have recently put some effort into exploring alternatives to visitor pattern and see what can be done in D. I ended up with a solution which is a real improvement compared to plein old visitor pattern and wanted

Re: Server downtime

2012-08-28 Thread Andrei Alexandrescu
On 8/28/12 12:42 AM, mta`chrono wrote: Am 28.08.2012 00:53, schrieb Walter Bright: Jan Knepper is going to be upgrading the digitalmars server to new hardware over the next couple days. This will result in some downtime. Is this only related to the digitalmars website or to this newsgroup,

Re: Visitor pattern revisited in D

2012-08-28 Thread deadalnix
Le 28/08/2012 17:39, Timon Gehr a écrit : On 08/27/2012 05:00 PM, deadalnix wrote: /!\ Shameless autopromotion incoming /!\ I have recently put some effort into exploring alternatives to visitor pattern and see what can be done in D. I ended up with a solution which is a real improvement

Re: Visitor pattern revisited in D

2012-08-28 Thread deadalnix
Le 28/08/2012 00:20, Pragma Tix a écrit : Am 27.08.2012 17:00, schrieb deadalnix: auto dispatch( alias unhandled = function typeof(null)(t) { throw new Exception(typeid(t).toString() ~ is not supported by visitor ~ typeid(V).toString() ~ .); }, V, T )(ref V visitor, T t) if(is(T == class) ||

Re: Visitor pattern revisited in D

2012-08-28 Thread Timon Gehr
On 08/29/2012 02:24 AM, deadalnix wrote: Le 28/08/2012 17:39, Timon Gehr a écrit : On 08/27/2012 05:00 PM, deadalnix wrote: /!\ Shameless autopromotion incoming /!\ I have recently put some effort into exploring alternatives to visitor pattern and see what can be done in D. I ended up with a

Re: D-etractions A real world programmers view on D

2012-08-28 Thread 1100110
On Mon, 27 Aug 2012 22:39:55 -0500, Era Scarecrow rtcv...@yahoo.com wrote: On Tuesday, 28 August 2012 at 00:14:34 UTC, Chris Cain wrote: On Monday, 27 August 2012 at 23:28:31 UTC, SomeDude wrote: I wish Walter went on kickstarter to get public funds allowing him to hire a couple of full

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Jacob Carlborg
On 2012-08-27 22:53, Walter Bright wrote: The language design requires a 1:1 mapping of mangling to types. Hence the compiler design to use the mangling as a hashmap key of types. The failure of that approach in this case points to a problem in the language design, not a bug in the compiler.

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Walter Bright
On 8/27/2012 11:53 PM, Jacob Carlborg wrote: How does this then work when the body of the anonymous functions are different? How will they be identified? I don't know what you mean.

Re: D-etractions A real world programmers view on D

2012-08-28 Thread mist
On Monday, 27 August 2012 at 23:28:31 UTC, SomeDude wrote: On Saturday, 25 August 2012 at 19:48:33 UTC, Jeff Nowakowski wrote: As for the IDE, he mentioned Scala, and there the developers made an effort to support the IDE in the compiler so that work wouldn't be duplicated and the IDE would

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Jacob Carlborg
On 2012-08-28 09:16, Walter Bright wrote: I don't know what you mean. The original problem in the bug report looked like this: void main () { auto foo = (int a = 1) { return a; }; auto bar = (int a) { return a; }; writeln(foo()); writeln(bar()); } If I change one of the

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Jacob Carlborg
On 2012-08-27 23:28, Jonathan M Davis wrote: Except that the change which is causing Manu problems _isn't_ a new feature. It's a bug fix. So, better versioning wouldn't necessarily have helped him any at all. At best, if we had a more complex versioning scheme, it could be decided that the bug

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Jacob Carlborg
On 2012-08-27 23:29, Manu wrote: Are you suggesting using DLL's is asking for trouble? Dynamic linkage is a fundamental part of software. Yes, they don't properly work in D. -- /Jacob Carlborg

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Don Clugston
On 27/08/12 16:16, Steven Schveighoffer wrote: On Sun, 26 Aug 2012 18:26:40 -0400, Manu turkey...@gmail.com wrote: I just updated to 2.60 and found errors throughout my code where function pointers default args no longer work. *Every single project* I've written in D, 5 projects, don't work

Cross-compilation

2012-08-28 Thread Chris
Probably this question has been asked and answered before, but I wonder if there is a way to cross-compile D code so that you can work on one platform and simultaneously create code for other platforms. In my case it would be Mac to Linux. I can imagine that there are a lot of dependency

Re: Cross-compilation

2012-08-28 Thread sidhu gaikwad
On Tuesday, 28 August 2012 at 09:21:55 UTC, Chris wrote: Probably this question has been asked and answered before, but I wonder if there is a way to cross-compile D code so that you can work on one platform and simultaneously create code for other platforms. In my case it would be Mac to

ARM?

2012-08-28 Thread Shadow_exe
Good day. Would like to ask a question to the developers of the language: Is the development of a compiler D under the ARM or is at least in the plans?

Re: ARM?

2012-08-28 Thread 1100110
On Tue, 28 Aug 2012 05:27:23 -0500, Shadow_exe shadow_...@ukr.net wrote: Good day. Would like to ask a question to the developers of the language: Is the development of a compiler D under the ARM or is at least in the plans? The D specification states that 16bit or below will not be

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread foobar
On Monday, 27 August 2012 at 21:29:06 UTC, Jonathan M Davis wrote: On Monday, August 27, 2012 23:22:39 foobar wrote: All true, except one crucial fact: DMD gets critical bug fixes incorporated with new features in the same release. This leaves a poor choice to the programmer, either he sticks

Re: ARM?

2012-08-28 Thread MattCoder
On Tuesday, 28 August 2012 at 10:53:17 UTC, 1100110 wrote: On Tue, 28 Aug 2012 05:27:23 -0500, Shadow_exe shadow_...@ukr.net wrote: The D specification states that 16bit or below will not be supported. DMD is a nogo for ARM right now, so take a look at LDC or GDC But I think the ARM main

Re: ARM?

2012-08-28 Thread 1100110
On Tue, 28 Aug 2012 06:23:11 -0500, MattCoder mattco...@hotmail.com wrote: On Tuesday, 28 August 2012 at 10:53:17 UTC, 1100110 wrote: On Tue, 28 Aug 2012 05:27:23 -0500, Shadow_exe shadow_...@ukr.net wrote: The D specification states that 16bit or below will not be supported. DMD is a

Re: ARM?

2012-08-28 Thread 1100110
On Tue, 28 Aug 2012 06:23:11 -0500, MattCoder mattco...@hotmail.com wrote: On Tuesday, 28 August 2012 at 10:53:17 UTC, 1100110 wrote: On Tue, 28 Aug 2012 05:27:23 -0500, Shadow_exe shadow_...@ukr.net wrote: The D specification states that 16bit or below will not be supported. DMD is a

Re: ARM?

2012-08-28 Thread Jordi Sayol
Al 28/08/12 12:27, En/na Shadow_exe ha escrit: Good day. Would like to ask a question to the developers of the language: Is the development of a compiler D under the ARM or is at least in the plans? GDC and LDC are both available for ARM processors on the last Debian stable.

Re: Consistency, Templates, Constructors, and D3

2012-08-28 Thread foobar
On Monday, 27 August 2012 at 23:09:13 UTC, F i L wrote: foobar wrote: FiL's scheme looks backwards to me. One of the main drawbacks of factories is the fact that they have non-standard names. Given a class Foo, How would I know to call a factory newFoo? Well you'd know to call constructor

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Daniel Murphy
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1446.1346070222.31962.digitalmar...@puremagic.com... Default arguments just do not make sense with function pointers, because they don't follow the function pointer, because it's a _pointer_ and has no knowledge of what it's

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Manu
On 28 August 2012 16:50, Daniel Murphy yebbl...@nospamgmail.com wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1446.1346070222.31962.digitalmar...@puremagic.com... Default arguments just do not make sense with function pointers, because they don't follow the

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Carl Sturtivant
On Monday, 27 August 2012 at 12:14:30 UTC, Manu wrote: On 27 August 2012 14:08, Carl Sturtivant sturtiv...@gmail.com wrote: extern(C) void function( ref const(Vector2) v0, ref const(Vector2) v1, ref const(Vector2) v2, ref const(Color) color = Color.white, BlendMode blendMode =

Re: Vote for the new std.hash (oops, std.digest)

2012-08-28 Thread Danni Coy
On Tue, Aug 28, 2012 at 1:19 AM, David Gileadi gilea...@nspmgmail.comwrote: On 8/26/12 7:14 AM, Andrei Alexandrescu wrote: How about this - use auto for code samples, but not for documenting function return types (except Voldemort)? Pie-in-the-sky dream: DDOC would advance enough to show a

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Andrei Alexandrescu
On 8/28/12 8:23 AM, Manu wrote: Well that's painful for a number of reasons.. Other than the fact that I need to rewrite a bunch of code, Walter and Kenji think breaking meaningful existing code is an overriding concern, and I ended up agreeing with them. They will look into a solution that

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Robert Clipsham
On Tuesday, 28 August 2012 at 06:53:15 UTC, Jacob Carlborg wrote: On 2012-08-27 22:53, Walter Bright wrote: The language design requires a 1:1 mapping of mangling to types. Hence the compiler design to use the mangling as a hashmap key of types. The failure of that approach in this case

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread bearophile
Andrei Alexandrescu: This change of wind may as well turn a new page in the history of D :o). humorMaybe as soon as the D1 branch stops getting bug fixes, WalterCo will start a D3 branch where this small breaking change happens./humor Bye, bearophile

Re: Consistency, Templates, Constructors, and D3

2012-08-28 Thread David Piepgrass
On Monday, 27 August 2012 at 20:22:47 UTC, Era Scarecrow wrote: On Monday, 27 August 2012 at 14:53:57 UTC, F i L wrote: in C#, you use 'new Type()' for both classes and structs, and it works fine. In fact, it has some benefit with generic programming. Plus, it's impossible to completely get

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Carl Sturtivant
On Monday, 27 August 2012 at 00:44:54 UTC, Walter Bright wrote: On 8/26/2012 4:50 PM, Timon Gehr wrote: On 08/27/2012 12:41 AM, Walter Bright wrote: The trouble for function pointers, is that any default args would need to be part of the type, not the declaration. They could be made part

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Carl Sturtivant
On Tuesday, 28 August 2012 at 18:52:13 UTC, Andrei Alexandrescu wrote: On 8/28/12 8:23 AM, Manu wrote: Well that's painful for a number of reasons.. Other than the fact that I need to rewrite a bunch of code, Walter and Kenji think breaking meaningful existing code is an overriding concern,

Re: Consistency, Templates, Constructors, and D3

2012-08-28 Thread David Piepgrass
And a postblits would end up being...? The extra 'this' makes it look like an obvious typo or a minor headache. this this(this){} //postblitz? This is not an appropriate syntax, not just because it looks silly, but because a postblit constructor is not really a constructor, it's is a

Re: Vote for the new std.hash (oops, std.digest)

2012-08-28 Thread Walter Bright
On 8/26/2012 7:14 AM, Andrei Alexandrescu wrote: On 8/26/12 8:35 AM, Craig Dillabaugh wrote: On Sunday, 26 August 2012 at 10:32:37 UTC, Mike James wrote: +2 As a very inexperienced D user, I find the use of auto in the documentation frustrating too. Cheers, Craig I'm torn on this. The

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Timon Gehr
On 08/28/2012 10:33 PM, Carl Sturtivant wrote: On Monday, 27 August 2012 at 00:44:54 UTC, Walter Bright wrote: On 8/26/2012 4:50 PM, Timon Gehr wrote: On 08/27/2012 12:41 AM, Walter Bright wrote: The trouble for function pointers, is that any default args would need to be part of the type,

Re: Vote for the new std.hash (oops, std.digest)

2012-08-28 Thread Gary Willoughby
On Sunday, 26 August 2012 at 10:32:37 UTC, Mike James wrote: Manu turkey...@gmail.com wrote in message news:mailman.1410.1345976415.31962.digitalmar...@puremagic.com... Looks good, though one thing annoys me as always throughout the D docs, liberal use of auto can make them very difficult to

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Manu
On 28 August 2012 21:52, Andrei Alexandrescu seewebsiteforem...@erdani.orgwrote: On 8/28/12 8:23 AM, Manu wrote: Well that's painful for a number of reasons.. Other than the fact that I need to rewrite a bunch of code, Walter and Kenji think breaking meaningful existing code is an

Some lazy code to D

2012-08-28 Thread bearophile
Once in a while I show some comparisons of code translated in different languages. A challenge from Reddit-Dailyprogrammer: http://www.reddit.com/r/dailyprogrammer/comments/ywm28/8272012_challenge_92_difficult_bags_and_balls/ The purpose of this post of mine is to compare a nice looking

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Carl Sturtivant
On Tuesday, 28 August 2012 at 21:40:01 UTC, Timon Gehr wrote: On 08/28/2012 10:33 PM, Carl Sturtivant wrote: On Monday, 27 August 2012 at 00:44:54 UTC, Walter Bright wrote: On 8/26/2012 4:50 PM, Timon Gehr wrote: On 08/27/2012 12:41 AM, Walter Bright wrote: The trouble for function

Why can't we make reference variables?

2012-08-28 Thread Tommi
In the following example code there's a situation, where the data we're looking for already exists, the data has value semantics, finding the data takes quite a lot of time, we need to use the data on multiple occasions, and the size of the data is so large that we don't want to copy it. In

Re: Why can't we make reference variables?

2012-08-28 Thread cal
On Wednesday, 29 August 2012 at 00:21:29 UTC, Tommi wrote: In this situation, I think, the most convenient and sensible thing to do is to make a reference to the data, and use that reference multiple times. We could make a pointer, but then we'd be stuck with the nasty syntax of dereferencing:

Re: Why can't we make reference variables?

2012-08-28 Thread Tommi
On Wednesday, 29 August 2012 at 00:34:02 UTC, cal wrote: On Wednesday, 29 August 2012 at 00:21:29 UTC, Tommi wrote: In this situation, I think, the most convenient and sensible thing to do is to make a reference to the data, and use that reference multiple times. We could make a pointer, but

Re: Why can't we make reference variables?

2012-08-28 Thread Jonathan M Davis
On Wednesday, August 29, 2012 02:21:28 Tommi wrote: Foreach loops can make reference variables, and function calls can do it for the parameters passed in. So, my question is, wouldn't it be better if we could, in general, make reference variables? Not going to happen. Unfortunately though, I

Re: Function pointers/delegates default args were stealth removed?

2012-08-28 Thread Jonathan M Davis
On Wednesday, August 29, 2012 01:13:15 Manu wrote: On 28 August 2012 21:52, Andrei Alexandrescu seewebsiteforem...@erdani.orgwrote: On 8/28/12 8:23 AM, Manu wrote: Well that's painful for a number of reasons.. Other than the fact that I need to rewrite a bunch of code, Walter and

Re: Why can't we make reference variables?

2012-08-28 Thread Timon Gehr
Not exactly the same thing (what you propose would have different IFTI behaviour), but works quite well: import std.stdio; struct Ref(T){ private T* _payload; this(ref T i){_payload = i; } @property ref T deref(){ return *_payload; } alias deref this; } auto ref_(T)(ref T

Re: Why can't we make reference variables?

2012-08-28 Thread Tommi
On Wednesday, 29 August 2012 at 01:28:49 UTC, Jonathan M Davis wrote: Not going to happen. Unfortunately though, I don't remember all of Walter's reasons for it, so I can't really say why (partly due to complications it causes in the language, I think, but I don't know). I'd really like to

Re: Some lazy code to D

2012-08-28 Thread Caligo
Did you time the runs? Non-lazy D version, compiled as -O -inline -release, and ran with pick(6, 11): real0m8.587s user0m8.497s sys0m0.012s Lazy D version, compiled as -O -inline -release, and ran with pick(6, 11): real0m4.195s user0m4.168s sys0m0.008s Haskell

Re: Why can't we make reference variables?

2012-08-28 Thread Tommi
On Wednesday, 29 August 2012 at 01:42:36 UTC, Timon Gehr wrote: Not exactly the same thing (what you propose would have different IFTI behaviour), but works quite well: import std.stdio; struct Ref(T){ private T* _payload; this(ref T i){_payload = i; } @property ref T deref(){

Re: Why can't we make reference variables?

2012-08-28 Thread Nick Sabalausky
On Wed, 29 Aug 2012 03:16:20 +0200 Tommi tommitiss...@hotmail.com wrote: On Wednesday, 29 August 2012 at 00:34:02 UTC, cal wrote: On Wednesday, 29 August 2012 at 00:21:29 UTC, Tommi wrote: In this situation, I think, the most convenient and sensible thing to do is to make a reference to

Re: Why can't we make reference variables?

2012-08-28 Thread Nick Sabalausky
On Wed, 29 Aug 2012 03:44:38 +0200 Tommi tommitiss...@hotmail.com wrote: On Wednesday, 29 August 2012 at 01:28:49 UTC, Jonathan M Davis wrote: Not going to happen. Unfortunately though, I don't remember all of Walter's reasons for it, so I can't really say why (partly due to

Re: Why can't we make reference variables?

2012-08-28 Thread Mehrdad
On Wednesday, 29 August 2012 at 02:28:09 UTC, Mehrdad wrote: I think there's an (undocumented?) Ref class in some file (object_.d?) er, struct

Re: Why can't we make reference variables?

2012-08-28 Thread Mehrdad
I think there's an (undocumented?) Ref class in some file (object_.d?)

Re: Consistency, Templates, Constructors, and D3

2012-08-28 Thread Era Scarecrow
On Tuesday, 28 August 2012 at 21:01:52 UTC, David Piepgrass wrote: this this(this){} //postblitz? This is not an appropriate syntax, not just because it looks silly, but because a postblit constructor is not really a constructor, it's is a postprocessing function that is called after an

Re: Why can't we make reference variables?

2012-08-28 Thread anonymous
On Wednesday, 29 August 2012 at 02:07:19 UTC, Nick Sabalausky wrote: On Wed, 29 Aug 2012 03:16:20 +0200 Tommi tommitiss...@hotmail.com wrote: On Wednesday, 29 August 2012 at 00:34:02 UTC, cal wrote: On Wednesday, 29 August 2012 at 00:21:29 UTC, Tommi wrote: In this situation, I think, the

Re: The review of std.hash package

2012-08-28 Thread Jesse Phillips
All this discussion on the use of auto in the docs made me notice something else about the docs I missed. I like how ranges are documented and think digest could do the same. Instead of an ExampleDigest, just write the details under isDigest. I don't see a need for template the constraint

Re: Why can't we make reference variables?

2012-08-28 Thread Era Scarecrow
On Wednesday, 29 August 2012 at 01:28:49 UTC, Jonathan M Davis wrote: On Wednesday, August 29, 2012 02:21:28 Tommi wrote: Foreach loops can make reference variables, and function calls can do it for the parameters passed in. So, my question is, wouldn't it be better if we could, in general,

Re: Why can't we make reference variables?

2012-08-28 Thread Era Scarecrow
On Wednesday, 29 August 2012 at 02:57:27 UTC, Era Scarecrow wrote: You would need a flag added to EVERY variable and item to specify if it was stack allocated or not. Otherwise it would be quite annoying to deal with. The compiler has to work blindly, assuming everything is correct. You can

Re: Why can't we make reference variables?

2012-08-28 Thread Jonathan M Davis
On Wednesday, August 29, 2012 04:40:17 anonymous wrote: On Wednesday, 29 August 2012 at 02:07:19 UTC, Nick Sabalausky wrote: On Wed, 29 Aug 2012 03:16:20 +0200 Tommi tommitiss...@hotmail.com wrote: On Wednesday, 29 August 2012 at 00:34:02 UTC, cal wrote: On Wednesday, 29 August

Re: Why can't we make reference variables?

2012-08-28 Thread Tommi
On Wednesday, 29 August 2012 at 03:21:04 UTC, Jonathan M Davis wrote: void main() { immutable(Test)* ptr = new immutable(Test); ptr.foo(); } Now, that's a surprise for someone coming from C++. But even though ptr looks like a reference variable in your example, it

Re: Why can't we make reference variables?

2012-08-28 Thread Tommi
On Wednesday, 29 August 2012 at 03:17:39 UTC, Era Scarecrow wrote: To add on to this a little.. If you can only ref by calling, you ensure the variable is alive/valid when you are calling it regardless if it's stack or heap or global (But can't ensure it once the scope ends). Making a

Re: Why can't we make reference variables?

2012-08-28 Thread Jonathan M Davis
On Wednesday, August 29, 2012 06:46:25 Tommi wrote: The weird thing is that you can use a member access operator with a pointer (without explicitly dereferencing the pointer first). Well, you clearly haven't done much pointers to structs in D, or that wouldn't be surprising at all. . always

Re: static struct definition

2012-08-28 Thread monarch_dodra
On Monday, 27 August 2012 at 18:53:23 UTC, bearophile wrote: Andrej Mitrovic: Isn't this limited to just classes? See the last section of this page: http://dlang.org/struct.html Nested Structs: A nested struct is a struct that is declared inside the scope of a function or a templated

Re: Comparing pointers with is

2012-08-28 Thread monarch_dodra
On Monday, 27 August 2012 at 16:33:46 UTC, bearophile wrote: monarch_dodra: Either that, or is it considered best practice to use is to compare pointers, For two pointers using == or is is the same. And I don't remember best practices about this. If your pointers later risk becoming class

Re: static struct definition

2012-08-28 Thread Simen Kjaeraas
On Tue, 28 Aug 2012 12:10:47 +0200, monarch_dodra monarchdo...@gmail.com wrote: From TDPL: 7.18: Unlike classes nested within classes, nested structs and nested classes within structs don’t contain any hidden member outer—there is no special code generated. The main design goal of

CTFE question

2012-08-28 Thread Danny Arends
I have the following code: import std.stdio; import std.metastrings; pure int[] testCTFE(){ int[] r; pragma(msg, Testing CTFE); foreach(i; 0 .. 360){ r ~= i; pragma(msg, Format!(Loop: %d,i)); } pragma(msg, Done CTFE test); return r; }

Re: CTFE question

2012-08-28 Thread Chris Cain
On Tuesday, 28 August 2012 at 11:13:40 UTC, Danny Arends wrote: Is this a bug or am I doing something wrong ?? Danny Arends http://www.dannyarends.nl You're doing something wrong, but I can see why the error message would confuse you. Your problem is using those pragma(msg, ...) lines...

Re: CTFE question

2012-08-28 Thread Danny Arends
Ahhh I understand... As a follow up, is it then possible to 'track' filling a large enum / immutable on compile time by outputting a msg every for ? I'm generating rotation matrices for yaw, pitch and roll at compile time which can take a long time depending on how fine grained I create them.

Re: static struct definition

2012-08-28 Thread monarch_dodra
On Tuesday, 28 August 2012 at 11:06:51 UTC, Simen Kjaeraas wrote: On Tue, 28 Aug 2012 12:10:47 +0200, monarch_dodra monarchdo...@gmail.com wrote: From TDPL: 7.18: Unlike classes nested within classes, nested structs and nested classes within structs don’t contain any hidden member

Re: CTFE question

2012-08-28 Thread Chris Cain
On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: Ahhh I understand... As a follow up, is it then possible to 'track' filling a large enum / immutable on compile time by outputting a msg every for ? I'm generating rotation matrices for yaw, pitch and roll at compile time which

Re: CTFE question

2012-08-28 Thread Danny Arends
On Tuesday, 28 August 2012 at 12:07:07 UTC, Chris Cain wrote: On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: I'm pretty sure there isn't. However, if you're just trying to develop/test your algorithm, you could write a program that runs it as a normal function (and just use

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Am 28.08.2012 01:53, schrieb Sean Kelly: On Aug 24, 2012, at 1:16 PM, David d...@dav1d.de wrote: That's not the problem. The problem has nothing to do with the tessellation, since the *rendering* is also 1000% slower (when all data is already processed). Is the alignment different between

Re: abnormal program termination

2012-08-28 Thread Regan Heath
On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer ellery-newco...@utulsa.edu wrote: I am running into an ICE on windows - Assertion Failure on such-and-such line in mtype.c - and I am trying to get a test command for to reduce it with the redoubtable dustmite. Normally, 'abnormal

Re: abnormal program termination

2012-08-28 Thread Ellery Newcomer
On 08/28/2012 06:37 AM, Regan Heath wrote: On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer ellery-newco...@utulsa.edu wrote: I am running into an ICE on windows - Assertion Failure on such-and-such line in mtype.c - and I am trying to get a test command for to reduce it with the

Re: CTFE question

2012-08-28 Thread bearophile
Danny Arends: Seems a bit strange that a discussion about yes/no newline is keeping this from getting into DMD. The ending newline is bad, because it unnecessarily kills some use cases for this feature. But I think the newline is not what is keeping it out of DMD. It's just there are about a

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread bearophile
David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the asm is my suggestion still. If someone is rusty in asm, it's time to brush

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Am 28.08.2012 17:41, schrieb bearophile: David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the asm is my suggestion still. If

Re: abnormal program termination

2012-08-28 Thread Regan Heath
On Tue, 28 Aug 2012 15:59:34 +0100, Ellery Newcomer ellery-newco...@utulsa.edu wrote: On 08/28/2012 06:37 AM, Regan Heath wrote: On Sat, 25 Aug 2012 01:10:05 +0100, Ellery Newcomer ellery-newco...@utulsa.edu wrote: I am running into an ICE on windows - Assertion Failure on such-and-such

Re: CTFE question

2012-08-28 Thread Philippe Sigaud
On Tue, Aug 28, 2012 at 2:07 PM, Chris Cain clc...@uncg.edu wrote: On Tuesday, 28 August 2012 at 11:39:20 UTC, Danny Arends wrote: Ahhh I understand... As a follow up, is it then possible to 'track' filling a large enum / immutable on compile time by outputting a msg every for ? I'm

Re: abnormal program termination

2012-08-28 Thread Ellery Newcomer
On 08/28/2012 09:55 AM, Regan Heath wrote: I searched the DMD sources, just in case the message abnormal program termination was DMD specific, and I found nothing. Then I searched all files and the string appears in the dmd.exe binary, making me suspect the compiler used to produce dmd.exe

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread bearophile
David: I generally tend to ignore dmd bugs and just workaround them, I don't have the time to track down every stuipid bug from a ~8k codebase. I understand you don't care much anymore for the discussed problem, and I know that localizing D/DMD bugs requires some time and work. But I'd

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
But I'd like you to not ignore all the bugs you find, and instead minimize some of them and submit them to Bugzilla. Despite thousands of open bugs and about a hundred of open patches, many bugs do get fixed at every release. If you submit bugs, D/DMD will improve, in your future you will find

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Timon Gehr
On 08/28/2012 06:35 PM, David wrote: Am 28.08.2012 17:41, schrieb bearophile: David: The arrays are 100% identical (I dumped a Vertex()-array and a raw float-array, they were 100% identical). I hope some people are realizing how much time is being wasted in this thread. Taking a look at the

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread David
Use this to create a minimal test case with minimal user interaction: https://github.com/CyberShadow/DustMite Doesn't help if dmd doesn't crash, or?

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Timon Gehr
On 08/29/2012 01:26 AM, David wrote: Use this to create a minimal test case with minimal user interaction: https://github.com/CyberShadow/DustMite Doesn't help if dmd doesn't crash, or? It doesn't help a lot if compilation succeeds, but you stated that you generally tend to ignore dmd bugs.

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Brad Roberts
On Wed, 29 Aug 2012, Timon Gehr wrote: On 08/29/2012 01:26 AM, David wrote: Use this to create a minimal test case with minimal user interaction: https://github.com/CyberShadow/DustMite Doesn't help if dmd doesn't crash, or? It doesn't help a lot if compilation succeeds, but you

[Issue 2296] IFTI with parameterization on fixed array size does not work

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2296 --- Comment #3 from github-bugzi...@puremagic.com 2012-08-28 00:38:39 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6764] IFTI fails on typesafe variadic function over static array with non IntegerLiteral length

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6764 --- Comment #2 from github-bugzi...@puremagic.com 2012-08-28 00:38:48 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 8595] New: typeof(return) inside opApply loop always int

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8595 Summary: typeof(return) inside opApply loop always int Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 8504] Template attribute inferrence doesn't work

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8504 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code

[Issue 8595] typeof(return) inside opApply loop always int

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8595 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code ---

[Issue 8596] New: Indeterministic assertion failure in rehash

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8596 Summary: Indeterministic assertion failure in rehash Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 4264] Support opApply in std.algorithm, std.range where possible

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4264 --- Comment #11 from bearophile_h...@eml.cc 2012-08-28 15:33:46 PDT --- This code: import std.stdio: writeln; struct Iter2 { int stop, current; @property int front() { return current; } @property bool empty() { return current ==

[Issue 7758] Mixin error: No size yet for forward reference

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7758 Ellery Newcomer ellery-newco...@utulsa.edu changed: What|Removed |Added CC|

[Issue 5573] Compiler (not linker) should generate an error for missing main()

2012-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5573 Borden Rhodes incoming-o...@bordenrhodes.com changed: What|Removed |Added CC|