Re: D Conference 2012 - Sep 26-29 at the Banker's Suite and Ballroom in Astoria, Oregon

2012-05-17 Thread Paul D. Anderson
On Wednesday, 22 February 2012 at 22:07:26 UTC, Walter Bright wrote: Pricing isn't set yet, nor has a web site been set up yet, this is just a heads up to reserve the dates on your calendar, and start thinking about that presentation you want to do! The general idea is: Wed evening - meet

Re: Can't run 'masm386'

2012-05-17 Thread Nick Sabalausky
Adam Wilson flybo...@gmail.com wrote in message news:op.wefr0erm707...@invictus.skynet.com... It looks like 2 days ago someone DID in fact change the minit.asm file. They changed the references to LICENSE and README. Your best bet is probably to redownload minit.obj from the druntime repo

Re: Can't run 'masm386'

2012-05-17 Thread Adam Wilson
On Wed, 16 May 2012 22:53:59 -0700, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: Adam Wilson flybo...@gmail.com wrote in message news:op.wefr0erm707...@invictus.skynet.com... It looks like 2 days ago someone DID in fact change the minit.asm file. They changed the references to

isInputRange instead of isForwardRange for std.algorithm.fill

2012-05-17 Thread Guillaume Chatelet
It looks to me that isForwardRange is too much of a restriction for the fill algorithm, isInputRange could do, we don't need any save() here or am I missing something ?

Re: Standard struct constructors for the heap?

2012-05-17 Thread bearophile
Andrej Mitrovic: Mixin workaround: Yeah, in some cases I have used a similar workaround. Now I'd like to avoid the workaround. Bye, bearophile

Re: O.T. Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Lars T. Kyllingstad
On Thursday, 17 May 2012 at 03:15:47 UTC, Jordi Sayol wrote: Al 17/05/12 03:32, En/na Walter Bright ha escrit: On 5/16/2012 12:29 AM, bearophile wrote: Then why is Andrei using the name std.algorithm.schwartzSort? May the schwartz be with you. Very appropriate :-) On 27 May is the 35

News server load becoming more and more an issue

2012-05-17 Thread filgood
Hi, Not sure who looks after the news server that hosts the relevant D newsgroups, but over the last few weeks, the amount of high load messages has been increasing at a steady rate, to an extend that it is becoming a real nuisance to read the newsgroups via a classic newsreader like

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Peter Alexander
On Tuesday, 15 May 2012 at 17:23:28 UTC, Kirill wrote: How about users who don't know what binary search is. binary search is an intuitive concept for people who have good programming experience but assumeSorted(r).contains(x) is more intuitive to higher level users. If you don't know about

Re: News server load becoming more and more an issue

2012-05-17 Thread Paulo Pinto
On Thursday, 17 May 2012 at 08:54:16 UTC, filgood wrote: Hi, Not sure who looks after the news server that hosts the relevant D newsgroups, but over the last few weeks, the amount of high load messages has been increasing at a steady rate, to an extend that it is becoming a real nuisance to

Re: News server load becoming more and more an issue

2012-05-17 Thread Andrea Fontana
What about a new group on: https://groups.google.com/ On Thursday, 17 May 2012 at 09:01:12 UTC, Paulo Pinto wrote: On Thursday, 17 May 2012 at 08:54:16 UTC, filgood wrote: Hi, Not sure who looks after the news server that hosts the relevant D newsgroups, but over the last few weeks, the

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread Mehrdad
Ugh, ran into a problem again... I was hoping I could do a type deduction for a write() function I had, based on whether the input is 'size_t' (in which case it'd be hexadecimal) or 'uint' (in which case it'd be decimal), but nope! that doesn't work. :( Any chance we'll be able to

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 11:16:08 Mehrdad wrote: Ugh, ran into a problem again... I was hoping I could do a type deduction for a write() function I had, based on whether the input is 'size_t' (in which case it'd be hexadecimal) or 'uint' (in which case it'd be decimal), but nope! that

Re: Can't run 'masm386'

