Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-09 Thread Dmitry Olshansky
On 09.03.2012 11:58, Jonathan M Davis wrote: On Friday, March 09, 2012 11:53:51 Dmitry Olshansky wrote: The goal is to make std.algorithm general when it comes to UTF-x ranges, VLE range seems a best suited abstraction level so far. Other things like base64 encoded stuff could be there, though

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-09 Thread Martin Nowak
Now, there is interest in having a D parser and lexer in Phobos. I don't know if your version will fit the bill (e.g. it must have a range-based API), but we need one at some point. The original idea was to more or less directly port dmd's lexer and parser with some adjustments to the API

Re: Our second mentor: Alex Rønne Petersen

2012-03-09 Thread Jonas Drewsen
On Sunday, 4 March 2012 at 23:31:41 UTC, deadalnix wrote: Le 04/03/2012 22:45, Andrei Alexandrescu a écrit : On 3/4/12 3:08 PM, deadalnix wrote: Le 04/03/2012 21:52, Andrei Alexandrescu a écrit : Please join me in welcoming Alex Rønne Petersen as a mentor! We believe he will bring great

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 11:08, Timon Gehr a écrit : On 03/06/2012 10:30 PM, deadalnix wrote: auto helps too. This remark was explicitly about _Java_ code style. 1/ We are not in the java's newsgroup. 2/ In java, the tooling is that awesome that you don't need to type most of it anyway.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 03:42, H. S. Teoh a écrit : On Tue, Mar 06, 2012 at 09:18:13PM -0500, Nick Sabalausky wrote: [...] But, I'm thinking this whole dur vs duration matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we even need the dur or duration for anyway? I say fuck

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 02:00, F i L a écrit : I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others obviously feel more comfortable writing with a high level of abbreviation, which they justify rather well. Still, if D's goal is to gain

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 04:05, Bill a écrit : F i L Wrote: I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others obviously feel more comfortable writing with a high level of abbreviation, which they justify rather well. Still, if D's

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 04:46, Nick Sabalausky a écrit : Adam D. Ruppedestructiona...@gmail.com wrote in message news:bwqkuqhyiygvgqswi...@forum.dlang.org... On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: I don't understand this complaint at all. curr is an incredibly common

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 07/03/2012 06:54, H. S. Teoh a écrit : On Wed, Mar 07, 2012 at 04:42:50AM +0100, Adam D. Ruppe wrote: On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: I don't understand this complaint at all. curr is an incredibly common abbreviation for current. Is it your *first*

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:39:23 deadalnix wrote: Le 07/03/2012 04:46, Nick Sabalausky a écrit : Adam D. Ruppedestructiona...@gmail.com wrote in message news:bwqkuqhyiygvgqswi...@forum.dlang.org... On Wednesday, 7 March 2012 at 03:24:23 UTC, Jonathan M Davis wrote: I don't

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:33:20 deadalnix wrote: Le 07/03/2012 02:00, F i L a écrit : I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others obviously feel more comfortable writing with a high level of abbreviation,

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations in Phobos consistent would be a big step forward. You know, people keep saying that the

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 02:59, Mantis mail.mantis...@gmail.com wrote: 09.03.2012 2:23, Manu пишет: On 9 March 2012 01:56, Mantis mail.mantis...@gmail.com mailto: mail.mantis.88@gmail.**com mail.mantis...@gmail.com wrote: [...] Is tuple required to be anonymous struct? I thought it's

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Don Clugston
On 09/03/12 05:54, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 07:07:04PM -0500, Nick Sabalausky wrote: [...] Heh one of us should hack up DMD to produce a NihonD, using (or at least allowing) kanji instead of the kanas wherever appropriate :) That'd be both fun to make and to use. [...] On

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations in Phobos consistent would be a big step

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 01:07:57 Jonathan M Davis wrote: On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 10:07, Jonathan M Davis a écrit : On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 08/03/2012 21:08, Matt Soucy wrote: American does have the benefit of being more pronounceable, though...I just tried to pronounce that oohz-ee-an, us-ee-an, etc and they all sound odd. I say it as Yu-Essian, it gets a lot of funny looks even after I have explained ^^ A...

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 09/03/2012 00:07, Nick Sabalausky wrote: But yea, it would be interesting to see a langauge that was based on something very different. A German-based one would be fun. Or even better, something that doesn't use the Latin alphabet, like Japanese or Hebrew or Russian. Or Swahili (which is an

