Re: [druntime] TypeInfo.getHash problems

2012-03-01 Thread Dmitry Olshansky
On 01.03.2012 1:45, H. S. Teoh wrote: I found the following bugs with the current implementations of getHash in the various TypeInfo classes: 1) TypeInfo_Array.getHash doesn't work correctly with class objects. with custom toHash() methods. Or, for that matter, arrays of AA's (which have their o

Re: Can someone decipher this moon speak for me? (abi - calling conventions)

2012-03-01 Thread Martin Nowak
On Thu, 01 Mar 2012 07:14:17 +0100, Bernard Helyer wrote: On Thursday, 1 March 2012 at 06:07:40 UTC, Martin Nowak wrote: For x86-32 dmd uses a fastcall, where EAX can contain a parameter, for Windows AND all other supported OSes. ._.; Well, that's nice to know, thanks. Because we (SDC) u

Re: Lexer and parser generators using CTFE

2012-03-01 Thread deadalnix
Le 29/02/2012 17:45, Andrei Alexandrescu a écrit : On 2/29/12 3:45 AM, Philippe Sigaud wrote: mixin(Grammar!("Doc <- Node*" "Node <- OpeningTag (Text / Node)* ClosingTag", NodeAction, "OpeningTag <- '<' Identifier '>'", OpeningAction, "ClosingTag <- `'", ClosingAction, "Text <- (!(OpeningTag / C

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-01 Thread Mikael Lindsten
On Monday, 27 February 2012 at 18:10:15 UTC, Kalle Svensson wrote: * I agree that it is a good idea just to use few log levels. * I think is it is a misstake not to let formatting of the whole log message be pluggable (i.e. not the free text message the programmer writes). If I have created a sp

Re: package and virtual

2012-03-01 Thread deadalnix
Le 01/03/2012 01:53, Jonathan M Davis a écrit : package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is supposed to be virtual. But from what I recall, the plan is to leave pa

Re: package and virtual

2012-03-01 Thread Rene Zwanenburg
On Thursday, 1 March 2012 at 07:45:24 UTC, Jonathan M Davis wrote: On Thursday, March 01, 2012 08:26:00 Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: > package functions are currenly non-virtual. > > The spec claims that "all non-sta­tic non-pri­vate > non-tem­plate mem­be

Re: package and virtual

2012-03-01 Thread deadalnix
Le 01/03/2012 02:27, Jonathan M Davis a écrit : Personally, I'm absolutely fine with package being non-virtual. I'm just trying to verify that I'm correct in my understanding that the plan is to leave it non-virtual rather than to make dmd match what the spec currently says and make package virt

Re: package and virtual

2012-03-01 Thread Kapps
On Thursday, 1 March 2012 at 07:26:01 UTC, Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is suppos

Re: Curl on Windows

2012-03-01 Thread Marco Leise
Am 27.02.2012, 03:15 Uhr, schrieb Brad Roberts : […] non-windows can suggest how to install via the standard package managers […] On Gentoo USE flags handle such cases. They enable additional dependencies on Curl, Python, zlib or whatever may be used with the installed package. Often these fl

Re: package and virtual

2012-03-01 Thread Mike Parker
On 3/1/2012 4:26 PM, Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is supposed to be virtual. But fr

Re: Outputting generated .di files to correct module structure

2012-03-01 Thread Rene Zwanenburg
On Wednesday, 29 February 2012 at 23:55:05 UTC, Andrei Alexandrescu wrote: On 2/29/12 12:26 PM, Rene Zwanenburg wrote: On Wednesday, 29 February 2012 at 18:10:41 UTC, Martin Nowak wrote: On Wed, 29 Feb 2012 16:25:32 +0100, Rene Zwanenburg wrote: The project I'm currently working on is becomin

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-01 Thread H. S. Teoh
On Thu, Mar 01, 2012 at 10:09:28AM +0100, Mikael Lindsten wrote: > On Monday, 27 February 2012 at 18:10:15 UTC, Kalle Svensson wrote: > >* I agree that it is a good idea just to use few log levels. [...] > I second what Kalle Svensson is saying. > > My belief is that when there are many log levels

Poll of the week: main OS and compiler

2012-03-01 Thread Marco Leise
Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? http://www.easypolls.net/poll.html?p=4f4f7d25c2e1b0e40b0ac494

Re: [druntime] TypeInfo.getHash problems

2012-03-01 Thread H. S. Teoh
On Thu, Mar 01, 2012 at 12:36:31PM +0400, Dmitry Olshansky wrote: > On 01.03.2012 1:45, H. S. Teoh wrote: > >I found the following bugs with the current implementations of > >getHash in the various TypeInfo classes: > > > >1) TypeInfo_Array.getHash doesn't work correctly with class objects. > >with

Re: Lexer and parser generators using CTFE

2012-03-01 Thread Philippe Sigaud
>> mixin(Grammar!("Doc <- Node*" >> "Node <- OpeningTag (Text / Node)* ClosingTag", NodeAction, >> "OpeningTag <- '<' Identifier '>'", OpeningAction, >> "ClosingTag <- `'", ClosingAction, >> "Text <- (!(OpeningTag / ClosingTag) _)+")); > > > That looks about right, but still has a fair amount of n

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Manu
Windows leads. Amazing! COFF + 64bit plz! ;) On 1 March 2012 16:40, Marco Leise wrote: > Since everyone loves polls, and the question comes up now and then: What > is your main development platform for D ? > > http://www.easypolls.net/poll.**html?p=**4f4f7d25c2e1b0e40b0ac494

Re: package and virtual

2012-03-01 Thread Alex Rønne Petersen
On 01-03-2012 11:34, Rene Zwanenburg wrote: On Thursday, 1 March 2012 at 07:45:24 UTC, Jonathan M Davis wrote: On Thursday, March 01, 2012 08:26:00 Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: > package functions are currenly non-virtual. > > The spec claims that "all non-

Re: package and virtual

2012-03-01 Thread Alex Rønne Petersen
On 01-03-2012 08:26, Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is supposed to be virtual. But fr

Re: package and virtual

2012-03-01 Thread Alex Rønne Petersen
On 01-03-2012 11:12, deadalnix wrote: Le 01/03/2012 01:53, Jonathan M Davis a écrit : package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is supposed to be virtual. But from

Re: Thoughts about in contract inheritance

2012-03-01 Thread Timon Gehr
On 03/01/2012 01:49 AM, Stewart Gordon wrote: On 29/02/2012 20:45, Timon Gehr wrote: On 02/29/2012 09:30 PM, Stewart Gordon wrote: But I can see what you really mean: the spec of what inputs to an overridable function are legal and what inputs are illegal is part of the API. Stewart. An in

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Kevin Cox
On Mar 1, 2012 11:11 AM, "Manu" wrote: > > Windows leads. Amazing! > > COFF + 64bit plz! ;) > > > On 1 March 2012 16:40, Marco Leise wrote: >> >> Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? >> >> http://www.easypolls.net/poll.

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Marco Leise
Am 01.03.2012, 17:10 Uhr, schrieb Manu : Windows leads. Amazing! COFF + 64bit plz! ;) You would have gotten it by tomorrow, but unfortunately now the *nix systems lead by a few % so this feature must obviously be postponed to next year.

