Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-28 Thread Andrei Alexandrescu
Hello, Following the great work that Masahiro Nakagawa and SHOO offered to Phobos, we are inviting them to join the Phobos developer ranks. Once the community review of the proposed libraries concludes with approval, Masahiro and SHOO will be able to commit the modules to Phobos

Re: I made std.time for Phobos, please review my code.

2010-04-28 Thread SHOO
Steven Schveighoffer さんは書きました: On Tue, 27 Apr 2010 12:32:44 -0400, SHOO zan77...@nifty.com wrote: The internal storage is via integer, so if for example the integer number of milliseconds is desired, doing the calculation via converting to a floating point, and then scaling/truncating is

Re: I made std.time for Phobos, please review my code.

2010-04-28 Thread Sean Kelly
Steven Schveighoffer Wrote: Two other benefits to using 100NS increments: Windows FILETIME structures use that same resolution, and Tango uses that same resolution. So we have easy compatibility throughout many systems, while at the same time capturing a wide enough range to last for

Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf. Andrei

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Robert Clipsham
On 28/04/10 18:39, Andrei Alexandrescu wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf. Andrei The timing for

Built-in range type

2010-04-28 Thread Lionello Lunesu
Slices are one of D's greatest assets, and now in D2 we have the new foreach range statement: foreach(i; 0..22) { ... } Wouldn't it be nice to introduce a built-in for these int..int ranges? auto range = 0..22; auto slice = array[range]; foreach(i; range) {...} L.

Clojure Protocols expression problem