Annotations or custom attributes

2012-03-09 Thread Manu
Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm serialising some struct/class using reflection to some text

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 10:28:12 deadalnix wrote: Le 09/03/2012 10:07, Jonathan M Davis a écrit : On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012

Re: [OT] American versus British spelling and pronunciation

2012-03-09 Thread Regan Heath
On Thu, 08 Mar 2012 23:27:18 -, Nick Sabalausky a@a.a wrote: But anyway, to me, rolling Rs seems pretentious It seems Spanish to me ;) Get your yappy 'perro' off my leg! LOL :) R -- Using Opera's revolutionary email client: http://www.opera.com/mail/

Re: Annotations or custom attributes

2012-03-09 Thread Alex Rønne Petersen
On 09-03-2012 11:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? Unfortunately, no. In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. Yes. This is a

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
Le 09/03/2012 11:58, Jonathan M Davis a écrit : This is not alias. This is about accepting template parameters. The actual isn't very consistent anyway (seconds, but usecs ?). It amounts to the same thing, and core.time and std.datetime are as consistent as they're going to get. seconds are

Re: Annotations or custom attributes

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 11:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? Unfortunately no. In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread deadalnix
PS: just to be clear, I do agree with most of what you said here : https://github.com/D-Programming-Language/druntime/pull/173

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread Jos van Uden
On 13-2-2012 15:14, bearophile wrote: Zach the Mystic: void setRandomColorPair( ref ColorPair cp ) { import std.random; ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); } Where possible it's good to add static to nested functions: Why?

Re: Annotations or custom attributes

2012-03-09 Thread Dmitry Olshansky
On 09.03.2012 14:56, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? There is a potential for them. At least technically everything with @ in front of it was supposed to be an annotation (like @property). I think it's just, sort of, reserved for future.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 6:17 AM, Jonathan M Davis wrote: On Friday, March 09, 2012 01:07:57 Jonathan M Davis wrote: On Friday, March 09, 2012 09:55:50 deadalnix wrote: Le 09/03/2012 05:42, H. S. Teoh a écrit : On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012

Re: Annotations or custom attributes

2012-03-09 Thread Manu
Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. On 9 March 2012 15:42, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 09.03.2012 14:56, Manu wrote: Does D have a nice way to add annotations or custom

Re: Creating dynamic arrays of known size

2012-03-09 Thread Andrej Mitrovic
Isn't this just as good? Key[] keys; keys.reserve(num_keys) foreach (key; keys_in_aa) keys ~= key;

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm qualified to propose a robust syntax, I don't know enough about the finer details of the grammar. Perhaps if other people agree with me, they could present some creative solutions to the syntax? I

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread Timon Gehr
On 03/09/2012 02:29 PM, Jos van Uden wrote: On 13-2-2012 15:14, bearophile wrote: Zach the Mystic: void setRandomColorPair( ref ColorPair cp ) { import std.random; ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); } Where possible it's good to add static to nested functions: Why?

Re: inout and function/delegate parameters

2012-03-09 Thread Steven Schveighoffer
On Thu, 08 Mar 2012 17:43:34 -0500, Stewart Gordon smjg_1...@yahoo.com wrote: On 08/03/2012 19:38, Steven Schveighoffer wrote: snip Yes, I couldn't really find that. It does specifically say casting away const and then modifying is invalid, but it does not say anything about if you know

Re: Creating dynamic arrays of known size

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 01:59:34 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: On Thursday, March 08, 2012 22:05:57 H. S. Teoh wrote: On Thu, Mar 08, 2012 at 09:13:13PM -0800, H. S. Teoh wrote: So, I'm plodding along with my AA implementation that *hopefully* will eventually reach the

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Timon Gehr
On 03/08/2012 10:07 PM, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 05:45:47PM -0300, Ary Manzana wrote: On 3/8/12 7:27 AM, Timon Gehr wrote: On 03/08/2012 03:14 AM, Ary Manzana wrote: Here's something I wrote today: parent_ids = results.map{|x| x['_source']['parent_ids']}.flatten.uniq.compact

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Wed, 07 Mar 2012 17:11:43 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: On Wed, 07 Mar 2012 10:25:32 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: On Wed, 07 Mar 2012 08:47:48 -0500, Steven Schveighoffer schvei...@yahoo.com wrote: I'll see if I can do a pull

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Timon Gehr
YOn 03/09/2012 09:12 AM, deadalnix wrote: Le 07/03/2012 11:08, Timon Gehr a écrit : On 03/06/2012 10:30 PM, deadalnix wrote: auto helps too. This remark was explicitly about _Java_ code style. 1/ We are not in the java's newsgroup. 2/ In java, the tooling is that awesome that you don't

