Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 17:19:49 -0400, Era Scarecrow rtcv...@yahoo.com wrote: 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 have JS disabled. I use NoScript, so

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

2012-03-12 Thread David Nadlinger
On Monday, 12 March 2012 at 05:05:43 UTC, Jose Armando Garcia wrote: I think there is currently too much disagreement on std.log. I am honestly too busy juggling family, friends, school and work. I am currently leaning towards removing std.log from the review queue and spending some time

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

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 5:35 PM, David Nadlinger wrote: On Monday, 12 March 2012 at 05:05:43 UTC, Jose Armando Garcia wrote: I think there is currently too much disagreement on std.log. I am honestly too busy juggling family, friends, school and work. I am currently leaning towards removing std.log from the

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa2pimkxeav7ka@localhost.localdomain... 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

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 6:02 PM, Nick Sabalausky wrote: Does nobody understand basic statistics? I don't see evidence they don't. First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by the seemingly small number: It's a percentage and it's out of a *very* large population. So 1-2% is

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread Peter Alexander
On Sunday, 11 March 2012 at 06:49:27 UTC, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 01:29:01AM -0500, Nick Sabalausky wrote: Suppose you have a delegate literal and immediately call it: auto a = x + (){ doStuff(); return y; }() + z; Does DMD ever (or always?) optimize away a delegate if it's

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread David Nadlinger
On Monday, 12 March 2012 at 23:04:17 UTC, Nick Sabalausky wrote: Does nobody understand basic statistics? First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by the seemingly small number: It's a percentage and it's out of a *very* large population. So 1-2% is still *huge*.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:jjlvdh$1to3$1...@digitalmars.com... Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa2pimkxeav7ka@localhost.localdomain... On Mon, 12 Mar 2012 15:27:30 -0400, Nick Sabalausky a@a.a wrote: Steven Schveighoffer schvei...@yahoo.com

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:jjm057$1val$1...@digitalmars.com... On 3/12/12 6:02 PM, Nick Sabalausky wrote: Does nobody understand basic statistics? I don't see evidence they don't. First of all, 1-2% is a *hell* of a *LOT* of people. Don't be

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
David Nadlinger s...@klickverbot.at wrote in message news:zlzlrudlbyiwwmgqq...@forum.dlang.org... Besides, I am totally in favor of not needlessly required JS, but it does have its legitimate uses. *Using* it is fine as long as you don't go overboard. The issue is *requiring* it when it

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
David Nadlinger s...@klickverbot.at wrote in message news:zlzlrudlbyiwwmgqq...@forum.dlang.org... Stats are pretty much the same (98.5% among ~1 »unique« visitors over the last months) for my programming-centric blog, where I added a non-JS tracking pixel precisely because I was

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe
On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote: at the end of the day, you're still saying fuck you to millions of people. ...for little to no reason. It's not like making 99% of sites work without javascript takes *any* effort. Indeed, going without javascript is often

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

2012-03-12 Thread Jose Armando Garcia
On Mon, Mar 12, 2012 at 4:01 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/12/12 5:35 PM, David Nadlinger wrote: On Monday, 12 March 2012 at 05:05:43 UTC, Jose Armando Garcia wrote: I think there is currently too much disagreement on std.log. I am honestly too busy

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message news:npkazdoslxiuqxiin...@forum.dlang.org... On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote: at the end of the day, you're still saying fuck you to millions of people. ...for little to no reason. It's not like making

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

2012-03-12 Thread James Miller
On 13 March 2012 12:34, Jose Armando Garcia jsan...@gmail.com wrote: On Mon, Mar 12, 2012 at 4:01 PM, Andrei Alexandrescu I think that's a wise decision, thanks Jose and David. One possibility is that Jose transfers the code to someone else who takes it through the review process and makes

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

2012-03-12 Thread Jose Armando Garcia
On Mon, Mar 12, 2012 at 4:44 PM, James Miller ja...@aatch.net wrote: On 13 March 2012 12:34, Jose Armando Garcia jsan...@gmail.com wrote: On Mon, Mar 12, 2012 at 4:01 PM, Andrei Alexandrescu I think that's a wise decision, thanks Jose and David. One possibility is that Jose transfers the

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

