Re: parallelFuture

2009-10-22 Thread zsxxsz
== Quote from dsimcha (dsim...@yahoo.com)'s article I've created an alpha release of parallelFuture, a high-level parallelization library for D2. Right now, it has a task pool, futures, parallel foreach, and parallel map. Here's the (IMHO) coolest example: auto pool = new ThreadPool(); //

Re: parallelFuture

2009-10-22 Thread Lars T. Kyllingstad
dsimcha wrote: I've created an alpha release of parallelFuture, a high-level parallelization library for D2. Right now, it has a task pool, futures, parallel foreach, and parallel map. Here's the (IMHO) coolest example: auto pool = new ThreadPool(); // Assuming we have a function isPrime(),

Re: parallelFuture

2009-10-22 Thread dsimcha
== Quote from Lars T. Kyllingstad (pub...@kyllingen.nospamnet)'s article Is there some particular reason why you have capitalised the F in the file name, but not in the module name? -Lars This is called the effects of being in hack mode late at night. I guess the convention is all lower case.

Re: parallelFuture

2009-10-22 Thread dsimcha
== Quote from Tim Matthews (tim.matthe...@gmail.com)'s article dsimcha wrote: I've created an alpha release of parallelFuture, a high-level parallelization library for D2. Right now, it has a task pool, futures, parallel foreach, and parallel map. Here's the (IMHO) coolest

Re: parallelFuture

2009-10-22 Thread dsimcha
== Quote from Charles Hixson (charleshi...@earthlink.net)'s article dsimcha wrote: I've created an alpha release of parallelFuture, a high-level parallelization library for D2. Right now, it has a task pool, futures, parallel foreach, and parallel map. Here's the (IMHO) coolest

Re: parallelFuture

2009-10-22 Thread Tim Matthews
dsimcha wrote: For now, parallelFuture was designed with a single producer, multiple worker model. Absolutely no attempt was made to allow for tasks running in the task pool to themselves submit jobs to the same task pool, because it would have made things more complicated and I couldn't

Re: parallelFuture

2009-10-22 Thread dsimcha
== Quote from Tim Matthews (tim.matthe...@gmail.com)'s article dsimcha wrote: For now, parallelFuture was designed with a single producer, multiple worker model. Absolutely no attempt was made to allow for tasks running in the task pool to themselves submit jobs to the same task pool,

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
KennyTM~ kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message news:mailman.228.1256181155.20261.digitalmar...@puremagic.com... On Wed, Oct 21, 2009 at 09:25:34PM -0500, AJ wrote:

Re: No header files?

2009-10-22 Thread Chris Nicholson-Sauls
AJ wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.u16mw4o6eav...@localhost.localdomain... On Wed, 21 Oct 2009 23:10:38 -0400, AJ a...@nospam.net wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.u16j03t2eav...@localhost.localdomain... On Wed,

Re: No header files?

2009-10-22 Thread AJ
Nick Sabalausky a...@a.a wrote in message news:hbontv$uq...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbof8k$ed...@digitalmars.com... Adam D. Ruppe destructiona...@gmail.com wrote in message news:mailman.226.1256173717.20261.digitalmar...@puremagic.com... On Wed, Oct 21,

Re: int always 32 bits on all platforms?

2009-10-22 Thread AJ
Sean Kelly s...@invisibleduck.org wrote in message news:hbo3bv$2q2...@digitalmars.com... AJ Wrote: How can/does D guarantee that int will always be 32 bits on all platforms? Does this mean that D won't work on some platforms? Why is integer width so ambiguous in C/C++? (I am using platform

Re: int always 32 bits on all platforms?

2009-10-22 Thread Chris Nicholson-Sauls
AJ wrote: Nick Sabalausky a...@a.a wrote in message news:hbonbp$to...@digitalmars.com... AJ a...@nospam.net wrote in message news:hboaeu$5s...@digitalmars.com... BCS n...@anon.com wrote in message news:a6268ffbb0a8cc20817fe1f...@news.digitalmars.com... Hello aJ, I would think so. Anyway,

Re: Revamped concurrency API (Don can you contact Bartosz ?)

