Re: What is the compilation model of D?

2012-07-25 Thread Jacob Carlborg
On 2012-07-25 04:00, Nick Sabalausky wrote: But that's just the DMD compiler itself. Instead of using DMD directly, there's a better modern trick that's generally preferred: RDMD. If you use rdmd to compile (instead of dmd), you *just* give it your *one* main source file (typically the one with

Re: of "Conditional Implementation" vs "Assertive Input Validation"

2012-07-25 Thread Jacob Carlborg
On 2012-07-25 07:30, xenon325 wrote: How is it different from creating a template for every condition ? ;) As long as you actually _do_ that, it might not be so much different. Honestly, I don't quite get what's the difference between current template constraints and ones you're proposing:

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 08:44:03 +0200 Gour wrote: > On Wed, 25 Jul 2012 00:12:23 -0400 > Nick Sabalausky wrote: > > > Anyone know of a NG/email client, available on Win (preferably cross > > platform - I do want to switch to Lin eventually) that isn't shit? > > I use Claws-mail for many years wit

Re: Computed gotos on Reddit

2012-07-25 Thread Walter Bright
On 7/24/2012 11:46 PM, Dmitry Olshansky wrote: It's pc => address because one can first preprocess all of byte code doing opcode => address rewrites. But you can't do it unless taking address of labels is possible. All right, that's the piece that was missing. I suppose it is possible for the

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Gour
On Wed, 25 Jul 2012 03:27:30 -0400 Nick Sabalausky wrote: > Thanks for the tip (I didn't know you could set up an external editor > for Claws), although...ummm...how to put this without reigniting the > age-old editor wars...Let's just say I'm not really much of a vi kinda > guy ;) Ok, use Emacs

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Paulo Pinto
On Wednesday, 25 July 2012 at 04:12:36 UTC, Nick Sabalausky wrote: Couple months ago I came across ClawsMail which, at first, seemed to actually be good enough to finally pull me away from Outlook Express. Which was nice because I was getting really tired of OE's issues: lack of spellcheck, can

Re: What is the compilation model of D?

2012-07-25 Thread Russel Winder
On Tue, 2012-07-24 at 20:35 -0700, Jonathan M Davis wrote: […] > I find it shocking that anyone would consider 15 seconds slow to compile for > a > large program. Yes, D's builds are lightning fast in general, and 15 seconds > is probably a longer build, but calling 15 seconds "slow-to-compile"

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 11:37, Walter Bright wrote: On 7/24/2012 11:46 PM, Dmitry Olshansky wrote: It's pc => address because one can first preprocess all of byte code doing opcode => address rewrites. But you can't do it unless taking address of labels is possible. All right, that's the piece that was m

Re: Computed gotos on Reddit

2012-07-25 Thread Don Clugston
On 25/07/12 09:37, Walter Bright wrote: On 7/24/2012 11:46 PM, Dmitry Olshansky wrote: It's pc => address because one can first preprocess all of byte code doing opcode => address rewrites. But you can't do it unless taking address of labels is possible. All right, that's the piece that was mi

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 11:51, Don Clugston wrote: On 25/07/12 09:37, Walter Bright wrote: On 7/24/2012 11:46 PM, Dmitry Olshansky wrote: It's pc => address because one can first preprocess all of byte code doing opcode => address rewrites. But you can't do it unless taking address of labels is possible.

Re: What is the compilation model of D?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 08:54:24 Russel Winder wrote: > On Tue, 2012-07-24 at 20:35 -0700, Jonathan M Davis wrote: > […] > > > I find it shocking that anyone would consider 15 seconds slow to compile > > for a large program. Yes, D's builds are lightning fast in general, and > > 15 seconds is

Re: What is the compilation model of D?

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 08:54:24 +0100 Russel Winder wrote: > On Tue, 2012-07-24 at 20:35 -0700, Jonathan M Davis wrote: > […] > > I find it shocking that anyone would consider 15 seconds slow to > > compile for a large program. Yes, D's builds are lightning fast in > > general, and 15 seconds is pro

Re: Computed gotos on Reddit

2012-07-25 Thread Don Clugston
On 25/07/12 09:55, Dmitry Olshansky wrote: On 25-Jul-12 11:51, Don Clugston wrote: On 25/07/12 09:37, Walter Bright wrote: On 7/24/2012 11:46 PM, Dmitry Olshansky wrote: It's pc => address because one can first preprocess all of byte code doing opcode => address rewrites. But you can't do it u

Re: Take and website

2012-07-25 Thread Christophe Travert
Russel Winder , dans le message (digitalmars.D:173102), a écrit : > > --=-aHxuwwF1pyt7fCGYFQXP > Content-Type: text/plain; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > > On Tue, 2012-07-24 at 13:56 -0400, Andrei Alexandrescu wrote: > [=E2=80=A6] >> The example is: >>=20 >> int[

Re: Rank The D Programming Language

2012-07-25 Thread Alix Pexton
On 25/07/2012 04:43, Nick Sabalausky wrote: On Tue, 24 Jul 2012 21:35:24 -0500 Caligo wrote: Just found this: http://hammerprinciple.com/therighttool/items/d/c-2 Jesus, that's one of the most poorly implemented sites I've ever seen. I tried going through the questions (after switching to my

Re: std.random and mersenne twister

2012-07-25 Thread Andrea Fontana
He want docs, here he can understand how it works. Some good params for CMWC can be found here and was provided by G. Marsaglia: http://blacklen.wordpress.com/2011/05/15/prng-3-complementary-multiply-with-carry/ A code for java "you're free to use this code as you want" can be find here: http://

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Alix Pexton
On 25/07/2012 05:12, Nick Sabalausky wrote: [snip] Anyone know of a NG/email client, available on Win (preferably cross platform - I do want to switch to Lin eventually) that isn't shit? Once upon a time, I used Emacs over telnet to check mail/news on my uni account from my parents place wher

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Alix Pexton
On 25/07/2012 05:12, Nick Sabalausky wrote: [snip] Anyone know of a NG/email client, available on Win (preferably cross platform - I do want to switch to Lin eventually) that isn't shit? Once upon a time, I used Emacs over telnet to check mail/news on my uni account from my parents place wher

Re: Rank The D Programming Language

2012-07-25 Thread Alix Pexton
On 25/07/2012 04:43, Nick Sabalausky wrote: On Tue, 24 Jul 2012 21:35:24 -0500 Caligo wrote: Just found this: http://hammerprinciple.com/therighttool/items/d/c-2 Jesus, that's one of the most poorly implemented sites I've ever seen. I tried going through the questions (after switching to my

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Alix Pexton
On 25/07/2012 09:30, Alix Pexton wrote: On 25/07/2012 05:12, Nick Sabalausky wrote: [snip] Anyone know of a NG/email client, available on Win (preferably cross platform - I do want to switch to Lin eventually) that isn't shit? Once upon a time, I used Emacs over telnet to check mail/news on m

Re: Study: build times for D programs

2012-07-25 Thread David Nadlinger
On Tuesday, 24 July 2012 at 23:55:03 UTC, Joseph Rushton Wakeling wrote: For a rough comparison: […] Even for a rough comparison of compile times, you need to include compiler switches used. For example, the difference between Clang -O0 vs. Clang -O3 is usually huge. David

Re: std.random and mersenne twister

2012-07-25 Thread monarch_dodra
Thanks for the links, and the info regarding copyrights. I'll stick with my decision to *start* with Lagged Fibonacci. I'll let the experience of that decide for me if I want to tackle CMWC or not (provided I even succeed with LF). PS: I like the name Marsaglia Tornado, but the initials are mt

Re: std.random and mersenne twister

2012-07-25 Thread Andrea Fontana
Of course it was a joke :) Il giorno mer, 25/07/2012 alle 10.41 +0200, monarch_dodra ha scritto: > PS: I like the name Marsaglia Tornado, but the initials are mt...

Re: [OT] Good^H^H^H^HAcceptable NG/email client?

2012-07-25 Thread Walter Bright
On 7/24/2012 9:12 PM, Nick Sabalausky wrote: Thunderbird's gone nowhere but downhill last number of years, just like Firefox. I've been sorely tried by TB's calendar feature. 2 times now I've tediously entered in my events info, only to have next time I "upgrade" TB it blows away the calenda

Struct no-arg constructor?

2012-07-25 Thread monarch_dodra
According to TDPL, the rationale for structs not having default constructors is "T.init", were T.init is defined as: *A static, known at compile time, mem-copyable value. *The value that gets mem-copied into structs before the constructors are called *The value that gets mem-copied into structs

Re: Struct no-arg constructor?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 11:34:12 monarch_dodra wrote: > According to TDPL, the rationale for structs not having default > constructors is "T.init", were T.init is defined as: > *A static, known at compile time, mem-copyable value. > *The value that gets mem-copied into structs before the > cons

Re: Computed gotos on Reddit

2012-07-25 Thread Walter Bright
On 7/25/2012 12:51 AM, Don Clugston wrote: so that there is no lookup table, just a multiply. Rethinking your idea a bit... Suppose the switch jump_address[] array was really an array of hardcoded jmp instructions, 5 bytes each: jmp_table: jmp Lcase1; jmp Lcase2; jmp Lcase3;

Re: Study: build times for D programs

2012-07-25 Thread Joseph Rushton Wakeling
On 25/07/12 09:37, David Nadlinger wrote: On Tuesday, 24 July 2012 at 23:55:03 UTC, Joseph Rushton Wakeling wrote: For a rough comparison: […] Even for a rough comparison of compile times, you need to include compiler switches used. For example, the difference between Clang -O0 vs. Clang -O3

Re: Struct no-arg constructor?

2012-07-25 Thread monarch_dodra
On Wednesday, 25 July 2012 at 09:51:49 UTC, Jonathan M Davis wrote: If you want to be able to do S(), then declare a static opCall for S which returns an S constructed in the way that you want. struct S { static S opCall() { //do whatever you do return s; } } auto s

Re: Struct no-arg constructor?

2012-07-25 Thread Simen Kjaeraas
On Wed, 25 Jul 2012 12:30:56 +0200, monarch_dodra wrote: I read TDPL back to back like 5 times before posting this, but it never mentions opCall. I just checked the index right now, it is not in there. Is this new? Hardly. Once upon a time, in the bad old days, structs didn't have constr

Re: Struct no-arg constructor?

2012-07-25 Thread deadalnix
Le 25/07/2012 12:30, monarch_dodra a écrit : On Wednesday, 25 July 2012 at 09:51:49 UTC, Jonathan M Davis wrote: If you want to be able to do S(), then declare a static opCall for S which returns an S constructed in the way that you want. struct S { static S opCall() { //do whatever you do retu

Re: Struct no-arg constructor?

2012-07-25 Thread deadalnix
Le 25/07/2012 11:51, Jonathan M Davis a écrit : On Wednesday, July 25, 2012 11:34:12 monarch_dodra wrote: According to TDPL, the rationale for structs not having default constructors is "T.init", were T.init is defined as: *A static, known at compile time, mem-copyable value. *The value that get

Re: Struct no-arg constructor?

2012-07-25 Thread monarch_dodra
On Wednesday, 25 July 2012 at 10:40:22 UTC, deadalnix wrote: Static opCall isn't a solution. You can't new on it. And it seems weird that you can disable something that don't possibly exists in the first place. This topic comes back again and again on the NG, it have to be considered. If I

Re: Troubles with immutable arrays

2012-07-25 Thread Don Clugston
On 23/07/12 15:29, bearophile wrote: After a discussion in D.learn started by someone else, after a suggestion of mine Timon Gehr has added a bug report: http://d.puremagic.com/issues/show_bug.cgi?id=8400 But the bug was fixed in the opposite way of what I was thinking. The problem was that th

Re: Computed gotos on Reddit

2012-07-25 Thread Don Clugston
On 25/07/12 12:11, Walter Bright wrote: On 7/25/2012 12:51 AM, Don Clugston wrote: so that there is no lookup table, just a multiply. Rethinking your idea a bit... Suppose the switch jump_address[] array was really an array of hardcoded jmp instructions, 5 bytes each: jmp_table: jmp

Re: of "Conditional Implementation" vs "Assertive Input Validation"

2012-07-25 Thread xenon325
On Wednesday, 25 July 2012 at 07:23:51 UTC, Jacob Carlborg wrote: On 2012-07-25 07:30, xenon325 wrote: For this to be useful you really need to create a template for every condition [snip] With my approach the constraint will have a name which should result in a lot better error messages. H

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 15:14, Don Clugston wrote: On 25/07/12 12:11, Walter Bright wrote: On 7/25/2012 12:51 AM, Don Clugston wrote: so that there is no lookup table, just a multiply. Rethinking your idea a bit... Suppose the switch jump_address[] array was really an array of hardcoded jmp instruction

Re: Help me!

2012-07-25 Thread Bernard Helyer
On Wednesday, 25 July 2012 at 06:01:37 UTC, Katayama Hirofumi MZ wrote: https://dl.dropbox.com/sh/yeu7fx8tgebf25x/CJupc40pKq/wonders.zip?dl=1 sqlext.d(361): Error: undefined identifier SQL_TYPE_DATE, did you mean variable SQL_C_TYPE_DATE? sqlext.d(362): Error: undefined identifier SQL_TYPE_T

Re: What is the compilation model of D?

2012-07-25 Thread Andrej Mitrovic
On 7/25/12, Jonathan M Davis wrote: > I find it shocking that anyone would consider 15 seconds slow to compile for > a large program. It's not shocking if you're used to a fast edit-compile-run cycle which takes a few seconds and then starts to slow down considerably when you involve more and mor

Re: Study: build times for D programs

2012-07-25 Thread Isaac Gouy
Walter Bright Wrote: -snip- > (Back in the olden days, when men were men and and the sun revolved about the > earth, everyone raved about Borland's compilation speed. In tests I ran > myself, > I found that it was fast, right up until you hit a certain size of source > code, > maybe about 500

Re: Study: build times for D programs

2012-07-25 Thread Isaac Gouy
Andrei Alexandrescu Wrote: -snip- > Nevertheless there's value in the shootout. Yes, if someone is up for it > that would be great. The Python measurement scripts are here -- http://shootout.alioth.debian.org/download/bencher.zip The whole ball of wax is available for download as a nightly sna

Re: Computed gotos on Reddit

2012-07-25 Thread David Piepgrass
OK I've taken your comments into account. Now I think I finally got it right: mov ecx, [ebx] ; ecx = code[pc] inc ebx ; pc ++ jmp ecx ; goto code[pc], as ecx is already a pointer Nope, ecx is an opcode, not a pointer. You need another indirection. Man this has been frustrating to read. I und

Re: Study: build times for D programs

2012-07-25 Thread Andrei Alexandrescu
On 7/25/12 4:37 AM, David Nadlinger wrote: On Tuesday, 24 July 2012 at 23:55:03 UTC, Joseph Rushton Wakeling wrote: For a rough comparison: […] Even for a rough comparison of compile times, you need to include compiler switches used. For example, the difference between Clang -O0 vs. Clang -O3

Re: What is the compilation model of D?

2012-07-25 Thread David Piepgrass
I find it shocking that anyone would consider 15 seconds slow to compile for a large program. Yes, D's builds are lightning fast in general, and 15 seconds is probably a longer build, but calling 15 seconds "slow-to-compile" just about blows my mind. 15 seconds for a large program is _fast_.

Re: Semantics of postfix ops for classes

2012-07-25 Thread Don Clugston
On 20/07/12 17:12, Andrej Mitrovic wrote: According to TDPL postfix operators are rewritten to call prefix operators, e.g. on this call for some user-type object named a: auto b = a++; // is converted to: auto b = ((ref x) { auto t = x; ++x; return t; })(a); But I don't see how this is reasona

Re: Semantics of postfix ops for classes

2012-07-25 Thread Christophe Travert
Don Clugston , dans le message (digitalmars.D:173192), a écrit : > The question really is, do postfix ++ and -- make sense for reference > types? Arguably not. From a theoretical sense, the existing behaviour > does make sense, but in practice, every time it is used, it is probably > a bug. > >

Re: What is the compilation model of D?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 17:35:09 David Piepgrass wrote: > > I find it shocking that anyone would consider 15 seconds slow > > to compile for a > > large program. Yes, D's builds are lightning fast in general, > > and 15 seconds > > is probably a longer build, but calling 15 seconds > > "slow-to

Re: What is the compilation model of D?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 14:57:23 Andrej Mitrovic wrote: > Hell I can't believe how outdated the compiler technology is. I can > play incredibly realistic and interactive 3D games in real-time with > practically no input lag, but I have to wait a dozen seconds for a > tool to convert lines of te

Re: Study: build times for D programs

2012-07-25 Thread ixid
beautiful ideas Andrei developed on policy class design Where would one find these ideas?

Re: Study: build times for D programs

2012-07-25 Thread Ali Çehreli
On 07/25/2012 09:46 AM, ixid wrote: beautiful ideas Andrei developed on policy class design Where would one find these ideas? There are some papers at Andrei's site: http://erdani.com/index.php/articles/ Search for "policy" there. Policy based design is the main topic in Andrei's book,

Re: Computed gotos on Reddit

2012-07-25 Thread Walter Bright
On 7/25/2012 4:26 AM, Dmitry Olshansky wrote: On 25-Jul-12 15:14, Don Clugston wrote: On 25/07/12 12:11, Walter Bright wrote: On 7/25/2012 12:51 AM, Don Clugston wrote: so that there is no lookup table, just a multiply. Rethinking your idea a bit... Suppose the switch jump_address[] array w

phobos breakage... why?

2012-07-25 Thread Adam D. Ruppe
I was just playing with the beta, and got this among the sea of errors: arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == b",ubyte[],string).indexOf is deprecated Why was that taken out? If you ask me, the root cause of D's perceived stability problem has little to do with bugs. I

Re: Study: build times for D programs

2012-07-25 Thread Walter Bright
On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: Yes, and both debug and release build times are important. Optimized build time comparisons are less relevant - are you really willing to trade off faster optimization times for less optimization? I think it's more the time of the edit-compile

Re: Study: build times for D programs

2012-07-25 Thread Simen Kjaeraas
On Wed, 25 Jul 2012 18:46:58 +0200, ixid wrote: beautiful ideas Andrei developed on policy class design Where would one find these ideas? http://www.amazon.com/Modern-Design-Generic-Programming-Patterns/dp/0201704315 -- Simen

Re: Rank The D Programming Language

2012-07-25 Thread Walter Bright
On 7/24/2012 8:58 PM, Craig Dillabaugh wrote: I think C++ got 76% of the vote on this one. Why would you ever write something in C++ with the intent of rewriting it in something else later? I don't get that, either.

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 21:19, Walter Bright wrote: On 7/25/2012 4:26 AM, Dmitry Olshansky wrote: On 25-Jul-12 15:14, Don Clugston wrote: On 25/07/12 12:11, Walter Bright wrote: On 7/25/2012 12:51 AM, Don Clugston wrote: so that there is no lookup table, just a multiply. Rethinking your idea a bit...

Re: phobos breakage... why?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 19:24:05 Adam D. Ruppe wrote: > I was just playing with the beta, and got this among the > sea of errors: > > arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == > b",ubyte[],string).indexOf is deprecated > > > Why was that taken out? If you ask me, the root

Re: Rank The D Programming Language

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 10:26:53 Walter Bright wrote: > On 7/24/2012 8:58 PM, Craig Dillabaugh wrote: > > I think C++ got 76% of the vote on this one. Why would you ever > > write something in C++ with the intent of rewriting it in > > something else later? > > I don't get that, either. Maybe

Re: phobos breakage... why?

2012-07-25 Thread deadalnix
Le 25/07/2012 19:24, Adam D. Ruppe a écrit : I was just playing with the beta, and got this among the sea of errors: arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == b",ubyte[],string).indexOf is deprecated Why was that taken out? If you ask me, the root cause of D's perceived sta

Re: phobos breakage... why?

2012-07-25 Thread dnewbie
On Wednesday, 25 July 2012 at 17:24:06 UTC, Adam D. Ruppe wrote: I was just playing with the beta, and got this among the sea of errors: arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == b",ubyte[],string).indexOf is deprecated Why was that taken out? If you ask me, the root caus

Re: Computed gotos on Reddit

2012-07-25 Thread Walter Bright
On 7/25/2012 10:29 AM, Dmitry Olshansky wrote: Is it possible you could code it up and test it using inline asm? Mm... I could try. So the trick is to add say this: Dispatch: asm{ ... lea EAX,jmp_table[EBX][EBX*4] jmp EAX jmp_table: jmp Lcase1; jmp Lcase2;

Re: Study: build times for D programs

2012-07-25 Thread Andrei Alexandrescu
On 7/25/12 1:24 PM, Walter Bright wrote: On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: Yes, and both debug and release build times are important. Optimized build time comparisons are less relevant - are you really willing to trade off faster optimization times for less optimization? I thin

Re: phobos breakage... why?

2012-07-25 Thread David Gileadi
On 7/25/12 10:36 AM, dnewbie wrote: One of my programs stopped working in 2.060. It is *really* annoying when I see the message 'X is deprecated'. It might be nicer if you could say: deprecated("Use countUntil instead.") {...}

Re: phobos breakage... why?

2012-07-25 Thread Andrej Mitrovic
On 7/25/12, Jonathan M Davis wrote: > As the documentation says, the > problem > was that it was just too easily confused with std.string.indexOf which is > subtlely different. I've always wondered how it's different? Using countUntil on strings seems to work ok for me, or should I be using strin

Multi-threaded GUI

2012-07-25 Thread Gor Gyolchanyan
Hi! I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna have a Window class, which creates a window and listens to its messages in a separate thread when constructed. This will allow me to write a main function like this: void main() { Window w = new Window; w.move(1

Re: phobos breakage... why?

2012-07-25 Thread bearophile
dnewbie: One of my programs stopped working in 2.060. It is *really* annoying when I see the message 'X is deprecated'. I have to maintain a good amount of D2 code now, and it's keeping around broken or badly designed stuff is far annoying. Bye, bearophile

Re: phobos breakage... why?

2012-07-25 Thread Walter Bright
On 7/25/2012 10:24 AM, Adam D. Ruppe wrote: Why was that taken out? If you ask me, the root cause of D's perceived stability problem has little to do with bugs. It is 95% phobos devs removing functionality at random. Why do we keep doing this? For a relevant discussion: http://d.puremagic.com/

Re: Multi-threaded GUI

2012-07-25 Thread Simon
On 25/07/2012 19:34, Gor Gyolchanyan wrote: Hi! I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna have a Window class, which creates a window and listens to its messages in a separate thread when constructed. This will allow me to write a main function like this: void ma

Re: phobos breakage... why?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 20:14:06 Andrej Mitrovic wrote: > On 7/25/12, Jonathan M Davis wrote: > > As the documentation says, the > > problem > > was that it was just too easily confused with std.string.indexOf which is > > subtlely different. > > I've always wondered how it's different? Using

Re: phobos breakage... why?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 10:55:53 David Gileadi wrote: > On 7/25/12 10:36 AM, dnewbie wrote: > > One of my programs stopped working in 2.060. It is *really* annoying > > when I see the message 'X is deprecated'. > > It might be nicer if you could say: > > deprecated("Use countUntil instead.")

Re: Study: build times for D programs

2012-07-25 Thread Walter Bright
On 7/25/2012 10:50 AM, Andrei Alexandrescu wrote: On 7/25/12 1:24 PM, Walter Bright wrote: On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: Yes, and both debug and release build times are important. Optimized build time comparisons are less relevant - are you really willing to trade off faste

Re: phobos breakage... why?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 19:36:27 dnewbie wrote: > On Wednesday, 25 July 2012 at 17:24:06 UTC, Adam D. Ruppe wrote: > > I was just playing with the beta, and got this among the > > sea of errors: > > > > arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == > > b",ubyte[],string).indexO

Re: Multi-threaded GUI

2012-07-25 Thread Gor Gyolchanyan
On Wed, Jul 25, 2012 at 10:50 PM, Simon wrote: > On 25/07/2012 19:34, Gor Gyolchanyan wrote: > >> Hi! >> >> I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna >> have a Window class, which creates a window and listens to its messages >> in a separate thread when constructed.

Re: phobos breakage... why?

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 11:52:51 Walter Bright wrote: > On 7/25/2012 10:24 AM, Adam D. Ruppe wrote: > > Why was that taken out? If you ask me, the root cause of D's > > perceived stability problem has little to do with bugs. It > > is 95% phobos devs removing functionality at random. Why do we

Re: Multi-threaded GUI

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 22:34, Gor Gyolchanyan wrote: Hi! I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna have a Window class, which creates a window and listens to its messages in a separate thread when constructed. This will allow me to write a main function like this: void mai

Re: Multi-threaded GUI

2012-07-25 Thread Gor Gyolchanyan
On Wed, Jul 25, 2012 at 11:18 PM, Dmitry Olshansky wrote: > On 25-Jul-12 22:34, Gor Gyolchanyan wrote: > >> Hi! >> >> I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna >> have a Window class, which creates a window and listens to its messages >> in a separate thread when con

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 21:47, Walter Bright wrote: On 7/25/2012 10:29 AM, Dmitry Olshansky wrote: Is it possible you could code it up and test it using inline asm? ... Any tips on which spare registers to use (I guess ecx is no go, as there is 'this' pointer present) ? I wouldn't worry about it. EAX

Re: What is the compilation model of D?

2012-07-25 Thread David Piepgrass
Thanks for the very good description, Nick! So if I understand correctly, if 1. I use an "auto" return value or suchlike in a module Y.d 2. module X.d calls this function 3. I call "dmd -c X.d" and "dmd -c Y.d" as separate steps Then the compiler will have to fully parse Y twice and fully anal

Re: Computed gotos on Reddit

2012-07-25 Thread Walter Bright
On 7/25/2012 12:52 PM, Dmitry Olshansky wrote: On 25-Jul-12 21:47, Walter Bright wrote: On 7/25/2012 10:29 AM, Dmitry Olshansky wrote: Is it possible you could code it up and test it using inline asm? ... Any tips on which spare registers to use (I guess ecx is no go, as there is 'this' poi

Re: What is the compilation model of D?

2012-07-25 Thread Roman D. Boiko
On Wednesday, 25 July 2012 at 19:54:31 UTC, David Piepgrass wrote: It keeps diving deeper and deeper to find anything it can "start" with. One it finds that, it'll just build everything back up in whatever order is necessary. I hope someone can give more details about this. TDPL chapter 11

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 25-Jul-12 23:58, Walter Bright wrote: On 7/25/2012 12:52 PM, Dmitry Olshansky wrote: On 25-Jul-12 21:47, Walter Bright wrote: On 7/25/2012 10:29 AM, Dmitry Olshansky wrote: Is it possible you could code it up and test it using inline asm? ... Any tips on which spare registers to use (I

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
On 26-Jul-12 00:06, Dmitry Olshansky wrote: On 25-Jul-12 23:58, Walter Bright wrote: On 7/25/2012 12:52 PM, Dmitry Olshansky wrote: On 25-Jul-12 21:47, Walter Bright wrote: On 7/25/2012 10:29 AM, Dmitry Olshansky wrote: Is it possible you could code it up and test it using inline asm? ...

Re: Computed gotos on Reddit

2012-07-25 Thread Ali Çehreli
On 07/25/2012 01:06 PM, Dmitry Olshansky wrote: > On 25-Jul-12 23:58, Walter Bright wrote: >> I was afraid of that. You may have to approximate it by loading the >> address of L_jumptable into a register and adding it in instead of using >> the addressing mode. > like this ? > mov EDX, L_jumpable

Re: What is the compilation model of D?

2012-07-25 Thread David Piepgrass
If you use rdmd to compile (instead of dmd), you *just* give it your *one* main source file (typically the one with your "main()" function). This file must be the *last* parameter passed to rdmd: $rdmd --build-only (any other flags) main.d Then, RDMD will figure out *all* of the source files

Re: What is the compilation model of D?

2012-07-25 Thread David Piepgrass
I hope someone can give more details about this. TDPL chapter 11 "Scaling Up". That's where I was looking. As I said already, TDPL does not explain how compilation works, especially not anything about the low-level semantic analysis which has me most curious.

Re: What is the compilation model of D?

2012-07-25 Thread Roman D. Boiko
On Wednesday, 25 July 2012 at 20:25:19 UTC, David Piepgrass wrote: I hope someone can give more details about this. TDPL chapter 11 "Scaling Up". That's where I was looking. As I said already, TDPL does not explain how compilation works, especially not anything about the low-level semantic

Re: build Ldc2 for win xp 32 bit Error

2012-07-25 Thread Rainer Schuetze
On 25.07.2012 06:28, huynh van sen wrote: Please build LDC2 for windowXP with visual studio 2010 I try compling on windows XP 32 bit .But I get Error Please Help me ! C:/ldcenv/build-ldc2/ldc/vcbuild/ldfpu.asm(33): error A2034: must be in segment nt block [C:\ldcenv\build-ldc2\LDCShared

Re: Study: build times for D programs

2012-07-25 Thread Rainer Schuetze
On 25.07.2012 19:24, Walter Bright wrote: On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: Yes, and both debug and release build times are important. Optimized build time comparisons are less relevant - are you really willing to trade off faster optimization times for less optimization? I t

Re: Multi-threaded GUI

2012-07-25 Thread Kagamin
On Wednesday, 25 July 2012 at 18:50:51 UTC, Simon wrote: You have to be very, very careful with trying to do multi threading w/ windoze windows. Try doing a google search on it, and the advice is invariably: don't do multi threaded windows. Everybody including people famous for their in-depth w

Re: What is the compilation model of D?

2012-07-25 Thread Peter Alexander
On Wednesday, 25 July 2012 at 08:06:23 UTC, Nick Sabalausky wrote: Yea, my understanding is that full-build times measured in days are (or used to be, don't know if they still are) also typical of high-budget C++-based videogames. You must be thinking of full data rebuilds, not code recompile

Re: Multi-threaded GUI

2012-07-25 Thread Kagamin
On Wednesday, 25 July 2012 at 19:25:09 UTC, Gor Gyolchanyan wrote: Yes. The idea was to programmatically operate on UI objects declaratively. For instance, create a window, change its size, show it, draw on it and never worry about "applying" (in the form of pumping the messages). Haha, show

Re: Study: build times for D programs

2012-07-25 Thread Andrei Alexandrescu
On 7/25/12 4:53 PM, Rainer Schuetze wrote: On 25.07.2012 19:24, Walter Bright wrote: On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: Yes, and both debug and release build times are important. Optimized build time comparisons are less relevant - are you really willing to trade off faster op

Re: What is the compilation model of D?

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 23:20:04 +0200 "Peter Alexander" wrote: > On Wednesday, 25 July 2012 at 08:06:23 UTC, Nick Sabalausky wrote: > > Yea, my understanding is that full-build times measured in days > > are (or > > used to be, don't know if they still are) also typical of > > high-budget > > C++-

Re: What is the compilation model of D?

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 22:18:37 +0200 "David Piepgrass" wrote: > > I meant to ask, why would it recompile *all* of the source files > if only one changed? Seems like it only should recompile the > changed ones (but still compile them together as a unit.) Is it > because of bugs (e.g. the template

Re: Study: build times for D programs

2012-07-25 Thread Jonathan M Davis
On Wednesday, July 25, 2012 22:53:08 Rainer Schuetze wrote: > On 25.07.2012 19:24, Walter Bright wrote: > > On 7/25/2012 8:13 AM, Andrei Alexandrescu wrote: > >> Yes, and both debug and release build times are important. > > > > Optimized build time comparisons are less relevant - are you really >

Re: Computed gotos on Reddit

2012-07-25 Thread Dmitry Olshansky
std\regex.d(5118): Error: undefined identifier 'L_jumptable' I was afraid of that. You may have to approximate it by loading the address of L_jumptable into a register and adding it in instead of using the addressing mode. I failed to load it in any register or interact with it in any way. I

Re: What is the compilation model of D?

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 21:54:29 +0200 "David Piepgrass" wrote: > Thanks for the very good description, Nick! So if I understand > correctly, if > > 1. I use an "auto" return value or suchlike in a module Y.d > 2. module X.d calls this function > 3. I call "dmd -c X.d" and "dmd -c Y.d" as separate

Re: Study: build times for D programs

2012-07-25 Thread Nick Sabalausky
On Wed, 25 Jul 2012 17:31:10 -0400 Andrei Alexandrescu wrote: > On 7/25/12 4:53 PM, Rainer Schuetze wrote: > > > > The "edit-compile-debug loop" is a use case where the D module > > system does not shine so well. Compare build times when only > > editing a single source file: > > With the help of

Re: Study: build times for D programs

2012-07-25 Thread Andrej Mitrovic
On 7/25/12, Jonathan M Davis wrote: > D should actually compile _faster_ if you compile everything at once - > certainly for smaller projects - since it then only has to lex and parse > each > module once. Incremental builds avoid having to fully compile each module > every time, but there's still

Re: Study: build times for D programs

2012-07-25 Thread Jonathan M Davis
On Thursday, July 26, 2012 00:34:07 Andrej Mitrovic wrote: > On 7/25/12, Jonathan M Davis wrote: > > D should actually compile _faster_ if you compile everything at once - > > certainly for smaller projects - since it then only has to lex and parse > > each > > module once. Incremental builds avoi

  1   2   >