2010-04-28 Thread bearophile
A short video about Clojure 1.2 Protocols, created to solve the expression problem (that D doesn't solve well yet), they are like fake multimetods because they are like single dispatch :-) (So they need just a virtual table, that the JavaVM can optimize well): http://vimeo.com/11236603 By the

Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-28 Thread Andrei Alexandrescu
Hello, Following the great work that Masahiro Nakagawa and SHOO offered to Phobos, we are inviting them to join the Phobos developer ranks. Once the community review of the proposed libraries concludes with approval, Masahiro and SHOO will be able to commit the modules to Phobos

Re: Clojure Protocols expression problem

2010-04-28 Thread BCS
Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? -- ... IXOYE

Re: Clojure Protocols expression problem

2010-04-28 Thread Lutger
retard wrote: Wed, 28 Apr 2010 16:44:07 +, BCS wrote: Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? Learning the use of a search engine would help you greatly in your life:

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf. Andrei

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Ezneh
Andrei Alexandrescu Wrote: On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at

Debugging with GDB on Mac

2010-04-28 Thread Sean Kelly
Has anyone gotten this to work? I was looking into a bug today and gdb can't find a symbol table at all.

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 01:51 PM, Ezneh wrote: Andrei Alexandrescu Wrote: On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Lutger
Ezneh wrote: Andrei Alexandrescu Wrote: On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for

Re: Debugging with GDB on Mac

2010-04-28 Thread Robert Clipsham
On 28/04/10 19:55, Sean Kelly wrote: Has anyone gotten this to work? I was looking into a bug today and gdb can't find a symbol table at all. It worked for me when I used OS X aaagees ago (before dmd got support for it), using ldc. I can't comment on dmd here. I'd suggest if gdb can't find

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrej Mitrovic
Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf. Andrei There's an extra dot in your

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrej Mitrovic
Andrej Mitrovic Wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf.

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Ezneh
Lutger Wrote: Ezneh wrote: Andrei Alexandrescu Wrote: On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 02:21 PM, Andrej Mitrovic wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at

Re: Clojure Protocols expression problem

2010-04-28 Thread bearophile
According to the paper from Bjarne Stroustrup: http://www.research.att.com/~bs/multimethods.pdf this is a possible syntax D3 can use for the double dispatch: void foo(@virtual A a, @virtual B b) {} Bye, bearophile

Re: Loop invariant for a binary search

2010-04-28 Thread Lutger
What do you think about expressing the loop invariant as as nested pure function? something like this: body { Node* p = list_header; // pointer to the current Node Node* pp; // pointer to the precedent Node pure void checkInvariant(in Node* _pp, in

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrej Mitrovic
Andrei Alexandrescu Wrote: On 04/28/2010 02:21 PM, Andrej Mitrovic wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 03:14 PM, Andrej Mitrovic wrote: Andrei Alexandrescu Wrote: On 04/28/2010 02:21 PM, Andrej Mitrovic wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover

Re: Clojure Protocols expression problem

2010-04-28 Thread Ellery Newcomer
On 04/28/2010 01:15 PM, Lutger wrote: retard wrote: Wed, 28 Apr 2010 16:44:07 +, BCS wrote: Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? Learning the use of a search engine would

Re: Clojure Protocols expression problem

2010-04-28 Thread Lutger
bearophile wrote: According to the paper from Bjarne Stroustrup: http://www.research.att.com/~bs/multimethods.pdf this is a possible syntax D3 can use for the double dispatch: void foo(@virtual A a, @virtual B b) {} Bye, bearophile I have studied this paper a bit once, it's good. It

Re: Clojure Protocols expression problem

2010-04-28 Thread bearophile
Lutger: I would love to never see a visitor pattern again, it really sucks compared to multimethods. You are probably more qualified than me to answer the original question by BCS :-) Multimethods are easy to use and understand (if you don't mix them with too many other things). I think we

Re: Loop invariant for a binary search

2010-04-28 Thread bearophile
Lutger: What do you think about expressing the loop invariant as as nested pure function? It's good enough to satisfy the basic 'requirements' I have listed for a invariant syntax :-) Thank you for the idea. That D code that tests the invariant is long. This was part of the invariant in

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Walter Bright
Andrej Mitrovic wrote: ..then I'm buying an extra copy and sending it to a friend. Makes a great Mother's Day gift too!

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrej Mitrovic
Walter Bright Wrote: Andrej Mitrovic wrote: ..then I'm buying an extra copy and sending it to a friend. Makes a great Mother's Day gift too! Are you implying the D language book is fiction? :p

Re: Clojure Protocols expression problem

2010-04-28 Thread retard
Wed, 28 Apr 2010 13:22:53 -0400, bearophile wrote: BCS: Could you elaborate on what exactly the expression problem is? I am far from being an expert on such matters, I will do what I can to answer. It's not an esoteric problem, if you program with an OO language you have probably faced it

Re: Clojure Protocols expression problem

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 06:28 PM, retard wrote: Wed, 28 Apr 2010 13:22:53 -0400, bearophile wrote: BCS: Could you elaborate on what exactly the expression problem is? I am far from being an expert on such matters, I will do what I can to answer. It's not an esoteric problem, if you program with an

Re: Clojure Protocols expression problem

2010-04-28 Thread retard
Wed, 28 Apr 2010 18:34:44 -0500, Andrei Alexandrescu wrote: On 04/28/2010 06:28 PM, retard wrote: Wed, 28 Apr 2010 13:22:53 -0400, bearophile wrote: BCS: Could you elaborate on what exactly the expression problem is? I am far from being an expert on such matters, I will do what I can to

Re: Clojure Protocols expression problem

2010-04-28 Thread bearophile
Andrei Alexandrescu: I'm having trouble picturing the following scenario for a day in life. After your experience with Loki, what do you think about double dispatch in external functions in D3? Bye, bearophile

Re: Clojure Protocols expression problem

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 07:38 PM, bearophile wrote: Andrei Alexandrescu: I'm having trouble picturing the following scenario for a day in life. After your experience with Loki, what do you think about double dispatch in external functions in D3? Good question. Statistically, I'd say very few people

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Brian Hay
Andrej Mitrovic wrote: Walter Bright Wrote: Andrej Mitrovic wrote: ..then I'm buying an extra copy and sending it to a friend. Makes a great Mother's Day gift too! Are you implying the D language book is fiction? :p It's a cookbook of sorts ;-)

Re: Clojure Protocols expression problem

2010-04-28 Thread bearophile
Andrei Alexandrescu: Good question. Statistically, I'd say very few people are interested in double dispatch. I see. I'd like to know what CLOS (CLisp) users too think about this. (Generally if a feature become syntactically clean and nice, and it's written in the manual, surely more people

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Walter Bright
Brian Hay wrote: It's a cookbook of sorts ;-) In a way, it is. As the back cover says, it isn't just a dry list of features, it shows how to combine them to solve common problems in a very modern way.

Re: Clojure Protocols expression problem

2010-04-28 Thread Michel Fortin
On 2010-04-28 21:39:41 -0400, bearophile bearophileh...@lycos.com said: Andrei Alexandrescu: Good question. Statistically, I'd say very few people are interested in double dispatch. I see. I'd like to know what CLOS (CLisp) users too think about this. (Generally if a feature become

Re: Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 09:53 PM, Walter Bright wrote: Brian Hay wrote: It's a cookbook of sorts ;-) In a way, it is. As the back cover says, it isn't just a dry list of features, it shows how to combine them to solve common problems in a very modern way. Here's an unrelated piece of info that I'm

D2 std.thread and ThreadAddr

2010-04-28 Thread fawcett
Hi folks, Looking at D2's documentation on the std.thread module: http://www.digitalmars.com/d/2.0/phobos/std_thread.html ...there are several functions take a ThreadAddr value as an argument. But there are no documented functions, methods or properties one can use to obtain a ThreadAddr

[Issue 3241] Limitations of array operations with parenthesis

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3241 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4131] break does not work correctly with foreach and associative arrays

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4131 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2010-04-28 06:29:57 PDT --- Not really. Can you try recompiling dmd with debug symbols on? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #4 from Torsten globe13.trotte...@gmx.de 2010-04-28 07:55:34 PDT --- I have managed to compile dmd :) Here is the output i got from gdb: Program received signal SIGSEGV, Segmentation fault. 0x08180c2d in obj_comdat

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #6 from Walter Bright bugzi...@digitalmars.com 2010-04-28 08:27:33 PDT --- In backend/cc.h, try changing it from a short to an int. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #5 from Walter Bright bugzi...@digitalmars.com 2010-04-28 08:25:40 PDT --- Hmm. Sseg is a short. I wonder if it's overflowing? (Each function is put into its own seg.) -- Configure issuemail:

[Issue 4067] [CTFE] Code inside try-catch blocks is silently ignored

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4067 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

[Issue 4115] Reading few CPU flags from D code

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4115 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4132] New: Bug? Pointer advancing is possible.

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4132 Summary: Bug? Pointer advancing is possible. Product: D Version: future Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2

[Issue 3207] gdb: Push D patches upstream

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3207 --- Comment #14 from Leandro Lucarella llu...@gmail.com 2010-04-28 09:21:07 PDT --- Almost there: The patch is approved (good job!). http://permalink.gmane.org/gmane.comp.gdb.patches/57678 -- Configure issuemail:

[Issue 3389] gdb: using -gc is mandatory but not well documented

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3389 --- Comment #2 from Leandro Lucarella llu...@gmail.com 2010-04-28 09:31:36 PDT --- Seems reasonable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 Robert Clipsham rob...@octarineparrot.com changed: What|Removed |Added CC|

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #9 from Torsten globe13.trotte...@gmx.de 2010-04-28 10:12:24 PDT --- I can confirm it did not work. It took a long time too; this time. Unfortunately I did not use gdb so I am doing it again for some stack trace. -- Configure

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #10 from Torsten globe13.trotte...@gmx.de 2010-04-28 10:59:19 PDT --- I got the same error again. I put bt full to my run script but I got no further output. I do not know much about gdb so I do not know how to extract more

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #11 from Robert Clipsham rob...@octarineparrot.com 2010-04-28 19:05:45 BST --- GDB isn't picking up the bt full, try invoking it with: gdb --args dmd $OPTIONS $FILES Where $OPTIONS and $FILES are the usual arguments you pass to

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #12 from Torsten globe13.trotte...@gmx.de 2010-04-28 12:00:50 PDT --- Now a got some more information: (gdb) p s-Sseg $2 = -32768 You can see that p s-Sseg is negative. Either I made an error when I recompiled dmd or there is

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #13 from Torsten globe13.trotte...@gmx.de 2010-04-28 12:43:06 PDT --- I made a mistake while compiling dmd: I did not call make -f linux.mak clean so the old object files have been used. Now dmd crashes at a different position

[Issue 4108] ICE(cod2.c): zero-length static array in function call

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4108 --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2010-04-28 15:12:54 PDT --- changeset 459 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 3522] ICE(cg87.c): variable*array[].

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3522 --- Comment #1 from Don clugd...@yahoo.com.au 2010-04-28 20:55:10 PDT --- This patch also fixes: bug 2549 Segfault on array multiplication. bug 3066 Array operation without a slice as the lvalue accepted, bad codegen bug 3817 Array op: wrong

[Issue 3066] Array operation without a slice as the lvalue accepted, bad codegen

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3066 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch CC|

[Issue 2549] Segfault on array multiplication.

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2549 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch CC|

[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130 --- Comment #14 from Torsten Sommerfeld globe13.trotte...@gmx.de 2010-04-28 22:43:49 PDT --- After I have modified the file cod3.c changing struct fixlist { symbol*Lsymbol;// symbol we don't know about shortLseg;