2009-10-22 Thread Nick B
Leandro Lucarella wrote: Don, el 21 de octubre a las 09:46 me escribiste: All my public email addresses are fake. Bugzilla is just spam bait. It clearly comes from a more innocent age. I once made the mistake of submitting a bug to gcc. Although the GCC Bugzilla hides the email in the

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Don
AJ wrote: Why not eliminate the requirement for semicolon statement terminators (unless there are multiple statements per line)? Less typing is more! Please don't post crazy stuff like this. This proposal would break every line of D code ever written. YOU ARE WASTING YOUR TIME (and everyone

Re: No header files?

2009-10-22 Thread Yigal Chripun
On 22/10/2009 02:01, Walter Bright wrote: Yigal Chripun wrote: the only valid IMO use case for header files is for linking libs - the compiler can handle just find binary formats for that. I was originally going to go with a binary format for that - but it turned out to be pointless. dmd is

Re: No header files?

2009-10-22 Thread Walter Bright
Yigal Chripun wrote: On 22/10/2009 02:01, Walter Bright wrote: Yigal Chripun wrote: the only valid IMO use case for header files is for linking libs - the compiler can handle just find binary formats for that. I was originally going to go with a binary format for that - but it turned out to

Re: No header files?

2009-10-22 Thread Walter Bright
Steven Schveighoffer wrote: On Wed, 21 Oct 2009 19:21:32 -0400, Walter Bright newshou...@digitalmars.com wrote: Yigal Chripun wrote: The C/C++ way of headers + lib has problems which D inherited as part of the same (broken) design. Hardly, as: 1. you don't need to use header files in D at

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Walter Bright
Adam D. Ruppe wrote: Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus aparsinganchorperiodsinasentencearentstrictlynecessarywecould putoneperlineorjustfigureoutwheretheybelongbyparsingthecontext

Re: Array, AA Implementations

2009-10-22 Thread Don
Andrei Alexandrescu wrote: Bill Baxter wrote: On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: 3. Remove some element from the container and give it to me E removeAny(); 4. Add an element to the container is possible bool add(E); I think any

Re: No header files?

2009-10-22 Thread Walter Bright
AJ wrote: Walter Bright newshou...@digitalmars.com wrote in message news:hbo7fa$316...@digitalmars.com... AJ wrote: You lose the ability to use, say a class declaration, as the specification (at least without a sophisitcated, code-folding/code-formatting IDE). Just change class to interface

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Kagamin
bearophile Wrote: Even worse, someone may even implement such alternative D syntax, and the sky will fall on your head: http://delight.sourceforge.net/ import dlt io Printer class Main void main Printer stdout stdout write Hello World!\n lolol

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
Semicolons As Implicit Programming Language Statement Terminators (An Analysis in Process) Pros: 1. Makes parsing of certain (they need to be listed) constructs easier (how much?) (?). 2. Adds redundancy which helps diagnose and isolate (facilitates reporting of ) the following common

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
Walter Bright newshou...@digitalmars.com wrote in message news:hbp2lc$1m2...@digitalmars.com... Adam D. Ruppe wrote: Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread bearophile
Don Wrote: Please don't post crazy stuff like this. This proposal would break every line of D code ever written. If semicolons become optional, the old code that uses them will keep working, because adding an extra semicolon isn't an error. Broken lines like: foo(x, y); a = [1, 2, 3]; c =

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread bearophile
Walter Bright: Adam D. Ruppe wrote: Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus aparsinganchorperiodsinasentencearentstrictlynecessarywecould putoneperlineorjustfigureoutwheretheybelongbyparsingthecontext

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
Don nos...@nospam.com wrote in message news:hbp00i$1d8...@digitalmars.com... AJ wrote: Why not eliminate the requirement for semicolon statement terminators (unless there are multiple statements per line)? Less typing is more! Please don't post crazy stuff like this. This proposal It's

Re: No header files?

2009-10-22 Thread AJ
Nick Sabalausky a...@a.a wrote in message news:hboum3$1bh...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbosh1$17l...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:hbontv$uq...@digitalmars.com... If you want to manually write a separate redundant

Re: No header files?

