Re: Auto constructor [Was: Archetype language]

2011-03-20 Thread Daniel Gibson
Am 21.03.2011 00:55, schrieb bearophile: Among the things I've listed about Archetype there's one interesting thing. Class instances aren't PODs, but sometimes I prefer reference semantics and to populate fields in a plain way, expecially for simple classes. Time ago I and other people have su

Re: Archetype language

2011-03-20 Thread Daniel Gibson
Am 20.03.2011 18:36, schrieb bearophile: It has List Comprehensions (I have kept the Archetype syntax here): var FirstHundred = [ 1..100 ]; var FirstHundred = from x in [ 1..100 ] where x*x> 3 select x*2; Isn't this plain LINQ like in C#? Maybe the [1..100] is new, but the rest isn't, I

Re: review of std.parallelism

2011-03-20 Thread dsimcha
On 3/20/2011 10:44 PM, Michel Fortin wrote: I don't see a problem with the above. The array elements you modify are passed through parallel's opApply which can check easily whether it's safe or not to pass them by ref to different threads (by checking the element's size) and allow or disallow th

Re: review of std.parallelism

2011-03-20 Thread Michel Fortin
On 2011-03-20 11:42:04 -0400, dsimcha said: On 3/19/2011 2:14 PM, Michel Fortin wrote: On 2011-03-19 13:20:00 -0400, dsimcha said: On 3/19/2011 1:09 PM, Michel Fortin wrote: For instance: void main() { int sum = 0; foreach (int value; taskPool.parallel([0,2,3,6,1,4,6,3,3,3,6])) { sum += v

Re: Trivial DMD fixes: GitHub pull requests vs. Bugzilla issues

2011-03-20 Thread David Nadlinger
On 3/20/11 12:20 AM, Jonathan M Davis wrote: Bugzilla is for tracking bugs. github is for tracking the source. So, in general, I would expect bugs to be reported to bugzilla. I would guess though, that enhancement requests aren't quite as critical if you already have a patch for them (though you

Re: Anything in the review queue?

2011-03-20 Thread dsimcha
On 3/20/2011 10:26 PM, bearophile wrote: dsimcha: On second thought, given the difficulty finding anything else, rational may be the thing that's most ready. I'll offer it up for review now It's good to have rationals in Phobos, thank you. Is this GCD? There is already a gcd in Phobos. Is t

Re: Auto constructor [Was: Archetype language]

2011-03-20 Thread bearophile
Adam D. Ruppe: > Have you tried doing this with a string mixin? It looks like > it'd be trivial. It's probably trivial with a string mixin, but no thanks. I don't like them a lot. Bye, bearophile

Re: Anything in the review queue?

2011-03-20 Thread bearophile
dsimcha: > On second thought, given the difficulty finding anything else, rational > may be the thing that's most ready. I'll offer it up for review now It's good to have rationals in Phobos, thank you. Is this GCD? There is already a gcd in Phobos. Is this efficient when numbers gets very l

Re: Anything in the review queue?

2011-03-20 Thread dsimcha
On 3/20/2011 11:10 AM, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere libcurl bindings) * std.path (improveme

Re: Archetype language

2011-03-20 Thread KennyTM~
On Mar 21, 11 07:41, bearophile wrote: KennyTM~: And this change makes integers look like they are iterable, That's not so good, I agree :-) This makes 'if' looks like a template :p. I agree, that may cause troubles in D. Not good. Yeah this was tried once and becomes a mess in detail

Re: Anything in the review queue?

2011-03-20 Thread Jonathan M Davis
> On 20/03/11 16.10, Andrei Alexandrescu wrote: > > Since David kindly agreed to work some more on std.parallelism, there is > > now time for carrying one review cycle on another library. I recall > > there's work on: > > > > * std.goodxml (status?) > > > > * std.net (beyond mere libcurl bindings

Re: Anything in the review queue?

2011-03-20 Thread Jonas Drewsen
On 20/03/11 16.10, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere libcurl bindings) * std.path (improvements

Re: Auto constructor [Was: Archetype language]

2011-03-20 Thread Adam D. Ruppe
Have you tried doing this with a string mixin? It looks like it'd be trivial.

Auto constructor [Was: Archetype language]

2011-03-20 Thread bearophile
Among the things I've listed about Archetype there's one interesting thing. Class instances aren't PODs, but sometimes I prefer reference semantics and to populate fields in a plain way, expecially for simple classes. Time ago I and other people have suggested a syntax like (this also to avoid a

Re: Archetype language

2011-03-20 Thread bearophile
KennyTM~: > And this change makes integers look like they are iterable, That's not so good, I agree :-) > This makes 'if' looks like a template :p. I agree, that may cause troubles in D. Not good. > Yeah this was tried once and becomes a mess in detail :) I remember part of the discussion,

Re: Archetype language

2011-03-20 Thread spir
On 03/20/2011 10:11 PM, bearophile wrote: Do you use tuple return values often, e.g. in Python? Not in every line of code, but they are quite useful. Tuples are useful for other purposes too, like: for a,b in zip((1, 2, 3), "abc"): Here a,b is a 2-tuple that Python automatically unpack from th

Re: Archetype language

2011-03-20 Thread spir
On 03/20/2011 11:56 PM, KennyTM~ wrote: On Mar 21, 11 05:21, spir wrote: On 03/20/2011 09:44 PM, bearophile wrote: They should also let down ';' noise, like Go. My experience so far has shown me that there are two options: 1) You design the whole language syntax on the fact that most times you

Re: How to proceed now that D is accepted to GSoC?

2011-03-20 Thread dsimcha
On 3/20/2011 7:07 PM, David Nadlinger wrote: P.S.: I'm sure you would be able to come up with something great even in a shorter amount of time though, using this opportunity to say thank you for plot2kill (for which I just hacked together a Qt backend, I'll let you know once I brought it into sha

Re: Archetype language

2011-03-20 Thread KennyTM~
On Mar 21, 11 05:21, spir wrote: On 03/20/2011 09:44 PM, bearophile wrote: They should also let down ';' noise, like Go. My experience so far has shown me that there are two options: 1) You design the whole language syntax on the fact that most times you don't use semicolons (see Python and Has

