Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jérôme M. Berger Wrote: > > > >> ?? > >> It ALWAYS makes a difference. For example, only .exe and .com files are > >> executable. > >> On unix, the filename is just a name. Nothing more. By contrast, the > >> Windows extension actually matters. They're completely different. > > > > What

Re: GtkD: Dead or Alive?

2011-03-04 Thread Trass3r
The GtkD repository contains the already generated D bindings. I was deterred from attempting the generation step myself because it involved setting up wine and htod. I can't help but wonder how much effort would be involved in an htod alternative, even if only worked for the GTK/glib/etc h

Re: Proposal for std.path replacement

2011-03-04 Thread Lars T. Kyllingstad
On Fri, 04 Mar 2011 13:53:33 +1030, Graham St Jack wrote: > On 04/03/11 12:34, Bekenn wrote: >> On 3/3/11 3:30 PM, Graham St Jack wrote: >>> My first instinct would be to use non-templated functions that take >>> const >>> char[]. >>> >>> >> Please don't ever restrict encodings like that. As much

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 04:23 AM, Graham St Jack wrote: On 04/03/11 12:34, Bekenn wrote: On 3/3/11 3:30 PM, Graham St Jack wrote: My first instinct would be to use non-templated functions that take const char[]. Please don't ever restrict encodings like that. As much as possible, libraries should seek

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Jonathan M Davis
On Thursday 03 March 2011 21:44:20 kenji hara wrote: > 2011/3/4 Jonathan M Davis : > > On Thursday, March 03, 2011 14:07:30 Steven Schveighoffer wrote: > >> On Thu, 03 Mar 2011 16:56:45 -0500, Jonathan M Davis > >> > >> > >> wrote: > >> > Conceptually, a property makes no sense unless it's a prop

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 00:08:25 Kagamin wrote: > JérÎme M. Berger Wrote: > > >> ?? > > >> It ALWAYS makes a difference. For example, only .exe and .com files > > >> are executable. > > >> On unix, the filename is just a name. Nothing more. By contrast, the > > >> Windows extension actually m

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 07:17 AM, Jonathan M Davis wrote: On Thursday 03 March 2011 19:23:33 Graham St Jack wrote: On 04/03/11 12:34, Bekenn wrote: On 3/3/11 3:30 PM, Graham St Jack wrote: My first instinct would be to use non-templated functions that take const char[]. Please don't ever restrict enco

Re: Is @property implementable?

2011-03-04 Thread Jacob Carlborg
On 2011-03-03 17:25, Jonathan M Davis wrote: On Thursday 03 March 2011 01:31:38 Jacob Carlborg wrote: On 2011-03-03 08:16, Jonathan M Davis wrote: On Wednesday 02 March 2011 23:12:43 %u wrote: Well, it wouldn't be universal then. For a function to be treated as a property, it would require a

Re: Is @property implementable?

2011-03-04 Thread Kevin Bealer
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > But that's not how the function is written. The left parameter is the > destination. If myString.strcpy(myString2) is confusing, I would expect > strcpy(myString, myString2) to be just as confusing. I don't see how using the > member

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 09:15 AM, Lars T. Kyllingstad wrote: On Fri, 04 Mar 2011 13:53:33 +1030, Graham St Jack wrote: On 04/03/11 12:34, Bekenn wrote: On 3/3/11 3:30 PM, Graham St Jack wrote: My first instinct would be to use non-templated functions that take const char[]. Please don't ever restric

Re: Proposal for std.path replacement

2011-03-04 Thread Lars T. Kyllingstad
On Thu, 03 Mar 2011 10:39:38 -0800, Jonathan M Davis wrote: > On Thursday, March 03, 2011 08:29:00 Lars T. Kyllingstad wrote: >> As mentioned in the "std.path.getName(): Screwy by design?" thread, I >> started working on a rewrite of std.path a long time ago, but I got >> sidetracked by other thin

Re: Proposal for std.path replacement

2011-03-04 Thread Lars T. Kyllingstad
On Fri, 04 Mar 2011 00:42:53 +0100, spir wrote: > On 03/03/2011 05:29 PM, Lars T. Kyllingstad wrote: >> As mentioned in the "std.path.getName(): Screwy by design?" thread, I >> started working on a rewrite of std.path a long time ago, but I got >> sidetracked by other things. The recent discussio