2012-05-17 Thread Andre Tampubolon
minit.obj is still there. I commented this part: src\rt\minit.obj : src\rt\minit.asm $(CC) -c $(CFLAGS) src\rt\minit.asm That works. On 5/17/2012 11:35 AM, Nick Sabalausky wrote: Andre Tampubolon an...@lc.vlsm.org wrote in message news:jp1kld$15mj$1...@digitalmars.com... I was

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread bearophile
Nick Sabalausky: One side of the argument is that this behavior is correct and expected since structs are value types, and iterating shouldn't consume the range. In that D.learn thread I've shown that iterating on a fixed-size array, that is a value, doesn't perform a copy of the array.

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 02:38:13 Jonathan M Davis wrote: On Thursday, May 17, 2012 11:16:08 Mehrdad wrote: Ugh, ran into a problem again... I was hoping I could do a type deduction for a write() function I had, based on whether the input is 'size_t' (in which case it'd be

Do not write object file?

2012-05-17 Thread Andre Tampubolon
Every time I compile a D code, an .obj file is generated. Is there any to prevent that? I tried dmd -o- hello.d. Indeed there's no obj file. And no executable, too. Maybe this is a bug?

Re: Do not write object file?

2012-05-17 Thread Kagamin
The linker makes exe from obj.

Re: New Traits

2012-05-17 Thread Jacob Carlborg
On 2012-05-16 23:20, John Maschmeyer wrote: On Wednesday, 16 May 2012 at 17:08:43 UTC, Philippe Sigaud wrote: If you give it a module name (qualified with package name), does it output the entire module code? Yes Awesome, now where is that CTFE D compiler :) -- /Jacob Carlborg

Re: New Traits

2012-05-17 Thread Jacob Carlborg
On 2012-05-16 23:19, John Maschmeyer wrote: It works for a function literal that has been assigned to a variable. Function Literal: int function(int) func = x = x+1; writeln(__traits(codeof, func)); Outputs: int function(int) func = delegate pure nothrow @safe int(int x) { return x + 1; } ;

Re: News server load becoming more and more an issue

2012-05-17 Thread filgood
I prefer to use native apps like Paulo. Andrei, any news regarding the news server? Thx, fil On 17/05/2012 10:17, Andrea Fontana wrote: What about a new group on: https://groups.google.com/ On Thursday, 17 May 2012 at 09:01:12 UTC, Paulo Pinto wrote: On Thursday, 17 May 2012 at 08:54:16

Re: Do not write object file?

2012-05-17 Thread Aleksandar Ružičić
On Thursday, 17 May 2012 at 10:16:38 UTC, Andre Tampubolon wrote: Every time I compile a D code, an .obj file is generated. Is there any to prevent that? I tried dmd -o- hello.d. Indeed there's no obj file. And no executable, too. Maybe this is a bug? If you don't want object files to be

Re: arrays: if(null == [ ])

2012-05-17 Thread deadalnix
Le 16/05/2012 23:15, Steven Schveighoffer a écrit : On Wed, 16 May 2012 17:11:58 -0400, deadalnix deadal...@gmail.com wrote: Le 16/05/2012 15:12, Steven Schveighoffer a écrit : On Tue, 15 May 2012 04:42:10 -0400, deadalnix deadal...@gmail.com wrote: Le 14/05/2012 21:53, Steven Schveighoffer

Re: Do not write object file?

2012-05-17 Thread Andre Tampubolon
Actually what I mean is once the compilation is done, the object file will be automatically removed. So I guess this is my misunderstanding of dmd -o-. No problem, then. On 5/17/2012 6:09 PM, Aleksandar Ružičić aleksan...@ruzicic.info wrote: On Thursday, 17 May 2012 at 10:16:38 UTC, Andre

Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));`

2012-05-17 Thread Roman D. Boiko
Is there anything preventing us from adding constraints on the auto function return value? I mean, such language extension seems to be quite useful. For example, it would be no longer necessary to provide method bodies for functions with auto return values. In many cases this would

Re: Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));`

