From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: luca@dealfaro.org
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] picking / marshaling to strings in ocaml-revision-stable way
Date: Sat, 31 May 2008 17:43:14 +0900 (JST) [thread overview]
Message-ID: <20080531.174314.107716495.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <28fa90930805302343n18b98b17t72a22ea82539fc6f@mail.gmail.com>
From: "Luca de Alfaro" <luca@dealfaro.org>
> I need a way to convert data structures to strings, in a way that is robust
> with respect to different versions of Ocaml.
> What I need to translate are mostly mixes of tuples, lists and variant
> types. A typical example of data to marshal/pickle may look like:
>
> (3.4, [Move (4, 3, 5); Del (4, 2); Ins (4, 2)], "an example")
>
> I heard that the marshaling of the module Marshal is not robust with respect
> to changes in the version of Ocaml, and since I need to insert the data in a
> database for long-term use, this is a serious drawback. I need the
> marshaling and unmarshaling to be completely independent from the version of
> Ocaml, and from the particular architecture where the marshaling occurs.
> I could of course write my own solution, but I am wondering if there are any
> suitable modules available that I could use.
AFAIK, ocaml's marshalling doesn't depend on the version, and is
architecture independent (there is only a limitation with integer
overflow when passing more than 31-bit integer values from 64-bit to
32-bit). So marshalling should be sufficient for your needs.
It is however sensitive to the data format you use (the types for your
data), and there is currently no way to verify that the type has not
changed between two versions of a program.
---------------------------------------------------------------------------
Jacques Garrigue Nagoya University garrigue at math.nagoya-u.ac.jp
<A HREF=http://www.math.nagoya-u.ac.jp/~garrigue/>JG</A>
next prev parent reply other threads:[~2008-05-31 8:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 6:43 Luca de Alfaro
2008-05-31 7:24 ` [Caml-list] " asmadeus77
2008-05-31 8:43 ` Jacques Garrigue [this message]
2008-05-31 9:38 ` Berke Durak
2008-05-31 16:54 ` Luca de Alfaro
2008-05-31 17:00 ` Robert Fischer
2008-05-31 17:24 ` Luca de Alfaro
2008-05-31 22:18 ` Martin Jambon
2008-05-31 17:25 ` blue storm
2008-05-31 21:34 ` Berke Durak
2008-05-31 22:51 ` Stefano Zacchiroli
2008-06-02 9:04 ` Berke Durak
2008-06-02 9:21 ` Stefano Zacchiroli
2008-06-01 11:14 ` Martin Jambon
2008-06-02 11:13 ` Richard Jones
2008-05-31 17:06 ` Yaron Minsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080531.174314.107716495.garrigue@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=luca@dealfaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).