Re: Archetype language

2011-03-20 Thread KennyTM~
On Mar 21, 11 01:36, bearophile wrote: Through I've found a link to a language I didn't know, named Archetype. This blog post contains some pointers and references about the language: http://dvanderboom.wordpress.com/2010/04/26/new-language-code-named-archetype/ Some comments and quotations and

Re: Proposal for std.path replacement

2011-03-20 Thread Jonathan M Davis
> "Andrej Mitrovic" wrote in message > news:mailman.2639.1300648308.4748.digitalmar...@puremagic.com... > > > I've just reported two issues with std.path.join: > > http://d.puremagic.com/issues/show_bug.cgi?id=5758 > > Ugh, phobos has a real problem with ctfe. There's a lot that doesn't work > a

Re: How to proceed now that D is accepted to GSoC?

2011-03-20 Thread dsimcha
On 3/20/2011 6:33 AM, Jens Mueller wrote: Hi, according to http://www.google-melange.com/gsoc/program/accepted_orgs/google/gsoc2011 Digital Mars got accepted to GSoC 2011. On the above mentioned page Digital Mars is ranked in the second table because the organization profile has not been comple

Re: Anything in the review queue?

2011-03-20 Thread Jonathan M Davis
> Since David kindly agreed to work some more on std.parallelism, there is > now time for carrying one review cycle on another library. I recall > there's work on: > > * std.goodxml (status?) > > * std.net (beyond mere libcurl bindings) > > * std.path (improvements to path) > > * A bunch of alm

Re: Archetype language

2011-03-20 Thread bearophile
spir: > Just replace 'in' by another keyword in the expression of > list comprehensions, and, I guess, you won't find it broken: > # filter only: > negs = [x across coll if x<1] It increases language complexity for a minimal saving. Not good. Bye, bearophile

Re: Archetype language

2011-03-20 Thread spir
On 03/20/2011 09:44 PM, bearophile wrote: They should also let down ';' noise, like Go. My experience so far has shown me that there are two options: 1) You design the whole language syntax on the fact that most times you don't use semicolons (see Python and Haskell. Or even Delight); 2) You ke

Re: Archetype language

2011-03-20 Thread spir
On 03/20/2011 09:44 PM, bearophile wrote: > # Logically, the following should produce a copy: > [x in coll]# dont work Your logic is broken. I don't think so ;-) This is something I discussed on Python's design mailing list ("ideas"). The only reason

Re: Archetype language

2011-03-20 Thread bearophile
Andrej Mitrovic: > Not so cute (to me). I'd prefer that syntax only in one-liner function > definitions. Of course. The example was just to show that with foreach you are allowed to spare the brackets. So in theory the same thing is doable with single-expression functions. And indeed Scala lang