Re: Appender and CTFE

2011-03-04 Thread Kevin Bealer
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > I see nothing wrong with the occasional forking conditioned by __ctfe. > Even today, code may fork an optimized but nonportable implementation of > some algorithm. The main requirement is that such forks are rare enough >

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jonathan M Davis Wrote: > On Friday 04 March 2011 00:08:25 Kagamin wrote: > > Jérôme M. Berger Wrote: > > > >> ?? > > > >> It ALWAYS makes a difference. For example, only .exe and .com files > > > >> are executable. > > > >> On unix, the filename is just a name. Nothing more. By contrast, th

Re: Is @property implementable?

2011-03-04 Thread spir
On 03/04/2011 09:31 AM, Kevin Bealer wrote: == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article But that's not how the function is written. The left parameter is the destination. If myString.strcpy(myString2) is confusing, I would expect strcpy(myString, myString2) to be just as confu

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Daniel Gibson
Am 04.03.2011 09:56, schrieb Kagamin: > Jonathan M Davis Wrote: > >> On Friday 04 March 2011 00:08:25 Kagamin wrote: >>> JérÎme M. Berger Wrote: >> ?? >> It ALWAYS makes a difference. For example, only .exe and .com files >> are executable. >> On unix, the filename is just a

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 09:33 AM, Lars T. Kyllingstad wrote: 1. They should properly camelcased. fcmp, fnccharmtach, and fnmatch are > probably okay, but basename should definitely be baseName. We probably couldn't disagree more. :) I think fncharmatch is a horrible name. On the other hand, basename()

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread spir
On 03/04/2011 09:56 AM, Kagamin wrote: Jonathan M Davis Wrote: On Friday 04 March 2011 00:08:25 Kagamin wrote: Jérôme M. Berger Wrote: ?? It ALWAYS makes a difference. For example, only .exe and .com files are executable. On unix, the filename is just a name. Nothing more. By contrast, th

Re: Proposal for std.path replacement

2011-03-04 Thread Lars T. Kyllingstad
On Fri, 04 Mar 2011 09:33:04 +0100, spir wrote: > On 03/04/2011 09:15 AM, Lars T. Kyllingstad wrote: >> On Fri, 04 Mar 2011 13:53:33 +1030, Graham St Jack wrote: >> >>> On 04/03/11 12:34, Bekenn wrote: On 3/3/11 3:30 PM, Graham St Jack wrote: > My first instinct would be to use non-templa

Re: Appender and CTFE

2011-03-04 Thread dennis luehring
Am 04.03.2011 09:51, schrieb Kevin Bealer: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article I see nothing wrong with the occasional forking conditioned by __ctfe. Even today, code may fork an optimized but nonportable implementation of some algorithm. The main requi

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Daniel Gibson Wrote: > >> The only way _anything_ is executable in *nix is if its executable flag is > >> set. > >> Extensions mean _nothing_ as far as executability goes. > > > > As you can see, there's an ambiguity here: script is not executed directly > > in the same sense as machine code,

Re: Proposal for std.path replacement

2011-03-04 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikqabr$796$4...@digitalmars.com... > >> >> - Windows *does* have a concept of a home dir, so maybe tilde should be >> expanded even on Windows. Only problem though is that Windows has *two* >> main home dirs for each user: %HOMEPATH% for user-created fi

Re: Google Summer of Code

2011-03-04 Thread Jacob Carlborg
On 2011-03-03 17:17, Andrei Alexandrescu wrote: On 3/3/11 3:48 AM, Jens Mueller wrote: Dear list, Trass3r brought it up and I think it's a very good idea. D is lacking some man power. The mentoring deadline is 11th of March. There are important and interesting projects students may work on. I'

Re: Proposal for std.path replacement

2011-03-04 Thread Jacob Carlborg
On 2011-03-03 17:29, Lars T. Kyllingstad wrote: As mentioned in the "std.path.getName(): Screwy by design?" thread, I started working on a rewrite of std.path a long time ago, but I got sidetracked by other things. The recent discussion got me working on it again, and it turned out there wasn't

Re: Proposal for std.path replacement