2009-10-22 Thread AJ
Walter Bright newshou...@digitalmars.com wrote in message news:hbp309$1nb...@digitalmars.com... AJ wrote: Walter Bright newshou...@digitalmars.com wrote in message news:hbo7fa$316...@digitalmars.com... AJ wrote: You lose the ability to use, say a class declaration, as the specification

Re: No header files?

2009-10-22 Thread AJ
Yigal Chripun yigal...@gmail.com wrote in message news:hbp0hh$1i2...@digitalmars.com... the benefits of using the llvm byte-code format are as following: 1) platform neutral Ha! I consider it another platform! 2) has efficient representation for in-memory and an equivalent for on-disk.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Mike James
I say we should get rid of vowels - it worked for the ancient egyptians :-) Next thing you know someone will propose eliminating braces and just using whitespace to denote blocks. It's utter madness. Or get rid of all the visible chars and use Whitespace...

Re: No header files?

2009-10-22 Thread AJ
Walter Bright newshou...@digitalmars.com wrote in message news:hbp2a5$1m2...@digitalmars.com... Steven Schveighoffer wrote: On Wed, 21 Oct 2009 19:21:32 -0400, Walter Bright newshou...@digitalmars.com wrote: Yigal Chripun wrote: The C/C++ way of headers + lib has problems which D

Re: int always 32 bits on all platforms?

2009-10-22 Thread AJ
Chris Nicholson-Sauls ibisbase...@gmail.com wrote in message news:hbou95$1al...@digitalmars.com... AJ wrote: Nick Sabalausky a...@a.a wrote in message news:hbonbp$to...@digitalmars.com... AJ a...@nospam.net wrote in message news:hboaeu$5s...@digitalmars.com... BCS n...@anon.com wrote in

Re: int always 32 bits on all platforms?

2009-10-22 Thread AJ
Nick Sabalausky a...@a.a wrote in message news:hboui3$1bb...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbor97$155...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:hbonj3$u3...@digitalmars.com... AJ a...@nospam.net wrote in message

Re: int always 32 bits on all platforms?

2009-10-22 Thread KennyTM~
On Oct 22, 09 17:31, AJ wrote: Nick Sabalauskya...@a.a wrote in message news:hboui3$1bb...@digitalmars.com... AJa...@nospam.net wrote in message news:hbor97$155...@digitalmars.com... Nick Sabalauskya...@a.a wrote in message news:hbonj3$u3...@digitalmars.com... AJa...@nospam.net wrote in

Re: Array, AA Implementations

2009-10-22 Thread Pelle Månsson
Don wrote: Andrei Alexandrescu wrote: Bill Baxter wrote: On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: 3. Remove some element from the container and give it to me E removeAny(); 4. Add an element to the container is possible bool add(E); I

Re: No header files?

2009-10-22 Thread Yigal Chripun
Walter Bright Wrote: Yigal Chripun wrote: On 22/10/2009 02:01, Walter Bright wrote: Yigal Chripun wrote: the only valid IMO use case for header files is for linking libs - the compiler can handle just find binary formats for that. I was originally going to go with a binary format for

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
Mike James f...@bar.com wrote in message news:hbp7le$220...@digitalmars.com... I say we should get rid of vowels - it worked for the ancient egyptians :-) Next thing you know someone will propose eliminating braces and just using whitespace to denote blocks. It's utter madness. Or get rid

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message news:mailman.228.1256181155.20261.digitalmar...@puremagic.com... On Wed, Oct 21, 2009 at

Re: No header files?

2009-10-22 Thread Nick Sabalausky
AJ a...@nospam.net wrote in message news:hbp6ka$1uv...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:hboum3$1bh...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbosh1$17l...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message

Re: int always 32 bits on all platforms?

2009-10-22 Thread AJ
KennyTM~ kenn...@gmail.com wrote in message news:hbp924$24h...@digitalmars.com... On Oct 22, 09 17:31, AJ wrote: Nick Sabalauskya...@a.a wrote in message news:hboui3$1bb...@digitalmars.com... AJa...@nospam.net wrote in message news:hbor97$155...@digitalmars.com... Nick

Re: No header files?

