Re: Install DWT2 using DMD and Tango

2011-06-09 Thread Andrew Wiley
On Wed, Jun 8, 2011 at 2:57 PM, Jesse Phillips jessekphillip...@gmail.comwrote: Andrew Wiley Wrote: On Wed, Jun 8, 2011 at 11:54 AM, Fabian contact-...@freenet.de wrote: Hi I'm trying to install DWT2 to create GUI applications with D. I have downloaded DWT2 with TortoiseHg already

Re: Install DWT2 using DMD and Tango

2011-06-09 Thread Fabian
On 08.06.2011 23:57, Jesse Phillips wrote: Andrew Wiley Wrote: On Wed, Jun 8, 2011 at 11:54 AM, Fabiancontact-...@freenet.de wrote: Hi I'm trying to install DWT2 to create GUI applications with D. I have downloaded DWT2 with TortoiseHg already and I've installed Ruby and Rake. But when I

Re: Is it reasonable to learn D

2011-06-09 Thread Kagamin
Trass3r Wrote: http://h3.gd/code/nucleus/ I lol'd at the suggestion to upgrade my FF4 to a modern HTML5-compliant browser. ^^ No problems with Opera. I mean, it's ok that it doesn't work, it's just diagnostic message is wrong.

Re: Convert TickDuration to Duration?

2011-06-09 Thread Steven Schveighoffer
On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a TickDuration to a Duration? If there really is

Re: Install DWT2 using DMD and Tango

2011-06-09 Thread Fabian
I decided to use gtkD but I would be very glad if anybody is able to solve my problem.

Re: Convert TickDuration to Duration?

2011-06-09 Thread simendsjo
On 09.06.2011 16:33, Steven Schveighoffer wrote: On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David Nadlinger wrote: Did I miss a way to convert a

? toString(?)

2011-06-09 Thread simendsjo
Object contains toString as the following: string toString(); But there are also other versions going about: void toString(void delegate(const(char)[]) sink, string fmt); void toString(void delegate(const(char)[]) sink, FormatSpec fmt); I wouldn't be surprised to see some range based version

Re: ? toString(?)

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 08:38, simendsjo wrote: Object contains toString as the following: string toString(); But there are also other versions going about: void toString(void delegate(const(char)[]) sink, string fmt); void toString(void delegate(const(char)[]) sink, FormatSpec fmt); I wouldn't be

Re: Convert TickDuration to Duration?

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 08:18, simendsjo wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: On Wed, 08 Jun 2011 18:02:40 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-06-08 14:30, David Nadlinger wrote: On 6/8/11 11:14 PM, Jonathan M Davis wrote: On 2011-06-08 13:36, David

Re: Convert TickDuration to Duration?

2011-06-09 Thread Steven Schveighoffer
On Thu, 09 Jun 2011 13:33:28 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: Hm... this involves cast(Duration)x? That seems like a dangerous thing for a common operation, no? There's nothing dangerous about it. It's an overloaded

Re: Convert TickDuration to Duration?

2011-06-09 Thread Andrej Mitrovic
On 6/9/11, Steven Schveighoffer schvei...@yahoo.com wrote: What I mean is, whenever you use the blunt instrument 'cast' anything can happen. This code: cast(x)y; can do a lot of damage, depending on what x and y are. This was on my mind since I've seen it in std.datetime, and I agree.

Re: Convert TickDuration to Duration?

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 10:58, Steven Schveighoffer wrote: On Thu, 09 Jun 2011 13:33:28 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On 09.06.2011 16:33, Steven Schveighoffer wrote: Hm... this involves cast(Duration)x? That seems like a dangerous thing for a common operation, no?

Re: Careful when using chdir inside a dirEntries loop

2011-06-09 Thread Jonathan M Davis
On 2011-06-09 15:20, Andrej Mitrovic wrote: Here's a little buggy code which most often throws an exception: foreach (string entry; dirEntries(curdir, SpanMode.shallow)) { if (entry.isdir) { foreach (string subentry; dirEntries(entry, SpanMode.shallow)) { if (subentry.isdir) {

Re: Careful when using chdir inside a dirEntries loop

2011-06-09 Thread Andrej Mitrovic
Ok filed. I don't know whether it's a bug or not, I do think it's a subtle issue worth investigating though.

How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread David Nadlinger
The title says it all – how can I avoid running out of OS thread handles when spawning lots of short-lived threads? In reality, I encountered the issue while writing tests a piece of code which spawns a thread, but this is the basic issue: --- import core.thread; void doNothing() {} void

Re: How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread Robert Clipsham
On 10/06/2011 00:17, David Nadlinger wrote: The title says it all – how can I avoid running out of OS thread handles when spawning lots of short-lived threads? In reality, I encountered the issue while writing tests a piece of code which spawns a thread, but this is the basic issue: --- import

Re: How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread David Nadlinger
On 6/10/11 1:21 AM, Robert Clipsham wrote: As far as I'm aware, you cannot avoid it, it's a hard coded limit set by the operating system. May I suggest using Fibers instead of threads? If your threads are short lived, their overhead is probably not worth it. You can also combine fibers with

Re: How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread Steven Schveighoffer
On Thu, 09 Jun 2011 19:17:28 -0400, David Nadlinger s...@klickverbot.at wrote: The title says it all – how can I avoid running out of OS thread handles when spawning lots of short-lived threads? In reality, I encountered the issue while writing tests a piece of code which spawns a

Re: How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread David Nadlinger
On 6/10/11 1:37 AM, Steven Schveighoffer wrote: t.join() ? http://www.digitalmars.com/d/2.0/phobos/core_thread.html#join Doesn't work, in my application I'm a) using std.concurrency, and b) even that is hidden behind the API I want to test. A better example would probably be the following,

Re: How to avoid running out of OS thread handles when spawning lots of short-lived threads?

2011-06-09 Thread Steven Schveighoffer
On Thu, 09 Jun 2011 19:57:27 -0400, David Nadlinger s...@klickverbot.at wrote: On 6/10/11 1:37 AM, Steven Schveighoffer wrote: t.join() ? http://www.digitalmars.com/d/2.0/phobos/core_thread.html#join Doesn't work, in my application I'm a) using std.concurrency, and b) even that is hidden

Re: DMD Backend: Deciding instructions to use/avoid?

2011-06-09 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:isoltk$1ehd$1...@digitalmars.com... Don nos...@nospam.com wrote in message news:isoh6c$15jb$1...@digitalmars.com... Nick Sabalausky wrote: So my main question: Does DMD do anything like, say, detecting the CPU at compile time and then enabling

Re: DMD Backend: Deciding instructions to use/avoid?

2011-06-09 Thread Nick Sabalausky
Bernard Helyer b.hel...@gmail.com wrote in message news:isdgdc$m3a$1...@digitalmars.com... If you run the program in GDB, can you disassemble when the error is given? That may give you the instruction the kernel is assasinating your process for. I can try that if anyone can help walk me