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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id E260B7ED7A for ; Wed, 19 Sep 2012 21:55:32 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@googlemail.com) identity=pra; client-ip=74.125.82.52; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of wojciech.meyer@googlemail.com designates 74.125.82.52 as permitted sender) identity=mailfrom; client-ip=74.125.82.52; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f52.google.com) identity=helo; client-ip=74.125.82.52; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="postmaster@mail-wg0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiUCAIEiWlBKfVI0jWdsb2JhbABFhgq2MQgjAQEBAQkJCwkSBiOCIAEBAQIBARICCQYdAQE3AQQLCwsPAgUhAgIPAQQNEwEFASITFA6HTgEDCQYEB5wwCQOKaG6DQgEFhQ8KQA2JTQaBIYkZhhGBEpQSgVWBFIoDgys/hAc X-IronPort-AV: E=Sophos;i="4.80,450,1344204000"; d="scan'208";a="156301118" Received: from mail-wg0-f52.google.com ([74.125.82.52]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Sep 2012 21:55:32 +0200 Received: by wgbfg15 with SMTP id fg15so1076249wgb.9 for ; Wed, 19 Sep 2012 12:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=Cl4hRP5aNkdrcK9UedBWdUDhwqCQCZo0mGkyqQAzEio=; b=fstlvFmDzfx6pBoe3KMQVb2JVuMeIMS4+EZegxXTFiJXBPC+tLZNhTfeShG6Ma3n6M iQfqah7KfQcNdEsxbZGb65+pVxqDff3P7JPeNGZnSuWBHPRNBO6pvM67BCF5yp6Yotiw p82HTEighwN1tWNt/+tt5xppWpjywazDU/QQmjGZKCPKl4yI+IjEFy1X9rZZViNAv6w/ dNlmBMiITwAF15OI0Lq+2/OO44gYPxSD3cYMBwKPPlj9325RUS2cwlqU+uslUQ3odWid mIMUlvTj7WssJIqWTUSrzUzO/clZH0fTqxI81CRGwE5xLv6JNJNpfKa/lMbKE60G+olt oLRA== Received: by 10.216.131.135 with SMTP id m7mr2396128wei.72.1348084531340; Wed, 19 Sep 2012 12:55:31 -0700 (PDT) Received: from spec-desktop.danmey.org (cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com. [86.9.116.202]) by mx.google.com with ESMTPS id k2sm6607512wiz.7.2012.09.19.12.55.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Sep 2012 12:55:30 -0700 (PDT) From: Wojciech Meyer To: bob zhang Cc: Caml List , Steve Zdancewic References: Date: Wed, 19 Sep 2012 20:55:42 +0100 In-Reply-To: (bob zhang's message of "Tue, 18 Sep 2012 15:11:38 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Call for collaboration on the future of camlp4 Hi Hongboz, Thanks for the slides, it's good. Indeed it makes sense now to focus on extending Camlp4, however as usually there are some gotchas, the process of extending syntax with Camlp4 is a bit not well known. Camlp5 has an excellent documentation, and great support for some of the things. Yet, Camlp4 is more modular, and is just easier to write application on top of Camlp4. On OUD we had open ended discussions, and many people share (like me) the same impression - -ppx that exist on trunk is powerful and that's the way to implement most of the meta programming facilities (deriving the code from type definitions, or using quotations to embed DSLs in OCaml), but I believe that the direct syntax extensions (opening the OCaml syntax) certainly has some benefits. How to do this in a clean way myself - I don't know. I posted just some time ago what would be a macro system of my dreams: https://sympa.inria.fr/sympa/arc/caml-list/2012-05/msg00184.html If the current Camlp4 could be used to do this, it would be great but that's need to be somewhat kept up to date with all up-coming compiler meta programming facilities. I will have a closer look at the Fan project today. Thanks, -- Wojciech Meyer http://danmey.org bob zhang writes: > Dear OCaml programmers, > > =C2=A0 =C2=A0Last week, I give a talk about the future of Camlp4 in the ML > workshop, the slides are here > http://www.lexifi.com/ml2012/slides_panel_hongbo.pdf (some are already > done, some are work in progress). > =C2=A0 =C2=A0For a long time, in the caml community, thanks to the talent= ed work > of Daniel and Michel, =C2=A0we know there is a very very powerful tool > called *camlp4*, if there are some bolierpolate code you write here > and there, someone will tell you "hey, you can do it in camlp4" though > he may not know how to do it in camlp4.=C2=A0 > =C2=A0 =C2=A0But it's a bit=C2=A0embarassing that camlp4 did not evolve v= ery well > (partly due to the fragmentation of camlp[4,5]), another fact is that > camlp4 is not *designed*, it's like a prototype that works but not > carefully designed, and it does not provide anything out of the box > =C2=A0and itself was written in a verbose way. > =C2=A0 =C2=A0It's time to bring the powerful tool back, my advisor Steve = and I > started a new project Fan, which is mainly to evolve the camlp4 macro > system to be more expressive and more powerful, push the Camlp4 to the > next level. For me, I am a long-term Lisp programmer, I appreciated > the value of macros, I would really be happy to see we could make a > such powerful macro systems. > =C2=A0 =C2=A0Here is my repo=C2=A0https://bitbucket.org/HongboZhang/camlp4 > =C2=A0 =C2=A0I already finished some cool staff, =C2=A0to mention just a = few: > =C2=A0 =C2=A01. A very robust bootstrapping system, previously it takes m= e 20 > minutes to verify my patches to camlp4 can reach a fixpoint or not, > but now you can compile your modification within seconds, and reach a > fixpoint under 2 minutes, this accelerate the development cycles > immediately. > =C2=A0 =C2=A02. Now you can customize your lexer now, previously it's imp= ossible > ( and a number of bug fixes) you can do deep anti-quotation like=C2=A0 > =C2=A0 <:expr< <:expr< $($(deepantiquot)) >> >>=C2=A0 > =C2=A0 =C2=A03. Linking the compiler and a number of cool features (see t= he > slides) > =C2=A0 =C2=A04. A macro which write macros to scrap all the bolierpolate = code > for generic programming, now you can customize your deriving stuff =C2=A0= in > ten lines (previously thousands of lines of code to write camlp4 > plugin) > =C2=A0 =C2=A0 5. A number of mini-DSLs =C2=A0and more to be expected > =C2=A0 =C2=A0I love macros, I would commit to the project for a long time > (probably my Ph.D term), I promise that I would write the > documentation to make users happy( I am also writing a book about > macros, it's un-readable though). And I am really happy to co-laborate > with anyone who love camlp4.=C2=A0 > =C2=A0 =C2=A0Syntax matters, if you see that coffescript is now already a > success, camlp4 or Fan is actually more expressive than that, Dear > ocaml programmers, let us find a way to make ocaml more beautiful. I > am also open minded to any discussion about the future of camlp4 > =C2=A0 =C2=A0Many thanks (sorry for my bad English)