caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Simon Cruanes <simon.cruanes.2007@m4x.org>
To: OCaml users <caml-list@inria.fr>
Subject: [Caml-list] [ANN] cconv-0.2
Date: Mon, 1 Dec 2014 10:44:30 +0100	[thread overview]
Message-ID: <20141201094430.GA8862@fuck_yeah> (raw)

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

Hi everyone,

I'm happy to announce the release of cconv 0.2 [1]. CConv is a
BSD-licensed combinators library for serializing and unserializing data
structures.  It particularity is that it doesn't target a specific
serialization format, but any format that is expressive enough (using
some type machinery involving a few GADTs and visitor patterns).

The rationale is that, for library writers, the current go-to practice
to provide some serialization support is to use type_conv and "with sexp".
This requires camlp4 and a lot of libraries, and forces the choice of
S-expressions on the user. Instead, by providing CConv encoders and
decoders, the user could choose which serialization format (even simple
printing) to use by herself.

To serialize values of type 'a, one can write a value of type ['a
CConv.Encode.encoder] that can be used with any serialization backend;
to unserialize, it's a value of type ['a CConv.Decode.decoder].
Then, cconv ships with three (optional) backends, to Yojson, Bencode and
Sexplib; an ['a encoder] can be used with any of those three (same for
decoders). See the readme [2] for more details.

There will be a ppx_deriving [3] instance [4] soon for automatically
generating decoders and encoders based on types.

If anyone used cconv-0.1, I apologize for the change of interface. The
ideas took time to evolve...

As usual, bug reports, comments, criticism and accusations of
reinventing the wheel are all welcome.

Cheers,

-- 
Simon

[1] https://github.com/c-cube/cconv/tree/0.2
[2] https://github.com/c-cube/cconv/blob/0.2/README.md#usage
[3] https://github.com/whitequark/ppx_deriving
[4] https://github.com/c-cube/ppx_deriving_cconv (work in progress, comments appreciated!)

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2014-12-01  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  9:44 Simon Cruanes [this message]
2014-12-01 10:15 ` Thomas Gazagnaire
2014-12-01 10:52   ` Simon Cruanes
2014-12-01 13:00     ` Simon Cruanes

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=20141201094430.GA8862@fuck_yeah \
    --to=simon.cruanes.2007@m4x.org \
    --cc=caml-list@inria.fr \
    /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).