Re: dereferencing null

2012-03-09 Thread Timon Gehr
On 03/09/2012 01:43 AM, bearophile wrote: Adam D. Ruppe: D rox the web (and has for a while). (Oh, you are starting to copy Andrei talk style now :-) The birth of community words, idioms and sub-languages is a very common thing, sociology studies such things a lot). But there's always

Re: [OT] Smoking sections (Was: Arbitrary abbreviations in phobos considered ridiculous)

2012-03-09 Thread H. S. Teoh
On Thu, Mar 08, 2012 at 11:01:21PM -0800, Jonathan M Davis wrote: On Friday, March 09, 2012 01:45:13 Nick Sabalausky wrote: [...] That's one great thing about Ohio: A few years back we had a state law passed here (by public vote! I had been convinced it wouldn't pass) prohibiting smoking in

Re: Annotations or custom attributes

2012-03-09 Thread bearophile
Manu: Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. As far as I know there are no concrete ideas yet for the semantics and precise usage of this feature. And I think there are different ideas regarding

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 03:27:14PM +0100, Timon Gehr wrote: On 03/09/2012 01:23 AM, Manu wrote: [...] int x; ... (x, float y) = func(); // assign to predeclared variable(/s)? (x, , z) = func(); // ignore the second result value (elimination of the second result's code path) Those two

Re: dereferencing null

2012-03-09 Thread bearophile
Timon Gehr: Comparing signed/unsigned is perfectly reasonable. Right, but only if the numbers don't get implicit reinterpretations to other intervals, as C/C++/D do. Bye, bearophile

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 16:27, Timon Gehr timon.g...@gmx.ch wrote: On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm qualified to propose a robust syntax, I don't know enough about the finer details of the grammar. Perhaps if other people agree with

Re: The One-Letter Nested Function - a sample article for some kind of

2012-03-09 Thread bearophile
Jos van Uden: On 13-2-2012 15:14, bearophile wrote: Where possible it's good to add static to nested functions: Why? For optimization, to be sure there's no closure allocation or a second pointer. But also for code correctness, because static functions can't use automatic variables

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 15:39, Timon Gehr wrote: On 03/08/2012 10:07 PM, H. S. Teoh wrote: On Thu, Mar 08, 2012 at 05:45:47PM -0300, Ary Manzana wrote: On 3/8/12 7:27 AM, Timon Gehr wrote: On 03/08/2012 03:14 AM, Ary Manzana wrote: Here's something I wrote today: parent_ids = results.map{|x|

Re: Multiple return values...

2012-03-09 Thread Kevin Cox
On Mar 9, 2012 10:28 AM, H. S. Teoh hst...@quickfur.ath.cx wrote: On Fri, Mar 09, 2012 at 03:27:14PM +0100, Timon Gehr wrote: On 03/09/2012 01:23 AM, Manu wrote: [...] int x; ... (x, float y) = func(); // assign to predeclared variable(/s)? (x, , z) = func(); // ignore the second result

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 04:38 PM, Manu wrote: On 9 March 2012 16:27, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm qualified to propose a robust syntax, I don't

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 17:20, bearophile bearophileh...@lycos.com wrote: Manu: Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. As far as I know there are no concrete ideas yet for the semantics and precise

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 17:57, Timon Gehr timon.g...@gmx.ch wrote: On 03/09/2012 04:38 PM, Manu wrote: On 9 March 2012 16:27, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 03/09/2012 01:23 AM, Manu wrote: I can imagine syntax using parentheses, but I don't think I'm

Re: Annotations or custom attributes

2012-03-09 Thread Andrei Alexandrescu
On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on occasion. For instance, I'm serialising some

Re: Annotations or custom attributes

2012-03-09 Thread Gor Gyolchanyan
That's easy to implement and extremely ugly. On Fri, Mar 9, 2012 at 8:15 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate

Re: Annotations or custom attributes