Re: [druntime] TypeInfo.getHash problems

2012-03-01 Thread Dmitry Olshansky
On 01.03.2012 18:56, H. S. Teoh wrote: On Thu, Mar 01, 2012 at 12:36:31PM +0400, Dmitry Olshansky wrote: On 01.03.2012 1:45, H. S. Teoh wrote: I found the following bugs with the current implementations of getHash in the various TypeInfo classes: 1) TypeInfo_Array.getHash doesn't work correctl

Re: Lexer and parser generators using CTFE

2012-03-01 Thread H. S. Teoh
On Thu, Mar 01, 2012 at 04:10:26PM +0100, Philippe Sigaud wrote: > >> mixin(Grammar!("Doc <- Node*" > >> "Node <- OpeningTag (Text / Node)* ClosingTag", NodeAction, > >> "OpeningTag <- '<' Identifier '>'", OpeningAction, > >> "ClosingTag <- `'", ClosingAction, > >> "Text <- (!(OpeningTag / Closing

Re: Lexer and parser generators using CTFE

2012-03-01 Thread Philippe Sigaud
> > But how to associate actions with a rule, in that case? I mean, some > > rules will have actions, some not. > > You could maybe just put D code in the grammar string, which gets > compiled as a string mixin by CTFE? I could, but one of my driving goals while beginning this project a month ao w

Re: Lexer and parser generators using CTFE

2012-03-01 Thread Andrei Alexandrescu
On 3/1/12 1:54 AM, Marco Leise wrote: Am 29.02.2012, 02:30 Uhr, schrieb Piotr Szturmaj : CTFE code can be much slower than native one, and I would like to see some kind of compiler cache for such code. I second this. As a fan of clean optimizations this is one of the things I tossed around my

Re: package and virtual

2012-03-01 Thread Andrei Alexandrescu
On 3/1/12 10:12 AM, Alex Rønne Petersen wrote: On 01-03-2012 11:12, deadalnix wrote: Le 01/03/2012 01:53, Jonathan M Davis a écrit : package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean

std.format.doFormat and std.format.formattedWrite

2012-03-01 Thread Stewart Gordon
There are several bug reports along the lines of std.stdio.writef* and std.string.format and stream writef* functions behaving inconsistently with each other. So far I've found: http://d.puremagic.com/issues/show_bug.cgi?id=4532 http://d.puremagic.com/issues/show_bug.cgi?id=5687 http://d.purema

Re: package and virtual

2012-03-01 Thread Jacob Carlborg
On 2012-03-01 14:43, Mike Parker wrote: On 3/1/2012 4:26 PM, Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Jacob Carlborg
On 2012-03-01 15:40, Marco Leise wrote: Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? http://www.easypolls.net/poll.html?p=4f4f7d25c2e1b0e40b0ac494 Why bundle Linux and FreeBSD in one option? -- /Jacob Carlborg

Re: package and virtual

2012-03-01 Thread Jacob Carlborg
On 2012-03-01 11:12, deadalnix wrote: Le 01/03/2012 01:53, Jonathan M Davis a écrit : package functions are currenly non-virtual. The spec claims that "all non-sta­tic non-pri­vate non-tem­plate mem­ber func­ tions are vir­tual," which would mean that package is supposed to be virtual. But from

Re: Lexer and parser generators using CTFE

2012-03-01 Thread Jacob Carlborg
On 2012-03-01 18:21, Philippe Sigaud wrote: > > But how to associate actions with a rule, in that case? I mean, some > > rules will have actions, some not. > > You could maybe just put D code in the grammar string, which gets > compiled as a string mixin by CTFE? I could, but one of my driv

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Gour
On Thu, 01 Mar 2012 21:26:59 +0100 Jacob Carlborg wrote: > Why bundle Linux and FreeBSD in one option? To make it harder for Windows to win. :-} Sincerely, Gour -- The spirit soul bewildered by the influence of false ego thinks himself the doer of activities that are in actuality carried o

Re: std.format.doFormat and std.format.formattedWrite

2012-03-01 Thread Simen Kjærås
On Thu, 01 Mar 2012 20:55:14 +0100, Stewart Gordon wrote: There are several bug reports along the lines of std.stdio.writef* and std.string.format and stream writef* functions behaving inconsistently with each other. So far I've found: http://d.puremagic.com/issues/show_bug.cgi?id=4532

Re: State of Mango

2012-03-01 Thread Steven Schveighoffer
On Sat, 25 Feb 2012 14:35:40 -0500, Nick Sabalausky wrote: "Paulo Pinto" wrote in message news:jibco6$28l7$2...@digitalmars.com... Hi, I was just wondering about the possibility to have a servlet like web server in D, and discover it already exists in the form of Mango. The project looks a

Tuples citizenship

2012-03-01 Thread bearophile
I think std.typecons.Tuples merit to be a little more citizens in D and Phobos. I think reducing the usage of "out" argument, and replacing them with a tuple result, will avoid mistakes and make the code look better. In std.math there are functions that maybe are better to use std.typecons.Tuple:

Re: package and virtual

2012-03-01 Thread Jonathan M Davis
On Thursday, March 01, 2012 21:19:04 Jacob Carlborg wrote: > On 2012-03-01 14:43, Mike Parker wrote: > > On 3/1/2012 4:26 PM, Jacob Carlborg wrote: > >> On 2012-03-01 01:53, Jonathan M Davis wrote: > >>> package functions are currenly non-virtual. > >>> > >>> The spec claims that "all non-sta­tic

Re: Tuples citizenship

2012-03-01 Thread Jonathan M Davis
On Thursday, March 01, 2012 17:08:44 bearophile wrote: > I think std.typecons.Tuples merit to be a little more citizens in D and > Phobos. I think reducing the usage of "out" argument, and replacing them > with a tuple result, will avoid mistakes and make the code look better. In > std.math there a

Re: Tuples citizenship

2012-03-01 Thread kennytm
bearophile wrote: (snip) > It's good for tuples to become more common in D code. Some time ago I > have asked the built-in associative arrays to grow a method to iterate on > key-value pairs, named "byPair": > http://d.puremagic.com/issues/show_bug.cgi?id=5466 > (snip) > Bye, > bearophile Assoc

Re: Tuples citizenship

2012-03-01 Thread deadalnix
Le 01/03/2012 23:33, Jonathan M Davis a écrit : On Thursday, March 01, 2012 17:08:44 bearophile wrote: I think std.typecons.Tuples merit to be a little more citizens in D and Phobos. I think reducing the usage of "out" argument, and replacing them with a tuple result, will avoid mistakes and mak

Re: Tuples citizenship

2012-03-01 Thread Jonathan M Davis
On Friday, March 02, 2012 00:05:22 deadalnix wrote: > Le 01/03/2012 23:33, Jonathan M Davis a écrit : > > On Thursday, March 01, 2012 17:08:44 bearophile wrote: > >> I think std.typecons.Tuples merit to be a little more citizens in D and > >> Phobos. I think reducing the usage of "out" argument, an

Re: Tuples citizenship

2012-03-01 Thread bearophile
Jonathan M Davis: > I'm sure > that there are plenty of cases where using out parameters is actually far > cleaner than using tuples, since you don't have multiple return values to > deal > with. Are you able to show me one or more examples where using one or more out arguments is in your op

Re: Tuples citizenship

2012-03-01 Thread kennytm
"Jonathan M Davis" wrote: > When you're looking to mutate existing variables in the caller, using out > parameters results in cleaner code. Tuples are inherently messier, because > you > have to deal with multiple return values. They also often do poorly when you > need to use the functional

Re: Tuples citizenship

2012-03-01 Thread bearophile
Jonathan M Davis: > When you're looking to mutate existing variables in the caller, using out > parameters results in cleaner code. Tuples are inherently messier, because > you > have to deal with multiple return values. out arguments have two risks: - If you assign a value to a variable and t

Re: package and virtual

2012-03-01 Thread Martin Nowak
On Thu, 01 Mar 2012 17:11:14 +0100, Alex Rønne Petersen wrote: On 01-03-2012 08:26, Jacob Carlborg wrote: On 2012-03-01 01:53, Jonathan M Davis wrote: package functions are currenly non-virtual. The spec claims that "all non-static non-private non-template member func­ tions are virtual,"

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-01 Thread Sean Kelly
On Feb 29, 2012, at 4:13 PM, Richard van Scheijen wrote: > When logging the severity level should convey a certain insight that the > developer has about the code. This can be done with a 3 bit field. These are: > known-cause, known-effect and breaks-flow. > > This creates the following matrix:

Re: Tuples citizenship

2012-03-01 Thread Jonathan M Davis
On Thursday, March 01, 2012 18:57:15 bearophile wrote: > Jonathan M Davis: > > They also often do poorly when you > > need to use the functional programming, > > As you know functional languages use tuples all the time. Yes, but chaining functions is the issue. It doesn't work well with tuples u

CORBA in D

2012-03-01 Thread Geoffrey Biggs
Morning all, In a project just starting, we want to use D (for its safety, amongst other things). However, we also need to connect to distributed objects that have CORBA interfaces. I did a search, and the most recent mention of CORBA and D that I could find is a post to this list nearly 5 yea

Re: CORBA in D

2012-03-01 Thread Walter Bright
On 3/1/2012 4:43 PM, Geoffrey Biggs wrote: Morning all, In a project just starting, we want to use D (for its safety, amongst other things). However, we also need to connect to distributed objects that have CORBA interfaces. I did a search, and the most recent mention of CORBA and D that I could

Re: Tuples citizenship

2012-03-01 Thread bearophile
Jonathan M Davis: > Yes, but chaining functions is the issue. It doesn't work well with tuples > unless the function you're passing the result to wants the tuple. If all it > wants is one piece of the tuple, then that doesn't work well at all. You're > forced to assign the tuple to something el

Re: Review of Jose Armando Garcia Sancio's std.log

2012-03-01 Thread Robert Jacques
On Wed, 29 Feb 2012 18:13:30 -0600, Richard van Scheijen wrote: When logging the severity level should convey a certain insight that the developer has about the code. This can be done with a 3 bit field. These are: known-cause, known-effect and breaks-flow. This creates the following matrix:

Re: CORBA in D

2012-03-01 Thread Geoffrey Biggs
On 02/03/12 10:54, Walter Bright wrote: On 3/1/2012 4:43 PM, Geoffrey Biggs wrote: Morning all, In a project just starting, we want to use D (for its safety, amongst other things). However, we also need to connect to distributed objects that have CORBA interfaces. I did a search, and the most r

Re: CORBA in D

2012-03-01 Thread Sean Kelly
On Mar 1, 2012, at 6:42 PM, Geoffrey Biggs wrote: > On 02/03/12 10:54, Walter Bright wrote: >> On 3/1/2012 4:43 PM, Geoffrey Biggs wrote: >>> Morning all, >>> >>> In a project just starting, we want to use D (for its safety, amongst >>> other >>> things). However, we also need to connect to dist

dereferencing null

2012-03-01 Thread Nathan M. Swan
Am I correct that trying to use an Object null results in undefined behavior? Object o = null; o.opCmp(new Object); // segmentation fault on my OSX machine This seems a bit non-D-ish to me, as other bugs like this throw Errors (e.g. RangeError). It would be nice if it would throw a N

Re: dereferencing null

2012-03-01 Thread Jonathan M Davis
On Friday, March 02, 2012 05:37:46 Nathan M. Swan wrote: > Am I correct that trying to use an Object null results in > undefined behavior? > > Object o = null; > o.opCmp(new Object); // segmentation fault on my OSX machine > > This seems a bit non-D-ish to me, as other bugs like this th

Re: CORBA in D

2012-03-01 Thread Geoffrey Biggs
On 02/03/12 13:28, Sean Kelly wrote: On Mar 1, 2012, at 6:42 PM, Geoffrey Biggs wrote: On 02/03/12 10:54, Walter Bright wrote: On 3/1/2012 4:43 PM, Geoffrey Biggs wrote: Morning all, In a project just starting, we want to use D (for its safety, amongst other things). However, we also need t

Re: Tuples citizenship

2012-03-01 Thread Dmitry Olshansky
On 02.03.2012 6:06, bearophile wrote: Jonathan M Davis: Yes, but chaining functions is the issue. It doesn't work well with tuples unless the function you're passing the result to wants the tuple. If all it wants is one piece of the tuple, then that doesn't work well at all. just stick in .ex

Re: Poll of the week: main OS and compiler

2012-03-01 Thread Marco Leise
Am 01.03.2012, 21:26 Uhr, schrieb Jacob Carlborg : On 2012-03-01 15:40, Marco Leise wrote: Since everyone loves polls, and the question comes up now and then: What is your main development platform for D ? http://www.easypolls.net/poll.html?p=4f4f7d25c2e1b0e40b0ac494 Why bundle Linux and Fre