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=1.4 required=5.0 tests=SPF_NEUTRAL 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 D1251BBCA for ; Tue, 26 Feb 2008 23:02:57 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACcbxEfAXQImh2dsb2JhbACQaAEBAQgKKYENk1SHbQ X-IronPort-AV: E=Sophos;i="4.25,409,1199660400"; d="scan'208";a="9625599" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Feb 2008 23:02:57 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1QM2sng015922 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 26 Feb 2008 23:02:57 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKAbxEfY7zq7hmdsb2JhbACQaAEBAQcFBAkKGIENk2GHbQ X-IronPort-AV: E=Sophos;i="4.25,409,1199660400"; d="scan'208";a="8624533" Received: from gv-out-0910.google.com ([216.239.58.187]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Feb 2008 23:02:56 +0100 Received: by gv-out-0910.google.com with SMTP id i36so851567gve.28 for ; Tue, 26 Feb 2008 14:02:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=C2AX1itpgZ2VDl5PnZcYzEwbcYxlJQs1NghYixyANhM=; b=OCtshiuzq+ro1p4AkpZbkRVRk9/PCOd7kdkmknpebVL6EaFDwH7DlVupi1+IE/NLVUPQxhki3+ZuBa/CqLdk4U0zn02Vdox0jDg62ajVUtFIc7GrqdxaO6gBmvVKXKlXKGdsFlGdPAuzee7tDHc4PsoabI0NAig6KfRmUYTasVY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XO0bCylMjhZ4JnX50E7W7WchklnrkOkiP+vfUDVxR/DoRl7knCCnmLhz7XBnBOuY0gTcSe+l9ou/7RDBnzuHPi08F9fUzWHNiD9/9vJxJ07golRr4iZaeBm7BknG+Uwbdz19D1+H/T4oiNksn+9JXBxDIVPQjagSKOHcovvSupQ= Received: by 10.142.226.2 with SMTP id y2mr4346481wfg.46.1204063374022; Tue, 26 Feb 2008 14:02:54 -0800 (PST) Received: by 10.142.98.15 with HTTP; Tue, 26 Feb 2008 14:02:53 -0800 (PST) Message-ID: <9d3ec8300802261402n4546e459qd3fffbebf601606e@mail.gmail.com> Date: Tue, 26 Feb 2008 22:02:53 +0000 From: "Till Varoquaux" To: "David Teller" Subject: Re: [Caml-list] Deriving + type-conv + OCaml-Templates + camlp4* = ? Cc: OCaml In-Reply-To: <1204057629.6163.50.camel@Blefuscu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1204057629.6163.50.camel@Blefuscu> X-Miltered: at discorde with ID 47C48C8E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 sexp:01 markus:01 mottl:01 toying:01 recursive:01 variants:01 compiler:01 browsed:01 vouillon:01 ens-lyon:01 ocaml:01 cheers:01 univ-orleans:01 type-conv in itself just puts the base down to be a common plate for type converter. The main reason for its inception was to avoid conflicts between different camlp4 extensions that scaffold types (e.g. sexp), it does not dispense from writing all that gruesome camlp4 code (this is in no way a critizisme of Nicolas work, hats off to both him and Daniel De Raugladre for the sheer amount of work they have done). Markus Mottl would be able to tell you more. I have not tried Deriving so I am not able to say much about it. I can however point out two approaches I have been involved in: _We (jane street) have recently been experimenting with a Camlp4 extension that automatically projects to and from universal types. It is still in its infancy but seems quite promising (disclaimer: I am the main author of the extention). Since this is such an amazing exciting, revolutionary, ground-breaking etc... project (what kind of monster would say his newborn is ugly) I will preceed the question that is bound to arise: why is not open sourced? 1) It is not my decision to make (this is not as big of an issue as it might seem) 2) Releasing bad code would hurt our credibility and give a bad image. Documenting and polishing this extension is a lot more work that what meets the eyes (Pareto principle....) 3) The code in our system is deeply intertwined doing a clean separation whilst not introducing artificial problems or code duplication is yet again an additional burden. I am fairly confident that if 2 and 3 are solved 1 will not be much of an issue. Of course this is a pie in the sky. _I have been toying with recursive modules, polymorphic variants and Camlp4 to build a toy layered compiler. The code is a nice proof of concept, but, as previously, does not address any of the exotic cases of the long trail (nor does it have proper documentation or error reporting). If you are not scared of having a bumping ride it can be browsed online at: http://till.varoquaux.free.fr/projects/janus/ Now I feel I should give credit (and disclaimers) where due: _I am currently the only person using the first extension. I am fixing it when it breaks down it is not used in critical production code.Do not be under the impression that the code at Jane Street is not carefully peer reviewed. This work was based on work by David Powers and others. As always my statements are purely personnel and do not reflect the views of my employer (although I do not think I am parting much with them). _Jerome Vouillon, Vincent Balat counseled me and guided (err.. suffered) me through the creation of Janus. I should be held responsible for the sorry state it is in, but they are to be praised for the little that has been made. Jacques Garrigue was also of great help, not to mention I stole most of my ideas from his articles. Till On Tue, Feb 26, 2008 at 8:27 PM, David Teller wrote: > Dear list, > > Browsing around the net, I've found three > "scrap-your-boilerplate"-style projects for OCaml: the simple Type-conv, > the ambitious Deriving and the unmaintained OCaml-Templates, and of > course the ability to use camlp4/camlp5 for the same purpose. I imagine > that there are a number of nice boilerplate-based modules just waiting > to be implemented or adopted. > > As far as I understand, there's no interaction between the project > authors, which is a shame. So this is an open call to whoever is in > charge of each work: do you think it would be possible for you all to > join forces and produce something robust, simple and possible to adopt > as a standard ? > > Cheers, > David > > -- > David Teller > Security of Distributed Systems > http://www.univ-orleans.fr/lifo/Members/David.Teller > Angry researcher: French Universities need reforms, but the LRU act brings liquidations. > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- http://till-varoquaux.blogspot.com/