2011-03-04 Thread J Chapman
== Quote from Jacob Carlborg (d...@me.com)'s article > On 2011-03-03 17:29, Lars T. Kyllingstad wrote: > > As mentioned in the "std.path.getName(): Screwy by design?" thread, I > > started working on a rewrite of std.path a long time ago, but I got > > sidetracked by other things. The recent discu

Re: Proposal for std.path replacement

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 00:25:31 spir wrote: > On 03/04/2011 07:17 AM, Jonathan M Davis wrote: > > On Thursday 03 March 2011 19:23:33 Graham St Jack wrote: > >> On 04/03/11 12:34, Bekenn wrote: > >>> On 3/3/11 3:30 PM, Graham St Jack wrote: > My first instinct would be to use non-templated fun

Re: Proposal for std.path replacement

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 00:33:58 Lars T. Kyllingstad wrote: > On Thu, 03 Mar 2011 10:39:38 -0800, Jonathan M Davis wrote: > > 1. They should properly camelcased. fcmp, fnccharmtach, and fnmatch are > > probably okay, but basename should definitely be baseName. > > We probably couldn't disagree mor

Re: Is @property implementable?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 00:31:37 Kevin Bealer wrote: > == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article > > > But that's not how the function is written. The left parameter is the > > destination. If myString.strcpy(myString2) is confusing, I would expect > > strcpy(myString, myStrin

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 02:02:45 Kagamin wrote: > Daniel Gibson Wrote: > > >> The only way _anything_ is executable in *nix is if its executable > > >> flag is set. Extensions mean _nothing_ as far as executability goes. > > > > > > As you can see, there's an ambiguity here: script is not executed

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 16:23:43 +, dsimcha wrote: > Ok, so that's one issue to cross off the list. To summarize the > discussion so far, most of it's revolved around the issue of > automatically determining how many CPUs are available and therefore how > many threads the default pool should have

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jonathan M Davis Wrote: > > I suppose, the flag on a script is checked "manually" by the shell, and on > > a binary - by the OS. > > The "OS" means next to nothing in unix land. What's the OS? The kernel? The > set > of common utilities? Oh, looking at execve(2), I see, shebang is processed by

Re: Proposal for std.path replacement

2011-03-04 Thread Jacob Carlborg
On 2011-03-04 11:31, J Chapman wrote: == Quote from Jacob Carlborg (d...@me.com)'s article On 2011-03-03 17:29, Lars T. Kyllingstad wrote: As mentioned in the "std.path.getName(): Screwy by design?" thread, I started working on a rewrite of std.path a long time ago, but I got sidetracked by oth

Re: Proposal for std.path replacement

2011-03-04 Thread Regan Heath
On Fri, 04 Mar 2011 10:13:04 -, Nick Sabalausky wrote: "Lars T. Kyllingstad" wrote in message news:ikqabr$796$4...@digitalmars.com... - Windows *does* have a concept of a home dir, so maybe tilde should be expanded even on Windows. Only problem though is that Windows has *two* main home

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Jim
Jonathan M Davis Wrote: > On Thursday 03 March 2011 21:44:20 kenji hara wrote: > > 2011/3/4 Jonathan M Davis : > > > On Thursday, March 03, 2011 14:07:30 Steven Schveighoffer wrote: > > >> On Thu, 03 Mar 2011 16:56:45 -0500, Jonathan M Davis > > >> > > >> > > >> wrote: > > >> > Conceptually, a p

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread David Nadlinger
On 3/4/11 1:44 PM, Jim wrote: […] So, what do you think about this translation? Although it is the same type of transformation, but I wouldn't call this @property because it isn't a property _of_ something. This isn't what @property is about, but describes uniform function call syntax. The @

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread David Nadlinger
On 3/3/11 10:27 PM, Jonathan M Davis wrote: I'd strongly argue that global/module properties make no sense. What are they a property of? The module? You could as well say: I'd strongly argue that global/module variables make no sense. What are they a variable of? The module? In my opinion, a

Re: Proposal for std.path replacement

2011-03-04 Thread Nick Sabalausky
"Regan Heath" wrote in message news:op.vrtj9iz454x...@puck.auriga.bhead.co.uk... > On Fri, 04 Mar 2011 10:13:04 -, Nick Sabalausky wrote: >> "Lars T. Kyllingstad" wrote in message >> news:ikqabr$796$4...@digitalmars.com... >>> - Windows *does* have a concept of a home dir, so mayb

