Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
A Few Questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-12-19 (22:31)
From: Nathaniel Gray <n8gray@g...>
Subject: Re: [Caml-list] A Few Questions
On 12/17/06, Jonathan T Bryant <> wrote:

> 4) I've found that in sending functions across sockets, I can only send
> them between copies of the
> exact same binary image.  Is it possible to marshal functions to
> different binaries of the same code,
> i.e., different platforms?  Again, does native vs. bytecode make a
> difference?

Nope.  From the docs for Marshal.to_channel:

If flags contains Marshal.Closures, functional values will be
marshaled as a position in the code of the program. In this case, the
output of marshaling can only be read back in processes that run
exactly the same program, with exactly the same compiled code. (This
is checked at un-marshaling time, using an MD5 digest of the code
transmitted along with the code position.)


>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- -->