Re: review of std.parallelism

2011-03-20 Thread Robert Jacques
On Sat, 19 Mar 2011 13:09:23 -0400, Michel Fortin wrote: On 2011-03-19 12:03:51 -0400, Andrei Alexandrescu said: * "Most of this module completely subverts..." Vague characterizations ("most", "completely", "some") don't belong in a technical documentation. (For example there's either

Re: Archetype language

2011-03-20 Thread bearophile
spir: > They should also let down ';' noise, like Go. My experience so far has shown me that there are two options: 1) You design the whole language syntax on the fact that most times you don't use semicolons (see Python and Haskell. Or even Delight); 2) You keep the semicolons obligatory (see D

Re: Proposal for std.path replacement

2011-03-20 Thread Andrej Mitrovic
On 3/20/11, Andrej Mitrovic wrote: > On 3/20/11, Lars T. Kyllingstad wrote: >> On Sun, 20 Mar 2011 20:11:36 +0100, Andrej Mitrovic wrote: >> >>> I've just reported two issues with std.path.join: >>> http://d.puremagic.com/issues/show_bug.cgi?id=5758 >>> http://d.puremagic.com/issues/show_bug.cgi?

Re: Proposal for std.path replacement

2011-03-20 Thread Andrej Mitrovic
On 3/20/11, Lars T. Kyllingstad wrote: > On Sun, 20 Mar 2011 20:11:36 +0100, Andrej Mitrovic wrote: > >> I've just reported two issues with std.path.join: >> http://d.puremagic.com/issues/show_bug.cgi?id=5758 >> http://d.puremagic.com/issues/show_bug.cgi?id=5759 >> >> Does pathJoiner suffer from t

Re: How to proceed now that D is accepted to GSoC?

2011-03-20 Thread Walter Bright
On 3/20/2011 3:33 AM, Jens Mueller wrote: On the above mentioned page Digital Mars is ranked in the second table because the organization profile has not been completed yet. Fixed.

Re: Proposal for std.path replacement

2011-03-20 Thread Lars T. Kyllingstad
On Sun, 20 Mar 2011 20:11:36 +0100, Andrej Mitrovic wrote: > I've just reported two issues with std.path.join: > http://d.puremagic.com/issues/show_bug.cgi?id=5758 > http://d.puremagic.com/issues/show_bug.cgi?id=5759 > > Does pathJoiner suffer from the same problems? Are you referring to joinPat

Re: Proposal for std.path replacement

2011-03-20 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.2639.1300648308.4748.digitalmar...@puremagic.com... > I've just reported two issues with std.path.join: > http://d.puremagic.com/issues/show_bug.cgi?id=5758 Ugh, phobos has a real problem with ctfe. There's a lot that doesn't work as ctfe, but sho

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread David Nadlinger
On 3/20/11 12:50 AM, Andrei Alexandrescu wrote: On 03/19/2011 06:12 PM, Jonathan M Davis wrote: Really, the problem is that someone needs to take the initiative on this. They need to work on setting it up and supporting the ecosystem which would result in a group of such projects. Good ideas ten

Re: Anything in the review queue?

2011-03-20 Thread Robert Jacques
On Sun, 20 Mar 2011 11:10:20 -0400, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere libcurl bindings)

Re: Archetype language

2011-03-20 Thread spir
On 03/20/2011 06:36 PM, bearophile wrote: Through I've found a link to a language I didn't know, named Archetype. This blog post contains some pointers and references about the language: http://dvanderboom.wordpress.com/2010/04/26/new-language-code-named-archetype/ Very interesting! Some com

Re: Proposal for std.path replacement

2011-03-20 Thread Andrej Mitrovic
I've just reported two issues with std.path.join: http://d.puremagic.com/issues/show_bug.cgi?id=5758 http://d.puremagic.com/issues/show_bug.cgi?id=5759 Does pathJoiner suffer from the same problems?

Re: Archetype language

2011-03-20 Thread Andrej Mitrovic
On 3/20/11, bearophile wrote: > The idea of optional curly braces for functions with 1 expression inside > (just a return): > int foo(int x) return x * x; > Instead of: > int foo(int x) { return x * x; } > Cute. Nice reason to keep the semicolon. > It is similar to a syntax like: > foreach (x; 0

Re: Anything in the review queue?

2011-03-20 Thread Simen kjaeraas
On Sun, 20 Mar 2011 17:50:59 +0100, Lars T. Kyllingstad wrote: On Sun, 20 Mar 2011 10:10:20 -0500, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.

Re: suggestion of type: ustring

2011-03-20 Thread spir
On 03/20/2011 05:12 PM, Jesse Phillips wrote: ZY Zhou Wrote: It would be prohibitively expensive to be constantly validating strings. No, it would be much much cheaper, since there are only 2 cases the validating is needed 1) when you convert char[] to ustring, in this case, the validating