Re: Proposal for std.path replacement

2011-03-04 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikofkc$322$1...@digitalmars.com... > As mentioned in the "std.path.getName(): Screwy by design?" thread, I > started working on a rewrite of std.path a long time ago, but I got > sidetracked by other things. The recent discussion got me working on it >

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Steven Schveighoffer
On Thu, 03 Mar 2011 18:03:48 -0500, Jonathan M Davis wrote: On Thursday, March 03, 2011 14:07:30 Steven Schveighoffer wrote: On Thu, 03 Mar 2011 16:56:45 -0500, Jonathan M Davis wrote: > Conceptually, a property makes no sense unless it's a property _of_ > something. This is your opinio

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 12:01 PM, Jonathan M Davis wrote: I have a preference for the longer names, but not a very strong one. I'm > not going to oppose the changes if others agree with you. I definitely like descriptive names, and my function names are often long, but I do tend to find that long names

Re: Proposal for std.path replacement

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 2:35 AM, Lars T. Kyllingstad wrote: One more vote for dirName() has been noted. :) Meh. Since we have basename which is a replica of the homonym Unix command, I think dirname (with that exact spelling) would be most appropriate there. Andrei

Re: Is @property implementable?

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 2:55 AM, spir wrote: Unfortunately, this is not possible for structs (the 'alias this' hack is not subtyping (*), it's plain delegation instead). Subtyping means many things to many people. 'alias this' is "coercive subtyping" by a commonly-accepted definition. The absence of stru

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 5:32 AM, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 16:23:43 +, dsimcha wrote: Ok, so that's one issue to cross off the list. To summarize the discussion so far, most of it's revolved around the issue of automatically determining how many CPUs are available and therefore how

Re: Proposal for std.path replacement

2011-03-04 Thread David Nadlinger
On 3/4/11 4:10 PM, Andrei Alexandrescu wrote: On 3/4/11 2:35 AM, Lars T. Kyllingstad wrote: One more vote for dirName() has been noted. :) Meh. Since we have basename which is a replica of the homonym Unix command, I think dirname (with that exact spelling) would be most appropriate there. I

Re: Proposal for std.path replacement

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 07:42:38 David Nadlinger wrote: > On 3/4/11 4:10 PM, Andrei Alexandrescu wrote: > > On 3/4/11 2:35 AM, Lars T. Kyllingstad wrote: > >> One more vote for dirName() has been noted. :) > > > > Meh. Since we have basename which is a replica of the homonym Unix > > command, I th

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 04:59:14 David Nadlinger wrote: > On 3/3/11 10:27 PM, Jonathan M Davis wrote: > > I'd strongly argue that global/module properties make no sense. What are > > they a property of? The module? > > You could as well say: I'd strongly argue that global/module variables > make n

Re: Proposal for std.path replacement