2012-03-09 Thread Jacob Carlborg
On 2012-03-09 17:15, Andrei Alexandrescu wrote: On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like to be able to do that in D on

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Brad Anderson
On Fri, Mar 9, 2012 at 1:46 AM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Friday, March 09, 2012 09:33:20 deadalnix wrote: Le 07/03/2012 02:00, F i L a écrit : I personally find it much easier to remember and use longer, more sentance-like method names. However, Jonathan and others

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 18:15, Andrei Alexandrescu seewebsiteforem...@erdani.orgwrote: On 3/9/12 2:56 AM, Manu wrote: Does D have a nice way to add annotations or custom attributes to entities? In Java/C# for example, it is common to annotate things with useful compile time information. I'd like

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread dolive
Jonathan M Davis Wrote: On Thursday, March 08, 2012 20:42:31 H. S. Teoh wrote: On Thu, Mar 08, 2012 at 07:07:43PM -0500, Jonathan M Davis wrote: On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote: IMO, making all abbreviations in Phobos consistent would be a big step forward.

Re: Annotations or custom attributes

2012-03-09 Thread Michel Fortin
On 2012-03-09 16:15:30 +, Andrei Alexandrescu seewebsiteforem...@erdani.org said: I think a good approach in D would be to define mixins that work in conjunction with the feature involved, for example: class A { int thing; mixin(DoNotSerialize!thing); ... } or together:

Re: Annotations or custom attributes

