[gambit-list] Gambit linking
feeley at iro.umontreal.ca
Thu Nov 7 13:05:53 EST 2013
On Nov 7, 2013, at 1:00 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
> On 11/07/2013 12:57 PM, Marc Feeley wrote:
>> On Nov 7, 2013, at 11:04 AM, Mikael <mikael.rcv at gmail.com> wrote:
>>> Hm, interesting:
>>> Independent of whether Gambit will not have or will have a dep loader built-in, it will be greatly practical that on creation of a new VM, the user can specify code that will be taken in use as main module for interpreted execution by the newly created VM i.e. something like
>>> (create-vm! '(begin (load/preload-module/alike "otherdep.o1") (hello-world) etc.))
>> Communicating some information to a new VM would be nice. However, there are technical problems... the source VM and the target VM don't share the same address space, so it isn't possible to just pass a reference to the new VM (except for symbols, which I intend to make unique over all VMs). So some copying would be involved. But what to do about cyclical data, or data with sharing, or with unserializable data (continuations? foreign pointers?). Passing a string would be easy enough, but it is very limitative and doesn't feel schemey.
> What about serializing things? This is what my students do when hooking
> up Gambit and MPI.
Some things can't be serialized, for example foreign pointers. So in general, a port can't be serialized. Closures and continuations are also problematic, because they contain a pointer to code and the module which this code belongs to in the source VM may not be loaded in the new VM.
More information about the Gambit-list