Re: Anything in the review queue?

2011-03-20 Thread Andrei Alexandrescu
On 03/20/2011 10:49 AM, dsimcha wrote: On 3/20/2011 11:10 AM, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere

Re: Anything in the review queue?

2011-03-20 Thread Andrei Alexandrescu
On 03/20/2011 11:50 AM, Lars T. Kyllingstad wrote: On Sun, 20 Mar 2011 10:10:20 -0500, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?

Archetype language

2011-03-20 Thread bearophile
Through I've found a link to a language I didn't know, named Archetype. This blog post contains some pointers and references about the language: http://dvanderboom.wordpress.com/2010/04/26/new-language-code-named-archetype/ Some comments and quotations and notes about the language. Some of the th

Re: review of std.parallelism

2011-03-20 Thread dsimcha
On 3/19/2011 10:16 PM, dsimcha wrote: * Again: speed of e.g. parallel min/max vs. serial, pi computation etc. on a usual machine? I **STRONGLY** believe this does not belong in API documentation because it's too machine specific, compiler specific, stack alignment specific, etc. and almost any

Re: Anything in the review queue?

2011-03-20 Thread Lars T. Kyllingstad
On Sun, 20 Mar 2011 10:10:20 -0500, Andrei Alexandrescu wrote: > Since David kindly agreed to work some more on std.parallelism, there is > now time for carrying one review cycle on another library. I recall > there's work on: > > * std.goodxml (status?) > > * std.net (beyond mere libcurl bindin

Re: Anything in the review queue?

2011-03-20 Thread Jesse Phillips
Andrei Alexandrescu Wrote: > Since David kindly agreed to work some more on std.parallelism, there is > now time for carrying one review cycle on another library. I recall > there's work on: > > * std.goodxml (status?) > > * std.net (beyond mere libcurl bindings) > > * std.path (improvements

Re: suggestion of type: ustring

2011-03-20 Thread Jesse Phillips
ZY Zhou Wrote: > > It would be prohibitively expensive to be constantly validating strings. > > No, it would be much much cheaper, since there are only 2 cases the > validating is > needed > > 1) when you convert char[] to ustring, in this case, the validating is > necessary > 2) when you use

Re: Anything in the review queue?

2011-03-20 Thread dsimcha
On 3/20/2011 11:10 AM, Andrei Alexandrescu wrote: Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere libcurl bindings) * std.path (improveme

Re: review of std.parallelism

2011-03-20 Thread dsimcha
On 3/19/2011 2:14 PM, Michel Fortin wrote: On 2011-03-19 13:20:00 -0400, dsimcha said: On 3/19/2011 1:09 PM, Michel Fortin wrote: For instance: void main() { int sum = 0; foreach (int value; taskPool.parallel([0,2,3,6,1,4,6,3,3,3,6])) { sum += value; } writeln(sum); } The "+=" would need to

Re: std.parallelism: Final review

2011-03-20 Thread dsimcha
On 3/19/2011 2:36 PM, Michel Fortin wrote: Next to "priority" I notice the "makeDaemon" and "makeAngel" functions... wouldn't it make more sense to mirror the core.thread API for this too and make an "isDaemon" property out of these? Good point. Done.

Re: suggestion of type: ustring

2011-03-20 Thread ZY Zhou
> It would be prohibitively expensive to be constantly validating strings. No, it would be much much cheaper, since there are only 2 cases the validating is needed 1) when you convert char[] to ustring, in this case, the validating is necessary 2) when you use split on ustring. but since ustring

Anything in the review queue?

2011-03-20 Thread Andrei Alexandrescu
Since David kindly agreed to work some more on std.parallelism, there is now time for carrying one review cycle on another library. I recall there's work on: * std.goodxml (status?) * std.net (beyond mere libcurl bindings) * std.path (improvements to path) * A bunch of almost-finished projec

Re: std.parallelism: voting postponed

2011-03-20 Thread dsimcha
On 3/20/2011 9:24 AM, Lars T. Kyllingstad wrote: A lot of suggestions have been made for std.parallelism in the last week of the review, and David currently doesn't have the time to fix all of them. We will therefore postpone the voting, which was scheduled to begin on Friday 25 April, and resta