2012-03-12 Thread Damian Ziemba
On Monday, 12 March 2012 at 03:32:26 UTC, Chad J wrote: On 03/11/2012 11:27 PM, Damian Ziemba wrote: On Monday, 12 March 2012 at 02:52:15 UTC, Andrei Alexandrescu wrote: On 3/11/12 9:16 PM, Chad J wrote: I remember doing colored terminal output in Python. It was pretty nifty, and allows for

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

2012-03-12 Thread Kevin Cox
On Mar 12, 2012 7:55 PM, Damian Ziemba s...@dzfl.pl wrote And yea, I think like others that it should have its own module like std.terminal/std.console or maybe somekind of spot in std.stdio. Python has a great lib for this. I can't remember what package it is in but it has things like isTty()

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jonathan M Davis
On Tuesday, March 13, 2012 00:27:26 Adam D. Ruppe wrote: On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote: at the end of the day, you're still saying fuck you to millions of people. ...for little to no reason. It's not like making 99% of sites work without javascript takes

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 12:15:02AM +0100, Peter Alexander wrote: On Sunday, 11 March 2012 at 06:49:27 UTC, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 01:29:01AM -0500, Nick Sabalausky wrote: Suppose you have a delegate literal and immediately call it: auto a = x + (){ doStuff(); return y; }()

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

2012-03-12 Thread Walter Bright
On 3/12/2012 1:56 PM, Martin Nowak wrote: 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. Hello endless bug reports of the form: It compiles when I send the arguments to dmd

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Era Scarecrow
In the case of my web apps, they do *not* pull JS from other sites. I understand and sympathize with your rationale. It's just not enough, however, to make web developers who want their site to appear a certain way care about the market share that your opinion represents. I'm perfectly

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe
On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely justified in using it, because 99% of the people out there

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

2012-03-12 Thread Walter Bright
On 3/12/2012 4:11 AM, deadalnix wrote: For struct, we have inference, ? No we don't. so most of the time attributes will correct. const pure nothrow @safe are something we want, but is it something we want to enforce ? Yes, because they are referred to by TypeInfo, and that's fairly

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

2012-03-12 Thread Walter Bright
On 3/12/2012 11:10 AM, Jonathan M Davis wrote: I believe that Walter likes to say that it takes away your excuse _not_ to write them because of how easy it is to write unit tests in D. It can be remarkable how much more use something gets if you just make it a bit more convenient.

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

2012-03-12 Thread Damian Ziemba
On Tuesday, 13 March 2012 at 00:24:58 UTC, Kevin Cox wrote: On Mar 12, 2012 7:55 PM, Damian Ziemba s...@dzfl.pl wrote And yea, I think like others that it should have its own module like std.terminal/std.console or maybe somekind of spot in std.stdio. Python has a great lib for this. I can't

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jonathan M Davis
On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your needs as a website developer. If JS best suits whatever the needs of a particular website developer are, then they are completely

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

2012-03-12 Thread Stewart Gordon
On 11/03/2012 23: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 KeyType s); snip And what about toString?

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

2012-03-12 Thread Jonathan M Davis
On Tuesday, March 13, 2012 01:15:59 Stewart Gordon wrote: On 11/03/2012 23: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);

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

2012-03-12 Thread bearophile
Stewart Gordon: And what about toString? Often in toString I use format() or text(), or to!string(), that currently aren't pure nor nothrow. But in this thread I have seen no answers regarding deprecating the need of opCmp() for hashability. Bye, bearophile

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

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 09:27:41PM -0400, Jonathan M Davis wrote: On Tuesday, March 13, 2012 01:15:59 Stewart Gordon wrote: On 11/03/2012 23:54, Walter Bright wrote: Consider the toHash() function for struct key types: http://dlang.org/hash-map.html And of course the others:

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