2009-10-22 Thread Tomas Lindquist Olsen
On Thu, Oct 22, 2009 at 11:50 AM, Yigal Chripun yigal...@gmail.com wrote: I think you misunderstood. the idea is *not* to replace .di header files with llvm bit-code files. the idea is to replace d object files lib files with a llvm bit-code equivalents  which does not need additional

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Ary Borenszweig
AJ wrote: Mike James f...@bar.com wrote in message news:hbp7le$220...@digitalmars.com... I say we should get rid of vowels - it worked for the ancient egyptians :-) Next thing you know someone will propose eliminating braces and just using whitespace to denote blocks. It's utter madness. Or

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
KennyTM~ kenn...@gmail.com wrote in message news:hbpa89$27s...@digitalmars.com... On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message

Small performance problem

2009-10-22 Thread bearophile
In D there are several things to implement and fix that have a priority higher than tuning the performance of the DMD back-end (a work may be wasted time anyway). But arrays are common, so the following may interest anyway. On LDC this synthetic benchmark shows the same run time with both

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread AJ
Ary Borenszweig a...@esperanto.org.ar wrote in message news:hbpau3$297...@digitalmars.com... AJ wrote: Mike James f...@bar.com wrote in message news:hbp7le$220...@digitalmars.com... I say we should get rid of vowels - it worked for the ancient egyptians :-) Next thing you know someone

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:hbp5qa$1te...@digitalmars.com... Walter Bright: Adam D. Ruppe wrote: Ifthepointisntplainobviousfromtheabovefewersymbolsmostcertainly doesNOTmeanalanguageisnecessarilyeasiertoparseSymbolsgiveus

Re: No header files?

2009-10-22 Thread AJ
Nick Sabalausky a...@a.a wrote in message news:hbpa7q$27r...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbp6ka$1uv...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:hboum3$1bh...@digitalmars.com... AJ a...@nospam.net wrote in message

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Nick Sabalausky
AJ a...@nospam.net wrote in message news:hbpb1b$29u...@digitalmars.com... KennyTM~ kenn...@gmail.com wrote in message news:hbpa89$27s...@digitalmars.com... OK. struct S { int a } int a void main () { S s auto t = s .a = 1 // ambiguity: Note that .sth means global scope.

Re: int always 32 bits on all platforms?

2009-10-22 Thread Nick Sabalausky
AJ a...@nospam.net wrote in message news:hbp85j$238...@digitalmars.com... Chris Nicholson-Sauls ibisbase...@gmail.com wrote in message news:hbou95$1al...@digitalmars.com... AJ wrote: Nick Sabalausky a...@a.a wrote in message news:hbonbp$to...@digitalmars.com... AJ a...@nospam.net wrote in

Re: Targeting C

2009-10-22 Thread Pelle Månsson
bearophile wrote: Tim Matthews: OOC. I quite like how this one myself personally. http://ooc-lang.org/about Type of arguments can be stated once: Vector3f: class { x, y, z : Float init: func(x, y, z : Float) { this x = x // 'this' is called 'self' in some other languages this y

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Lars T. Kyllingstad
AJ wrote: KennyTM~ kenn...@gmail.com wrote in message news:hbpa89$27s...@digitalmars.com... On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in

Re: Targeting C

2009-10-22 Thread bearophile
Pelle Månsson: Personally, I like this: foreach (i; 0..10) list ~= i; more. :) While I like this more: for (i in 0 .. 10) list ~= i; Bye, bearophile

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread bearophile
Nick Sabalausky: I'm already kicking myself for trying to jump into the middle of yet another semicolon debate, but...burden of semicolons? Isn't that a bit overstated? I suppose it depends on the person, but I find it to be every bit as automatic as reaching for the Shift key when I write

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Pelle Månsson
KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message news:mailman.228.1256181155.20261.digitalmar...@puremagic.com... On Wed,

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Kagamin
AJ Wrote: Cons: 1. Makes most source code less comprehensible. That depends on what parser you have. If you're a basic addict, why you bother about C family language? 2. Is redundant with the newline designator. Statements don't end at newline. 3. Is more typing. Code reuse saves

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Ary Borenszweig
AJ wrote: Ary Borenszweig a...@esperanto.org.ar wrote in message news:hbpau3$297...@digitalmars.com... AJ wrote: Mike James f...@bar.com wrote in message news:hbp7le$220...@digitalmars.com... I say we should get rid of vowels - it worked for the ancient egyptians :-) Next thing you know

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Lars T. Kyllingstad
AJ wrote: Cons: 10. Allows one to write hard-to-see do nothings like: for(;;); That's not allowed in D, for that exact reason. You have to write for (;;) { } for a do-nothing loop. -Lars

