From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,DNS_FROM_SECURITYSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id C2F26BBAF for ; Thu, 23 Oct 2008 17:34:24 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4AAEg2AEnOvjGwkWdsb2JhbACTcAEBAQEJCwoHEQOkP4g6BQIBg0s X-IronPort-AV: E=Sophos;i="4.33,470,1220220000"; d="scan'208";a="18426741" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Oct 2008 17:34:24 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9NFYNSh000698 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 23 Oct 2008 17:34:24 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4AAEg2AEnOvjGwkWdsb2JhbACTcAEBAQEJCwoHEQOkP4g6BQIBg0s X-IronPort-AV: E=Sophos;i="4.33,470,1220220000"; d="scan'208";a="18426740" Received: from web54606.mail.re2.yahoo.com ([206.190.49.176]) by mail3-smtp-sop.national.inria.fr with SMTP; 23 Oct 2008 17:34:23 +0200 Received: (qmail 70911 invoked by uid 60001); 23 Oct 2008 15:34:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=AW5G3eEj/VKA6Pnq26GGvOLWypfB9G3VDzmeQDwfbfFuqJu0Yt65DiX2jlSnuKfWpkFq6Sm7WUUN4v1LCK5YTxZXWxn8J3yzGaQJJy3FU9T71xDU8t/HcABoxwIJo7ZKgG79MqFNgVGBOmtrisgvKv7VzFDrM5LOHQv5nuq+aB8=; X-YMail-OSG: 7Tt3P7UVM1kQK4IjncytyPR4gbemY3uUGrndYkJQnvkAup6oYZplfbHmDP9S2ZZml5NiUiVfGlTDu62lEZT1FrCBW2XgEFGXzPu9d1wz3c8GcTE2cGehC47SYV4T9BP1oX0lPKy5gPbi3MyeGjsWNU2g9Ub9xhPY9x._5iz_ Received: from [82.155.121.213] by web54606.mail.re2.yahoo.com via HTTP; Thu, 23 Oct 2008 08:34:21 PDT X-Mailer: YahooMailWebService/0.7.247.3 Date: Thu, 23 Oct 2008 08:34:21 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Re: Serialisation of PXP DTDs To: caml-list@inria.fr, Sylvain Le Gall In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <33055.70791.qm@web54606.mail.re2.yahoo.com> X-Miltered: at discorde with ID 4900997F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; pxp:01 dtds:01 encodes:01 foobar:01 syntax:01 trivial:01 foobar:01 substituted:01 pxp:01 dtds:01 gerd:01 opaque:01 caml-list:01 functions:01 marshal:01 Hi, First, and concerning the more general problem of serialisation: one often comes across a situation where a library encodes a very complex and opaque value of type Foobar.t, but offers no dedicated (de)serialisation functions. The assumption is of course that users can just use Marshal and be done with. There are however situations for which Marshal is badly suited. Long term storage is one, and portability is another. Moreover, if the value is an object and you wish to carry it across process boundaries, using Marshal is just not possible. Take also into consideration that the Sexplib syntax extension makes it trivial to add (de)serialisers to a data structure. The litmus test for considering this task should be "is there any reasonable situation where users of my Foobar library would like to serialise Foobar.t values in a portable and long-term manner?". If the answer is yes, I reckon it wouldn't be too much to ask that the library adds support for Sexplib. Note that in the paragraph above, "Sexplib" may be substituted by another serialisation mechanism. And this gets us to the question of performance numbers you speak of. In fact, besides performance I would like to bring other variables to the table: - ease of use - "future-proofness" - portability - human-readability Sexplib scores very good on ease of use, future-proofness, and portability, and reasonably good on performance and human-readability. My guess is that bin-prot has better performance but worse portability and future-proofness, and nill human-readability. Marshal gets top scores in performance and ease of use, but fails miserably in future-proofness, human-readability, and portability. As for my particular problem with PXP DTDs, I will look at writing a (de)serialiser by hand. According to Gerd it shouldn't be too much trouble. Best regards, Dario Teixeira =0A=0A=0A