From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 5BD657ED7A for ; Mon, 10 Sep 2012 14:18:44 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.210.182 as permitted sender) identity=mailfrom; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-iy0-f182.google.com) identity=helo; client-ip=209.85.210.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-iy0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswBAE/aTVDRVdK2m2dsb2JhbABFqiKIRgGIUAgiAQEBAQEICQsJFCeCIAEBAQMBEgIsARsdAQMBCwYFCw0uIQEBEQEFARwGEyKHWwEDCQYLnC8JA4wjgnOEZAoZJw1ZiHQBBQyKJGOGNgOUCIFVgRSKAYMqPoQI X-IronPort-AV: E=Sophos;i="4.80,398,1344204000"; d="scan'208";a="172518022" Received: from mail-iy0-f182.google.com ([209.85.210.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Sep 2012 14:18:43 +0200 Received: by iayy25 with SMTP id y25so2690832iay.27 for ; Mon, 10 Sep 2012 05:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JCNS+Ihlza9CCEf33zc2bDDSG37sXyHqyyGY6mwbom8=; b=Tw0/2HxGdGkraFMlX1xTyezpqykVrrkQXHH5m53gJC4SM0GXYmFXrc+amS8ELzHm9J npIyxAKubPEPwWyFEgLbnZK/j3MiyFMSYvI6LhU0wCbhQMPusLdLSuzW4lD8Tm2qfTzj vATRUIBLQCJA15ssvdrmA4HUa8yMEh8w7EcWyayLL4RqvweuBVfGUtsFcDMhYIwcd21K oNrcF2BNE1t5oyVf5o70FB6D6+t2xh4oYpqjSRJ4xjoNIBxCu07bb6RjIkSsp4fAlr2s w+oUGRz31SpCNNla3cpFw3lDOt6tZyjEI8cPmk6zWN48qlZIuzbNbFo5tV+yL2LseA+/ NsBg== MIME-Version: 1.0 Received: by 10.50.169.2 with SMTP id aa2mr7816227igc.23.1347279522106; Mon, 10 Sep 2012 05:18:42 -0700 (PDT) Received: by 10.64.166.34 with HTTP; Mon, 10 Sep 2012 05:18:42 -0700 (PDT) In-Reply-To: <504DD828.3000208@gmail.com> References: <504DD828.3000208@gmail.com> Date: Mon, 10 Sep 2012 14:18:42 +0200 Message-ID: From: bob zhang To: Wojciech Meyer Cc: Gabriel Scherer , Anil Madhavapeddy , caml users Content-Type: multipart/alternative; boundary=e89a8f23586b540e3c04c957f591 Subject: [Caml-list] Re: working %.pp.ml target with ocamfind/ocamlbuild --e89a8f23586b540e3c04c957f591 Content-Type: text/plain; charset=ISO-8859-1 Btw, there's something wrong with the rule "%.pp.ml", I don't remember exactly where it's, for your interest, you can have a look at https://bitbucket.org/HongboZhang/camlp4/src/e88f431db722/myocamlbuild.ml ocaml has a really really *high quality* compiler, but all the tools around it is not that satisfied, contribution is much harder than bug fixes :-( If you take a look at ICFP 12's paper about Shake, the idea is essentially the same as 'ocamlbuild', and the idea is cool, but the implementation of ocamlbuild is fragile and buggy. On Mon, Sep 10, 2012 at 2:08 PM, Hongbo Zhang wrote: > Greetings, > On 9/9/12 6:29 PM, Wojciech Meyer wrote: > >> Gabriel Scherer writes: >> >> This is useful for debugging purposes, and for some (minor) modes of >>> use of Camlp4. However, for most Camlp4 development, this has the >>> severe downside of losing the location information of the original >>> file, if I understand correctly. This means that you don't want to use >>> it as a transparent step towards compilation, but only in exceptional >>> situations where the developers will re-edit the output code. >>> >> >> I think I've to say I disagree it's not useful, when I'm developing a >> syntax extension on top of Camlp4 I really want to see the generated >> code. Moreover to understand some of the more complicated syntax >> extensions like type_conv, deriving, FoldGenerator I need to look at the >> expanded code to understand how to use it - last time I hit the same >> > Yes, it's damn useful not only for bootstrapping, but also for developing > to locate type errors. But there's something wrong with Camlp4's printer, > it has *4* printers in total, writing a printer for an Ast which has no > backend is totally useless. In my branch of camlp4, *I removed all those 4 > printers and using tools/pprintast.ml* in ocaml's compiler source > tree(with some my own bug fixes), and it works very well. > Btw, are you in ICFP? we could have a talk about Camlp4 :-) > >> problem it was actually 'deriving-ocsigen' when I needed to implement my >> own Show module - it's just much faster to see what's being generated >> for the usual case, then trying to figure out from the recipe in the >> documentation. Otherwise for bootstrapping purposes, you might want to >> pre-generate some code too and put into the repository. >> >> -- >> Wojciech Meyer >> http://danmey.org >> >> > -- Regards -- Bob --e89a8f23586b540e3c04c957f591 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Btw, there's something wrong with the rule "%.pp.ml", I don't remember exactly where it&= #39;s, for your interest, you can have a look at=A0

https://bitbucket.org/HongboZhang/camlp4/src/e88f431db722/myocamlbui= ld.ml

ocaml has a really really *high quality* compiler, but all the tools ar= ound it is not that satisfied, contribution is much harder than bug fixes := -(

If you take a look at ICFP 12's paper about= Shake, the idea is essentially the same as 'ocamlbuild', and the i= dea is cool,=A0but the implementation of ocamlbuild is fragile and buggy.= =A0

On Mon, Sep 10, 2012 at 2:08 PM, Hongbo= Zhang <bobzhang1988@gmail.com> wrote:
Greetings,
On 9/9/12 6:29 PM, Wojciech Meyer wrote:
Gabriel Scherer <gabriel.scherer@gmail.com> writes:

This is useful for debugging purposes, and for some (minor) modes of
use of Camlp4. However, for most Camlp4 development, this has the
severe downside of losing the location information of the original
file, if I understand correctly. This means that you don't want to use<= br> it as a transparent step towards compilation, but only in exceptional
situations where the developers will re-edit the output code.

I think I've to say I disagree it's not useful, when I'm develo= ping a
syntax extension on top of Camlp4 I really want to see the generated
code. Moreover to understand some of the more complicated syntax
extensions like type_conv, deriving, FoldGenerator I need to look at the
expanded code to understand how to use it - last time I hit the same
Yes, it's damn useful not only for bootstrapping, but also for developi= ng to locate type errors. But there's something wrong with Camlp4's= printer, it has *4* printers in total, writing a printer for an Ast which = has no backend is totally useless. In my branch of camlp4, *I removed all t= hose 4 printers and using tools/pprintast.ml* in ocaml's compiler source tree(with some my o= wn bug fixes), and it works very well.
Btw, are you in ICFP? we could have a talk about Camlp4 :-)
problem it was actually 'deriving-ocsigen' when I needed to impleme= nt my
own Show module - it's just much faster to see what's being generat= ed
for the usual case, then trying to figure out from the recipe in the
documentation. =A0Otherwise for bootstrapping purposes, you might want to pre-generate some code too and put into the repository.

--
Wojciech Meyer
http://danmey.org





--
Regards=
-- Bob
--e89a8f23586b540e3c04c957f591--