Re: No header files?

2009-10-22 Thread downs
AJ wrote: Nick Sabalausky a...@a.a wrote in message news:hboum3$1bh...@digitalmars.com... AJ a...@nospam.net wrote in message news:hbosh1$17l...@digitalmars.com... Nick Sabalausky a...@a.a wrote in message news:hbontv$uq...@digitalmars.com... If you want to manually write a separate

Re: No header files?

2009-10-22 Thread Steven Schveighoffer
On Thu, 22 Oct 2009 06:16:50 -0400, AJ a...@nospam.net wrote: No. And tomorrow (later today after I get done sleeping), I'm going to do more coding and less newsgrouping! Goodnight. Oh thank god. (Yes, keep replying, I'm going to see how long I can keep you away from critical header

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Danny Wilson
Op Thu, 22 Oct 2009 07:44:44 +0200 schreef AJ a...@nospam.net: Also, referring to your second struct example above, D never has semicolons directly after a closing curly-brace. Isn't that ironic! Kinda far fetched to call that ironic. The struct decleration was already ended by '}'.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Ary Borenszweig
KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Pelle Månsson
KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D. Ruppedestructiona...@gmail.com wrote in message

Re: Array, AA Implementations

2009-10-22 Thread Steven Schveighoffer
On Thu, 22 Oct 2009 09:07:47 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Don wrote: Andrei Alexandrescu wrote: Bill Baxter wrote: On Wed, Oct 21, 2009 at 6:35 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: 3. Remove some element from the container and

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 21:12, Ary Borenszweig wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Adam D. Ruppe
On Thu, Oct 22, 2009 at 12:46:50AM -0700, Walter Bright wrote: (Fixed that for you!) hehehe :) -- Adam D. Ruppe http://arsdnet.net

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 21:17, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Pelle Månsson
KennyTM~ wrote: On Oct 22, 09 21:17, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Pelle Månsson
KennyTM~ wrote: On Oct 22, 09 21:12, Ary Borenszweig wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On Oct 22, 09 12:29, AJ wrote: Adam D.

Re: Revamped concurrency API (Don can you contact Bartosz ?)

2009-10-22 Thread Leandro Lucarella
Nick B, el 22 de octubre a las 19:35 me escribiste: Leandro Lucarella wrote: Don, el 21 de octubre a las 09:46 me escribiste: All my public email addresses are fake. Bugzilla is just spam bait. It clearly comes from a more innocent age. I once made the mistake of submitting a bug to gcc.

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 21:36, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 21:12, Ary Borenszweig wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com...

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 21:35, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 21:17, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message news:hbopns$125...@digitalmars.com... On

Re: Revamped concurrency API (Don can you contact Bartosz ?)

2009-10-22 Thread Denis Koroskin
On Thu, 22 Oct 2009 17:32:00 +0400, Leandro Lucarella llu...@gmail.com wrote: Nick B, el 22 de octubre a las 19:35 me escribiste: Leandro Lucarella wrote: Don, el 21 de octubre a las 09:46 me escribiste: All my public email addresses are fake. Bugzilla is just spam bait. It clearly comes

Re: Revamped concurrency API (Don can you contact Bartosz ?)

2009-10-22 Thread Steven Schveighoffer
On Thu, 22 Oct 2009 09:32:00 -0400, Leandro Lucarella llu...@gmail.com wrote: Nick B, el 22 de octubre a las 19:35 me escribiste: Leandro Lucarella wrote: Don, el 21 de octubre a las 09:46 me escribiste: All my public email addresses are fake. Bugzilla is just spam bait. It clearly comes

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Pelle Månsson
KennyTM~ wrote: On Oct 22, 09 21:36, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 21:12, Ary Borenszweig wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote: KennyTM~kenn...@gmail.com wrote in message

