caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: bob zhang <bobzhang1988@gmail.com>
Cc: Caml List <caml-list@inria.fr>,  Steve Zdancewic <stevez@cis.upenn.edu>
Subject: Re: [Caml-list] Call for collaboration on the future of camlp4
Date: Wed, 19 Sep 2012 20:55:42 +0100	[thread overview]
Message-ID: <wfipb9vlc1.fsf@gmail.com> (raw)
In-Reply-To: <CANcqPu5zb_u=HdrP8Cj0NAZBYzsZN2bFByUkVSjtuWhuOZnoVg@mail.gmail.com> (bob zhang's message of "Tue, 18 Sep 2012 15:11:38 -0400")

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 <bobzhang1988@gmail.com> writes:

> Dear OCaml programmers,
>
>    Last 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).
>    For a long time, in the caml community, thanks to the talented work
> of Daniel and Michel,  we 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. 
>    But it's a bit embarassing that camlp4 did not evolve very 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
>  and itself was written in a verbose way.
>    It'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.
>    Here is my repo https://bitbucket.org/HongboZhang/camlp4
>    I already finished some cool staff,  to mention just a few:
>    1. A very robust bootstrapping system, previously it takes me 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.
>    2. Now you can customize your lexer now, previously it's impossible
> ( and a number of bug fixes) you can do deep anti-quotation like 
>   <:expr< <:expr< $($(deepantiquot)) >> >> 
>    3. Linking the compiler and a number of cool features (see the
> slides)
>    4. A macro which write macros to scrap all the bolierpolate code
> for generic programming, now you can customize your deriving stuff  in
> ten lines (previously thousands of lines of code to write camlp4
> plugin)
>     5. A number of mini-DSLs  and more to be expected
>    I 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. 
>    Syntax 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
>    Many thanks (sorry for my bad English)

  reply	other threads:[~2012-09-19 19:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 19:11 bob zhang
2012-09-19 19:55 ` Wojciech Meyer [this message]
2012-09-19 21:21   ` [Caml-list] " Hongbo Zhang
2012-09-19 21:35     ` Hongbo Zhang
2012-09-30 17:02 ` bobzhang
2012-09-20  9:36 [Caml-list] " oleg

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=wfipb9vlc1.fsf@gmail.com \
    --to=wojciech.meyer@googlemail.com \
    --cc=bobzhang1988@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=stevez@cis.upenn.edu \
    /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).