From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTP id A494C5D4 for ; Sat, 29 Jun 2019 18:14:02 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.63,432,1557180000"; d="scan'208";a="389701141" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 29 Jun 2019 20:14:01 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 5F308826E3; Sat, 29 Jun 2019 20:14:01 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 1D3537ED69 for ; Sat, 29 Jun 2019 19:49:57 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=sylvain@le-gall.net; spf=Pass smtp.mailfrom=sylvain@le-gall.net; spf=None smtp.helo=postmaster@relay2-d.mail.gandi.net IronPort-PHdr: =?us-ascii?q?9a23=3AklysmB1dXsc+eHr1smDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seISLvad9pjvdHbS+e9qxAeQG9mCsbQe0aGP6v6oGTRZp8rY6TZaKN0EfiRGoP?= =?us-ascii?q?1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6?= =?us-ascii?q?KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq9cajZF8JqovxRfFv2ZEdu?= =?us-ascii?q?VLzm9sOV6fggzw68it8JJ+6Shcp+4t+8tdWqjmYqo0SqBVAi47OG4v/s3rshfD?= =?us-ascii?q?TQqL5nQCV2gdjwRFDQvY4hzkR5n9qiT1uPZz1ymcJs32UKs7WS++4KdxSR/nkz?= =?us-ascii?q?kIOjgk+2zKkMNwjaZboBW8pxxjxoPffY+YOOZicq7bYNgXXnRKUNpPW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us-ascii?q?EOXjOik4S5cK+/FLZk98H9u4iRWahHiuDvoanriPQpo57vCF0g=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BkAABUpBddh8K3RtllHAEBAQQBAQcEA?= =?us-ascii?q?QGBVgQBAQsBhAQoCoQTknSCD5ptCQEDAQwtAgEBgUuCdQKDABsHAQQzBg4BAwE?= =?us-ascii?q?BBAEBAgECAwETAQEBCA0JCBsOikqCOikBgmcBAgMjSA4QCwsNAgImAgIiEgEFA?= =?us-ascii?q?RwGE4MiggsEmUg8iyGBMoh7gUaBDCgBi14RBj6BQYERgxI+hESDCoJYBJN9ljI?= =?us-ascii?q?JghiTehuCK4snihekbA8hgUWBek0uCjsxBoI1gk0OCY4jPjKBKY0jAYEgAQE?= X-IPAS-Result: =?us-ascii?q?A0BkAABUpBddh8K3RtllHAEBAQQBAQcEAQGBVgQBAQsBhAQ?= =?us-ascii?q?oCoQTknSCD5ptCQEDAQwtAgEBgUuCdQKDABsHAQQzBg4BAwEBBAEBAgECAwETA?= =?us-ascii?q?QEBCA0JCBsOikqCOikBgmcBAgMjSA4QCwsNAgImAgIiEgEFARwGE4MiggsEmUg?= =?us-ascii?q?8iyGBMoh7gUaBDCgBi14RBj6BQYERgxI+hESDCoJYBJN9ljIJghiTehuCK4sni?= =?us-ascii?q?hekbA8hgUWBek0uCjsxBoI1gk0OCY4jPjKBKY0jAYEgAQE?= X-IronPort-AV: E=Sophos;i="5.63,432,1557180000"; d="scan'208";a="311878898" X-MGA-submission: =?us-ascii?q?MDFzR3y139MOYRsdYBEaQ4Ns5bb8cZkX+jMRiW?= =?us-ascii?q?AmJaTohg2dpO9LA68MOcs6YVUf32ABxBZi0G5LlS7eVmxUcQrsdgEVUF?= =?us-ascii?q?1aenFqsXfrt2yedlwEAW8fqisizXJM1RTYVqqjS9WFJrkx680FHghcQX?= =?us-ascii?q?CLEjBfs2WUo6a5kPBp8ENzvw=3D=3D?= Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2019 19:49:55 +0200 X-Originating-IP: 209.85.167.47 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (Authenticated sender: sylvain@le-gall.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A50EE40008 for ; Sat, 29 Jun 2019 17:49:53 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id z15so6025947lfh.13 for ; Sat, 29 Jun 2019 10:49:53 -0700 (PDT) X-Gm-Message-State: APjAAAUppyWeD33HHxIIanS+M8TuPdXSqySdCG0piSfMG+0a5EckKZsE qgtPNdn1NrCCxWUlNJ94QkEuohCvYJMYFmyOk8w= X-Google-Smtp-Source: APXvYqzjGH8FTV/5LcOSE5n1DthnG3SFw7kZZr28F2cW8wQ7c+FJF75nt/2DerC6ksBEBTDEj9DgBM8miUgGPTp9AaU= X-Received: by 2002:ac2:5205:: with SMTP id a5mr7966817lfl.143.1561830592946; Sat, 29 Jun 2019 10:49:52 -0700 (PDT) MIME-Version: 1.0 References: <20190627134517.hzhbmjkihidxlnkz@annexia.org> <45419C48-63D3-4981-B54C-3EEA1F4A6FE6@recoil.org> <20190629094350.7mw6gif3vz2qxqwp@annexia.org> <12C0FD24-2DCD-4128-B020-84416F228E87@metastack.com> <20190629105248.aqc5fvdjfh6fccpj@annexia.org> In-Reply-To: <20190629105248.aqc5fvdjfh6fccpj@annexia.org> From: Sylvain Le Gall Date: Sat, 29 Jun 2019 19:49:41 +0200 X-Gmail-Original-Message-ID: Message-ID: To: "Richard W.M. Jones" Cc: David Allsopp , Anil Madhavapeddy , "caml-list@inria.fr" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Validation-by: sylvain@le-gall.net Subject: Re: [Caml-list] camlp4 & OCaml 4.08 Reply-To: Sylvain Le Gall X-Loop: caml-list@inria.fr X-Sequence: 17659 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: AFAIR, it only extracts "s_ STRING". You just need something that will pattern match a function name ("s_") and a string. I don't know enough PPX to decide if it is easy to port or not. I'll gladly integrate anything that will replace campl5/campl4 by PPX. Feel free to send me PR on this. Regards Sylvain Le sam. 29 juin 2019 =C3=A0 12:52, Richard W.M. Jones a = =C3=A9crit : > > On Sat, Jun 29, 2019 at 10:17:02AM +0000, David Allsopp wrote: > > > On 29 Jun 2019, at 10:44, Richard W.M. Jones 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 wro= te: > > >>> > > >>> > > >>> I know camlp4 is dead and all that, but we've got some software whi= ch > > >>> 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 re= maining > > >> in your codebase, and is there anything we can do to help migrate? > > > > > > The dependencies that I care about run through ocaml-gettext. Gettex= t > > > is a specific method to make code internationalized and by its nature > > > it involves deep changes throughout our codebase, so porting away fro= m > > > 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 don= e > > > 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=E2=80=99s not instantly clear to my (non-expert) eyes why this can= =E2=80=99t be done with PPX. If I read the camlp4 script correctly, it does= n=E2=80=99t introduce any new syntax, it just matches on particular functio= n 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. > > Rich. > > -- > Richard Jones