[MLton] Serialization?

mael@itu.dk mael@itu.dk
Mon, 4 Jul 2005 15:16:07 +0200 (CEST)


See [1]. Code and paper is available from
http://www.itu.dk/people/mael/papers.html

[1] Martin Elsman. Type-Specialized Serialization with Sharing. IT
University of Copenhagen. IT University Technical Report Series.
TR-2004-43. February, 2004.

Cheers,

Martin

> I was wondering if anyone has a good idea how to implement a generic
> serialization library _without_ language support?
>
> I mean something like: val serialize: 'a -> string
> and                    val deserialize: string -> 'a
>
> Assuming Matthew ever makes the bytecode portable ;), then everything in
> SML
> should be pretty easy to serialize/deserialize, but how to do it well? I
> ask
> because the current project I am working on needs to send events across
> the
> wire that correspond to a user-defined type. I could require the user to
> specify how to serialize their type, but it seems to me that MLton already
> has all the information required.
>
> Even if the user is required to serialize things by hand, he would still
> need to be able to ship functions across. Matthew's bytecode seems the
> best
> way to acheive this, but I don't know how feasible it is to run bytecode
> within an existing MLton application.
>
> That said, how can I help make the bytecode portable?
>
> Also, what level of interaction is inteded between a MLton-built
> application
> and bytecode that is run inside it?
>
> ... for me, I just need to be able to call the 'main' function of the
> bytecode with a parameter and recover the result. The bytecode need not
> read any variables from the host, but I imagine some people might want
> that.
> I also don't really want the bytecode to make C-calls of the 'rmdir' sort.
>
> --
> Wesley W. Terpstra
>
> _______________________________________________
> MLton mailing list
> MLton@mlton.org
> http://mlton.org/mailman/listinfo/mlton
>