Re: Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Andres Clari via Digitalmars-d-learn
On Monday, 22 January 2018 at 06:15:24 UTC, Dmitry Olshansky wrote: On Sunday, 21 January 2018 at 17:28:13 UTC, Andres Clari wrote: Hi, is there any way to get from the GC all allocated objects, so I can see their size and find where I'm leaking memory? Or perhaps a good tool to help with this

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Dmitry Olshansky via Digitalmars-d-learn
On Sunday, 21 January 2018 at 17:28:13 UTC, Andres Clari wrote: Hi, is there any way to get from the GC all allocated objects, so I can see their size and find where I'm leaking memory? Or perhaps a good tool to help with this issue... I tried building my program with "profile-gc" but I got

Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
On Sunday, 21 January 2018 at 20:46:56 UTC, Timon Gehr wrote: On 21.01.2018 21:20, Mark wrote: Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919 'in' means 'const scope', but it seems you need references that are allowed to mutate the

Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Timon Gehr via Digitalmars-d-learn
On 21.01.2018 21:20, Mark wrote: Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919 'in' means 'const scope', but it seems you need references that are allowed to mutate the incoming items. Remove the 'in' attribute from the parameters

Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919

Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
Hello, I re wrote my old BST. This one is far more complete and clean. However, It fails my final unittest when I try to stick a class in as its type. Link: https://dpaste.dzfl.pl/95e1ae49b25b Ive done this type of thing before, but it is giving me this error: BinarySearchTree.d(30):

Re: How do I solve this kind of conflict?

2018-01-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 21 January 2018 at 16:22:33 UTC, Marc wrote: But libraries has this defined: extern(C) int callback(void*, int, char** , char**){ Just rename one of the functions. It is really bad form to have extern(C) functions have a common word like this exactly because they share a

Re: Cannot initialize associative array

2018-01-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-01-20 00:16, rumbu wrote: According to this (https://dlang.org/spec/hash-map.html#static_initialization) this is correct static initialization for AA: immutable RoundingMode[string] ibmRounding = [     ">" : RoundingMode.towardPositive,     "<" : RoundingMode.towardNegative,    

Get largest heap object at runtime? ...tracking the leak

2018-01-21 Thread Andres Clari via Digitalmars-d-learn
Hi, is there any way to get from the GC all allocated objects, so I can see their size and find where I'm leaking memory? Or perhaps a good tool to help with this issue... I tried building my program with "profile-gc" but I got an invalid MemoryOperationError with no stack trace... so no luck

How do I solve this kind of conflict?

2018-01-21 Thread Marc via Digitalmars-d-learn
I was using a Sqlite3 library then I included another library that started the conflict. From what I could tell, it seems it's another Sqlite3 engine that the included library uses. The link error is:

Re: -transition=safe and DIP1000

2018-01-21 Thread Carsten Blüggel via Digitalmars-d-learn
My understanding is, currently read DIP1000 as: "NB: this DIP is out of sync with -dip1000 compiler switch implementation ...". My own current problem fits well in this thread: I want to push forward support of -dip1000 in phobos, testing each module's compatibility with -dip1000

Re: -transition=safe and DIP1000

2018-01-21 Thread Carsten Blüggel via Digitalmars-d-learn
On Sunday, 21 January 2018 at 10:27:05 UTC, Mike Franklin wrote: On Sunday, 21 January 2018 at 10:04:36 UTC, Mike Franklin wrote: What is/was `transition=safe`? I can't find any documentation on it. Adding -transition=? to the dmd (v2.078.0) command line doesn't show safe listed. My

Re: -transition=safe and DIP1000

2018-01-21 Thread Mike Franklin via Digitalmars-d-learn
On Sunday, 21 January 2018 at 10:04:36 UTC, Mike Franklin wrote: What is/was `transition=safe`? I can't find any documentation on it. Well, I found http://forum.dlang.org/post/gquxgusfhyigirfpe...@forum.dlang.org But, didn't really clear much up for me.

Re: -transition=safe and DIP1000

2018-01-21 Thread ketmar via Digitalmars-d-learn
Mike Franklin wrote: And what does "NB" mean? "nota bene". used as "pay attention to the following".

-transition=safe and DIP1000

2018-01-21 Thread Mike Franklin via Digitalmars-d-learn
I found the following statement in the DIP1000 document (https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md) NB: this DIP is out of sync with -transition=safe implementation available in dmd and pending a rewrite. Most key points still apply though. What is/was `transition=safe`? I