Re: Nobody understands templates?

2014-03-05 Thread develop32
On Wednesday, 5 March 2014 at 23:47:33 UTC, H. S. Teoh wrote: Whoa. What did you do with those arrays?? Either you did something wrong, or there's a nasty bug somewhere in the compiler/language; AFAIK static arrays are supposed to be value types so they shouldn't generate any garbage at all.

Re: Nobody understands templates?

2014-03-05 Thread develop32
On Wednesday, 5 March 2014 at 22:46:40 UTC, sclytrack wrote: Are there any disadvantages of using a fixed size array for fixed size coordinates and vectors, over creating an actual typedef or struct Vec3? Don't know what's the current situation in druntime, but when I tried static arrays a wh

Re: D and C++

2013-10-21 Thread develop32
On Monday, 21 October 2013 at 11:08:15 UTC, qznc wrote: On Saturday, 19 October 2013 at 13:20:28 UTC, develop32 wrote: Hi, Are there any recent improvements in how D interfaces with C++? I got the impression that some work has been done on that, in order to make DMD a self-hosting compiler

D and C++

2013-10-19 Thread develop32
Hi, Are there any recent improvements in how D interfaces with C++? I got the impression that some work has been done on that, in order to make DMD a self-hosting compiler.

Re: Memory leaks

2013-10-13 Thread develop32
On Sunday, 13 October 2013 at 14:31:13 UTC, Benjamin Thaut wrote: Am 13.10.2013 16:23, schrieb develop32: On Sunday, 13 October 2013 at 14:13:39 UTC, Benjamin Thaut wrote: Am 13.10.2013 15:52, schrieb develop32: On Sunday, 13 October 2013 at 13:18:47 UTC, Benjamin Thaut wrote: Am 13.10.2013

Re: Memory leaks

2013-10-13 Thread develop32
On Sunday, 13 October 2013 at 14:01:09 UTC, Adam D. Ruppe wrote: On Sunday, 13 October 2013 at 13:46:13 UTC, develop32 wrote: My question is, are there any more places in druntime that I can change so that I will get a notification when allocation occurs, besides _d_allocmemory? I set

Re: Memory leaks

2013-10-13 Thread develop32
On Sunday, 13 October 2013 at 14:13:39 UTC, Benjamin Thaut wrote: Am 13.10.2013 15:52, schrieb develop32: On Sunday, 13 October 2013 at 13:18:47 UTC, Benjamin Thaut wrote: Am 13.10.2013 14:08, schrieb develop32: Windows task manager shows constantly increasing memory usage of my D application

Re: Memory leaks

2013-10-13 Thread develop32
On Sunday, 13 October 2013 at 13:18:47 UTC, Benjamin Thaut wrote: Am 13.10.2013 14:08, schrieb develop32: Windows task manager shows constantly increasing memory usage of my D application, yet there is ZERO allocation done by it at the time. I have made a hook inside the rt/lifetime.d for

Re: Memory leaks

2013-10-13 Thread develop32
On Sunday, 13 October 2013 at 13:18:47 UTC, Benjamin Thaut wrote: Am 13.10.2013 14:08, schrieb develop32: Windows task manager shows constantly increasing memory usage of my D application, yet there is ZERO allocation done by it at the time. I have made a hook inside the rt/lifetime.d for

Memory leaks

2013-10-13 Thread develop32
Windows task manager shows constantly increasing memory usage of my D application, yet there is ZERO allocation done by it at the time. I have made a hook inside the rt/lifetime.d for _d_allocmemory, and I do get notified when an array or a class object in constructed. What could be the source

Re: Are properties actually all that good?

2013-07-22 Thread develop32
On Monday, 22 July 2013 at 16:42:57 UTC, Land wrote: Thank you for the replies. So, what's the bottom line? Should I use accessor methods or should I use properties? (I've read quite a bit of the mentioned 500-post topic, by the way, but I'm still not clear on what's the most logical step here)

Re: Strange output

2013-06-07 Thread develop32
On Friday, 7 June 2013 at 19:10:54 UTC, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. module main; import std.stdio; import std.conv; int main(string[] argv) { auto de = find!(delegate(a) { return a < 5; })([10

Re: Emplace using private constructor

2013-06-07 Thread develop32
On Friday, 7 June 2013 at 16:14:25 UTC, Ali Çehreli wrote: But it is too heavy-handed. Your problem exposes a real weakness. Other... Well, its not *that* heavy. // Inside Display class. auto display = alloc!Display; display.__ctor(name); Where alloc(T) is a bigger part of the original emplac

Re: Emplace using private constructor

2013-06-07 Thread develop32
Nevermind, problem was not worth the question. I just copied code from Phobos std.conv.emplace and placed it directly in my code, it works since it is in the same module as the private constructor.

Emplace using private constructor

2013-06-07 Thread develop32
In a project I'm working on there are classes that are available publicly but I want to disable their construction outside of their modules. class Display { const string name; private this(string name) { this.name = name; } static Display[] all() { // Returns all