2012-03-12 Thread Alex Rønne Petersen
On 13-03-2012 02:28, bearophile wrote: Stewart Gordon: And what about toString? Often in toString I use format() or text(), or to!string(), that currently aren't pure nor nothrow. But in this thread I have seen no answers regarding deprecating the need of opCmp() for hashability. Bye,

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

2012-03-12 Thread Christian Manning
On Monday, 12 March 2012 at 09:51:08 UTC, 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: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote: On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your needs as a website developer. If JS best suits whatever the

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:jjm0c8$1vk8$1...@digitalmars.com... Nick Sabalausky a@a.a wrote in message news:jjlvdh$1to3$1...@digitalmars.com... Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.wa2pimkxeav7ka@localhost.localdomain... No, it *is* the point.

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

2012-03-12 Thread Christian Manning
On Tuesday, 13 March 2012 at 01:53:11 UTC, Chad J wrote: On 03/12/2012 09:36 PM, Christian Manning wrote: On Monday, 12 March 2012 at 09:51:08 UTC, Jacob Carlborg wrote: I think it would nice to have, but not in std.format. std.terminal or similar would be better. It would be great if an

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 14:58, H. S. Teoh hst...@quickfur.ath.cx wrote: On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote: On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your

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

2012-03-12 Thread Walter Bright
On 3/12/2012 6:40 PM, H. S. Teoh wrote: And I'm not talking about doing just toHash, or just toString either. Any of these functions have complex interdependencies with each other, so it's either fix them ALL, or not at all. Yup. It also seems very hard to figure out a transitional path to it.

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

2012-03-12 Thread Walter Bright
On 3/12/2012 6:15 PM, Stewart Gordon wrote: And what about toString? Good question. What do you suggest?

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

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 07:06:51PM -0700, Walter Bright wrote: On 3/12/2012 6:40 PM, H. S. Teoh wrote: And I'm not talking about doing just toHash, or just toString either. Any of these functions have complex interdependencies with each other, so it's either fix them ALL, or not at all.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Era Scarecrow rtcv...@yahoo.com wrote in message news:kbvwixcrdcgakjigj...@forum.dlang.org... This situation (where payphones were obsolete) existed long before the smartphone craze. Perhaps... I may be giving up my cell phone and having no phone connection. I'd buy a phone card soon,

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

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 03:02:27AM +0100, Christian Manning wrote: On Tuesday, 13 March 2012 at 01:53:11 UTC, Chad J wrote: On 03/12/2012 09:36 PM, Christian Manning wrote: On Monday, 12 March 2012 at 09:51:08 UTC, Jacob Carlborg wrote: I think it would nice to have, but not in std.format.

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

2012-03-12 Thread Chad J
On 03/12/2012 11:02 AM, H. S. Teoh wrote: 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

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

2012-03-12 Thread James Miller
On 13 March 2012 15:20, Chad J chadjoan@__spam.is.bad__gmail.com wrote: On 03/12/2012 11:02 AM, H. S. Teoh wrote: 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

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.572.1331601463.4860.digitalmar...@puremagic.com... On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your needs as a

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

2012-03-12 Thread Alex Rønne Petersen
On 13-03-2012 03:15, H. S. Teoh wrote: On Mon, Mar 12, 2012 at 07:06:51PM -0700, Walter Bright wrote: On 3/12/2012 6:40 PM, H. S. Teoh wrote: And I'm not talking about doing just toHash, or just toString either. Any of these functions have complex interdependencies with each other, so it's

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message news:pfaikhejyfjpbpwwq...@forum.dlang.org... Then, he asked for a partial ajax load thing. Turns out that's trivially easy too. On the client: That reminds me: Trendy web people seem to be a bit schizophrenic (I can't believe I

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.575.1331603803.4860.digitalmar...@puremagic.com... (And for the record, I don't own [a TV], and do not plan to. I know I'm in the minority. I can somewhat relate: I have a TV, but I rarely watch broadcast programming anymore,

Re: Breaking backwards compatiblity

2012-03-12 Thread Simen Kjærås
On Sun, 11 Mar 2012 21:07:06 +0100, Walter Bright newshou...@digitalmars.com wrote: On 3/11/2012 12:32 PM, Nick Sabalausky wrote: I'm convinced that colleges in general produce very bad programmers. The good programmers who have degrees, for the most part (I'm sure there are rare

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
James Miller ja...@aatch.net wrote in message news:mailman.576.1331604546.4860.digitalmar...@puremagic.com... The phrase in web development is Progressive enhancement that used to be all the rage at one point. I miss those days... Heh. :) So true... I miss the days when having animations on a