2012-05-17 Thread Roman D. Boiko
On Thursday, 17 May 2012 at 11:49:18 UTC, Roman D. Boiko wrote: Is there anything preventing us from adding constraints on the auto function return value? I mean, such language extension seems to be quite useful. For example, it would be no longer necessary to provide method bodies for

Re: Is dsource .org completely deserted?

2012-05-17 Thread Joseph Rushton Wakeling
On 17/05/12 01:45, Nick Sabalausky wrote: My main point is that those features (fork/pull request/issue tracking, etc) should be decoupled from hosting so that, for example, self-hosted repos would *not* provide inferior service, in fact they woudn't have to provide some stupid bundled interface

Re: O.T. Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Regan Heath
On Thu, 17 May 2012 09:50:44 +0100, Lars T. Kyllingstad pub...@kyllingen.net wrote: On Thursday, 17 May 2012 at 03:15:47 UTC, Jordi Sayol wrote: Al 17/05/12 03:32, En/na Walter Bright ha escrit: On 5/16/2012 12:29 AM, bearophile wrote: Then why is Andrei using the name

Re: input completion system

2012-05-17 Thread sclytrack
On 05/16/2012 04:37 AM, Katayama Hirofumi MZ wrote: Hi, everyone! Could you make input completion system for D? There is also DDT for eclipse. It works really well except for all the is(typeof({})) code which is starting to become present everywhere in libraries. Hence we are going to loose

Re: arrays: if(null == [ ])

2012-05-17 Thread Regan Heath
On Thu, 17 May 2012 00:08:49 +0100, Jonathan M Davis jmdavisp...@gmx.com wrote: On Wednesday, May 16, 2012 09:18:38 Steven Schveighoffer wrote: but I still think we should discourage using null as a sentinel, it leads to confusing code. If null were actually properly differentiated from

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread Andrej Mitrovic
On 5/17/12, Jonathan M Davis jmdavisp...@gmx.com wrote: The compiler _might_ Clang already does this with C++ for error messages, I see no reason why DMD shouldn't do the same.

Re: 2D (or higher) equivalent of ranges?

2012-05-17 Thread Philippe Sigaud
On Wed, May 16, 2012 at 11:20 PM, Tobias Pankrath tob...@pankrath.net wrote: More exotic: http://svn.dsource.org/projects/dranges/trunk/dranges/docs/recursive.html That looks like a compile time composite pattern and I'd say it's a natural way to iterate over every form of graph. To be a

Return type inference

2012-05-17 Thread Tobias Pankrath
This does not work and I can see why. --- auto foo(int x) { if(x 0) return foo(-x); return x; } DMD 2.059 says: oopsc/compiler/test.d(7): Error: forward reference to foo oopsc/compiler/test.d(14): Error: forward reference to foo For the human reader it is

Re: Standard struct constructors for the heap?

2012-05-17 Thread Steven Schveighoffer
On Wed, 16 May 2012 19:50:25 -0400, bearophile bearophileh...@lycos.com wrote: Regarding the efforts of removing limitations from D, do you know if there are problems in implementing this oldish enhancement request? http://d.puremagic.com/issues/show_bug.cgi?id=4086 Should be absolutely

Re: Can't run 'masm386'

2012-05-17 Thread Steven Schveighoffer
On Thu, 17 May 2012 01:53:59 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: (Or, as someone suggested, just remove the minit.obj depends on minit.asm from the makefile.) I don't think this is a good idea, minit.asm could have code changes, in which case you are

Re: Return type inference

2012-05-17 Thread Andrej Mitrovic
On 5/17/12, Tobias Pankrath tob...@pankrath.net wrote: snip http://d.puremagic.com/issues/show_bug.cgi?id=7483

Re: Return type inference

