Re: Why doesn't DMD recreate folder structure when using multiple .d files and -H?

2012-10-12 Thread Jordi Sayol
Al 13/10/12 02:10, En/na Andrej Mitrovic ha escrit: > For example: > > $ dmd -H -o- atk/Action.d gio/DBusProxy.d -Hdinclude > > Both files are written to the 'include' folder but they're flat > because the original folder structure is lost. So instead of having: > > include/atk/Action.d > includ

Re: Calling un-overridden class method

2012-10-12 Thread Timon Gehr
On 10/13/2012 04:22 AM, H. S. Teoh wrote: ... // PROBLEM #1: due to PROBLEM #1, this causes an // infinite recursion that eventually overflows // the stack. ... I'm sure it does :). @topic: yes this is a bug.

Re: Calling un-overridden class method

2012-10-12 Thread H. S. Teoh
On Sat, Oct 13, 2012 at 05:00:40AM +0200, Andrej Mitrovic wrote: > On 10/13/12, H. S. Teoh wrote: > > This seems to be a compiler bug to me? > > Has to be: http://dpaste.dzfl.pl/89a646b7 OK, filed an issue for it: http://d.puremagic.com/issues/show_bug.cgi?id=8809 T -- Laissez-faire

Re: Calling un-overridden class method

2012-10-12 Thread H. S. Teoh
On Sat, Oct 13, 2012 at 04:35:12AM +0200, Andrej Mitrovic wrote: > On 10/13/12, H. S. Teoh wrote: > > The problem is, I can't seem to specify that I want it to _statically_ > > bind the save method to call B.eval; > > Try using typeof(this).eval > > typeof(this) and typeof(super) are mentioned h

Re: Calling un-overridden class method

2012-10-12 Thread Andrej Mitrovic
On 10/13/12, H. S. Teoh wrote: > The problem is, I can't seem to specify that I want it to _statically_ > bind the save method to call B.eval; Try using typeof(this).eval typeof(this) and typeof(super) are mentioned here: http://dlang.org/declaration.html#typeof http://dlang.org/expression.html

Calling un-overridden class method

2012-10-12 Thread H. S. Teoh
Today I ran into a bit of a bind. I have a class hierarchy in which a base class B defines a method eval, which returns a forward range struct whose save method consists of a delegate that simply re-invokes eval with the same arguments. Then there's a derived class C, which overrides B.eval, but us

Re: Why doesn't DMD recreate folder structure when using multiple .d files and -H?

2012-10-12 Thread Andrej Mitrovic
On 10/13/12, Andrej Mitrovic wrote: > I didn't find an open bug report on this, but I think this is worthy > of an enhancement request. And writing header files one at a time is incredibly slow because DMD parses every import on each header generation.

Re: Why doesn't DMD recreate folder structure when using multiple .d files and -H?

2012-10-12 Thread Andrej Mitrovic
On 10/13/12, Andrej Mitrovic wrote: > On 10/13/12, Andrej Mitrovic wrote: >> I didn't find an open bug report on this, but I think this is worthy >> of an enhancement request. > > And writing header files one at a time is incredibly slow because DMD > parses every import on each header generation

Why doesn't DMD recreate folder structure when using multiple .d files and -H?

2012-10-12 Thread Andrej Mitrovic
For example: $ dmd -H -o- atk/Action.d gio/DBusProxy.d -Hdinclude Both files are written to the 'include' folder but they're flat because the original folder structure is lost. So instead of having: include/atk/Action.d include/gio/DBusProxy.d I have: include/Action.d include/DBusProxy.d The f

Re: Is there a thread safe single linked list?

2012-10-12 Thread Sean Kelly
On Oct 12, 2012, at 10:18 AM, denizzzka <4deni...@gmail.com> wrote: > Thanks for answer! > > After investigation came to the conclusion that here is needed not > synchronized-based solution. I am need compare-and-swap single linked list > because it will be used in callback proc from C, and it

Re: Save JSONValue binary in file?

2012-10-12 Thread Sean Kelly
On Oct 12, 2012, at 9:40 AM, Chopin wrote: > > I got this 109 MB json file that I read... and it takes over 32 > seconds for parseJSON() to finish it. So I was wondering if it > was a way to save it as binary or something like that so I can > read it super fast? The performance problem is becaus