Re: Breaking backwards compatiblity

2012-03-12 Thread Nick Sabalausky
Simen Kjærås simen.kja...@gmail.com wrote in message news:op.wa28iobk0gp...@biotronic.lan... On Sun, 11 Mar 2012 21:07:06 +0100, Walter Bright newshou...@digitalmars.com wrote: On 3/11/2012 12:32 PM, Nick Sabalausky wrote: I'm convinced that colleges in general produce very bad programmers.

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

2012-03-12 Thread bearophile
Walter: Good question. What do you suggest? I suggest to follow a slow but reliable path, working bottom-up: turn to!string()/text()/format() into pure+nothrow functions, and then later require toString to be pure+nothrow and to have such annotations. Bye, bearophile

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread Brad Roberts
On 3/12/2012 4:15 PM, Peter Alexander wrote: On Sunday, 11 March 2012 at 06:49:27 UTC, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 01:29:01AM -0500, Nick Sabalausky wrote: Suppose you have a delegate literal and immediately call it: auto a = x + (){ doStuff(); return y; }() + z; Does DMD ever

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 15:48, Nick Sabalausky a@a.a wrote: James Miller ja...@aatch.net wrote in message news:mailman.576.1331604546.4860.digitalmar...@puremagic.com... The phrase in web development is Progressive enhancement that used to be all the rage at one point. I miss those days... Heh. :)

Re: EBNF grammar for D?

2012-03-12 Thread bcs
On 03/12/2012 03:17 AM, Alix Pexton wrote: 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

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread Nick Sabalausky
Peter Alexander peter.alexander...@gmail.com wrote in message news:thetmhnnbeepmxgus...@forum.dlang.org... On Sunday, 11 March 2012 at 06:49:27 UTC, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 01:29:01AM -0500, Nick Sabalausky wrote: Suppose you have a delegate literal and immediately call it:

Re: Breaking backwards compatiblity

2012-03-12 Thread Simen Kjærås
On Tue, 13 Mar 2012 03:50:49 +0100, Nick Sabalausky a@a.a wrote: Simen Kjærås simen.kja...@gmail.com wrote in message news:op.wa28iobk0gp...@biotronic.lan... On Sun, 11 Mar 2012 21:07:06 +0100, Walter Bright newshou...@digitalmars.com wrote: On 3/11/2012 12:32 PM, Nick Sabalausky wrote: I'm

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread Nick Sabalausky
Brad Roberts bra...@puremagic.com wrote in message news:mailman.582.1331607753.4860.digitalmar...@puremagic.com... On 3/12/2012 4:15 PM, Peter Alexander wrote: On Sunday, 11 March 2012 at 06:49:27 UTC, H. S. Teoh wrote: On Sun, Mar 11, 2012 at 01:29:01AM -0500, Nick Sabalausky wrote: Suppose

Re: Optimize away immediately-called delegate literals?

2012-03-12 Thread Brad Roberts
On 3/12/2012 8:10 PM, Nick Sabalausky wrote: Brad Roberts bra...@puremagic.com wrote: See also: bug 4440 The patch in there, if it hasn't bit rotten to badly (I suspect it has) will handle _this_ case. But almost no other case of inlining delegates. It'd be a good area for someone who

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

2012-03-12 Thread Chad J
On 03/12/2012 07:51 PM, Damian Ziemba wrote: On Monday, 12 March 2012 at 03:32:26 UTC, Chad J wrote: On 03/11/2012 11:27 PM, Damian Ziemba wrote: On Monday, 12 March 2012 at 02:52:15 UTC, Andrei Alexandrescu wrote: On 3/11/12 9:16 PM, Chad J wrote: I remember doing colored terminal output in