Who's using structs nested in functions?

2009-10-22 Thread Andrei Alexandrescu
Refer to: http://www.digitalmars.com/d/2.0/struct.html and scroll down to the last section, Nested Structs. A struct defined inside a function has a hidden pointer to that function's stack frame and therefore can use function's local variables. Nested classes do a similar trick, but for

Re: Who's using structs nested in functions?

2009-10-22 Thread Denis Koroskin
On Thu, 22 Oct 2009 18:07:15 +0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Refer to: http://www.digitalmars.com/d/2.0/struct.html and scroll down to the last section, Nested Structs. A struct defined inside a function has a hidden pointer to that function's stack frame

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread KennyTM~
On Oct 22, 09 21:51, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 21:36, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 21:12, Ary Borenszweig wrote: KennyTM~ wrote: On Oct 22, 09 19:03, Pelle Månsson wrote: KennyTM~ wrote: On Oct 22, 09 13:57, AJ wrote:

Struct Comparison

2009-10-22 Thread dsimcha
Regarding recent discussions in Bugzilla: I wonder if we could somehow define a super-efficient struct opEquals that performs introspection and only tests expensive members if it's necessary. For example, here is a simple case of it: enum opEqualsMixin = q{ bool opEquals(typeof(this) rhs) {

Re: Struct Comparison

2009-10-22 Thread bearophile
dsimcha: Similar stuff could be done for a generic opCmp that gives a struct an arbitrary total ordering as long as all of its members have a total ordering. I have a similar structCmp in my dlibs, it's used by the Record/record (similar to the Tuple/tuple of Phobos2). It works recursively.

Re: Who's using structs nested in functions?

2009-10-22 Thread Jeremie Pelletier
bearophile wrote: Andrei Alexandrescu: With nested structs, however, you can't do much. You can pass them to a template, but I can't see some solid use cases there. My understanding is that nested structs have been implemented for completeness and consistency with nested classes. Any good

Re: Struct Comparison

2009-10-22 Thread Andrei Alexandrescu
dsimcha wrote: Regarding recent discussions in Bugzilla: I wonder if we could somehow define a super-efficient struct opEquals that performs introspection and only tests expensive members if it's necessary. For example, here is a simple case of it: enum opEqualsMixin = q{ bool

Re: Struct Comparison

2009-10-22 Thread Don
dsimcha wrote: Regarding recent discussions in Bugzilla: I wonder if we could somehow define a super-efficient struct opEquals that performs introspection and only tests expensive members if it's necessary. The compiler should be doing this. It's the way to fix the Bugzilla bug. There should

Re: Struct Comparison

2009-10-22 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Of course, we could get even fancier. We could recursively introspect struct types and use various heuristics to calculate the optimal comparison order at compile time. Similar stuff could be done for a

What Does Haskell Have to Do with C++?

2009-10-22 Thread Jeremie Pelletier
http://bartoszmilewski.wordpress.com/2009/10/21/what-does-haskell-have-to-do-with-c/ Bartosz's second part of 'Template Metaprogramming Made Easy (Huh?)', its quite a read :)

Re: Who's using structs nested in functions?

2009-10-22 Thread bearophile
Jeremie Pelletier: However I don't think having a closure for that struct is really needed, nested functions already perform that task very well, and I use those quite often. That's why I have said static nested structs, they are like nested structs, but they don't have the extra field.

Re: What Does Haskell Have to Do with C++?

2009-10-22 Thread Justin Johansson
Jeremie Pelletier Wrote: http://bartoszmilewski.wordpress.com/2009/10/21/what-does-haskell-have-to-do-with-c/ Bartosz's second part of 'Template Metaprogramming Made Easy (Huh?)', its quite a read :) Jeremie, you are a champion and a scholar. Thanks for changing the topic. Justin

Re: No header files?