Re: equivalent of c++ private inheritance with using

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 23:10:47 Dan wrote: > What is best way to get equivalent of C++ private inheritance > combined with using declarations in the drived to expose some > functionality. For example, suppose I want a basic RateCurve > class that defers almost entirely to type Array as below.

equivalent of c++ private inheritance with using

2012-10-12 Thread Dan
What is best way to get equivalent of C++ private inheritance combined with using declarations in the drived to expose some functionality. For example, suppose I want a basic RateCurve class that defers almost entirely to type Array as below. The problem is, once RateCurve is moved to a differe

Import Libs, DLLs, 64bit and 32bit

2012-10-12 Thread David
I really don't know where to ask that, I hope you can help me :). Is it possible to use an import lib generated with implib on 32bit on a 64bit machine? And if so, is it also possible to have dlls which work for 32 and 64bit?

Re: In Expression for Static and DYnamic Arrays

2012-10-12 Thread Nick Sabalausky
On Fri, 12 Oct 2012 19:18:31 +0200 "Jonathan M Davis" wrote: > On Thursday, October 11, 2012 18:45:36 Rizo Isrof wrote: > > Hi, > > > > Why the `in` expression can only be applied to associative > > arrays and cannot be used with static or dynamic arrays as > > it is possible with, _e.g._, Pytho

Re: Automated D code editing?

2012-10-12 Thread Nick Sabalausky
On Fri, 12 Oct 2012 19:51:02 +0200 Lubos Pintes wrote: > Hi, > I am still playing with DGUI library. Besides other things, I would > like to convert enum names from > "THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE" to > "thisGoodOne". Obviously I could do this by hand but it is a bit tim

Re: Automated D code editing?

2012-10-12 Thread Aziz K.
On Fri, 12 Oct 2012 19:51:02 +0200, Lubos Pintes wrote: Hi, I am still playing with DGUI library. Besides other things, I would like to convert enum names from "THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE" to "thisGoodOne". Obviously I could do this by hand but it is a bit time co

Re: revamped candydoc

2012-10-12 Thread Aziz K.
On Thu, 11 Oct 2012 21:30:11 +0200, Jacob Carlborg wrote: I liked the style that the Tango docs are using much better. What? You don't like my soft, green colours? Shame on you! :P Ok, I'm not happy with the style myself, but I want to concentrate on functionality more atm.

Re: In Expression for Static and DYnamic Arrays

2012-10-12 Thread bearophile
Jonathan M Davis: Because that would mean than in was O(n), whereas it's generally assumed to be at least o(log n) (which is what you'd get in a balanced binary tree such as red-black tree). AA's do it in O(1), so they're okay, but dynamic arrays can't do better than O(n). Time ago the built

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
I would be grateful if someone share singly linked list based on cas() Ok, this is a good opportunity to learn how to write such by oneself :-)

Automated D code editing?

2012-10-12 Thread Lubos Pintes
Hi, I am still playing with DGUI library. Besides other things, I would like to convert enum names from "THIS_STUPID_NAMING_CONVENTION_WHICH_I_ABSOLUTELY_HATE" to "thisGoodOne". Obviously I could do this by hand but it is a bit time consuming. Any tool / hack to help me with this? Thank

Re: LockingTextWriter/Reader

2012-10-12 Thread Steven Schveighoffer
On Fri, 12 Oct 2012 13:06:16 -0400, Adam D. Ruppe wrote: std.stdio has a nice struct called LockingTextReader in the source. The thing is it isn't documented at all, and I don't think it even does its own interface. It claims to return dchars, but apparently reads bytes. Its counterpart

Re: Save JSONValue binary in file?

2012-10-12 Thread Piotr Szturmaj
Chopin wrote: Thanks! I tried using it: auto document = parseJSON(content).array; // this works with std.json :) Using json.d from the link: auto j = JSONReader!string(content); auto document = j.value.whole.array; // this doesn't "Error: undefined identifier 'array'" If you're sure that

Re: Save JSONValue binary in file?

2012-10-12 Thread Chopin
Thanks! I tried using it: auto document = parseJSON(content).array; // this works with std.json :) Using json.d from the link: auto j = JSONReader!string(content); auto document = j.value.whole.array; // this doesn't "Error: undefined identifier 'array'"

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
Thanks for answer! After investigation came to the conclusion that here is needed not synchronized-based solution. I am need compare-and-swap single linked list because it will be used in callback proc from C, and it cannot be throwable, but synchronized contains throwable _d_monitorenter and

