caml-list - the Caml user's mailing list
 help / Atom feed
From: Jeremie Dimino <jdimino@janestreet.com>
To: David Allsopp <dra-news@metastack.com>
Cc: "Richard W.M. Jones" <rich@annexia.org>, Anil Madhavapeddy <anil@recoil.org>, caml users <caml-list@inria.fr>, Sylvain Le Gall <sylvain@le-gall.net>
Subject: Re: [Caml-list] camlp4 & OCaml 4.08
Date: Mon, 1 Jul 2019 14:40:56 +0100
Message-ID: <CANhEzE6_cqK+zMZ4tJ53TQLC23ixsHQw96rOWjhmFZWfiozTDg@mail.gmail.com> (raw)
In-Reply-To: <000f01d52f21$9374a8a0$ba5df9e0$@metastack.com>

FTR, I had considered modernising camlp4 to make its maintenance
easier, however due to its complexity it is a lot of work. Right now,
keeping camlp4 alive and up to date is indeed painful and complicated.
Additionally, I don't think it's a good idea to keep such projects
that are basically abandoned on life support forever as it is giving
the false impression that they are still actively maintained.


On Sun, Jun 30, 2019 at 9:56 AM David Allsopp <dra-news@metastack.com> wrote:
>
> Richard W.M. Jones wrote:
> > On Sat, Jun 29, 2019 at 10:17:02AM +0000, David Allsopp wrote:
> > > > On 29 Jun 2019, at 10:44, Richard W.M. Jones <rich@annexia.org> wrote:
> > > >
> > > >> On Sat, Jun 29, 2019 at 10:06:15AM +0100, Anil Madhavapeddy wrote:
> > > >>> On 27 Jun 2019, at 14:45, Richard W.M. Jones <rich@annexia.org>
> > > >>> wrote:
> > > >>>
> > > >>>
> > > >>> I know camlp4 is dead and all that, but we've got some software
> > > >>> which still uses it.  I will probably port it to camlp5 when I
> > > >>> have the time, but has anyone got the patch to make camlp4 work with
> > > >>> 4.08?
> > > >>
> > > >>
> > > >> To fork the thread slightly,  how big are the camlp4 dependencies
> > > >> remaining in your codebase, and is there anything we can do to help
> > > >> migrate?
> > > >
> > > > The dependencies that I care about run through ocaml-gettext.
> > > > Gettext is a specific method to make code internationalized and by
> > > > its nature it involves deep changes throughout our codebase, so
> > > > porting away from ocaml-gettext isn't an option any time soon.
> > > > However porting ocaml-gettext to use something else might be.
> > > >
> > > > ocaml-gettext has a tool which runs over the OCaml source code and
> > > > extracts the magic translatable strings, and it's my understanding
> > > > that this is the only reason it uses camlp4.  AIUI this cannot be
> > > > done using ppx's (maybe I'm wrong about that?) but could be done
> > > > using camlp5.  In fact it was me who did the original port of
> > > > ocaml-gettext from old camlp4 (ie. camlp5) to camlp4(!)
> > >
> > > It’s not instantly clear to my (non-expert) eyes why this can’t be done
> > with PPX. If I read the camlp4 script correctly, it doesn’t introduce any
> > new syntax, it just matches on particular function calls and rewrites
> > them?
> >
> > Actually I believe it simply extracts the string parameters into a
> > separate file (from where they get translated).  However it's a separate
> > tool, it doesn't run as part of ordinary compilation.
>
> As I say, I've not done it, but walking an AST to pattern match those things sounds eminently doable. Similarly, I've not done it, but producing a driver program is one of the raison d'etre of ppxlib (or ppx-driver, as was).
>
>
> David
>


-- 
Jeremie

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 13:45 Richard W.M. Jones
2019-06-27 17:29 ` Ian Zimmerman
2019-06-27 20:00   ` Richard W.M. Jones
2019-06-27 18:09 ` Jürgen Hötzel
2019-06-29  9:06 ` Anil Madhavapeddy
2019-06-29  9:44   ` Richard W.M. Jones
     [not found]     ` <12C0FD24-2DCD-4128-B020-84416F228E87@metastack.com>
2019-06-29 10:53       ` Richard W.M. Jones
2019-06-29 18:14         ` Sylvain Le Gall
2019-06-30  8:55         ` David Allsopp
2019-07-01 13:41           ` Jeremie Dimino [this message]
2019-07-02 16:20     ` Louis Gesbert
2019-06-29 15:15   ` Daniil Baturin
     [not found]     ` <5CE377AD-CB06-4261-BD26-A2A697253F02@uca.fr>
     [not found]       ` <393603fa-0efa-5714-82da-ba4bc3e869b8@baturin.org>
2019-07-05  9:56         ` [Caml-list] Lascar/RFSM & Camlp4 (was camlp4 & OCaml 4.08) Jocelyn Sérot

Reply instructions:

You may reply publically 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=CANhEzE6_cqK+zMZ4tJ53TQLC23ixsHQw96rOWjhmFZWfiozTDg@mail.gmail.com \
    --to=jdimino@janestreet.com \
    --cc=anil@recoil.org \
    --cc=caml-list@inria.fr \
    --cc=dra-news@metastack.com \
    --cc=rich@annexia.org \
    --cc=sylvain@le-gall.net \
    /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

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox