* [Caml-list] Pickling for OCaml?
@ 2006-01-06 9:59 Jonathan Roewen
2006-01-06 10:16 ` Erik de Castro Lopo
2006-01-06 14:50 ` David MENTRE
0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Roewen @ 2006-01-06 9:59 UTC (permalink / raw)
To: caml-list
Hi,
Has anyone done a pickling library for O'Caml yet?
Kindest Regards,
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 9:59 [Caml-list] Pickling for OCaml? Jonathan Roewen
@ 2006-01-06 10:16 ` Erik de Castro Lopo
2006-01-06 10:27 ` Jonathan Roewen
2006-01-06 14:50 ` David MENTRE
1 sibling, 1 reply; 10+ messages in thread
From: Erik de Castro Lopo @ 2006-01-06 10:16 UTC (permalink / raw)
To: caml-list
Jonathan Roewen wrote:
> Hi,
>
> Has anyone done a pickling library for O'Caml yet?
Will the Marshall module not do?
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
Pastafarianism : http://www.venganza.org/
The intelligent alternative to 'Intelligent Design'.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 10:16 ` Erik de Castro Lopo
@ 2006-01-06 10:27 ` Jonathan Roewen
2006-01-06 14:30 ` Markus Mottl
2006-01-06 15:36 ` Alessandro Baretta
0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Roewen @ 2006-01-06 10:27 UTC (permalink / raw)
To: Erik de Castro Lopo; +Cc: caml-list
> Will the Marshall module not do?
Marshal is unsafe. Pickling is safe. I'd take pickling =)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 10:27 ` Jonathan Roewen
@ 2006-01-06 14:30 ` Markus Mottl
2006-01-06 15:36 ` Alessandro Baretta
1 sibling, 0 replies; 10+ messages in thread
From: Markus Mottl @ 2006-01-06 14:30 UTC (permalink / raw)
To: Jonathan Roewen; +Cc: Erik de Castro Lopo, caml-list
On 1/6/06, Jonathan Roewen <jonathan.roewen@gmail.com> wrote:
> > Will the Marshall module not do?
>
> Marshal is unsafe. Pickling is safe. I'd take pickling =)
You could try our S-expression library, which uses CamlP4 to generate
code for converting arbitrary extensionally defined (= sum and product
types, polymorphic variants, records, types with type variables)
OCaml-types to and from S-expressions:
http://www.janestcapital.com/ocaml
The library is safe and displays understandable error messages when
parsing S-expressions. One can choose whether to print values in
human-readable ways or in very compact machine-readable (somewhat
human-readable) form. It's also very easy to write down OCaml-values
in S-expression syntax, which makes it ideal for complex configuration
files.
Regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 9:59 [Caml-list] Pickling for OCaml? Jonathan Roewen
2006-01-06 10:16 ` Erik de Castro Lopo
@ 2006-01-06 14:50 ` David MENTRE
1 sibling, 0 replies; 10+ messages in thread
From: David MENTRE @ 2006-01-06 14:50 UTC (permalink / raw)
To: Jonathan Roewen; +Cc: caml-list
Hello,
2006/1/6, Jonathan Roewen <jonathan.roewen@gmail.com>:
> Has anyone done a pickling library for O'Caml yet?
What does mean "pickling"?
Best wishes,
d.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 10:27 ` Jonathan Roewen
2006-01-06 14:30 ` Markus Mottl
@ 2006-01-06 15:36 ` Alessandro Baretta
2006-01-06 16:02 ` Mark Shinwell
1 sibling, 1 reply; 10+ messages in thread
From: Alessandro Baretta @ 2006-01-06 15:36 UTC (permalink / raw)
To: Jonathan Roewen, Ocaml
Jonathan Roewen wrote:
>>Will the Marshall module not do?
>
>
> Marshal is unsafe. Pickling is safe. I'd take pickling =)
Marshalling and "pickling" are synonyms. The Marshal module does not provide
runtime checks, yet, but the Caml team is working at it, as far as I know.
Alex
--
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL
tel. +39 02 370 111 55
fax. +39 02 370 111 54
Our technology:
The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>
The FreerP Project
<http://www.freerp.org/>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 15:36 ` Alessandro Baretta
@ 2006-01-06 16:02 ` Mark Shinwell
2006-01-11 4:48 ` Jonathan Roewen
0 siblings, 1 reply; 10+ messages in thread
From: Mark Shinwell @ 2006-01-06 16:02 UTC (permalink / raw)
To: caml-list
On Fri, Jan 06, 2006 at 04:36:34PM +0100, Alessandro Baretta wrote:
> Jonathan Roewen wrote:
> >>Will the Marshall module not do?
> >
> >
> >Marshal is unsafe. Pickling is safe. I'd take pickling =)
>
> Marshalling and "pickling" are synonyms. The Marshal module does not
> provide runtime checks, yet, but the Caml team is working at it, as far as
> I know.
Myself and others at Cambridge, headed by Peter Sewell, are working on
type- and abstraction-safe marshalling for O'Caml that works even where
values to be marshalled are passed through polymorphic functions.
Expect to hear more later this year.
Mark
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-06 16:02 ` Mark Shinwell
@ 2006-01-11 4:48 ` Jonathan Roewen
2006-01-11 4:50 ` Jonathan Roewen
2006-01-11 8:16 ` Alessandro Baretta
0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Roewen @ 2006-01-11 4:48 UTC (permalink / raw)
To: Mark Shinwell; +Cc: caml-list
> > Marshalling and "pickling" are synonyms. The Marshal module does not
> > provide runtime checks, yet, but the Caml team is working at it, as far as
> > I know.
>
> Myself and others at Cambridge, headed by Peter Sewell, are working on
> type- and abstraction-safe marshalling for O'Caml that works even where
> values to be marshalled are passed through polymorphic functions.
> Expect to hear more later this year.
Well, in the meantime, we've ported most of the pickling library from
SML.NET to work with O'Caml. Supports most of the basic types
(int,bool,char,string,list,array,unit,pairs->sextuples) and a few
combinators (alttag, wrap, lift,seq).
Fairly easy to define a pickler:
module BytePickle = Pickle.CorePickle(Pickle.ByteCodec)
open BytePickle
let pickler = pair (string list,int)
let data = pickle pickler (["hello";"world"],-1)
let value = unpickle pickler (List.rev data)
Files at http://devnulled.ath.cx/svn/dst/kernel/pickle.ml &
http://devnulled.ath.cx/svn/dst/kernel/pickle.mli
Kindest Regards,
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-11 4:48 ` Jonathan Roewen
@ 2006-01-11 4:50 ` Jonathan Roewen
2006-01-11 8:16 ` Alessandro Baretta
1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Roewen @ 2006-01-11 4:50 UTC (permalink / raw)
Cc: caml-list
Oops, URLs are wrong =(
Files at http://devnulled.ath.cx/svn/dst/trunk/kernel/pickle.ml &
http://devnulled.ath.cx/svn/dst/trunk/kernel/pickle.mli
> Well, in the meantime, we've ported most of the pickling library from
> SML.NET to work with O'Caml. Supports most of the basic types
> (int,bool,char,string,list,array,unit,pairs->sextuples) and a few
> combinators (alttag, wrap, lift,seq).
>
> Fairly easy to define a pickler:
>
> module BytePickle = Pickle.CorePickle(Pickle.ByteCodec)
> open BytePickle
>
> let pickler = pair (string list,int)
>
> let data = pickle pickler (["hello";"world"],-1)
>
> let value = unpickle pickler (List.rev data)
>
> Files at http://devnulled.ath.cx/svn/dst/kernel/pickle.ml &
> http://devnulled.ath.cx/svn/dst/kernel/pickle.mli
>
> Kindest Regards,
>
> Jonathan
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Caml-list] Pickling for OCaml?
2006-01-11 4:48 ` Jonathan Roewen
2006-01-11 4:50 ` Jonathan Roewen
@ 2006-01-11 8:16 ` Alessandro Baretta
1 sibling, 0 replies; 10+ messages in thread
From: Alessandro Baretta @ 2006-01-11 8:16 UTC (permalink / raw)
To: Jonathan Roewen; +Cc: caml-list
Jonathan Roewen wrote:
> let pickler = pair (string list,int)
>
> let data = pickle pickler (["hello";"world"],-1)
>
> let value = unpickle pickler (List.rev data)
Neat trick!
Alex
--
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL
tel. +39 02 370 111 55
fax. +39 02 370 111 54
Our technology:
The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>
The FreerP Project
<http://www.freerp.org/>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-01-11 8:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06 9:59 [Caml-list] Pickling for OCaml? Jonathan Roewen
2006-01-06 10:16 ` Erik de Castro Lopo
2006-01-06 10:27 ` Jonathan Roewen
2006-01-06 14:30 ` Markus Mottl
2006-01-06 15:36 ` Alessandro Baretta
2006-01-06 16:02 ` Mark Shinwell
2006-01-11 4:48 ` Jonathan Roewen
2006-01-11 4:50 ` Jonathan Roewen
2006-01-11 8:16 ` Alessandro Baretta
2006-01-06 14:50 ` David MENTRE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox