On 11/29/11, bearophile 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
Andrej Mitrovic:
> Err no? Running after compilation goes into an infinite loop on 2.056.
Silly, this is a quiz, you need to try to answer without compiling it first :-)
Do you know why the compiler doesn't ask you for a cast, and why the run does
that?
Bye,
bearophile
Err no? Running after compilation goes into an infinite loop on 2.056.
Andrej Mitrovic:
> I get an infinite loop. :s
In your brain, really? Is that dangerous?
Bye,
bearophile
I get an infinite loop. :s
A little D2 quiz, of course. This was discussed some time ago, but repeating
now and then such things doesn't hurt in D.learn.
Do you think this little program compiles? Or do you think the D2 compiler will
refuse to compile it and ask you for a cast from int -> ubyte?
If this compiles (maybe b
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
implementation.
Cool stuff Steve, I'll be eager to review it when the time comes.
On Mon, 28 Nov 2011 17:41:08 -0800, David Currie wrote:
> I am a newbie to D. From (C++,Java,others...) background.
>
> In C++ I can say
>
> void f1(int& pInt)
> {
>pInt = 1;
> }
>
> which sets pInt(which is outside f1)
> because although pInt (at compile time) is a Value in reality it is
>
On 11/28/2011 07:37 AM, breezes wrote:
Thanks. It seems that I have to write two classes, one synchronized and one is
not. Of course the
synchronized one should be the wrapper.
However, all members of a synchronized class are also shared. So I can not use
the un-synchronized class
in the synch
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 std.container a bit sparse at the moment, but
RedBlackTree does give you a set (or a sorted map with the appropriate
comparator function).
- Jonathan M Da
On Sun, 27 Nov 2011 17:37:24 -0500, Andrej Mitrovic
wrote:
I've talked about this before, there's a problem with spawning
multiple processes and letting them write to stderr asynchronously It
seems like this might be a Windows-only problem, I couldn't recreate
on Ubuntu but maybe that's becau
On Sun, 27 Nov 2011 16:52:56 -0500, Matthias Walter
wrote:
Hi,
Recently, I realized that several "dup" methods in D2's phobos are
declared like the one for BitArray:
@property BitArray dup()
My question is why it is declared without "const"? Is it a bug or is
there a reason for it? I can t
Thank you! I didn't check for "std.container" module :)
Il giorno lun, 28/11/2011 alle 02.55 -0800, Jonathan M Davis ha scritto:
> On Monday, November 28, 2011 11:48:28 Andrea Fontana wrote:
> > In c++ there are a lot of data structs (vector, hashmap, ...) defined by
> > stl. I need something sim
Okay, what about this hack?
---
import std.bitmanip;
import core.stdc.string;
void main()
{
const(BitArray) foo;
BitArray bar;
bar.len = foo.len;
bar.ptr = foo.ptr[0 .. foo.dim].dup.ptr;
}
---
On Monday, November 28, 2011 11:48:28 Andrea Fontana wrote:
> In c++ there are a lot of data structs (vector, hashmap, ...) defined by
> stl. I need something similar to c++ "set" in D. Does it exists?
> I don't care about order of items, but I need a fast search and a easy
> way to iterate. A tree
In c++ there are a lot of data structs (vector, hashmap, ...) defined by
stl. I need something similar to c++ "set" in D. Does it exists?
I don't care about order of items, but I need a fast search and a easy
way to iterate. A tree-like struct...
18 matches
Mail list logo