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

2014-07-29 Thread Kagamin via Digitalmars-d-learn
Registering a descriptor with moving GC is not enough, you should also fix the pointer so that it's not moved.

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

2014-07-29 Thread Kagamin via Digitalmars-d-learn
The better way would be to interact through a COM interface, which would abstract tricks of the library code. Advanced environments are usually able to generate such interface.

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

2014-07-29 Thread Carl Sturtivant via Digitalmars-d-learn
On Monday, 28 July 2014 at 21:33:54 UTC, Rene Zwanenburg wrote: If I understand you correctly, an easy way is to use RefCounted with a simple wrapper. Something like this: // Descriptor defined by the external library struct DescriptorImpl { size_t type; void* data; } // Tiny wrapper

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

2014-07-29 Thread Carl Sturtivant via Digitalmars-d-learn
On Monday, 28 July 2014 at 20:52:01 UTC, Anton wrote: 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

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

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