Re: Porting D to the Mac, part 2

2009-02-05 Thread Miguel Rossi Seabra
Walter Bright Wrote: Here it is: http://www.reddit.com/r/programming/comments/7uys8/porting_d_to_the_mac/ http://dobbscodetalk.com/index.php?option=com_myblogshow=Porting-D-to-the-Mac-Pt.-2.htmlItemid=29 great stuff :D

Re: QtD 0.1 is out!

2009-02-05 Thread ideage
Great stuff! Expect window's version!

Re: QtD 0.1 is out!

2009-02-05 Thread David Ferenczi
I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you

Re: QtD 0.1 is out!

2009-02-05 Thread Eldar Insafutdinov
David Ferenczi Wrote: I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people

Re: QtD 0.1 is out!

2009-02-05 Thread Eldar Insafutdinov
ideage Wrote: Great stuff! Expect window's version! I will probably do it in couple of weeks. Don't have time now :(

Re: QtD 0.1 is out!

2009-02-05 Thread Chris Nicholson-Sauls
Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials

Re: QtD 0.1 is out!

2009-02-05 Thread Daniel Keep
Eldar Insafutdinov wrote: David Ferenczi Wrote: I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation of signals and

Re: QtD 0.1 is out!

2009-02-05 Thread Ary Borenszweig
Daniel Keep escribió: Eldar Insafutdinov wrote: David Ferenczi Wrote: I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation

Re: QtD 0.1 is out!

2009-02-05 Thread Nick Sabalausky
Daniel Keep daniel.keep.li...@gmail.com wrote in message news:gmfo1e$2kt...@digitalmars.com... Eldar Insafutdinov wrote: David Ferenczi Wrote: I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:

Re: QtD 0.1 is out!

2009-02-05 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:gmfr9m$2u5...@digitalmars.com... Plus, notice that you can't open one of the files in a new tab without it *also* opening in the same tab. Clarification: That problem seems to happen on Ctrl-Click, but not Right-Click-Open In New Tab.

Re: QtD 0.1 is out!

2009-02-05 Thread Nick Sabalausky
Daniel Keep daniel.keep.li...@gmail.com wrote in message news:gmfujj$2t...@digitalmars.com... Ary Borenszweig wrote: Daniel Keep escribió: No files in this directory. Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* No files in this directory, but there ARE

Re: QtD 0.1 is out!

2009-02-05 Thread Daniel Keep
BCS wrote: Reply to Bill, On Fri, Feb 6, 2009 at 9:00 AM, Daniel Keep daniel.keep.li...@gmail.com wrote: You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be

Re: OT: Scripting on websites [Was: Re: QtD 0.1 is out!]

2009-02-05 Thread Daniel Keep
Ary Borenszweig wrote: lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for me. The point is that instead of giving you a sub-optimal but functional alternative, they

Re: QtD 0.1 is out!

2009-02-05 Thread Nick Sabalausky
Bill Baxter wbax...@gmail.com wrote in message news:mailman.658.1233882921.22690.digitalmars-d-annou...@puremagic.com... http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to

Re: QtD 0.1 is out!

2009-02-05 Thread Daniel Keep
Nick Sabalausky wrote: Bill Baxter wbax...@gmail.com wrote in message news:mailman.658.1233882921.22690.digitalmars-d-annou...@puremagic.com... http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad

Re: OT: Scripting on websites [Was: Re: QtD 0.1 is out!]

2009-02-05 Thread Nick Sabalausky
Daniel Keep daniel.keep.li...@gmail.com wrote in message news:gmg4av$dq...@digitalmars.com... Ary Borenszweig wrote: lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for

Re: QtD 0.1 is out!

2009-02-05 Thread John Reimer
Hello Bill, http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely. What kind of sites do you go that are so bad? I find things a little

Re: OT: Scripting on websites [Was: Re: QtD 0.1 is out!]

2009-02-05 Thread Robert Fraser
Nick Sabalausky wrote: Interesting side note: I've noticed that such flash-only pages and sites seem to be by far the most common among musicians and restaurant chains. Yup; I *hate* looking up tour dates. Don't get me started on actual Flash development... (I have the oh-so-wonderful luck

Re: QtD 0.1 is out!

2009-02-05 Thread Chris R Miller
Nick Sabalausky wrote: Daniel Keepdaniel.keep.li...@gmail.com wrote in message news:gmfujj$2t...@digitalmars.com... Ary Borenszweig wrote: Daniel Keep escribió: No files in this directory. Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* No files in this

Re: QtD 0.1 is out!

2009-02-05 Thread John Reimer
Hello Chris, Nick Sabalausky wrote: Daniel Keepdaniel.keep.li...@gmail.com wrote in message news:gmfujj$2t...@digitalmars.com... Ary Borenszweig wrote: Daniel Keep escribió: No files in this directory. Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* No

Re: OT: Scripting on websites [Was: Re: QtD 0.1 is out!]

2009-02-05 Thread grauzone
But... why Javascript hurts you that much? What did it do to you? Yesterday, I was on digitalmars.com, browsing the archive for the D newsgroup. Actually, I just had it open in a tab, and was actively browsing another website. I wondered why the browser had such a bad response. Finally, I

Re: QtD 0.1 is out!

2009-02-05 Thread grauzone
Daniel Keep wrote: Eldar Insafutdinov wrote: David Ferenczi Wrote: I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote: It didn't take very long after previous post to make a first implementation of

Re: QtD 0.1 is out!

2009-02-05 Thread Nick Sabalausky
Daniel Keep daniel.keep.li...@gmail.com wrote in message news:gmg4oj$dq...@digitalmars.com... Nick Sabalausky wrote: Bill Baxter wbax...@gmail.com wrote in message news:mailman.658.1233882921.22690.digitalmars-d-annou...@puremagic.com... http://adblockplus.org/en/subscriptions I'm not

Re: QtD 0.1 is out!

2009-02-05 Thread grauzone
Do I see correctly, that you didn't need to introduce a MOC compiler for D? And that the Signal and Slots implementation is written in pure D?

Re: OT: Scripting on websites [Was: Re: QtD 0.1 is out!]

2009-02-05 Thread Nick Sabalausky
grauzone n...@example.net wrote in message news:gmgjou$1af...@digitalmars.com... But... why Javascript hurts you that much? What did it do to you? Another example is Candydoc. That tree on the left is awful JavaScript hackery. It only works if JS is enabled, and even then it is slow,

Re: Lambda syntax, etc

2009-02-05 Thread Kagamin
bearophile Wrote: C#2 has lambdas, and C#3 adds closures and more type inferencing, so C#3+ supports the following syntaxes: (int i) = { return i % 3 == 1; } // C#2 i = i % 3 == 1 // C#3 i = { return i % 3 == 1; } // C#3, with statements too To define a delegate o delegate closure:

property syntax problems

2009-02-05 Thread Alex Burton
Hi, I just found a bug that comes out of the property syntax. The property syntax is great in that it allows a smooth transition from simple code dealing with public member variables to the use of interfaces without needing to update the client code. i.e. A.bob = 1 can stay as A.bob = 1 when

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Frits van Bommel
Walter Bright wrote: Frits van Bommel wrote: Is it really that hard? Can't you just detect this case (non-void function without a 'return' at the end but with inline asm inside)? Since the compiler should know the calling convention[1], the register that will contain the return value of the

Re: Lambda syntax, etc

2009-02-05 Thread Denis Koroskin
On Thu, 05 Feb 2009 12:32:15 +0300, Kagamin s...@here.lot wrote: bearophile Wrote: C#2 has lambdas, and C#3 adds closures and more type inferencing, so C#3+ supports the following syntaxes: (int i) = { return i % 3 == 1; } // C#2 i = i % 3 == 1 // C#3 i = { return i % 3 == 1; } // C#3, with

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Don
Frits van Bommel wrote: Walter Bright wrote: Frits van Bommel wrote: Is it really that hard? Can't you just detect this case (non-void function without a 'return' at the end but with inline asm inside)? Since the compiler should know the calling convention[1], the register that will contain

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Denis Koroskin
On Thu, 05 Feb 2009 16:21:54 +0300, Don nos...@nospam.com wrote: Frits van Bommel wrote: Walter Bright wrote: Frits van Bommel wrote: Is it really that hard? Can't you just detect this case (non-void function without a 'return' at the end but with inline asm inside)? Since the compiler

Non-fragile ABI in D?

2009-02-05 Thread Michel Fortin
http://michelf.com/weblog/2009/non-fragile-abi-in-d/ -- Michel Fortin michel.for...@michelf.com http://michelf.com/

Re: Non-fragile ABI in D?

2009-02-05 Thread grauzone
Michel Fortin wrote: http://michelf.com/weblog/2009/non-fragile-abi-in-d/ Summary of the upcoming discussion: use interfaces! You should preemptively list reasons, why this is not enough.

Re: Lambda syntax, etc

2009-02-05 Thread Andrei Alexandrescu
Kagamin wrote: bearophile Wrote: C#2 has lambdas, and C#3 adds closures and more type inferencing, so C#3+ supports the following syntaxes: (int i) = { return i % 3 == 1; } // C#2 i = i % 3 == 1 // C#3 i = { return i % 3 == 1; } // C#3, with statements too To define a delegate o delegate

Re: Lambda syntax, etc

2009-02-05 Thread Andrei Alexandrescu
Denis Koroskin wrote: On Thu, 05 Feb 2009 12:32:15 +0300, Kagamin s...@here.lot wrote: bearophile Wrote: C#2 has lambdas, and C#3 adds closures and more type inferencing, so C#3+ supports the following syntaxes: (int i) = { return i % 3 == 1; } // C#2 i = i % 3 == 1 // C#3 i = { return i %

Re: Scientific computing with D

2009-02-05 Thread Stewart Gordon
dsimcha wrote: snip Good idea. Stupid question, though: Where the heck is the account creation page so I can create wiki4d account and post some info to this page? There isn't one. You just give yourself a username in the preferences and then you're ready to go.

Re: Lambda syntax, etc

2009-02-05 Thread grauzone
What I see above is a smörgåsbord of syntaxes that shoot all over the proverbial barn door in the hope that one of them would strike someone's fancy. That strikes me as a rather lousily done job. Also, it is my I find this statement rather ironic, because you also seem to be quite happy with

Re: Scientific computing with D

2009-02-05 Thread dsimcha
== Quote from Stewart Gordon (smjg_1...@yahoo.com)'s article dsimcha wrote: snip Good idea. Stupid question, though: Where the heck is the account creation page so I can create wiki4d account and post some info to this page? There isn't one. You just give yourself a username in the

Re: Lambda syntax, etc

2009-02-05 Thread Andrei Alexandrescu
grauzone wrote: What I see above is a smörgåsbord of syntaxes that shoot all over the proverbial barn door in the hope that one of them would strike someone's fancy. That strikes me as a rather lousily done job. Also, it is my I find this statement rather ironic, because you also seem to be

Re: ch-ch-changes

2009-02-05 Thread Max Samukha
On Wed, 28 Jan 2009 09:25:05 -0800, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Max Samukha wrote: On Wed, 28 Jan 2009 06:46:29 -0800, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Max Samukha wrote: On Wed, 28 Jan 2009 06:01:29 -0800, Andrei Alexandrescu

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Tomas Lindquist Olsen
On Thu, Feb 5, 2009 at 2:42 PM, Frits van Bommel fvbom...@remwovexcapss.nl wrote: Don wrote: Frits van Bommel wrote: Walter Bright wrote: Frits van Bommel wrote: Is it really that hard? Can't you just detect this case (non-void function without a 'return' at the end but with inline asm

Re: Scientific computing with D

2009-02-05 Thread Stewart Gordon
dsimcha wrote: snip Invalid username dsimcha not stored. server time: February 5, 2009 8:54 local time: February 5, 2009 16:54 The preferences have been saved. No matter what I do I can't get wiki4d to actually let me edit anything. AIUI your username needs to be BiCapitalised, like the

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Don
Tomas Lindquist Olsen wrote: On Thu, Feb 5, 2009 at 2:42 PM, Frits van Bommel fvbom...@remwovexcapss.nl wrote: Don wrote: Frits van Bommel wrote: Walter Bright wrote: Frits van Bommel wrote: Is it really that hard? Can't you just detect this case (non-void function without a 'return' at the

Re: property syntax problems

2009-02-05 Thread Robert Jacques
On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: Hi, I just found a bug that comes out of the property syntax. The property syntax is great in that it allows a smooth transition from simple code dealing with public member variables to the use of interfaces without

Re: Lambda syntax, etc

2009-02-05 Thread BCS
Reply to Nick, This way, it's impossible to take valid code, add or remove a semicolon, and still have valid code (which I think was your main concern?). I think that way can be made even stronger my making the delegate/block need a trailing ';' (it's a function call after all) where a bare

Re: Lambda syntax, etc

2009-02-05 Thread BCS
Reply to Andrei, Kagamin wrote: Also, it is my perception (and not only mine) that C#'s creator completely missed the power of templates and generative programming. I have never met the man, but it is my impression that Anders didn't miss the power, he just doesn't care for the paradigm. I

Re: Lambda syntax, etc

2009-02-05 Thread Yigal Chripun
hsyl20 wrote: Nick Sabalausky Wrote: The first notation _ % 2 == 0 has no boilerplate and Scala is statically typed (unlike Python). I like that very much, especially since you can use either the implicit _ or a manually named var. Although I would prefer something like a, b, etc, (or maybe

Re: property syntax problems

2009-02-05 Thread Bill Baxter
On Fri, Feb 6, 2009 at 2:34 AM, Robert Jacques sandf...@jhu.edu wrote: On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: Hi, I just found a bug that comes out of the property syntax. The property syntax is great in that it allows a smooth transition from simple code

Re: property syntax problems

2009-02-05 Thread Robert Jacques
On Thu, 05 Feb 2009 14:27:27 -0500, Bill Baxter wbax...@gmail.com wrote: On Fri, Feb 6, 2009 at 2:34 AM, Robert Jacques sandf...@jhu.edu wrote: On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: int main() { B b; b.a.j = 10; // error b.a is a temporary. }

Re: Lambda syntax, etc

2009-02-05 Thread Chris Nicholson-Sauls
BCS wrote: Why use this: func(someInt) { |a,b| return a+b; }; when you can reuse syntax and get this for the same amount of typeing func(someInt) (a,b){ return a+b; }; While I know the compiler could (should) know the difference easily enough, my eyes want to parse that as a chained

Re: Lambda syntax, etc

2009-02-05 Thread BCS
Reply to Yigal, Personally I prefer to have syntax for blocks like Ruby/smalltalk. given the following example function: int func(int a, delegate int(int) dg) { .. } // call func with [something in this spirit is my favorite]: func(someInt) { | int a, int b | return a+b; }; how about require

Re: Lambda syntax, etc

2009-02-05 Thread Christopher Wright
Kagamin wrote: Yeah, C# lambdas are the killer feature. Slick, readable, C-compatible. Anders knows his job. Let's face it: delegate literals suck a little, mixins as delegates suck a lot, the former is too verbose, the latter just sucks. C# delegates in C# 2.0 are annoying. I try not to use

Re: Lambda syntax, etc

2009-02-05 Thread Nick Sabalausky
Christopher Wright dhase...@gmail.com wrote in message news:gmfsqa$311...@digitalmars.com... Kagamin wrote: Yeah, C# lambdas are the killer feature. Slick, readable, C-compatible. Anders knows his job. Let's face it: delegate literals suck a little, mixins as delegates suck a lot, the

Re: property syntax problems

2009-02-05 Thread Alex Burton
Robert Jacques Wrote: On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: Hi, I just found a bug that comes out of the property syntax. The property syntax is great in that it allows a smooth transition from simple code dealing with public member variables to

Re: property syntax problems

2009-02-05 Thread Chad J
Alex Burton wrote: Hi, I just found a bug that comes out of the property syntax. Yep, as was said, this is a feature. Sadly I forget why, but I'm pretty sure ref returning doesn't solve all of the problems with properties, just this one (sorta). Also, D1 doesn't have ref returns, so if

Re: property syntax problems

2009-02-05 Thread Alex Burton
Robert Jacques Wrote: On Thu, 05 Feb 2009 14:27:27 -0500, Bill Baxter wbax...@gmail.com wrote: On Fri, Feb 6, 2009 at 2:34 AM, Robert Jacques sandf...@jhu.edu wrote: On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: int main() { B b; b.a.j = 10; //

Re: Inline assembler in D and LDC, round 2

2009-02-05 Thread Walter Bright
Frits van Bommel wrote: His approach depends on DMD directly emitting x86 machine code, so it can just emit 'RET' and be done with it. LDC on the other hand needs to emit LLVM asm, which requires it to specify an explicit return value. My approach is a way to extract that return value from

Re: property syntax problems

2009-02-05 Thread Robert Jacques
On Thu, 05 Feb 2009 20:26:03 -0500, Alex Burton alex...@mac.com wrote: Robert Jacques Wrote: On Thu, 05 Feb 2009 06:55:46 -0500, Alex Burton alex...@mac.com wrote: Hi, I just found a bug that comes out of the property syntax. The property syntax is great in that it allows a smooth

Re: property syntax problems

2009-02-05 Thread Andrei Alexandrescu
Chad J wrote: Alex Burton wrote: Hi, I just found a bug that comes out of the property syntax. Yep, as was said, this is a feature. Sadly I forget why, but I'm pretty sure ref returning doesn't solve all of the problems with properties, just this one (sorta). Also, D1 doesn't have ref

goto

2009-02-05 Thread Andrei Alexandrescu
I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; !a.empty; a.next, b.next) { enforce(!b.empty); auto t = a.head - b.head; result += t *

Re: goto

2009-02-05 Thread Brad Roberts
Andrei Alexandrescu wrote: I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; !a.empty; a.next, b.next) { enforce(!b.empty); auto t =

Re: Non-fragile ABI in D?

2009-02-05 Thread Michel Fortin
On 2009-02-05 12:53:07 -0500, BCS a...@pathlink.com said: What I would like to see is the vtbl offsets being patched up by the linker. That way the vtbl can be reordered with impunity and you only need to re link. You still can't get binary compatibility for DLL/SO's (unless loading them does

Re: goto

2009-02-05 Thread BCS
Hello Andrei, I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; !a.empty; a.next, b.next) { enforce(!b.empty); auto t = a.head - b.head; result += t * t; if (result = limit)

Re: Lambda syntax, etc

2009-02-05 Thread Robert Fraser
BCS wrote: Reply to Yigal, Personally I prefer to have syntax for blocks like Ruby/smalltalk. given the following example function: int func(int a, delegate int(int) dg) { .. } // call func with [something in this spirit is my favorite]: func(someInt) { | int a, int b | return a+b; }; how

Re: Non-fragile ABI in D?

2009-02-05 Thread Michel Fortin
On 2009-02-05 08:51:39 -0500, grauzone n...@example.net said: Summary of the upcoming discussion: use interfaces! You should preemptively list reasons, why this is not enough. Well, you can't create a subclass and override functions if only the interface is exposed. In fact, exposing only

Re: Lambda syntax, etc

2009-02-05 Thread Robert Fraser
Christopher Wright wrote: C#: delegate void SomeName(int i); void foo(SomeName dg); Ugh, don't remind me!

Re: goto

2009-02-05 Thread Brad Roberts
Robert Fraser wrote: Which looks even worse. IMO, this is the perfect place for goto -- small function, used only for an exit condition. There's no spaghetti code here at all. I know goto used to be abused back in the day, but it has its place. Oh, I agree. I didn't say that in my response

Re: goto

2009-02-05 Thread Andrei Alexandrescu
Brad Roberts wrote: Robert Fraser wrote: Which looks even worse. IMO, this is the perfect place for goto -- small function, used only for an exit condition. There's no spaghetti code here at all. I know goto used to be abused back in the day, but it has its place. Oh, I agree. I didn't say

Re: goto

2009-02-05 Thread Walter Bright
Andrei Alexandrescu wrote: I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; !a.empty; a.next, b.next) { enforce(!b.empty); auto t = a.head -

Re: goto

2009-02-05 Thread Andrei Alexandrescu
Chris R Miller wrote: Andrei Alexandrescu wrote: Yah, same here. I seem to finally have found one of the elusive cases when goto simplifies things. About Brad's variant - ranges don't define clear, but assigning b = b.init does the trick. (I personally still find the goto version marginally

Re: goto

2009-02-05 Thread Andrei Alexandrescu
Walter Bright wrote: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; 1; a.next, b.next) { if (a.empty) { enforce(b.empty); break; } enforce(!b.empty); auto t

Re: goto

2009-02-05 Thread Bill Baxter
On Fri, Feb 6, 2009 at 2:27 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: He tried a test to narrow the area of specialty. He put each man in a room with a stove, a table, and a pot of water on the table. He said Boil the water. Both men moved the pot from the table to the

Re: goto

2009-02-05 Thread Bill Baxter
On Fri, Feb 6, 2009 at 2:30 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Walter Bright wrote: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; 1; a.next, b.next) { if (a.empty) {

Re: goto

2009-02-05 Thread Derek Parnell
On Thu, 05 Feb 2009 19:37:35 -0800, Andrei Alexandrescu wrote: I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (; !a.empty; a.next, b.next) {

Re: Lambda syntax, etc

2009-02-05 Thread Chris Nicholson-Sauls
Robert Fraser wrote: BCS wrote: Reply to Yigal, Personally I prefer to have syntax for blocks like Ruby/smalltalk. given the following example function: int func(int a, delegate int(int) dg) { .. } // call func with [something in this spirit is my favorite]: func(someInt) { | int a, int b |

Re: goto

2009-02-05 Thread Lionello Lunesu
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:gmgb9u$qk...@digitalmars.com... I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (;

Re: goto

2009-02-05 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:gmgb9u$qk...@digitalmars.com... I was coding a simple Euclidean distance function with limit: double euclideanDistance(Range)(Range a, Range b, double limit) { limit *= limit; double result = 0; for (;

Re: goto

2009-02-05 Thread Christof Schardt
In the web-source of hius adventure-game http://www-cs-staff.stanford.edu/~uno/programs/advent.w.gz Knuth comments (resp. warns the reader): By the way, if you don't like |goto| statements, don't read this. (And don't read any other programs that simulate multistate systems.) Don Knuth,

Re: switch off GC?

2009-02-05 Thread Kagamin
Weed Wrote: I just would like that D could substitute C++ completely in all applications... D can do it. Phobos and Tango - can't.

Re: switch off GC?

2009-02-05 Thread Lutger
Weed wrote: I just would like that D could substitute C++ completely in all applications... D2 can easily, but it seems there is not so much interest if measured by what library code is available. D1 can do too, but if you want to use raii for memory management D2 has better facilities. In

Re: A array bug?

2009-02-05 Thread taqya
Chris Nicholson-Sauls Wrote: Stewart Gordon wrote: Ellery Newcomer wrote: taqya wrote: snip char[] a = a.dup; char[] b = b.dup; writefln(a + b); //Error: Array operations not implemented snip If so, the error informs you why you can't do that. snip Except that

Re: A array bug?

2009-02-05 Thread Stewart Gordon
Chris Nicholson-Sauls wrote: snip Suggest: Array operation 'OP' not implemented for type T[]. Where OP is here '+' and T is here char. It doesn't quite work like that. AIUI the only supported way of using array operations is assigning the result to an array slice, which this isn't. And

Re: A array bug?

2009-02-05 Thread Chris Nicholson-Sauls
Stewart Gordon wrote: Chris Nicholson-Sauls wrote: snip Suggest: Array operation 'OP' not implemented for type T[]. Where OP is here '+' and T is here char. It doesn't quite work like that. AIUI the only supported way of using array operations is assigning the result to an array slice,

[Issue 2643] -o- switch breaks semantic analysis

2009-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2643 --- Comment #2 from ma...@pochta.ru 2009-02-05 04:16 --- that's not a bug if you look at it a different way; -o- is to allow generating ddoc output without having to run everything. not everything, just object file generation

Re: Russian and other national languages support

2009-02-05 Thread Kagamin
zorran Wrote: in Delphi, C#, and many C++ compilers - All OK! Why? it can reduce popularity D! Russian text not needs two-byte code-page! its not Chinese! In C# all strings are two-byte encoded (UTF-16), in C++ L... strings are (usually) two-byte encoded, Delphi is a legacy technology, but

[Issue 2643] -o- switch breaks semantic analysis

2009-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2643 --- Comment #3 from shro8...@vandals.uidaho.edu 2009-02-05 11:58 --- At some point I home that DMD will actual do more semantic stuff under -o- as then I can get DDoc output for generated code. However even then DMD should only do

[Issue 2643] -o- switch breaks semantic analysis

2009-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2643 --- Comment #4 from to...@famolsen.dk 2009-02-05 12:07 --- DMD actually does quite a bit of error handling during code generation. I've been hit by this several times in LDC, where it means that quite a lot of the time, you can't be

D2 phobos BigInt bug

2009-02-05 Thread ZHOU Zhenyu
BigInt b = 10; foreach( i; 1..20 ){ b*=10; writeln(b*b); } system: Windows CPU: Intel Core2 Duo T7250 2.00GHz result: 1 100 1 100 1 100 81553255926290448384 100