Re: Dscience

2012-03-12 Thread Paul D. Anderson
On Friday, 2 March 2012 at 12:27:06 UTC, bioinfornatics wrote: Dear, I have do a D 2 port to my dscience project: https://gitorious.org/dscience/dscience Any help are welcome I'm willing to help but I've got a couple of other things I need to get out the door first. But I will take a look

quickbar

2012-03-12 Thread negerns
quickbar-20120313-b.rar Description: Binary data

Re: quickbar

2012-03-12 Thread negerns
On 3/13/2012 3:06 AM, negerns wrote: I'm so sorry for that :( my bad! I hope it could be delete...

std.log review suspended

2012-03-12 Thread David Nadlinger
The extended review period for std.log has ended [1], and Jose, the author of the proposed module, has requested some extra time to incorporate the suggestions made during the review without ending up with a butchered design. Thus, the review process has been suspended as to not block the

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 06:43, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 04:54:09PM -0700, Walter Bright wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const bool opEquals(ref const KeyType s); const int

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 07:04, Alex Rønne Petersen wrote: On 12-03-2012 06:43, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 04:54:09PM -0700, Walter Bright wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const

Re: Breaking backwards compatiblity

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 01:36:06AM -0400, Nick Sabalausky wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.510.1331520028.4860.digitalmar...@puremagic.com... [...] Personally, I found discrete math to be the easiest class I took since kindergarten (*Both* of the times

Re: Breaking backwards compatiblity

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 01:48:46AM -0400, Nick Sabalausky wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.517.1331521772.4860.digitalmar...@puremagic.com... On Sun, Mar 11, 2012 at 11:38:12PM +0100, deadalnix wrote: I think a better solution is including expected

Re: Feq questions about the D language

2012-03-12 Thread Jonathan M Davis
On Sunday, March 11, 2012 21:33:23 Andrei Alexandrescu wrote: At any rate, the comparison is rigged because C++ is much more mature and invested in. It _is_ rigged, but if a programmer is used to more mature languages where they don't run into compiler bugs, and they try out a new one where

Re: Multiple return values...

2012-03-12 Thread Timon Gehr
On 03/12/2012 05:01 AM, Robert Jacques wrote: On Sun, 11 Mar 2012 21:49:52 -0500, Mantis mail.mantis...@gmail.com wrote: 12.03.2012 4:00, Robert Jacques пишет: On Sun, 11 Mar 2012 18:15:31 -0500, Timon Gehr timon.g...@gmx.ch wrote: On 03/11/2012 11:58 PM, Robert Jacques wrote: Manu was

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread so
On Sunday, 11 March 2012 at 23:54:10 UTC, Walter Bright wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const bool opEquals(ref const KeyType s); const int opCmp(ref const KeyType s); They need to be,

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread so
On Monday, 12 March 2012 at 07:18:06 UTC, so wrote: A pattern is emerging. Why not analyze it a bit and somehow try to find a common ground? Then we can generalize it to a single annotation. @mask(wat) const|pure|nothrow|safe @wat hash_t toHash() @wat bool opEquals(ref const KeyType s) @wat

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
On Mon, 12 Mar 2012 07:04:52 +0100, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Or, as a compromise, perhaps the compiler can auto-infer most of the attributes without any further effort from the user. No, that has API design issues. You can silently break a guarantee you made

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread James Miller
On 12 March 2012 21:08, Martin Nowak d...@dawgfoto.de wrote: On Mon, 12 Mar 2012 07:04:52 +0100, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Or, as a compromise, perhaps the compiler can auto-infer most of the attributes without any further effort from the user.  No, that has API design

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
So I propose instead a bit of a hack. toHash, opEquals, and opCmp as struct members be automatically annotated with pure, nothrow, and @safe (if not already marked as @trusted). How about complete inference instead of a hack?

Re: Multiple return values...

2012-03-12 Thread Manu
On 12 March 2012 04:44, Andrei Alexandrescu seewebsiteforem...@erdani.orgwrote: On 3/11/12 6:30 PM, Manu wrote: D should define an MRV ABI which is precisely the ABI for passing multiple args TO a function, but in reverse, for any given architecture. This also has the lovely side effect of

Re: Multiple return values...

2012-03-12 Thread Manu
On 12 March 2012 04:00, Robert Jacques sandf...@jhu.edu wrote: On Sun, 11 Mar 2012 18:15:31 -0500, Timon Gehr timon.g...@gmx.ch wrote: On 03/11/2012 11:58 PM, Robert Jacques wrote: Manu was arguing that MRV were somehow special and had mystical optimization potential. That's simply not

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Marco Leise
Am Mon, 12 Mar 2012 07:06:33 +0100 schrieb Alex Rønne Petersen xtzgzo...@gmail.com: I should point out that I *do* think the idea is good (i.e. if you want the bad things, that's what you have to declare), but it's just too late now. Also, there might be issues with const and the likes -

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jacob Carlborg
On 2012-03-11 20:55, Nick Sabalausky wrote: Mobile sites have traditionally required less-fancy implementations, so it's not unreasonable to think that some sites would use their mobile version *as* their low-tech fallback version. That's becoming less and less true these days, of course. But

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Walter Bright
On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and template functions - why? - because the function's implementation is guaranteed to be visible to the compiler.

Re: Has Tomasz's (h3r3tic's) OpenGL font rendering code been ported to D2?

2012-03-12 Thread Jacob Carlborg
On 2012-03-11 23:36, Chad J wrote: No, just getting the font onto the screen at all. And I want to: - Be able to size the font smoothly. (No bitmap fonts!) - Draw glyphs for higher unicode codepoints. (No texture[128]!) - Have kerning/hinting. (Freetype makes it possible, but does not do it

Re: Multiple return values...

2012-03-12 Thread Mantis
12.03.2012 6:01, Robert Jacques пишет: On Sun, 11 Mar 2012 21:49:52 -0500, Mantis mail.mantis...@gmail.com wrote: [...] That's the point of discussion. Fields of structure may not be optimized away, because they are not independent variables. In D you have unchecked pointer-to-pointer casts,

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
One problem I can think of is relying on the auto-inference can create fragile code. You make a change in one place without concentrating and suddenly a completely different part of your code breaks, because it's expecting pure, or @safe code and you have done something to prevent the inference.

Re: How about colors and terminal graphics in std.format?

2012-03-12 Thread Jacob Carlborg
On 2012-03-12 03:16, Chad J wrote: I remember doing colored terminal output in Python. It was pretty nifty, and allows for some slick CLI design. I think D can do better by putting it in the standard library. I was thinking something along the lines of this:

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread James Miller
That sounds intentionally. Say you have a struct with a getHash method. struct Key {    hash_t getHash() /* inferred pure */    {    } } Say you have an Set that requires a pure opHash. void insert(Key key) pure {    immutable hash = key.toHash(); } Now if you change the

Re: EBNF grammar for D?

2012-03-12 Thread Alix Pexton
On 11/03/2012 16:49, Philippe Sigaud wrote: Hello, I'm looking for a D grammar in (E)BNF form. Did any of you write something like that or do you think I can use the grammar parts on dlang.org? I remember different threads on this subject and saw the docs being updated regularly on github,

Re: Multiple return values...

2012-03-12 Thread RivenTheMage
So, function with MRV is basically the function that returns Tuple where one can specify return convention? --- auto fun() { return(Windows) tuple(1, 2.0f); } (int x, float y) = fun(); ---

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread deadalnix
Le 12/03/2012 00:54, Walter Bright a écrit : Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const bool opEquals(ref const KeyType s); const int opCmp(ref const KeyType s); They need to be, as well as const,

Re: Breaking backwards compatiblity

2012-03-12 Thread Marco Leise
Am Sun, 11 Mar 2012 04:12:12 -0400 schrieb Nick Sabalausky a@a.a: I think it's a shame that companies hand out high-end hardware to their developers like it was candy. There's no doubt in my mind that's significantly contributed to the amount of bloatware out there. But what if the

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Don Clugston
On 12/03/12 00:55, Alex Rønne Petersen wrote: On 12-03-2012 00:54, Walter Bright wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const bool opEquals(ref const KeyType s); const int opCmp(ref const

Re: Breaking backwards compatiblity

2012-03-12 Thread Marco Leise
I searched every inch of Opera's options screens and never found *any* mention or reference to any Disable AutoUpdate Derek ddparn...@bigpond.com wrote in message news:op.wazmllu534mv3i@red-beast... I found it in a minute. First I tried opera help and it directed me to details about

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 01:26:54 -0400, Jose Armando Garcia jsan...@gmail.com wrote: On Wed, Mar 7, 2012 at 6:39 AM, Steven Schveighoffer schvei...@yahoo.com wrote: On Wed, 07 Mar 2012 07:09:17 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: What is wrong with import std.log;

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 01:05:33 -0400, Jose Armando Garcia jsan...@gmail.com wrote: On Sun, Mar 11, 2012 at 3:28 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: I thought more about the point made about mixing throwing and logging levels. I agree that it's awkward to e.g. log to

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote: You know what I think it is (without actually looking at the code): I think they tried to do some highly misguided and even more poorly implemented hack (which they no-doubt thought was clever) for dealing with *cough* old

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 10:40, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and template functions - why? - because the function's implementation is

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-12 Thread Geoffrey Biggs
On Mar 12, 2012, at 7:28 AM, Andrei Alexandrescu wrote: On 3/11/12 4:49 PM, David Nadlinger wrote: Unfortunately, the discussion has ground to a halt again, so consider this a friendly reminder that there is still one day left until the end of the review period. David I thought more

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Sat, 10 Mar 2012 00:06:40 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Insert obligatory link: http://drdobbs.com/184401197 Very insightful article. Interesting point to make about D, however. It's really *difficult* to make related non-member non-friend functions,

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Sun, 11 Mar 2012 00:18:31 -0500, Daniel Murphy yebbl...@nospamgmail.com wrote: Nick Sabalausky a@a.a wrote in message news:jjh9uh$1vto$1...@digitalmars.com... My understanding is that the *only* thing preventing vitrual template functions is the possibility of pre-compiled closed-source

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread deadalnix
Le 12/03/2012 13:51, Alex Rønne Petersen a écrit : On 12-03-2012 10:40, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and template functions

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Steven Schveighoffer
On Sun, 11 Mar 2012 19:54:09 -0400, Walter Bright newshou...@digitalmars.com wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others: const hash_t toHash(); const bool opEquals(ref const KeyType s); const int opCmp(ref const

Re: Has Tomasz's (h3r3tic's) OpenGL font rendering code been ported to D2?

2012-03-12 Thread Kiith-Sa
On Sunday, 11 March 2012 at 22:39:46 UTC, Chad J wrote: On 03/11/2012 04:24 AM, Kiith-Sa wrote: Thanks for the link! I don't have time to go over it right now, but that looks promising. I took a shot at porting Tomasz's code a while ago, but I never got it to compile. At least your code

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 14:16, deadalnix wrote: Le 12/03/2012 13:51, Alex Rønne Petersen a écrit : On 12-03-2012 10:40, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
On Mon, 12 Mar 2012 10:40:16 +0100, Walter Bright newshou...@digitalmars.com wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes are only strengthening guarantees. Auto-inference is currently done for lambdas and template functions -

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread bearophile
Walter: toHash, opEquals, and opCmp as struct members be automatically annotated with pure, nothrow, and @safe (if not already marked as @trusted). I have read the other answers of this thread, and I don't like some of them. In this case I think this programmer convenience doesn't justify

Calling D from C

2012-03-12 Thread Chris W.
I have a problem when calling D functions from C. While I can perform simple arithmetic operations (i.e. the calculation is performed in D and returned to C), I experience problems when trying to perform string/char operations or call functions from the D standard library (e.g. writefln()). The

Re: Calling D from C

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 15:53, Chris W. wrote: I have a problem when calling D functions from C. While I can perform simple arithmetic operations (i.e. the calculation is performed in D and returned to C), I experience problems when trying to perform string/char operations or call functions from the D

Re: How about colors and terminal graphics in std.format?

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 10:51:08AM +0100, Jacob Carlborg wrote: On 2012-03-12 03:16, Chad J wrote: I remember doing colored terminal output in Python. It was pretty nifty, and allows for some slick CLI design. I think D can do better by putting it in the standard library. I was thinking

Re: Calling D from C

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 10:53:09 -0400, Chris W. wend...@cd.ie wrote: I have a problem when calling D functions from C. While I can perform simple arithmetic operations (i.e. the calculation is performed in D and returned to C), I experience problems when trying to perform string/char operations or

Re: Calling D from C

2012-03-12 Thread Chris W.
On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 10:53:09 -0400, Chris W. wend...@cd.ie wrote: I have a problem when calling D functions from C. While I can perform simple arithmetic operations (i.e. the calculation is performed in D and returned to

Re: Calling D from C

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 16:09, Chris W. wrote: On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 10:53:09 -0400, Chris W. wend...@cd.ie wrote: I have a problem when calling D functions from C. While I can perform simple arithmetic operations (i.e. the calculation

Re: Calling D from C

2012-03-12 Thread Chris W.
On Monday, 12 March 2012 at 15:17:32 UTC, Alex Rønne Petersen wrote: On 12-03-2012 16:09, Chris W. wrote: On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 10:53:09 -0400, Chris W. wend...@cd.ie wrote: I have a problem when calling D functions from C.

Re: Calling D from C

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 16:36, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 11:17:31 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: On 12-03-2012 16:09, Chris W. wrote: On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 10:53:09 -0400, Chris W.

Re: Calling D from C

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 11:17:31 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: On 12-03-2012 16:09, Chris W. wrote: On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12 Mar 2012 10:53:09 -0400, Chris W. wend...@cd.ie wrote: I have a problem when calling D

Re: Calling D from C

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 11:36:45 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: On Mon, 12 Mar 2012 11:17:31 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: On 12-03-2012 16:09, Chris W. wrote: On Monday, 12 March 2012 at 15:00:31 UTC, Steven Schveighoffer wrote: On Mon, 12

Re: Multiple return values...

2012-03-12 Thread Iain Buclaw
On 12 March 2012 01:37, Andrew Wiley wiley.andre...@gmail.com wrote: On Sun, Mar 11, 2012 at 7:44 PM, Manu turkey...@gmail.com wrote: On 12 March 2012 00:58, Robert Jacques sandf...@jhu.edu wrote: That's an argument for using the right register for the job. And we can / will be doing this on

Re: Multiple return values...

2012-03-12 Thread Iain Buclaw
On 12 March 2012 00:44, Manu turkey...@gmail.com wrote: On 12 March 2012 00:58, Robert Jacques sandf...@jhu.edu wrote: That's an argument for using the right register for the job. And we can / will be doing this on x86-64, as other compilers have already done. Manu was arguing that MRV were

Re: Calling D from C

2012-03-12 Thread Stewart Gordon
On 12/03/2012 15:38, Steven Schveighoffer wrote: snip http://dlang.org/phobos/core_runtime.html#initialize And actually, I think this should do everything necessary. No need to call gc_init and thread_attachThis(). Hm... just realized you can't do this, since it's a D function :D Why can't

Re: Multiple return values...

2012-03-12 Thread Manu
On 12 March 2012 19:03, Iain Buclaw ibuc...@ubuntu.com wrote: On 12 March 2012 00:44, Manu turkey...@gmail.com wrote: On 12 March 2012 00:58, Robert Jacques sandf...@jhu.edu wrote: That's an argument for using the right register for the job. And we can / will be doing this on x86-64, as

Re: Calling D from C

2012-03-12 Thread Sean Kelly
On Mar 12, 2012, at 9:54 AM, Stewart Gordon smjg_1...@yahoo.com wrote: On 12/03/2012 15:38, Steven Schveighoffer wrote: snip http://dlang.org/phobos/core_runtime.html#initialize And actually, I think this should do everything necessary. No need to call gc_init and thread_attachThis().

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 09:14:17 Martin Nowak wrote: So I propose instead a bit of a hack. toHash, opEquals, and opCmp as struct members be automatically annotated with pure, nothrow, and @safe (if not already marked as @trusted). How about complete inference instead of a hack? Because

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 14:23:28 Alex Rønne Petersen wrote: On 12-03-2012 14:16, deadalnix wrote: Le 12/03/2012 13:51, Alex Rønne Petersen a écrit : On 12-03-2012 10:40, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's wrong with auto-inference. Inferred attributes

Re: Calling D from C

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 12:54:25 -0400, Stewart Gordon smjg_1...@yahoo.com wrote: On 12/03/2012 15:38, Steven Schveighoffer wrote: snip http://dlang.org/phobos/core_runtime.html#initialize And actually, I think this should do everything necessary. No need to call gc_init and

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 18:38, Jonathan M Davis wrote: On Monday, March 12, 2012 14:23:28 Alex Rønne Petersen wrote: On 12-03-2012 14:16, deadalnix wrote: Le 12/03/2012 13:51, Alex Rønne Petersen a écrit : On 12-03-2012 10:40, Walter Bright wrote: On 3/12/2012 1:08 AM, Martin Nowak wrote: What's

Re: Multiple return values...

2012-03-12 Thread Iain Buclaw
On 12 March 2012 17:22, Manu turkey...@gmail.com wrote: On 12 March 2012 19:03, Iain Buclaw ibuc...@ubuntu.com wrote: On 12 March 2012 00:44, Manu turkey...@gmail.com wrote: On 12 March 2012 00:58, Robert Jacques sandf...@jhu.edu wrote: That's an argument for using the right register for

Re: Multiple return values...

2012-03-12 Thread Iain Buclaw
On 12 March 2012 17:49, Iain Buclaw ibuc...@ubuntu.com wrote: On 12 March 2012 17:22, Manu turkey...@gmail.com wrote: On 12 March 2012 19:03, Iain Buclaw ibuc...@ubuntu.com wrote: On 12 March 2012 00:44, Manu turkey...@gmail.com wrote: On 12 March 2012 00:58, Robert Jacques sandf...@jhu.edu

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 18:44:06 Alex Rønne Petersen wrote: Now, that _does_ introduce the possibility of a template being to be pure and then not being able to be pure thanks to a change that's made to it or something that it uses, and that makes impossible for any code using it to be

Re: [OT] Hanlon's Razor (Was: Optimize away immediately-called delegate literals?)

2012-03-12 Thread H. S. Teoh
On Sun, Mar 11, 2012 at 03:03:39AM -0400, Nick Sabalausky wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.455.1331448575.4860.digitalmar...@puremagic.com... Never ascribe to malice that which is adequately explained by incompetence. -- Napoleon Bonaparte Pardon

Re: Multiple return values...

2012-03-12 Thread Manu
On 12 March 2012 19:49, Iain Buclaw ibuc...@ubuntu.com wrote: OK, -msse2 is not an ARM target option. :~) Oh sorry, I thought you were asking about the x86 codegen ;) I used -S -O2 -float-abi=hard Looking around, the Procedure Call Standard for the ARM Architecture specifically says

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 01:55:33PM -0400, Jonathan M Davis wrote: [...] So, no, I don't think that @ctfe would really work. And while I agree that the situation isn't exactly ideal, I don't really see a way around it. Unit tests _do_ catch it for you though. The only thing that they can't

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 11:04:54 H. S. Teoh wrote: Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of that tedium. So much so that I find myself writing as much code in unittests as real code. Which is a good thing, because in

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 02:10:23PM -0400, Jonathan M Davis wrote: On Monday, March 12, 2012 11:04:54 H. S. Teoh wrote: Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of that tedium. So much so that I find myself writing as much

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 19:04, H. S. Teoh wrote: On Mon, Mar 12, 2012 at 01:55:33PM -0400, Jonathan M Davis wrote: [...] So, no, I don't think that @ctfe would really work. And while I agree that the situation isn't exactly ideal, I don't really see a way around it. Unit tests _do_ catch it for you

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 18:55, Jonathan M Davis wrote: On Monday, March 12, 2012 18:44:06 Alex Rønne Petersen wrote: Now, that _does_ introduce the possibility of a template being to be pure and then not being able to be pure thanks to a change that's made to it or something that it uses, and that makes

Re: Breaking backwards compatiblity

2012-03-12 Thread Nick Sabalausky
Marco Leise marco.le...@gmx.de wrote in message news:20120312124959.2ef8e...@marco-leise.homedns.org... I searched every inch of Opera's options screens and never found *any* mention or reference to any Disable AutoUpdate Derek ddparn...@bigpond.com wrote in message

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 07:41:39PM +0100, Alex Rønne Petersen wrote: On 12-03-2012 19:04, H. S. Teoh wrote: [...] Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of that tedium. So much so that I find myself writing as much code in

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Walter Bright
On 3/12/2012 11:04 AM, H. S. Teoh wrote: Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of that tedium. So much so that I find myself writing as much code in unittests as real code. Which is a good thing, because in the past I'd

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Alex Rønne Petersen
On 12-03-2012 20:08, H. S. Teoh wrote: On Mon, Mar 12, 2012 at 07:41:39PM +0100, Alex Rønne Petersen wrote: On 12-03-2012 19:04, H. S. Teoh wrote: [...] Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of that tedium. So much so

Re: Breaking backwards compatiblity

2012-03-12 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.531.1331533449.4860.digitalmar...@puremagic.com... On Mon, Mar 12, 2012 at 01:36:06AM -0400, Nick Sabalausky wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.510.1331520028.4860.digitalmar...@puremagic.com...

Re: Multiple return values...

2012-03-12 Thread Iain Buclaw
On 12 March 2012 17:59, Manu turkey...@gmail.com wrote: On 12 March 2012 19:49, Iain Buclaw ibuc...@ubuntu.com wrote: OK, -msse2 is not an ARM target option. :~) Oh sorry, I thought you were asking about the x86 codegen ;) I used -S -O2 -float-abi=hard Looking around, the Procedure Call

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa1432xjeav7ka@localhost.localdomain... On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote: You know what I think it is (without actually looking at the code): I think they tried to do some highly misguided and

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa1432xjeav7ka@localhost.localdomain... You may want to consider -- if you on principle don't view pages with information because the pages contain JS, you are the one missing out on the information. And it's not on

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa16bibneav7ka@localhost.localdomain... On Sat, 10 Mar 2012 00:06:40 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Insert obligatory link: http://drdobbs.com/184401197 Very insightful article. Interesting

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 15:27:30 -0400, Nick Sabalausky a@a.a wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa1432xjeav7ka@localhost.localdomain... On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote: You know what I think it is (without actually looking at

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jacob Carlborg
On 2012-03-12 19:41, Alex Rønne Petersen wrote: I stopped writing inline unit tests in larger code bases. If I do that, I have to maintain a separate build configuration just for test execution, which is not practical. Furthermore, I want to test my code in debug and release mode, which... goes

Re: Multiple return values...

2012-03-12 Thread Robert Jacques
On Mon, 12 Mar 2012 02:15:55 -0500, Timon Gehr timon.g...@gmx.ch wrote: On 03/12/2012 05:01 AM, Robert Jacques wrote: On Sun, 11 Mar 2012 21:49:52 -0500, Mantis mail.mantis...@gmail.com wrote: 12.03.2012 4:00, Robert Jacques пишет: On Sun, 11 Mar 2012 18:15:31 -0500, Timon Gehr

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
That could be solved with a @ctfe attribute or something, no? Like, if the function has @ctfe, go through all possible CTFE paths (excluding !__ctfe paths of course) and make sure they are CTFEable. Everything that's pure should be CTFEable which doesn't imply that you can turn every

Re: Multiple return values...

2012-03-12 Thread Robert Jacques
On Mon, 12 Mar 2012 04:46:45 -0500, Mantis mail.mantis...@gmail.com wrote: 12.03.2012 6:01, Robert Jacques пишет: On Sun, 11 Mar 2012 21:49:52 -0500, Mantis mail.mantis...@gmail.com wrote: [...] That's the point of discussion. Fields of structure may not be optimized away, because they are not

http://dlang.org/language-reference.html is down

2012-03-12 Thread Nick Sabalausky
See subject.

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 21:36:21 Martin Nowak wrote: That could be solved with a @ctfe attribute or something, no? Like, if the function has @ctfe, go through all possible CTFE paths (excluding !__ctfe paths of course) and make sure they are CTFEable. Everything that's pure should be

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Jonathan M Davis
On Monday, March 12, 2012 11:25:41 H. S. Teoh wrote: On Mon, Mar 12, 2012 at 02:10:23PM -0400, Jonathan M Davis wrote: On Monday, March 12, 2012 11:04:54 H. S. Teoh wrote: Tangential note: writing unit tests may be tedious, but D's inline unittest syntax has alleviated a large part of

Nevermind (Was: http://dlang.org/language-reference.html is down)

2012-03-12 Thread Nick Sabalausky
I still had meta redirects disabled from when I was reading that Dr Dobbs article.

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Timon Gehr
On 03/12/2012 09:46 PM, Jonathan M Davis wrote: On Monday, March 12, 2012 21:36:21 Martin Nowak wrote: That could be solved with a @ctfe attribute or something, no? Like, if the function has @ctfe, go through all possible CTFE paths (excluding !__ctfe paths of course) and make sure they are

Re: toHash = pure, nothrow, const, @safe

2012-03-12 Thread Martin Nowak
Because that requires having all of the source code. The fact that we have .di files prevents that. It doesn't require all source code. It just means that without source code nothing can be inferred and the attributes fall back to what has been annotated by hand. It could be used to annotated

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Era Scarecrow
It could be that they don't care to cater to people who hate JS. There aren't that many of you. There are enough. Apparently not. http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/ I'm perfectly willing to give up on 1-2% of Internet users who

Re: Nevermind (Was: http://dlang.org/language-reference.html is down)

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 04:45:39PM -0400, Nick Sabalausky wrote: I still had meta redirects disabled from when I was reading that Dr Dobbs article. [...] Somebody should invent per-site meta redirect enabling... :-P In fact, most browser options should be configurable per site/domain/etc.. (I

Re: Multiple return values...

2012-03-12 Thread Robert Jacques
On Mon, 12 Mar 2012 04:25:54 -0500, Manu turkey...@gmail.com wrote: On 12 March 2012 04:00, Robert Jacques sandf...@jhu.edu wrote: On Sun, 11 Mar 2012 18:15:31 -0500, Timon Gehr timon.g...@gmx.ch wrote: On 03/11/2012 11:58 PM, Robert Jacques wrote: Manu was arguing that MRV were somehow

Re: Multiple return values...

2012-03-12 Thread Martin Nowak
Is this basically like saying it'll never happen? There is already a pending pull request implementing the syntax, that addresses half of the feature straight up.. codegen can come later, I agreed earlier that it is of lesser importance. You don't see the immediate value in a convenient MRV

Re: Breaking backwards compatiblity

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 03:15:32PM -0400, Nick Sabalausky wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.531.1331533449.4860.digitalmar...@puremagic.com... [...] (And before you shoot me down with infinite quantities are not practical in programming, I'd like to say

Re: D support in Thrift needs your reviews!

2012-03-12 Thread David Nadlinger
On Monday, 12 March 2012 at 05:44:10 UTC, Martin Nowak wrote: I did recently tried it out because I wanted to test some async Fiber kqueue stuff. It did fail to compile though because of conflicting selective imports. You probably want to avoid those until the remaining issues are sorted out.

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-12 Thread Jose Armando Garcia
On Mon, Mar 12, 2012 at 1:11 PM, Robert Jacques sandf...@jhu.edu wrote: On Mon, 12 Mar 2012 00:15:14 -0500, Jose Armando Garcia jsan...@gmail.com wrote: On Wed, Mar 7, 2012 at 7:16 AM, Robert Jacques sandf...@jhu.edu wrote: On Tue, 06 Mar 2012 21:22:21 -0600, Andrei Alexandrescu

  1   2   3   >