2011-03-04 Thread spir
On 03/04/2011 04:42 PM, David Nadlinger wrote: On 3/4/11 4:10 PM, Andrei Alexandrescu wrote: On 3/4/11 2:35 AM, Lars T. Kyllingstad wrote: One more vote for dirName() has been noted. :) Meh. Since we have basename which is a replica of the homonym Unix command, I think dirname (with that exac

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Michel Fortin
On 2011-03-04 08:30:44 -0500, "Steven Schveighoffer" said: Note that there is only one (currently) ambiguous case, the case of a getter on an array or a setter on the module. A setter on an array cannot be confused with something else, as well as a getter for the module. What we need is

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Russel Winder
On Fri, 2011-03-04 at 09:27 -0600, Andrei Alexandrescu wrote: [ . . . ] > > - We give it one more week for the final review, starting today, 4 March. > > - If this review does not lead to major API changes, we start the vote > > next Friday, 11 March. Vote closes after one week, 18 March. > > > >

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 11:52 AM, Russel Winder wrote: On Fri, 2011-03-04 at 09:27 -0600, Andrei Alexandrescu wrote: [ . . . ] - We give it one more week for the final review, starting today, 4 March. - If this review does not lead to major API changes, we start the vote next Friday, 11 March. Vote closes af

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Jim
Jonathan M Davis Wrote: > On Friday 04 March 2011 04:59:14 David Nadlinger wrote: > > On 3/3/11 10:27 PM, Jonathan M Davis wrote: > > > I'd strongly argue that global/module properties make no sense. What are > > > they a property of? The module? > > > > You could as well say: I'd strongly argue

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Jonathan M Davis
On Friday, March 04, 2011 09:52:17 Russel Winder wrote: > On Fri, 2011-03-04 at 09:27 -0600, Andrei Alexandrescu wrote: > [ . . . ] > > > > - We give it one more week for the final review, starting today, 4 > > > March. - If this review does not lead to major API changes, we start > > > the vote n

Re: std.parallelism: Request for Review

2011-03-04 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 3/4/11 5:32 AM, Lars T. Kyllingstad wrote: > > On Tue, 01 Mar 2011 16:23:43 +, dsimcha wrote: > > > >> Ok, so that's one issue to cross off the list. To summarize the > >> discussion so far, most of it's revolved

Re: std.parallelism: Request for Review

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 12:34 PM, dsimcha wrote: This sounds reasonable. Should I be doing anything besides following the thread and reacting accordingly? Basically yes. Here's a good set of notes: http://www.boost.org/community/reviews.html#Review_Manager Don't forget that the ultimate accept/reject deci

Re: std.parallelism: Request for Review

2011-03-04 Thread Andrei Alexandrescu
On 3/4/11 12:34 PM, dsimcha wrote: This sounds reasonable. Should I be doing anything besides following the thread and reacting accordingly? Basically yes. Here's a good set of notes: http://www.boost.org/community/reviews.html#Review_Manager Don't forget that the ultimate accept/reject deci

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Russel Winder
On Fri, 2011-03-04 at 10:10 -0800, Jonathan M Davis wrote: [ . . . ] > We've never really discussed that. Thus far, anyone who posted on the > newsgroup > could vote. Now, if there were a bunch of votes from unknown folks and that > definitely shifted the vote, then I would fully expect those vo

The road map of formatted read and write in Phobos

2011-03-04 Thread Ali Çehreli
There has been changes in formatted input and output in the recent Phobos releases. There are also differences in behavior among std.stdio, std.format, and std.cstream (which will be deprecated). I can't find documentation for formatted read. Could someone please summarize the status quo and r

Needing to match white space during formatted read

2011-03-04 Thread Ali Çehreli
I am asking this question from the point of view of someone who is in the process of replacing std.cstream with std.stdio in his book that targets novices. There are many sample programs in the book where the user interacts with the program through the console. I would like to know whether the

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Jonathan M Davis
On Friday, March 04, 2011 11:12:00 Russel Winder wrote: > On Fri, 2011-03-04 at 10:10 -0800, Jonathan M Davis wrote: > [ . . . ] > > > We've never really discussed that. Thus far, anyone who posted on the > > newsgroup could vote. Now, if there were a bunch of votes from unknown > > folks and that

Re: GtkD: Dead or Alive?

2011-03-04 Thread Mike Wey
On 03/04/2011 12:35 AM, David Bryant wrote: Could you provide this patched version of yours publicly ? I would be interested in it. Here is the patch I apply. Note, that it is being applied to generated code, rather than fixing the problem at the root. However I'm yet to delve into running the

Re: GtkD: Dead or Alive?

2011-03-04 Thread Mike Wey
On 03/04/2011 12:55 AM, David Bryant wrote: Hi Mike, It's good to hear from an official GtkD maintainer that the project isn't dead! I understand that GTK 3.0 is supposed to be more amenable to language bindings than previous GTK versions but don't have any details of how it achieves this. This

Re: How fast is D compared to C++?

2011-03-04 Thread Thomas Mader
Am 2011-03-03 00:18, schrieb %u: What pisses me off is the Issac Guy doesn't want to support D in the great language benchmark. It's very important utlity for developers. Most coders with C and C++ mentality look the charts and only use the top-2 languages, that is C and C++. If D was there, w

Re: std.parallelism: Request for Review [Summary of discussion]

2011-03-04 Thread Russel Winder
On Fri, 2011-03-04 at 11:27 -0800, Jonathan M Davis wrote: [ . . . ] > > Presumably this is a four-state vote: > > > > +1 approve > > 0 cannot decide > > -1 disapprove > > -- no opinion > > > > Anyone not emailing is deemed to have cast a -- vote all of which are > > automatically

Re: std.parallelism: Request for Review

2011-03-04 Thread Lars T. Kyllingstad
On Fri, 04 Mar 2011 18:34:39 +, dsimcha wrote: > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s > article >> On 3/4/11 5:32 AM, Lars T. Kyllingstad wrote: >> > On Tue, 01 Mar 2011 16:23:43 +, dsimcha wrote: >> > >> >> Ok, so that's one issue to cross off the list. To

Re: std.parallelism: Request for Review

2011-03-04 Thread dsimcha
== Quote from Lars T. Kyllingstad (public@kyllingen.NOSPAMnet)'s article > On Fri, 04 Mar 2011 18:34:39 +, dsimcha wrote: > > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s > > article > >> On 3/4/11 5:32 AM, Lars T. Kyllingstad wrote: > >> > On Tue, 01 Mar 2011 16:23:43 +0

Feature request: ssize_t, a signed size_t

2011-03-04 Thread Julio César Carrascal Urquijo
I was writing something like the following code: // double y1, y2, width; size_t index = to!size_t((x2 - x1) / width); if (index >= 0 && index < grid.length) { ... } else { ... } When I finished writing the condition I remembered that size_t is actually an uint so it can't be negative.

std.parallelism: Final review

2011-03-04 Thread Lars T. Kyllingstad
David Simcha has made a proposal for an std.parallelism module to be included in Phobos. We now begin the formal review process. The code repository and documentation can be found here: https://github.com/dsimcha/std.parallelism/wiki http://cis.jhu.edu/~dsimcha/d/phobos/std_parallelism.html

Re: std.parallelism: Request for Review

2011-03-04 Thread Lars T. Kyllingstad
On Fri, 04 Mar 2011 20:53:56 +, dsimcha wrote: > == Quote from Lars T. Kyllingstad (public@kyllingen.NOSPAMnet)'s article >> On Fri, 04 Mar 2011 18:34:39 +, dsimcha wrote: >> > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s >> > article >> >> On 3/4/11 5:32 AM, Lars T.

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread spir
On 03/04/2011 06:26 PM, Michel Fortin wrote: Another idea someone proposed (I can't find the exact post to give proper credit) would be to allow having a parameter named 'this'. This would allow the creation of non-member functions using the member syntax as with the Uniform Function Call Syntax

Re: std.parallelism: Request for Review

2011-03-04 Thread Jonathan M Davis
On Friday, March 04, 2011 12:53:56 dsimcha wrote: > == Quote from Lars T. Kyllingstad (public@kyllingen.NOSPAMnet)'s article > > > On Fri, 04 Mar 2011 18:34:39 +, dsimcha wrote: > > > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s > > > article > > > > > >> On 3/4/11 5:32

Re: Feature request: ssize_t, a signed size_t

2011-03-04 Thread spir
On 03/04/2011 09:54 PM, Julio César Carrascal Urquijo wrote: I was writing something like the following code: // double y1, y2, width; size_t index = to!size_t((x2 - x1) / width); if (index >= 0 && index < grid.length) { ... } else { ... } When I finished writing the condition I remembered that

Re: Proposal for std.path replacement

2011-03-04 Thread Nick Sabalausky
"spir" wrote in message news:mailman.2175.1299248868.4748.digitalmar...@puremagic.com... > On 03/04/2011 12:01 PM, Jonathan M Davis wrote: >>> I have a preference for the longer names, but not a very strong one. >>> I'm >>> > not going to oppose the changes if others agree with you. >> I defini

Re: std.parallelism: Request for Review

2011-03-04 Thread Steven Schveighoffer
On Fri, 04 Mar 2011 15:53:56 -0500, dsimcha wrote: But then official "judgement day" will be April Fool's Day. I don't want anyone thinking std.parallelism is an April Fool's joke. IIRC, I believe that day is reserved for the big release of preprocessor macros for D. We'll have to find

Re: Feature request: ssize_t, a signed size_t

2011-03-04 Thread Walter Bright
Julio César Carrascal Urquijo wrote: Could we have a signed size_t in Phobos? ssize_t or with another name. ptrdiff_t

QuickCheck-like in Phobos?

2011-03-04 Thread bearophile
Is it useful to add QuickCheck-like functionality to the Phobos module that helps testing (or is it better to keep it as an module external to Phobos)? It's a nice thing, and it's probably small: http://en.wikipedia.org/wiki/QuickCheck At the bottom of that Wikipedia page there are links to the

context-free grammar

2011-03-04 Thread Simon Buerger
It is often said that D's grammar is easier to parse than C++, i.e. it should be possible to seperate syntactic and semantic analysis, which is not possible in C++ with the template-"< >" and so on. But I found following example: The Line "a * b = c;" can be interpreted in two ways: -> Declara

Re: context-free grammar

2011-03-04 Thread Simen kjaeraas
Simon Buerger wrote: It is often said that D's grammar is easier to parse than C++, i.e. it should be possible to seperate syntactic and semantic analysis, which is not possible in C++ with the template-"< >" and so on. But I found following example: The Line "a * b = c;" can be interpre

Re: context-free grammar

2011-03-04 Thread bearophile
Simen kjaeraas: > Well, obviously not. The grammar has one and only one meaning for that > example - that of an a* called b, being set to c. This can be inferred > with no other context. This little program: struct Foo { int x; Foo opBinary(string op:"*")(Foo other) { Foo result

Re: context-free grammar

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 17:05:57 Simon Buerger wrote: > It is often said that D's grammar is easier to parse than C++, i.e. it > should be possible to seperate syntactic and semantic analysis, which > is not possible in C++ with the template-"< >" and so on. But I found > following example: > > Th

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Michel Fortin
On 2011-03-04 13:04:59 -0500, Jim said: Jonathan M Davis Wrote: On Friday 04 March 2011 04:59:14 David Nadlinger wrote: On 3/3/11 10:27 PM, Jonathan M Davis wrote: I'd strongly argue that global/module properties make no sense. What are they a property of? The module? You could as well sa

Re: context-free grammar

2011-03-04 Thread uri
Jonathan M Davis Wrote: > On Friday 04 March 2011 17:05:57 Simon Buerger wrote: > > It is often said that D's grammar is easier to parse than C++, i.e. it > > should be possible to seperate syntactic and semantic analysis, which > > is not possible in C++ with the template-"< >" and so on. But I f

Re: How fast is D compared to C++?

2011-03-04 Thread Isaac Gouy
== Quote from Thomas Mader (thomas.ma...@gmail.com)'s article > You speak about http://shootout.alioth.debian.org/ right? They had D > listed but I don't know why they removed it. That's been answered many times - http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_sof

Interesting observation [ot]

2011-03-04 Thread uri
This should likely go to d.learn or someplace else. As a simple exercise I tried to build a tool that fetches a list of random news articles written by a single person and determine his or hers time zone based on the frequencies. I first thought the period of sleep would determine the daily rhyt

Re: How fast is D compared to C++?

2011-03-04 Thread uri
Isaac Gouy Wrote: > == Quote from Thomas Mader (thomas.ma...@gmail.com)'s article > > > You speak about http://shootout.alioth.debian.org/ right? They had D > > listed but I don't know why they removed it. > > That's been answered many times - > > http://www.reddit.com/r/programming/comments/ck

Re: context-free grammar

2011-03-04 Thread SiegeLord
bearophile Wrote: > Simen kjaeraas: > > > Well, obviously not. The grammar has one and only one meaning for that > > example - that of an a* called b, being set to c. This can be inferred > > with no other context. > > This little program: > > struct Foo { > int x; > Foo opBinary(string

Re: context-free grammar

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 19:10:35 uri wrote: > Jonathan M Davis Wrote: > > On Friday 04 March 2011 17:05:57 Simon Buerger wrote: > > > It is often said that D's grammar is easier to parse than C++, i.e. it > > > should be possible to seperate syntactic and semantic analysis, which > > > is not possi

Re: context-free grammar

2011-03-04 Thread Walter Bright
SiegeLord wrote: Gives an error. I don't see any problem here: a * b; // always a pointer declaration (a * b); // always a binary expression There isn't one. C++ decides if a*b=c; is a declaration or expression based on whether 'a' is a type or a variable. That requires semantic analysis. D'

Re: Interesting observation [ot]

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 19:48:10 uri wrote: > This should likely go to d.learn or someplace else. As a simple exercise I > tried to build a tool that fetches a list of random news articles written > by a single person and determine his or hers time zone based on the > frequencies. > > I first thou

Re: Uniform Function Call Syntax(UFCS) and @property

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 18:50:59 Michel Fortin wrote: > On 2011-03-04 13:04:59 -0500, Jim said: > > Jonathan M Davis Wrote: > >> On Friday 04 March 2011 04:59:14 David Nadlinger wrote: > >>> On 3/3/11 10:27 PM, Jonathan M Davis wrote: > I'd strongly argue that global/module properties make no

Re: context-free grammar

2011-03-04 Thread Walter Bright
uri wrote: Explain why (a*b) is lvalue in bearophile's second example. Because the expression evaluates to a temporary, which is an lvalue. This is one of the weird things in D. The language is too complex. It takes years to find out about the corner cases. It's not a weird corner case at

Re: How fast is D compared to C++?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 19:51:04 uri wrote: > Isaac Gouy Wrote: > > == Quote from Thomas Mader (thomas.ma...@gmail.com)'s article > > > > > You speak about http://shootout.alioth.debian.org/ right? They had D > > > listed but I don't know why they removed it. > > > > That's been answered many tim

Re: context-free grammar

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 20:31:38 Walter Bright wrote: > uri wrote: > > Explain why (a*b) is lvalue in bearophile's second example. > > Because the expression evaluates to a temporary, which is an lvalue. > > > This is one of the weird things in D. The language is too complex. It > > takes years t

Re: How fast is D compared to C++?

2011-03-04 Thread Daniel Gibson
Am 05.03.2011 05:35, schrieb Jonathan M Davis: On Friday 04 March 2011 19:51:04 uri wrote: Isaac Gouy Wrote: == Quote from Thomas Mader (thomas.ma...@gmail.com)'s article You speak about http://shootout.alioth.debian.org/ right? They had D listed but I don't know why they removed it. That's

Re: Interesting observation [ot]

2011-03-04 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.2200.1299299436.4748.digitalmar...@puremagic.com... > On Friday 04 March 2011 19:48:10 uri wrote: >> This should likely go to d.learn or someplace else. As a simple exercise >> I >> tried to build a tool that fetches a list of random news articles

Re: context-free grammar

2011-03-04 Thread Nick Sabalausky
"uri" wrote in message news:iks9jb$127g$1...@digitalmars.com... > Jonathan M Davis Wrote: > >> On Friday 04 March 2011 17:05:57 Simon Buerger wrote: >> > It is often said that D's grammar is easier to parse than C++, i.e. it >> > should be possible to seperate syntactic and semantic analysis, whi

Re: Interesting observation [ot]

2011-03-04 Thread Kagamin
Jonathan M Davis Wrote: > On Friday 04 March 2011 19:48:10 uri wrote: > > This should likely go to d.learn or someplace else. As a simple exercise I > > tried to build a tool that fetches a list of random news articles written > > by a single person and determine his or hers time zone based on the

Re: Interesting observation [ot]

2011-03-04 Thread Daniel Gibson
Am 05.03.2011 04:48, schrieb uri: This should likely go to d.learn or someplace else. As a simple exercise I tried to build a tool that fetches a list of random news articles written by a single person and determine his or hers time zone based on the frequencies. I first thought the period of

Re: How fast is D compared to C++?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 20:50:18 Daniel Gibson wrote: > Am 05.03.2011 05:35, schrieb Jonathan M Davis: > > On Friday 04 March 2011 19:51:04 uri wrote: > >> Isaac Gouy Wrote: > >>> == Quote from Thomas Mader (thomas.ma...@gmail.com)'s article > >>> > You speak about http://shootout.alioth.debi

Re: context-free grammar

2011-03-04 Thread Rainer Schuetze
The ambiguities are simply resolved by this rule in the language specification: "Any ambiguities in the grammar between Statements and Declarations are resolved by the declarations taking precedence." ( http://www.digitalmars.com/d/2.0/statement.html ). Simon Buerger wrote: It is often said th