Re: EBNF grammar for D?

2012-03-12 Thread James Miller
On 13 March 2012 16:02, bcs b...@example.com wrote: On 03/12/2012 03:17 AM, Alix Pexton wrote: 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?

Re: Breaking backwards compatiblity

2012-03-12 Thread James Miller
On 13 March 2012 16:10, Simen Kjærås simen.kja...@gmail.com wrote: On Tue, 13 Mar 2012 03:50:49 +0100, Nick Sabalausky a@a.a wrote: Simen Kjærås simen.kja...@gmail.com wrote in message news:op.wa28iobk0gp...@biotronic.lan... On Sun, 11 Mar 2012 21:07:06 +0100, Walter Bright

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

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 8:15 PM, Stewart Gordon wrote: On 11/03/2012 23: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 KeyType

Re: EBNF grammar for D?

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 10:36 PM, James Miller wrote: I agree, automatic generation of the grammar rules would be incredibly useful for D tools. It doesn't necessarily have to be in a human-readable format, or even in a specific grammar format, just up to date. We can always have something to convert it into

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

2012-03-12 Thread Chad J
On 03/12/2012 10:37 PM, James Miller wrote: I think the problem with putting it into formatting is that it is inherently not output. IOW formatting should go anywhere, but colored output is terminal-only. Also, there are differences between terminals and all sorts of crap that just make this

Re: EBNF grammar for D?

2012-03-12 Thread James Miller
On 13 March 2012 16:47, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/12/12 10:36 PM, James Miller wrote: I agree, automatic generation of the grammar rules would be incredibly useful for D tools. It doesn't necessarily have to be in a human-readable format, or even in a

Re: EBNF grammar for D?

2012-03-12 Thread Alex Rønne Petersen
On 13-03-2012 05:00, James Miller wrote: On 13 March 2012 16:47, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/12/12 10:36 PM, James Miller wrote: I agree, automatic generation of the grammar rules would be incredibly useful for D tools. It doesn't necessarily have to be in a

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana
On 03/12/2012 08:32 PM, Nick Sabalausky wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message news:npkazdoslxiuqxiin...@forum.dlang.org... On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote: at the end of the day, you're still saying fuck you to millions of people.

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

2012-03-12 Thread Chad J
On 03/12/2012 11:58 PM, Chad J wrote: On 03/12/2012 10:37 PM, James Miller wrote: I think the problem with putting it into formatting is that it is inherently not output. IOW formatting should go anywhere, but colored output is terminal-only. Also, there are differences between terminals and

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana
On 03/12/2012 10:58 PM, H. S. Teoh wrote: On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote: On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote: But that's a decision based on your needs as a website

Re: EBNF grammar for D?

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 11:03 PM, Alex Rønne Petersen wrote: On 13-03-2012 05:00, James Miller wrote: On 13 March 2012 16:47, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/12/12 10:36 PM, James Miller wrote: I agree, automatic generation of the grammar rules would be incredibly useful for

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