Re: In Expression for Static and DYnamic Arrays

2012-10-12 Thread Jonathan M Davis
On Thursday, October 11, 2012 18:45:36 Rizo Isrof wrote: > Hi, > > Why the `in` expression can only be applied to associative > arrays and cannot be used with static or dynamic arrays as > it is possible with, _e.g._, Python? > > The following code is not legal: > > int[] a = [1,2,3,4,5]; >

In Expression for Static and DYnamic Arrays

2012-10-12 Thread Rizo Isrof
Hi, Why the `in` expression can only be applied to associative arrays and cannot be used with static or dynamic arrays as it is possible with, _e.g._, Python? The following code is not legal: int[] a = [1,2,3,4,5]; if (1 in a) { } Are there any technical explanation for this limitation

LockingTextWriter/Reader

2012-10-12 Thread Adam D. Ruppe
std.stdio has a nice struct called LockingTextReader in the source. The thing is it isn't documented at all, and I don't think it even does its own interface. It claims to return dchars, but apparently reads bytes. Its counterpart, LockingTextWriter, seems to do a little more dchar related st

Re: Is there a thread safe single linked list?

2012-10-12 Thread Jonathan M Davis
On Friday, October 12, 2012 14:59:56 denizzzka wrote: > Hi! > > Specifically, pushBack(x) and moveFront() operations should be a > thread safe. Not in Phobos. No containers in Phobos contain any kind of synchronization. The same goes for the built-in array types. If any of them are shared, you'l

Re: Save JSONValue binary in file?

2012-10-12 Thread Piotr Szturmaj
Chopin wrote: Hello! I got this 109 MB json file that I read... and it takes over 32 seconds for parseJSON() to finish it. So I was wondering if it was a way to save it as binary or something like that so I can read it super fast? Thanks for all suggestions :) Try this implementation: https:

Save JSONValue binary in file?

2012-10-12 Thread Chopin
Hello! I got this 109 MB json file that I read... and it takes over 32 seconds for parseJSON() to finish it. So I was wondering if it was a way to save it as binary or something like that so I can read it super fast? Thanks for all suggestions :)

Re: revamped candydoc

2012-10-12 Thread Aziz K.
On Fri, 12 Oct 2012 08:16:54 +0200, Jacob Carlborg wrote: Why is that? Tango is working just fine and Phobos is still missing some stuff that Tango has. Actually, I'm using both and there's nothing wrong with that. Tango is just yet another third party library. Yeah, no disagreement ther

Re: revamped candydoc

2012-10-12 Thread Aziz K.
On Fri, 12 Oct 2012 08:19:23 +0200, Jacob Carlborg wrote: Have a look at this documentation of submodules: http://git-scm.com/book/en/Git-Tools-Submodules Be sure to point submodules to a public address. That was a good read, but unfortunately it deterred me from using submodules. Sounds

Re: revamped candydoc

2012-10-12 Thread Dan
On Thursday, 11 October 2012 at 18:08:47 UTC, Aziz K. wrote: I'll be happy to help you compile DIL yourself. That way I can see where my assumptions are false and my instructions are lacking and make it work for different platforms and needs. I've been considering just copying Tango's files to

Re: Is there a thread safe single linked list?

2012-10-12 Thread denizzzka
or dynamic array with this methods

Re: How many std.concurrency receivers?

2012-10-12 Thread Russel Winder
On Thu, 2012-10-11 at 20:30 -0700, Charles Hixson wrote: […] > I'm not clear on what Fibers are. From Ruby they seem to mean > co-routines, and that doesn't have much advantage. But it also seems as […] I think the emerging consensus is that threads allow for pre-emptive scheduling whereas fib

Re: revamped candydoc

2012-10-12 Thread Jakob Ovrum
On Thursday, 11 October 2012 at 14:26:54 UTC, Dan wrote: Also, pointers to any doc generation setup with decent styling that works out of the box would be great. bootDoc[1] uses Twitter's Bootstrap theme for styling, and has a lot of extra features implemented with JavaScript. It works right