Re: What about sets?

2011-11-29 Thread Andrea Fontana
I was thinking to implement a redblack tree by myself so it's perfect! Il giorno lun, 28/11/2011 alle 08.44 -0800, Jonathan M Davis ha scritto: On Monday, November 28, 2011 12:09:45 Andrea Fontana wrote: Thank you! I didn't check for std.container module :) I should warn you that

Re: What about sets?

2011-11-29 Thread Andrej Mitrovic
Also take a look at dcollections 2.0: http://www.dsource.org/projects/dcollections (the d2 branch). I think RBT was derived from there by Steven himself. Or maybe I'm thinking of another structure.

Re: Frontend and backend communication

2011-11-29 Thread Dainius (GreatEmerald)
I seem to have another problem with the function pointer approach. I am trying to set up a function that would pass the function pointers from C to D, and DMD refuses to compile it: If I have the function pointer struct with D calling convention pointers, like this: struct

Re: Frontend and backend communication

2011-11-29 Thread Jacob Carlborg
On 2011-11-29 12:53, Dainius (GreatEmerald) wrote: I seem to have another problem with the function pointer approach. I am trying to set up a function that would pass the function pointers from C to D, and DMD refuses to compile it: If I have the function pointer struct with D calling

About File.rawWrite

2011-11-29 Thread bearophile
This D2 program runs in about 5.13 seconds on my PC: import std.stdio; void main() { auto f = File(bytes_test.dat, wb); ubyte[3] RGB; foreach (_; 0 .. 1_000_000) f.rawWrite(RGB); } While this C program runs in about 0.14 seconds: #include stdio.h int main() { FILE *f

Re: Array initialization quiz

2011-11-29 Thread deadalnix
Le 29/11/2011 04:11, Andrej Mitrovic a écrit : On 11/29/11, bearophilebearophileh...@lycos.com wrote: Do you know why the compiler doesn't ask you for a cast, and why the run does that? Because foreach is broken? http://d.puremagic.com/issues/show_bug.cgi?id=4510 No it has nothing to do

Re: Array initialization quiz

2011-11-29 Thread Andrej Mitrovic
I meant that in a sarcastic way. :)

Re: Array initialization quiz

2011-11-29 Thread bearophile
deadalnix: No it has nothing to do with this bug. I tend to agree. But actually, this exemple should generate a warning at least, or being illegal eventually. I'd like that code to loop on all array 256 items once, and then stop :-) Bye, bearophile

Re: Frontend and backend communication

2011-11-29 Thread Dainius (GreatEmerald)
Ah, I see, that makes sense. And it now compiles correctly, thanks.

Re: How do I redirect stderr of a spawned process into an internal buffer?

2011-11-29 Thread Steven Schveighoffer
On Mon, 28 Nov 2011 17:42:54 -0500, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Btw, is the new std.process hosted anywhere? My solution is windows-specific and probably doesn't handle all the edge-cases. Even if the new std.process isn't ready yet I'd love to look at your

Re: Array initialization quiz

2011-11-29 Thread Marco Leise
Am 29.11.2011, 14:53 Uhr, schrieb bearophile bearophileh...@lycos.com: deadalnix: No it has nothing to do with this bug. I tend to agree. But actually, this exemple should generate a warning at least, or being illegal eventually. I'd like that code to loop on all array 256 items once,

Re: Array initialization quiz

2011-11-29 Thread Marco Leise
Am 29.11.2011, 20:41 Uhr, schrieb Marco Leise marco.le...@gmx.de: Am 29.11.2011, 14:53 Uhr, schrieb bearophile bearophileh...@lycos.com: deadalnix: No it has nothing to do with this bug. I tend to agree. But actually, this exemple should generate a warning at least, or being illegal

Re: Array initialization quiz

2011-11-29 Thread Jonathan M Davis
On Tuesday, November 29, 2011 20:42:59 Marco Leise wrote: Am 29.11.2011, 20:41 Uhr, schrieb Marco Leise marco.le...@gmx.de: Am 29.11.2011, 14:53 Uhr, schrieb bearophile bearophileh...@lycos.com: deadalnix: No it has nothing to do with this bug. I tend to agree. But actually, this

Re: About File.rawWrite

2011-11-29 Thread torhu
On 29.11.2011 16:00, Denis Shelomovskij wrote: Your OS is Windows, right? On Windows, rawWrite and rawRead always flushes stream, sets binary mode, reads/writes, flushes stream again, sets previous mode. This is definitely unnecessary slow - at least it should change mode only if needed (the

Re: About File.rawWrite

2011-11-29 Thread Kai Meyer
On 11/29/2011 08:00 AM, Denis Shelomovskij wrote: 29.11.2011 15:57, bearophile пишет: This D2 program runs in about 5.13 seconds on my PC: import std.stdio; void main() { auto f = File(bytes_test.dat, wb); ubyte[3] RGB; foreach (_; 0 .. 1_000_000) f.rawWrite(RGB); } While this C program

Re: About File.rawWrite

2011-11-29 Thread Ali Çehreli
On 11/29/2011 01:20 PM, torhu wrote: On 29.11.2011 16:00, Denis Shelomovskij wrote: Your OS is Windows, right? On Windows, rawWrite and rawRead always flushes stream, sets binary mode, reads/writes, flushes stream again, sets previous mode. This is definitely unnecessary slow - at least it

std.xml

2011-11-29 Thread bioinfornatics
Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are sometime ago std.xml will be updated. I do not want do twice time the works. So my question is: std.xml will be deprecated or not ? thanks

Re: std.xml

2011-11-29 Thread Jonathan M Davis
On Tuesday, November 29, 2011 23:47:33 bioinfornatics wrote: Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are sometime ago std.xml will be updated. I do not want do twice time the works. So my question is: std.xml will be deprecated or not ? Yes.

Re: std.xml

2011-11-29 Thread Jesse Phillips
bioinfornatics Wrote: Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are sometime ago std.xml will be updated. I do not want do twice time the works. So my question is: std.xml will be deprecated or not ? thanks I don't think there is an

Re: D Grammar Specification

2011-11-29 Thread Trass3r
http://lists.puremagic.com/pipermail/digitalmars-d/2011-March/098950.html

Re: std.xml

2011-11-29 Thread bioinfornatics
Le mardi 29 novembre 2011 à 18:10 -0500, Jonathan M Davis a écrit : On Tuesday, November 29, 2011 23:47:33 bioinfornatics wrote: Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are sometime ago std.xml will be updated. I do not want do twice time

Re: std.xml

2011-11-29 Thread Jonathan M Davis
On Wednesday, November 30, 2011 03:42:33 bioinfornatics wrote: Le mardi 29 novembre 2011 à 18:10 -0500, Jonathan M Davis a écrit : On Tuesday, November 29, 2011 23:47:33 bioinfornatics wrote: Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are

Re: std.xml

2011-11-29 Thread Jacob Carlborg
On 2011-11-29 23:47, bioinfornatics wrote: Dear I convert my lib tango/d1 to phobos/d2 so i need use std.xml but i have heard they are sometime ago std.xml will be updated. I do not want do twice time the works. So my question is: std.xml will be deprecated or not ? thanks I've created a