2012-03-12 Thread James Miller
On 13 March 2012 16:58, Chad J chadjoan@__spam.is.bad__gmail.com wrote: On 03/12/2012 10:37 PM, James Miller wrote: I think the problem with putting it into formatting is that it is inherently not output. IOW formatting should go anywhere, but colored output is terminal-only. Also, there

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
James Miller ja...@aatch.net wrote in message news:mailman.581.1331607750.4860.digitalmar...@puremagic.com... On 13 March 2012 15:48, Nick Sabalausky a@a.a wrote: James Miller ja...@aatch.net wrote in message news:mailman.576.1331604546.4860.digitalmar...@puremagic.com... The phrase in web

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe
On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote: 2. On the web, animation means JS. css3 does animations that are pretty easy to use, degrade well, and tend to be fast. Moreover css is where it belongs anyway - it is pure presentation. Far, far superior to the JS crap.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 17:23, Nick Sabalausky a@a.a wrote: 1. Such animations need to be *FAST*. We're talking roughly 250ms max (probably even less, but I'd have to play around with it to refresh my memory). Most UI animations are slower than this (particularly on the web - although many DVDs are

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana
On 03/13/2012 01:29 AM, James Miller wrote: On 13 March 2012 17:07, Ary Manzanaa...@esperanto.org.ar wrote: On 03/12/2012 08:32 PM, Nick Sabalausky wrote: Adam D. Ruppedestructiona...@gmail.comwrote in message news:npkazdoslxiuqxiin...@forum.dlang.org... On Monday, 12 March 2012 at

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe
On Tuesday, 13 March 2012 at 04:07:08 UTC, Ary Manzana wrote: The implementation is straightforward (much more if I use something like knockoutjs): I post the comment to the server via javascript and on the callback, turn that editing comment into a definitive comment. It is *equally*

Re: Multiple return values...

2012-03-12 Thread Andrei Alexandrescu
On 3/12/12 3:37 AM, Manu wrote: On 12 March 2012 04:44, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:seewebsiteforem...@erdani.org wrote: On 3/11/12 6:30 PM, Manu wrote: D should define an MRV ABI which is precisely the ABI for passing multiple args

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message news:jjmhja$3a$2...@digitalmars.com... On 03/12/2012 10:58 PM, H. S. Teoh wrote: The problem today is that JS is the next cool thing, so everyone is jumping on the bandwagon, and everything from a single-page personal website to a list of

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

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 10:58:18PM -0400, bearophile wrote: Walter: Good question. What do you suggest? I suggest to follow a slow but reliable path, working bottom-up: turn to!string()/text()/format() into pure+nothrow functions, and then later require toString to be pure+nothrow and to

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 05:27:27AM +0100, Adam D. Ruppe wrote: On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote: 2. On the web, animation means JS. css3 does animations that are pretty easy to use, degrade well, and tend to be fast. Moreover css is where it belongs anyway -

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.572.1331601463.4860.digitalmar...@puremagic.com... [...] All I'm saying is that if it makes sense for the web developer to use javascript given what they're

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 17:31, Ary Manzana a...@esperanto.org.ar wrote: Ideally, you don't have to detect for javascript, you just have to *shock horror* code to web standards. -- James Miller But the non-javascript version is a worse user experience, and it's less efficient. Why not make it

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

2012-03-12 Thread Chad J
On 03/13/2012 12:15 AM, James Miller wrote: On 13 March 2012 16:58, Chad Jchadjoan@__spam.is.bad__gmail.com wrote: On 03/12/2012 10:37 PM, James Miller wrote: I think the problem with putting it into formatting is that it is inherently not output. IOW formatting should go anywhere, but

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 06:13:53PM +1300, James Miller wrote: [...] This isn't some JS vs NoJS debate, this is JS-only vs Progressive Enhancement. And for the record, GMail has a HTML-only version, and most of the other products work, if with reduced functionality, without javascript. I just

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message news:jjmiip$2c2$1...@digitalmars.com... But the non-javascript version is a worse user experience, and it's less efficient. Why not make it well from scratch? Because it's trivially easy to do, and it *is* a better experience than: a user

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

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 03:17:42PM +1300, James Miller wrote: On 13 March 2012 15:17, H. S. Teoh hst...@quickfur.ath.cx wrote: We could start off with said module just doing colors for now, and then gradually add more stuff to it later. We could end up at a D-flavoured ncurses library!

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

2012-03-12 Thread Sean Cavanaugh
On 3/12/2012 10:58 PM, Chad J wrote: On 03/12/2012 10:37 PM, James Miller wrote: I do want to be able to format things besides color with the color formatting function. Maybe I can pick out the color format specifiers first and then pass the rest to format. It'd be a shame to reimplement

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message news:oxkxtvkuybdommyer...@forum.dlang.org... On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote: 2. On the web, animation means JS. css3 does animations that are pretty easy to use, degrade well, and tend to be fast.

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

2012-03-12 Thread James Miller
On 13 March 2012 18:24, Chad J chadjoan@__spam.is.bad__gmail.com wrote: I'm not sure I agree with resetting to a default color.  What if I want to write to the stream without altering the terminal's graphics settings? Actually, I meant more to make sure that any output is reset to the

Re: Breaking backwards compatiblity

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 04:10:20AM +0100, Simen Kjærås wrote: On Tue, 13 Mar 2012 03:50:49 +0100, Nick Sabalausky a@a.a wrote: [...] D is great for physics programming. Now you can have much, much more than 26 variables :) True, though mostly, you'd just change to using greek letters, right?