2009-10-22 Thread Yigal Chripun
Tomas Lindquist Olsen Wrote: This locks D to the LLVM backend, things like that is never a good idea. you could say the same thing about .net and Java - Java locks you to .class files and .net locks you to assemblies. there are many JVMs from different vendors for different platforms which

Re: Who's using structs nested in functions?

2009-10-22 Thread Fawzi Mohamed
On 2009-10-22 16:33:01 +0200, Jeremie Pelletier jerem...@gmail.com said: bearophile wrote: Andrei Alexandrescu: With nested structs, however, you can't do much. You can pass them to a template, but I can't see some solid use cases there. My understanding is that nested structs have been

Re: No header files?

2009-10-22 Thread Denis Koroskin
On Thu, 22 Oct 2009 19:59:04 +0400, Yigal Chripun yigal...@gmail.com wrote: Tomas Lindquist Olsen Wrote: This locks D to the LLVM backend, things like that is never a good idea. you could say the same thing about .net and Java - Java locks you to .class files and .net locks you to

Re: Who's using structs nested in functions?

2009-10-22 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: With nested structs, however, you can't do much. You can pass them to a template, but I can't see some solid use cases there. My understanding is that nested structs have been implemented for completeness and consistency with nested classes. Any good

Re: int always 32 bits on all platforms?

2009-10-22 Thread BCS
Hello aJ, Well I can do the same thing with pragma or compiler switch in C++. It doesn't mean that thing will work if 32-bit ints have to be aligned on 32-bit boundaries. While nice to have one syntax to do that, it doesn't fix the problem (which I haven't expressed correctly probably). What

Re: Who's using structs nested in functions?

2009-10-22 Thread Andrei Alexandrescu
Fawzi Mohamed wrote: On 2009-10-22 16:33:01 +0200, Jeremie Pelletier jerem...@gmail.com said: bearophile wrote: Andrei Alexandrescu: With nested structs, however, you can't do much. You can pass them to a template, but I can't see some solid use cases there. My understanding is that nested

Re: No header files?

2009-10-22 Thread BCS
Hello aJ, You sound angry that your feature is not a fit for my development process. I think the frustration here is that you seem to be saying that you can't do something in D that you want to do but we have yet to figure out what it is. Every thing I have seen you ask for is already

Re: No header files?

2009-10-22 Thread BCS
Hello aJ, BCS n...@anon.com wrote in message news:a6268ffbb078cc2081280f1...@news.digitalmars.com... I will hold that the full source or webpage like documentation will do better in all cases than a header file. The first for where the details matter and the second for all other cases because

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread bearophile
KennyTM~: Please people, let's edit emails a little, so you don't carry around 30 KB of useless text :-) And if all you need is a re-syntax-ized D with optional semicolon, there is already one here. It's called Delight. In F# you have the light syntax, that you can activate with the

Re: this() not executing code on structs

2009-10-22 Thread grauzone
dsimcha wrote: == Quote from grauzone (n...@example.net)'s article Andrei Alexandrescu wrote: I'd really like to know why scope x = new X(); is unsafe, while encouraging doing exactly the same with structs seems to be a perfectly fine idea. Allocating structs on the stack is obviously not any

Re: this() not executing code on structs

2009-10-22 Thread grauzone
dsimcha wrote: == Quote from grauzone (n...@example.net)'s article Andrei Alexandrescu wrote: I'd really like to know why scope x = new X(); is unsafe, while encouraging doing exactly the same with structs seems to be a perfectly fine idea. Allocating structs on the stack is obviously not any

Re: No header files?

2009-10-22 Thread BCS
Hello Yigal, On 22/10/2009 00:57, BCS wrote: Hello Yigal, As you said, what is needed is a better lib format. we already have DDL NOW which already has most of what you described above. D can also take advantage of the LLVM framework. Does DDL or LLVM work to generate monolithic

Re: Semicolons: mostly unnecessary?

2009-10-22 Thread Bill Baxter
On Thu, Oct 22, 2009 at 9:44 AM, bearophile bearophileh...@lycos.com wrote: KennyTM~: Please people, let's edit emails a little, so you don't carry around 30 KB of useless text :-) And if all you need is a re-syntax-ized D with optional semicolon, there is already one here. It's called

  1   2   >