2012-03-09 Thread Manu
On 9 March 2012 19:23, Michel Fortin michel.for...@michelf.com wrote: On 2012-03-09 16:15:30 +, Andrei Alexandrescu seewebsiteforem...@erdani.org** said: I think a good approach in D would be to define mixins that work in conjunction with the feature involved, for example: class A {

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 05:14 PM, Manu wrote: On 9 March 2012 17:57, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 03/09/2012 04:38 PM, Manu wrote: On 9 March 2012 16:27, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch mailto:timon.g...@gmx.ch

Re: Multiple return values...

2012-03-09 Thread Timon Gehr
On 03/09/2012 05:14 PM, Manu wrote: What I mean is this: retTuple = func(); someStruct.x = retTuple[0]; y = retTuple[1]; // retTuple[2] is ignored, but the intent is not clear in the code as it was in my prior example, I like how my prior example makes this intent explicit int err =

Re: Creating dynamic arrays of known size

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 03:10:21PM +0100, Andrej Mitrovic wrote: Isn't this just as good? Key[] keys; keys.reserve(num_keys) foreach (key; keys_in_aa) keys ~= key; I suppose that should work. Although it does open up a new can of worms: reserve is @system and also impure. I can see

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 07:16:19PM +0100, Timon Gehr wrote: [...] Another issue is that people would complain about auto-flattening all the time once built-in tuples get more accessible, even though it is not actually a problem. It would be just due to the fact that it does not occur in most

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Alix Pexton alix.dot.pex...@gmail.dot.com wrote in message news:jjcn41$2g4g$1...@digitalmars.com... and I have a theory that poetic languages would be good for programming in. http://shakespearelang.sourceforge.net/ Hello World:

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message news:jjd21r$6ni$1...@digitalmars.com... Sample Ruby session: irb ruby-1.8.7-p352 :001 [1, 2, 3].count = 3 ruby-1.8.7-p352 :002 [1, 2, 3].length = 3 ruby-1.8.7-p352 :003 [1, 2, 3].size = 3 I never saw *anyone* complaining about

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 10:01:19 Brad Anderson wrote: On Fri, Mar 9, 2012 at 1:46 AM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Friday, March 09, 2012 09:33:20 deadalnix wrote: Le 07/03/2012 02:00, F i L a écrit : I personally find it much easier to remember and use longer, more

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 01:29:03PM -0500, Nick Sabalausky wrote: Alix Pexton alix.dot.pex...@gmail.dot.com wrote in message news:jjcn41$2g4g$1...@digitalmars.com... and I have a theory that poetic languages would be good for programming in. http://shakespearelang.sourceforge.net/

Re: Multiple return values...

2012-03-09 Thread bearophile
H. S. Teoh: Perl auto-flattens lists. Maybe they have fixed this big design mistake in Perl6. Bye, bearophile

Re: Annotations or custom attributes

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 16:00:03 Manu wrote: Okay, so the consensus is, it doesn't currently exist, but there is no real resistance, and is tentatively planned? Sounds good to me. I wouldn't really say that it's tentatively planned. I don't recall Walter ever weighing in on it at all, and

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 01:34:38PM -0500, Nick Sabalausky wrote: Ary Manzana a...@esperanto.org.ar wrote in message news:jjd21r$6ni$1...@digitalmars.com... Sample Ruby session: irb ruby-1.8.7-p352 :001 [1, 2, 3].count = 3 ruby-1.8.7-p352 :002 [1, 2, 3].length = 3

Re: Multiple return values...

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 02:01:34PM -0500, bearophile wrote: H. S. Teoh: Perl auto-flattens lists. Maybe they have fixed this big design mistake in Perl6. [...] Whether or not it was a mistake is debatable. It does have its uses... though forcing everyone to use references to prevent

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Alix Pexton
On 09/03/2012 18:29, Nick Sabalausky wrote: Alix Pextonalix.dot.pex...@gmail.dot.com wrote in message news:jjcn41$2g4g$1...@digitalmars.com... and I have a theory that poetic languages would be good for programming in. http://shakespearelang.sourceforge.net/ Hello World:

Re: Multiple return values...

2012-03-09 Thread Manfred Nowak
Manu wrote: By contrast, multiple return values are quite the opposite. They are explicitly NON-STRUCTURED. The presumption in this case is that multiple resturn values would follow the exact same set of rules as passing multiple args TO a function, but in reverse. this seams to state a

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 4:09 PM, H. S. Teoh wrote: On Fri, Mar 09, 2012 at 01:34:38PM -0500, Nick Sabalausky wrote: Ary Manzanaa...@esperanto.org.ar wrote in message news:jjd21r$6ni$1...@digitalmars.com... Sample Ruby session: irb ruby-1.8.7-p352 :001 [1, 2, 3].count = 3 ruby-1.8.7-p352 :002 [1,

Re: Multiple return values...

2012-03-09 Thread Manu
On 9 March 2012 22:39, Manfred Nowak svv1...@hotmail.com wrote: Manu wrote: By contrast, multiple return values are quite the opposite. They are explicitly NON-STRUCTURED. The presumption in this case is that multiple resturn values would follow the exact same set of rules as passing

Re: Multiple return values...

2012-03-09 Thread a
I'm finding HEAPS of SIMD functions want to return pairs (unpacks in particular): int4 (low, hight) = unpack(someShort8); Currently I have to duplicate everyting: int4 low = unpackLow(someShort8); int4 high = unpackHigh(someShort8); I'm getting really sick of that, it feels so... last

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:jjdru9$1rv5$1...@digitalmars.com... Nick Sabalausky a@a.a wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... But, I'm thinking this whole dur vs duration matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... But, I'm thinking this whole dur vs duration matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we even need the dur or duration for anyway? I say fuck it: Let's just toss this into

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message news:jjdqe4$1oeb$1...@digitalmars.com... Indeed, count can be used to count elements: ruby-1.8.7-p352 :002 [1, 2, 3, 3, 3].count 3 = 3 ruby-1.8.7-p352 :004 [1, 2, 3, 3, 3].count :odd? = 4 ruby-1.8.7-p352 :005 [1, 2, 3, 3, 3].count {

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Ary Manzana
On 3/9/12 6:21 PM, Nick Sabalausky wrote: Ary Manzanaa...@esperanto.org.ar wrote in message news:jjdqe4$1oeb$1...@digitalmars.com... Indeed, count can be used to count elements: ruby-1.8.7-p352 :002 [1, 2, 3, 3, 3].count 3 = 3 ruby-1.8.7-p352 :004 [1, 2, 3, 3, 3].count:odd? = 4

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky a@a.a wrote: Nick Sabalausky a@a.a wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... But, I'm thinking this whole dur vs duration matter is stupid anyway. Seconds, hours, etc *are* durations. What the hell do we even need the dur or

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky a@a.a wrote: Nick Sabalausky a@a.a wrote in message news:jj6gjm$2m6a$1...@digitalmars.com... But, I'm thinking this whole dur vs duration matter is stupid anyway. Seconds,

Can getHash be made pure?

2012-03-09 Thread H. S. Teoh
Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be marked pure. Is it possible to make

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.357.1331329638.4860.digitalmar...@puremagic.com... On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky a@a.a wrote: Nick Sabalausky a@a.a wrote in message

Re: Can getHash be made pure?

2012-03-09 Thread Walter Bright
On 3/9/2012 1:54 PM, H. S. Teoh wrote: Still chugging away at implementing AA's in druntime proper, I reviewed the code for methods that can be marked pure but ran into a major road block: getHash() is not marked pure. That makes a lot of AA methods impure, that could, and probably should, be

Breaking backwards compatiblity

2012-03-09 Thread Walter Bright
This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big problem with breaking source code compatibility.

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:jjdu0j$209o$1...@digitalmars.com... I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. I'd argue that should not be considered a problem in this case:

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:47:01 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: On Friday, March 09, 2012 16:36:27 Steven Schveighoffer wrote: On Fri, 09 Mar 2012 16:14:08 -0500, Nick Sabalausky a@a.a wrote: Nick Sabalausky a@a.a wrote in message news:jj6gjm$2m6a$1...@digitalmars.com...

Re: Breaking backwards compatiblity

2012-03-09 Thread Timon Gehr
On 03/09/2012 11:32 PM, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big

Re: Breaking backwards compatiblity

2012-03-09 Thread Walter Bright
On 3/9/2012 2:41 PM, Timon Gehr wrote: On 03/09/2012 11:32 PM, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 17:38:08 -0500, Nick Sabalausky a@a.a wrote: Nick Sabalausky a@a.a wrote in message news:jjdu0j$209o$1...@digitalmars.com... I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. I'd argue that should

Re: Breaking backwards compatiblity

2012-03-09 Thread Alex Rønne Petersen
On 09-03-2012 23:32, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary compatibility with new D releases, we do have a big problem

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Steven Schveighoffer
On Fri, 09 Mar 2012 16:50:22 -0500, Adam D. Ruppe destructiona...@gmail.com wrote: On Friday, 9 March 2012 at 21:36:28 UTC, Steven Schveighoffer wrote: I can't say I agree with this, as it pollutes the global namespace with several common terms that could be used for fields. There's no

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote: I'll say I *don't* agree with the rejection of aliases on principle -- aliases can be extremely useful/helpful, and they cost literally nothing (the cognitive cost on the docs is a BS argument IMO). I just don't agree with

Re: Breaking backwards compatiblity

2012-03-09 Thread Jonathan M Davis
On Friday, March 09, 2012 14:44:05 Walter Bright wrote: On 3/9/2012 2:41 PM, Timon Gehr wrote: On 03/09/2012 11:32 PM, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Adam D. Ruppe
On Friday, 9 March 2012 at 22:54:37 UTC, Steven Schveighoffer wrote: Again, I find this just as descriptive and not terrible to type: Yeah, that's fine by me (though duration is still better than dur :-D ) I'm just the name conflict isn't a big deal either since writing .minutes in some

Re: Multiple return values...

2012-03-09 Thread Manfred Nowak
Manu wrote: I'm just talking about the ABI for returning multiple values, not chaining Does this mean, that you want a special type of function? For example this would be disallowed statement: `auto result= f( g( parameters));', if `f' and `g' are functions returning multiple values?

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Brad Anderson
On Fri, Mar 9, 2012 at 3:56 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote: I'll say I *don't* agree with the rejection of aliases on principle -- aliases can be extremely useful/helpful, and they cost literally nothing (the

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-09 Thread Andrei Alexandrescu
On 3/9/12 5:54 AM, Ary Manzana wrote: Sample Ruby session: irb ruby-1.8.7-p352 :001 [1, 2, 3].count = 3 ruby-1.8.7-p352 :002 [1, 2, 3].length = 3 ruby-1.8.7-p352 :003 [1, 2, 3].size = 3 I never saw *anyone* complaining about this. When you write, you choose whatever is convenient to you

Re: Breaking backwards compatiblity

2012-03-09 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jje0er$24mb$1...@digitalmars.com... This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about breaking binary

Re: Breaking backwards compatiblity

2012-03-09 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 11:46:24PM +0100, Alex Rønne Petersen wrote: On 09-03-2012 23:32, Walter Bright wrote: This statement is from Linus Torvalds about breaking binary compatibility: https://lkml.org/lkml/2012/3/8/495 While I don't think we need to worry so much at the moment about

  1   2   3   >