Re: Bug on dmd or gdc ?

2014-07-28 Thread bearophile via Digitalmars-d-learn
Domingo Alvarez Duarte: Based on a question about manually allocated structures with payload I found that a solution proposed seems to work when compiled with dmd but segfaults when compiled with gdc. ... int size; char[0] _b; @property char[] bu

Tracing down core.exception.InvalidMemoryOperationError

2014-07-28 Thread Martin Drasar via Digitalmars-d-learn
Hi, at the end of my program it throws InvalidMemoryOperationError. Looking at the documentation and past forum questions I learned that it is probably because of allocations in destructors. However, I have no such thing in my code (at least not intentionally). I am suspecting the std.logger packa

Re: Bug on dmd or gdc ?

2014-07-28 Thread Domingo Alvarez Duarte via Digitalmars-d-learn
On Monday, 28 July 2014 at 08:16:37 UTC, bearophile wrote: Domingo Alvarez Duarte: Based on a question about manually allocated structures with payload I found that a solution proposed seems to work when compiled with dmd but segfaults when compiled with gdc. ... int size;

Re: Tracing down core.exception.InvalidMemoryOperationError

2014-07-28 Thread Joakim via Digitalmars-d-learn
On Monday, 28 July 2014 at 09:38:35 UTC, Martin Drasar via Digitalmars-d-learn wrote: Hi, at the end of my program it throws InvalidMemoryOperationError. Looking at the documentation and past forum questions I learned that it is probably because of allocations in destructors. However, I have

Re: Tracing down core.exception.InvalidMemoryOperationError

2014-07-28 Thread Martin Drasar via Digitalmars-d-learn
On 28.7.2014 14:09, Joakim via Digitalmars-d-learn wrote: > More broadly speaking, it is thrown whenever certain memory operations > are attempted while the GC is running, 6 in all, as you can see here: > > https://github.com/D-Programming-Language/druntime/blob/master/src/gc/gc.d#L458 > > > I b

D may disappoint in the presence of an alien Garbage Collector?

2014-07-28 Thread Carl Sturtivant via Digitalmars-d-learn
Suppose I want to use D as a system programming language to work with a library of functions written in another language, operating on dynamically typed data that has its own garbage collector, such as an algebra system or the virtual machine of a dynamically typed scripting language viewed as

Re: D may disappoint in the presence of an alien Garbage Collector?

2014-07-28 Thread Anton via Digitalmars-d-learn
On Monday, 28 July 2014 at 19:57:38 UTC, Carl Sturtivant wrote: Suppose I want to use D as a system programming language to work with a library of functions written in another language, operating on dynamically typed data that has its own garbage collector, such as an algebra system or the virt

Re: D may disappoint in the presence of an alien Garbage Collector?

2014-07-28 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 28 July 2014 at 19:57:38 UTC, Carl Sturtivant wrote: Suppose I want to use D as a system programming language to work with a library of functions written in another language, operating on dynamically typed data that has its own garbage collector, such as an algebra system or the virt

Re: Tracing down core.exception.InvalidMemoryOperationError

2014-07-28 Thread Joakim via Digitalmars-d-learn
On Monday, 28 July 2014 at 13:31:08 UTC, Martin Drasar via Digitalmars-d-learn wrote: On 28.7.2014 14:09, Joakim via Digitalmars-d-learn wrote: More broadly speaking, it is thrown whenever certain memory operations are attempted while the GC is running, 6 in all, as you can see here: https://

Re: Tracing down core.exception.InvalidMemoryOperationError

2014-07-28 Thread fra via Digitalmars-d-learn
On Monday, 28 July 2014 at 22:13:56 UTC, Joakim wrote: On Monday, 28 July 2014 at 13:31:08 UTC, Martin Drasar via Digitalmars-d-learn wrote: On 28.7.2014 14:09, Joakim via Digitalmars-d-learn wrote: More broadly speaking, it is thrown whenever certain memory operations are attempted while the G

Re: Showing a user specified error message when no overloads match

2014-07-28 Thread Vlad Levenfeld via Digitalmars-d-learn
opDispatch behaves as though it has SFINAE. When something fails in the definition (like I am having now, some of the symbols I used in it hadn't been imported) there won't ever be an error message, I just get "Error: no property 'bar' for type 'Foo'" In one case I had to use static ifs and pr