Re: EBNF grammar for D?

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 11:10:14PM -0500, Andrei Alexandrescu wrote: [...] I'd love to embed a D parser inside Phobos, even though it's not the implementation used inside the compiler. [...] That will *certainly* be a big bonus. It will open up the opportunity for many, many user-contributed

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

2012-03-12 Thread Chad J
On 03/13/2012 01:41 AM, James Miller wrote: On 13 March 2012 18:24, Chad Jchadjoan@__spam.is.bad__gmail.com wrote: I'm not sure I agree with resetting to a default color. What if I want to write to the stream without altering the terminal's graphics settings? Actually, I meant more to make

Re: Assert and the optional Message

2012-03-12 Thread Jacob Carlborg
On 2012-03-11 22:12, Jonathan M Davis wrote: On Sunday, March 11, 2012 13:13:58 Jacob Carlborg wrote: Yeah, exactly. And it feels a bit stupid to duplicate the assert statement just to throw something that isn't an AssertError. Not to say that it's what you have to do, but I _would_ point

Sorting char arrays

2012-03-12 Thread Magnus Lie Hetland
The following fails, which I guess is a bug? import std.algorithm; void main() { char[] a = ['a', 'b', 'c']; sort(a); } I thought maybe I'd report it -- sort of surprises me that it hasn't been reported before, but I couldn't find it (although I found some similar reports) in

Re: Tempfiles in unittests

2012-03-12 Thread Magnus Lie Hetland
On 2012-03-11 21:14:59 +, Jonathan M Davis said: So, as far as Phobos' unit tests are concerned, there's not really any need for what you're trying to do. Sure. Just would have thought that maybe some unit-testing D user out there had written a function that wrote something to a file

Re: Sorting char arrays

2012-03-12 Thread Dmitry Olshansky
On 12.03.2012 16:51, Magnus Lie Hetland wrote: The following fails, which I guess is a bug? import std.algorithm; void main() { char[] a = ['a', 'b', 'c']; sort(a); } I thought maybe I'd report it -- sort of surprises me that it hasn't been reported before, but I couldn't find it (although I

Re: Sorting char arrays

2012-03-12 Thread bearophile
Magnus Lie Hetland: The following fails, which I guess is a bug? import std.algorithm; void main() { char[] a = ['a', 'b', 'c']; sort(a); } It's not a bug, char is meant to be a UTF-8. Two workarounds: import std.algorithm; void main() { dchar[] a1 = ['a', 'b', 'c'];

Re: Assert and the optional Message

2012-03-12 Thread Steven Schveighoffer
On Sat, 10 Mar 2012 11:03:43 -0500, Jacob Carlborg d...@me.com wrote: On 2012-03-09 20:06, Jonathan M Davis wrote: In what way? Yes, they're _catchable_, but everything that was on the unwound portion of the stack is now in an undefined state. So, recovering from the AssertError and

Re: Assert and the optional Message

2012-03-12 Thread Steven Schveighoffer
On Sat, 10 Mar 2012 01:09:02 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: On Friday, March 09, 2012 22:48:25 Timon Gehr wrote: On 03/09/2012 10:43 PM, Jonathan M Davis wrote: ... Jonathan is just speculating. And I think he is wrong. Speculating about what? - Jonathan M Davis

<    1   2   3   >