2012-05-17 Thread Dmitry Olshansky
On 17.05.2012 17:10, Tobias Pankrath wrote: This does not work and I can see why. --- auto foo(int x) { if(x 0) return foo(-x); Pluck in other condition then x 0 and you may see it's not so easy. Basically compiler has to deduce that recursion stops and trace down to the bottom of it.

stream interfaces - with ranges

2012-05-17 Thread Steven Schveighoffer
OK, so I had a couple partially written replies on the 'deprecating std.stream etc' thread, then I had to go home. But I thought about this a lot last night, and some of the things Andrei and others are saying is starting to make sense (I know!). Now I've scrapped those replies and am thinking

stream interfaces - with ranges

2012-05-17 Thread Steven Schveighoffer
OK, so I had a couple partially written replies on the 'deprecating std.stream etc' thread, then I had to go home. But I thought about this a lot last night, and some of the things Andrei and others are saying is starting to make sense (I know!). Now I've scrapped those replies and am thinking

Re: Return type inference

2012-05-17 Thread Peter Alexander
On Thursday, 17 May 2012 at 13:10:20 UTC, Tobias Pankrath wrote: For the human reader it is easy to see that the return type of foo should be int. Could the following rule be added to make dmd see this, too? If the function is called recursively the type of the result of this call is inferred

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Steven Schveighoffer
On Thu, 17 May 2012 01:48:06 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: I'm a little discouraged that my concern about input ranges can't save their state, and yet that's exactly what happens implicitly hasn't been addressed. I was hoping to at least get a That's not

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 03:04:00PM +0200, Andrej Mitrovic wrote: On 5/17/12, Jonathan M Davis jmdavisp...@gmx.com wrote: The compiler _might_ Clang already does this with C++ for error messages, I see no reason why DMD shouldn't do the same. I have brought this up before. Maybe I should

AliasTuples, rather than Records, to return multiple values

2012-05-17 Thread Dario Schiavon
Hi everybody! I've been lurking this forum for quite some time, attracted by the power and elegance of D. Although I'm not a programmer by profession, I often happen to develop programs for scientific data evaluation at work and I've always being intrigued with programming languages since I

Re: Return type inference

2012-05-17 Thread Steven Schveighoffer
On Thu, 17 May 2012 09:10:18 -0400, Tobias Pankrath tob...@pankrath.net wrote: This does not work and I can see why. --- auto foo(int x) { if(x 0) return foo(-x); return x; } DMD 2.059 says: oopsc/compiler/test.d(7): Error: forward reference to foo

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Dmitry Olshansky
On 17.05.2012 18:18, Steven Schveighoffer wrote: On Thu, 17 May 2012 01:48:06 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: I'm a little discouraged that my concern about input ranges can't save their state, and yet that's exactly what happens implicitly hasn't been

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread bearophile
H. S. Teoh: I have brought this up before. Maybe I should open an enhancement request? Something like this? http://d.puremagic.com/issues/show_bug.cgi?id=5004 Bye, bearophile

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Steven Schveighoffer
On Wed, 16 May 2012 17:37:14 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: A small debate has broken out over on D.learn ( http://forum.dlang.org/thread/jovicg$jta$1...@digitalmars.com#post-jovicg:24jta:241:40digitalmars.com ) that I thought I should move here.

Re: Return type inference

2012-05-17 Thread bearophile
Andrej Mitrovic: http://d.puremagic.com/issues/show_bug.cgi?id=7483 Probably related: http://d.puremagic.com/issues/show_bug.cgi?id=8111 Bye, bearophile

Re: isInputRange instead of isForwardRange for std.algorithm.fill

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 2:14 AM, Guillaume Chatelet wrote: It looks to me that isForwardRange is too much of a restriction for the fill algorithm, isInputRange could do, we don't need any save() here or am I missing something ? That's correct, please file as a bug so we remember. (The second range must be

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 4:00 AM, Peter Alexander wrote: On Tuesday, 15 May 2012 at 17:23:28 UTC, Kirill wrote: How about users who don't know what binary search is. binary search is an intuitive concept for people who have good programming experience but assumeSorted(r).contains(x) is more intuitive to

Re: Return type inference

2012-05-17 Thread Tobias Pankrath
In order to determine the first return type, it needs to find out what overloaded 'bar' to call, which requires determining the first return type. I didn't think of overloaded functions. If we consider only direct recursion, it should still work?

Re: News server load becoming more and more an issue

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 5:58 AM, filgood wrote: Andrei, any news regarding the news server? Things are moving, but to be honest they're moving a lot slower than I'd like. Andrei

Re: Return type inference

2012-05-17 Thread Alex Rønne Petersen
On 17-05-2012 16:22, Steven Schveighoffer wrote: On Thu, 17 May 2012 09:10:18 -0400, Tobias Pankrath tob...@pankrath.net wrote: This does not work and I can see why. --- auto foo(int x) { if(x 0) return foo(-x); return x; } DMD 2.059 says: oopsc/compiler/test.d(7): Error: forward

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 11:05:46 Steven Schveighoffer wrote: Hm... proposal: foreach(e; ref r) { } equates to your desired code. Would this help? Or you could just do for(; !r.empty; r.popFront()) { auto e = r.front; } I really don't think that that's a big deal. I don't think

Re: stream interfaces - with ranges

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 9:02 AM, Steven Schveighoffer wrote: 1. We need a buffering input stream type. This must have additional methods besides the range primitives, because doing one-at-a-time byte reads is not going to cut it. I was thinking a range of T[] could be enough for a buffered input range.

Re: Can't run 'masm386'

2012-05-17 Thread Walter Bright
On 5/17/2012 6:38 AM, Steven Schveighoffer wrote: Any chance this asm file can be written in D with asm block? No.

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread bearophile
Andrei Alexandrescu: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the standard library is a quest that could go forever, make everybody happy we're making progress, and achieve no

Re: Can't run 'masm386'

2012-05-17 Thread Adam Wilson
On Thu, 17 May 2012 06:38:15 -0700, Steven Schveighoffer schvei...@yahoo.com wrote: On Thu, 17 May 2012 01:53:59 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: (Or, as someone suggested, just remove the minit.obj depends on minit.asm from the makefile.) I don't

Re: Why typedef's shouldn't have been removed :(

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 04:29:57PM +0200, bearophile wrote: H. S. Teoh: I have brought this up before. Maybe I should open an enhancement request? Something like this? http://d.puremagic.com/issues/show_bug.cgi?id=5004 [...] Heh, I've actually voted for that bug before, and forgot about

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 10:26:18AM -0500, Andrei Alexandrescu wrote: On 5/17/12 4:00 AM, Peter Alexander wrote: [...] I'd have to read the documentation to find out which of these uses binary search. In fact, I'd probably have to read the Phobos source. If I just used binarySearch then I

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Peter Alexander
On Thursday, 17 May 2012 at 15:26:19 UTC, Andrei Alexandrescu wrote: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the standard library is a quest that could go forever, make everybody happy

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 06:52:26PM +0200, Peter Alexander wrote: On Thursday, 17 May 2012 at 15:26:19 UTC, Andrei Alexandrescu wrote: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Marco Leise
Am Fri, 11 May 2012 21:02:40 +0200 schrieb Philippe Sigaud philippe.sig...@gmail.com: On Fri, May 11, 2012 at 8:55 PM, H. S. Teoh hst...@quickfur.ath.cx wrote: If newbies had the proper introduction to the concept of templates (instead of being dunked in the deep end of the pool with

Re: AliasTuples, rather than Records, to return multiple values

2012-05-17 Thread deadalnix
Le 17/05/2012 16:20, Dario Schiavon a écrit : Hi everybody! I've been lurking this forum for quite some time, attracted by the power and elegance of D. Although I'm not a programmer by profession, I often happen to develop programs for scientific data evaluation at work and I've always being

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Steven Schveighoffer
On Thu, 17 May 2012 11:42:04 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday, May 17, 2012 11:05:46 Steven Schveighoffer wrote: Hm... proposal: foreach(e; ref r) { } equates to your desired code. Would this help? Or you could just do for(; !r.empty; r.popFront()) {

Re: AliasTuples, rather than Records, to return multiple values

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 07:20:38PM +0200, deadalnix wrote: [...] I think you show a real need here, but I don't really like your proposal. I'd advocate for recycling the comma operator for tuple building. +1. I know the topic of comma operator has been beaten to death several times over, but

Re: stream interfaces - with ranges

2012-05-17 Thread Steven Schveighoffer
On Thu, 17 May 2012 11:46:18 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/17/12 9:02 AM, Steven Schveighoffer wrote: Roughly speaking, not all the details are handled, but this makes a feasible input range that will perform quite nicely for things like

Re: isInputRange instead of isForwardRange for std.algorithm.fill

2012-05-17 Thread Guillaume Chatelet
On 05/17/12 17:19, Andrei Alexandrescu wrote: On 5/17/12 2:14 AM, Guillaume Chatelet wrote: It looks to me that isForwardRange is too much of a restriction for the fill algorithm, isInputRange could do, we don't need any save() here or am I missing something ? That's correct, please file as

alias 'this' with opCall?

2012-05-17 Thread Mehrdad
Why doesn't opCall() get forwarded by alias this? Is that a bug or a feature?

Re: enums extension

2012-05-17 Thread Comrad
On Wednesday, 16 May 2012 at 05:54:45 UTC, Simen Kjaeraas wrote: On Wed, 16 May 2012 06:22:15 +0200, Comrad comrad.karlov...@googlemail.com wrote: Dear developers and community, I want to draw you attention to the topic which was already discussed here:

Re: alias 'this' with opCall?

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 08:06:58PM +0200, Mehrdad wrote: Why doesn't opCall() get forwarded by alias this? Is that a bug or a feature? Sounds like a bug. T -- The peace of mind---from knowing that viruses which exploit Microsoft system vulnerabilities cannot touch Linux---is priceless. --

Re: alias 'this' with opCall?

2012-05-17 Thread Mehrdad
okie. http://d.puremagic.com/issues/show_bug.cgi?id=8113

Re: enums extension

2012-05-17 Thread Mehrdad
On Thursday, 17 May 2012 at 18:27:07 UTC, Mehrdad wrote: On Wednesday, 16 May 2012 at 06:24:54 UTC, Robert DaSilva wrote: The inheritances notation implies that it's a subset and can be assigned to an instances of the base. This would not be true with enums. FileAccessMask foo =

Re: enums extension

2012-05-17 Thread Mehrdad
On Wednesday, 16 May 2012 at 06:24:54 UTC, Robert DaSilva wrote: The inheritances notation implies that it's a subset and can be assigned to an instances of the base. This would not be true with enums. FileAccessMask foo = FileAccessMask.FILE_READ_DATA; AccessMask bar = foo; // Error

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 13:23:22 Steven Schveighoffer wrote: On Thu, 17 May 2012 11:42:04 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday, May 17, 2012 11:05:46 Steven Schveighoffer wrote: Hm... proposal: foreach(e; ref r) { } equates to your desired code.

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 18:00:40 bearophile wrote: Andrei Alexandrescu: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the standard library is a quest that could go forever, make

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Jonathan M Davis
On Thursday, May 17, 2012 18:52:26 Peter Alexander wrote: On Thursday, 17 May 2012 at 15:26:19 UTC, Andrei Alexandrescu wrote: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the standard

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 11:52 AM, Peter Alexander wrote: On Thursday, 17 May 2012 at 15:26:19 UTC, Andrei Alexandrescu wrote: I agree binarySearch is more precise, but I also think it's a minor issue not worth the cost of changing at this point. Improving names of things in the standard library is a quest

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Marco Leise
Am Mon, 14 May 2012 10:19:40 +0200 schrieb Jakob Bornecrantz wallbra...@gmail.com: On Saturday, 12 May 2012 at 23:27:15 UTC, Alex Rønne Petersen wrote: You know, my project consisting of 130-ish source files and 24.000-ish lines of code compiles from scratch in ~20 seconds on my

Posix vs. Windows

2012-05-17 Thread Mehrdad
From looking at Phobos, I'm understanding that the main difference between the implementation of various features for Posix systems as compared to Windows systems (aside from the API, etc.) is that Windows tends to do a lot of stuff *before* the program is loaded (and hence requires special

Re: Can't run 'masm386'

2012-05-17 Thread Jacob Carlborg
On 2012-05-17 17:53, Walter Bright wrote: On 5/17/2012 6:38 AM, Steven Schveighoffer wrote: Any chance this asm file can be written in D with asm block? No. Wasn't the whole point of supporting inline assembly directly in D to avoid these situations. -- /Jacob Carlborg

Re: Can't run 'masm386'

2012-05-17 Thread David Nadlinger
On Thursday, 17 May 2012 at 20:07:23 UTC, Jacob Carlborg wrote: On 2012-05-17 17:53, Walter Bright wrote: On 5/17/2012 6:38 AM, Steven Schveighoffer wrote: Any chance this asm file can be written in D with asm block? No. Wasn't the whole point of supporting inline assembly directly in D to

Re: Is dsource .org completely deserted?

2012-05-17 Thread Nick Sabalausky
Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote in message news:mailman.886.1337255711.24740.digitalmar...@puremagic.com... On 17/05/12 01:45, Nick Sabalausky wrote: My main point is that those features (fork/pull request/issue tracking, etc) should be decoupled from hosting so

Re: Is dsource .org completely deserted?

2012-05-17 Thread Nick Sabalausky
Nick Sabalausky seewebsitetocontac...@semitwist.com wrote in message news:jp3ocp$2e1c$1...@digitalmars.com... 2. The protocols (ie. either git/hg/etc or better yet a standard extension that handles both git and hg) would then incorporate the things that github/bitbucket have proven to be

Re: Is dsource .org completely deserted?

2012-05-17 Thread Nick Sabalausky
Nick Sabalausky seewebsitetocontac...@semitwist.com wrote in message news:jp3oq2$2esa$1...@digitalmars.com... Nick Sabalausky seewebsitetocontac...@semitwist.com wrote in message news:jp3ocp$2e1c$1...@digitalmars.com... 2. The protocols (ie. either git/hg/etc or better yet a standard

Re: Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));

2012-05-17 Thread Jonathan M Davis
` To: digitalmars.D digitalmars-d@puremagic.com User-Agent: KMail/4.8.2 (Linux/3.3.1-1-ARCH; KDE/4.8.2; x86_64; ; ) X-Authenticated: #68274723 X-Flags: 0001 X-KMail-CryptoMessageFormat: 15 X-KMail-EncryptActionEnabled: false X-KMail-Fcc: 15 X-KMail-SignatureActionEnabled: false X-KMail-Transport:

Re: New Traits

2012-05-17 Thread John Maschmeyer
On Thursday, 17 May 2012 at 10:30:26 UTC, Jacob Carlborg wrote: Does it work if the lambda is passed to a function: void foo (int delegate (int x) dg) { wirteln(__traits(codeof, dg); } foo(x = x + 1); Unforutnately, no. As written the lambda is a runtime parameter, so there is no way

Re: Getting the const-correctness of Object sorted once and for all

2012-05-17 Thread Marco Leise
Am Mon, 14 May 2012 16:54:34 -0700 schrieb Walter Bright newshou...@digitalmars.com: On 5/14/2012 10:08 AM, Tove wrote: but c++ has the 'mutable' keyword as an easy escape route... The existence of that capability means that 'const' in C++ cannot be meaningfully reasoned about. class Foo

D versus C#/.NET module systems

2012-05-17 Thread Eduardo Cavazos
This question on programmers.stackexchange.com questions the complexity of the C#/.NET namespace/module/dll system in relation to more elegant approaches taken by other languages. http://programmers.stackexchange.com/questions/149056/why-do-net-modules-separate-module-file-names-from-namespaces

Re: Would it be possible (and useful) to introduce declarations like `auto foo() if(isInputRange(auto));

2012-05-17 Thread Roman D. Boiko
On Thursday, 17 May 2012 at 21:09:10 UTC, Jonathan M Davis wrote: It would still be necessary, because the compiler needs to know what the actual return type is. Knowing that the type implements popFront, front, and empty isn't enough. It needs to know the actual, physical layout of the type

Re: New Traits

2012-05-17 Thread Justin Whear
On Thu, 17 May 2012 23:20:01 +0200, John Maschmeyer wrote: On Thursday, 17 May 2012 at 10:30:26 UTC, Jacob Carlborg wrote: Does it work if the lambda is passed to a function: void foo (int delegate (int x) dg) { wirteln(__traits(codeof, dg); } foo(x = x + 1); Unforutnately, no.

Re: News server load becoming more and more an issue

2012-05-17 Thread Nick Sabalausky
Andrea Fontana nos...@example.com wrote in message news:fauqirfsbdadgijxg...@forum.dlang.org... What about a new group on: https://groups.google.com/ God no. Google groups is a putrid turd.

Re: DFL?

2012-05-17 Thread Ronny
On Wednesday, 16 May 2012 at 15:52:37 UTC, Richard Webb wrote: Try using the version from https://github.com/Rayerd/dfl instead of the one from the official site. Thank you, but that didn't work. I now get the following error: C:\D\dmd2\import\dflC:\D\dmd2\windows\bin\dmd -c -debug -g -wi

Re: DFL?

2012-05-17 Thread Guillaume Chatelet
On 05/17/12 23:47, Ronny wrote: On Wednesday, 16 May 2012 at 15:52:37 UTC, Richard Webb wrote: Try using the version from https://github.com/Rayerd/dfl instead of the one from the official site. Thank you, but that didn't work. I now get the following error:

Re: News server load becoming more and more an issue

2012-05-17 Thread Alex Rønne Petersen
On 17-05-2012 23:41, Nick Sabalausky wrote: Andrea Fontananos...@example.com wrote in message news:fauqirfsbdadgijxg...@forum.dlang.org... What about a new group on: https://groups.google.com/ God no. Google groups is a putrid turd. Just use emails, rather than the web interface. ;)

Re: Is dsource .org completely deserted?

2012-05-17 Thread H. S. Teoh
On Thu, May 17, 2012 at 04:51:04PM -0400, Nick Sabalausky wrote: [...] Have you ever heard of, or even read, Hugi Magazine? ( http://www.hugi.scene.org/main.php?page=hugi ). It has interesting content, but the format is absolutely moronic: Instead of coming in PDF or HTML or even DOC or

Re: Is dsource .org completely deserted?

2012-05-17 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.902.1337292243.24740.digitalmar...@puremagic.com... On Thu, May 17, 2012 at 04:51:04PM -0400, Nick Sabalausky wrote: [...] Have you ever heard of, or even read, Hugi Magazine? ( http://www.hugi.scene.org/main.php?page=hugi ). It

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Philippe Sigaud
On Thu, May 17, 2012 at 7:00 PM, Marco Leise marco.le...@gmx.de wrote: Your PDF is my reference manual on templates for quite a while. Thanks for putting it up! Glad to hear it :-) *Sigh* It's only 2-3 months old and is already lagging behind the current D spec. Things like is(T t = U!(Args),

Re: Should range foreach be iterating over an implicit copy?

2012-05-17 Thread Erik Jensen
On Thursday, 17 May 2012 at 05:48:44 UTC, Nick Sabalausky wrote: - A range is not a collection, it's a *view* of a collection (or of something else). This is a necessary distinction because ranges and collections work in fundamentally different ways: A range is, *by necessity* consumed as

Re: AliasTuples, rather than Records, to return multiple values

2012-05-17 Thread deadalnix
Le 17/05/2012 19:27, H. S. Teoh a écrit : On Thu, May 17, 2012 at 07:20:38PM +0200, deadalnix wrote: [...] I think you show a real need here, but I don't really like your proposal. I'd advocate for recycling the comma operator for tuple building. +1. I know the topic of comma operator has

Re: D dropped in favour of C# for PSP emulator

2012-05-17 Thread Andrei Alexandrescu
On 5/17/12 5:44 PM, Philippe Sigaud wrote: On Thu, May 17, 2012 at 7:00 PM, Marco Leisemarco.le...@gmx.de wrote: Your PDF is my reference manual on templates for quite a while. Thanks for putting it up! Glad to hear it :-) *Sigh* It's only 2-3 months old and is already lagging behind the

  1   2   >