std.parallelism: voting postponed

2011-03-20 Thread Lars T. Kyllingstad
A lot of suggestions have been made for std.parallelism in the last week of the review, and David currently doesn't have the time to fix all of them. We will therefore postpone the voting, which was scheduled to begin on Friday 25 April, and restart the review process at a later date. David, h

Re: suggestion of type: ustring

2011-03-20 Thread Jonathan M Davis
> D's string is supposed to be utf8 encoded, however, the following code > compiles and runs with no error: > > string s = "\xff"; // s is invalid > writeln(s); > fileStream.writeLine(s); > > In order to make sure only valid utf8 string is used in the system, > validating is needed everywhe

Re: review of std.parallelism

2011-03-20 Thread Lars T. Kyllingstad
On Sat, 19 Mar 2011 17:58:46 -0500, Andrei Alexandrescu wrote: > On 03/19/2011 04:25 PM, dsimcha wrote: >> On 3/19/2011 4:35 PM, Andrei Alexandrescu wrote: >>> I know you'd have no problem finding the right voice in this >>> discussion if you only frame it in the right light. Again, people are >>>

suggestion of type: ustring

2011-03-20 Thread ZY Zhou
D's string is supposed to be utf8 encoded, however, the following code compiles and runs with no error: string s = "\xff"; // s is invalid writeln(s); fileStream.writeLine(s); In order to make sure only valid utf8 string is used in the system, validating is needed everywhere, e.g. string

Re: What is vsi.lib (VSI_LIB) for Visual D?

2011-03-20 Thread Rainer Schuetze
vsi.lib is a D library built from converted idl/h files from the Visual Studio Integration SDK and some files from the Windows SDK. You should adjust the settings at the top of trunk/Makefile and run "nmake" once to build the conversion tools and run the conversion. You can then use visuald_v

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Caligo
On Sun, Mar 20, 2011 at 4:44 AM, Jonathan M Davis wrote: > > > Regardless, no one has taken the time to put together such an incubator > project, and exactly what it would be and how it would work would be highly > dependent on whoever put it together. It's been proposed before and > generally > f

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Jonathan M Davis
> On 03/20/2011 08:41 AM, Jonathan M Davis wrote: > > A proper incubator site/project would be _the_ > > place to go looking for D projects, and it would be properly managed so > > that the state of each project was clear and dead/inactive projects > > weren't in the way (be it because they're remo

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Daniel Gibson
Am 20.03.2011 11:22, schrieb spir: > On 03/20/2011 08:41 AM, Jonathan M Davis wrote: >> A proper incubator site/project would be _the_ >> place to go looking for D projects, and it would be properly managed so that >> the state of each project was clear and dead/inactive projects weren't in the >>

How to proceed now that D is accepted to GSoC?

2011-03-20 Thread Jens Mueller
Hi, according to http://www.google-melange.com/gsoc/program/accepted_orgs/google/gsoc2011 Digital Mars got accepted to GSoC 2011. On the above mentioned page Digital Mars is ranked in the second table because the organization profile has not been completed yet. Maybe the name can also be changed.

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread spir
On 03/20/2011 08:41 AM, Jonathan M Davis wrote: A proper incubator site/project would be _the_ place to go looking for D projects, and it would be properly managed so that the state of each project was clear and dead/inactive projects weren't in the way (be it because they're removed or put in an

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Jonathan M Davis
> On Sun, Mar 20, 2011 at 2:41 AM, Jonathan M Davis wrote: > > It's both. Without any developers, there obviously won't be any code. > > However, > > until someone takes the initiative and sets up a proper place and > > framework for projects to be posted to with the idea that it's an > > incubato

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Caligo
On Sun, Mar 20, 2011 at 2:41 AM, Jonathan M Davis wrote: > > It's both. Without any developers, there obviously won't be any code. > However, > until someone takes the initiative and sets up a proper place and framework > for projects to be posted to with the idea that it's an incubator for > possi

Re: Quo vadis, D2? Thoughts on the D library ecosystem.

2011-03-20 Thread Jonathan M Davis
> On Sat, Mar 19, 2011 at 6:12 PM, Jonathan M Davis wrote: > > Really, the problem is that someone needs to take the initiative on this. > > They > > need to work on setting it up and supporting the ecosystem which would > > result in > > a group of such projects. Good ideas tend to be presented a