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 ESMTPS id 2839C5D4 for ; Sun, 30 Jun 2019 08:55:46 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.63,434,1557180000"; d="scan'208";a="389736800" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 30 Jun 2019 10:55:45 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 22AD6826E3; Sun, 30 Jun 2019 10:55:45 +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 C05268247D for ; Sun, 30 Jun 2019 10:55:38 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=dra-news@metastack.com; spf=Pass smtp.mailfrom=dra-news@metastack.com; spf=None smtp.helo=postmaster@outmail148108.authsmtp.net IronPort-PHdr: =?us-ascii?q?9a23=3AQqkKORJnCxiKv13cs9mcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgeLfzxwZ3uMQTl6Ol3ixeRBMOHsqgC0bad6/+oGTRZp8rY6TZaKN0EfiRGoP?= =?us-ascii?q?1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6?= =?us-ascii?q?KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq9cajZF8Jqs+xRfFvnlFcP?= =?us-ascii?q?lSyW90OF6fhRnx6tqt8JJ57yhcp/ct/NNcXKvneKg1UaZWByk8PWAv483ruxjD?= =?us-ascii?q?TQ+R6XYZT24bjBlGDRXb4R/jRpv+vTf0ueR72CmBIM35Vqs0Vii476dqUxDnli?= =?us-ascii?q?EKPCMk/W7Ni8xwiKVboA+9pxF63oXZbp2ZOOZ4c6jAZt4RW3ZPUd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jWGxjS98tysQSak1+Xd6li0Kahnf4M/ouj7WOQacM3Ofc0nz2fZYvzGva0a?= =?us-ascii?q?AgiwB6EpIXZSuvm7J/7A3PH8jPnlnLz6s=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AmAABGeBhdh2yUDT5lGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAQGBVgEBAQEBAQsBAYNULyiEHYh7ikoBAQaBNhODJoYghQqMCgk?= =?us-ascii?q?BAwEKAQEtAgEBgUuCdQKDABsHAQQzBg4BAwEBBAEBAgECAwETAQEBCgsJCCmKS?= =?us-ascii?q?kIBEAGBZikBgmYBAQEECAIZBUMODQMCCQ0LAgImAgIZIxsCBBMLBYMSgXcUBAG?= =?us-ascii?q?kKIEBMYpDgQwoAYtegQ+BB4ERgxI+h06CWASOXptRCQKCFgJgkzOCK4snihekU?= =?us-ascii?q?wIECwIVgWaBenBQgmw/gg4OCY4icYEDBSETC26NJQEB?= X-IPAS-Result: =?us-ascii?q?A0AmAABGeBhdh2yUDT5lGQEBAQEBAQEBAQEBAQcBAQEBAQG?= =?us-ascii?q?BVgEBAQEBAQsBAYNULyiEHYh7ikoBAQaBNhODJoYghQqMCgkBAwEKAQEtAgEBg?= =?us-ascii?q?UuCdQKDABsHAQQzBg4BAwEBBAEBAgECAwETAQEBCgsJCCmKSkIBEAGBZikBgmY?= =?us-ascii?q?BAQEECAIZBUMODQMCCQ0LAgImAgIZIxsCBBMLBYMSgXcUBAGkKIEBMYpDgQwoA?= =?us-ascii?q?YtegQ+BB4ERgxI+h06CWASOXptRCQKCFgJgkzOCK4snihekUwIECwIVgWaBenB?= =?us-ascii?q?Qgmw/gg4OCY4icYEDBSETC26NJQEB?= X-IronPort-AV: E=Sophos;i="5.63,434,1557180000"; d="scan'208";a="311909285" X-MGA-submission: =?us-ascii?q?MDEhutviWfKzThOW46UXw0aFNrFhiaA5giQXAA?= =?us-ascii?q?6hxfcnNh3ocI6TziVfVClp1wZ1tcHr0RqRy80bKO6eU33nNxGvPBKoW1?= =?us-ascii?q?ME71TbHBdIxeSSHl/mM/IO7EG3OLhyxlJ1/Ig2r7CR0k6odVlrL/Ci5S?= =?us-ascii?q?7tEMR0aM9TCF1DUT3x5prJow=3D=3D?= Received: from outmail148108.authsmtp.net ([62.13.148.108]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 10:55:37 +0200 Received: from punt22.authsmtp.com (punt22.authsmtp.com [62.13.128.207]) by punt15.authsmtp.com. (8.15.2/8.15.2) with ESMTP id x5U8tZUl039367 for ; Sun, 30 Jun 2019 09:55:35 +0100 (BST) (envelope-from dra-news@metastack.com) Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt22.authsmtp.com. (8.15.2/8.15.2) with ESMTP id x5U8tZ0D015147; Sun, 30 Jun 2019 09:55:35 +0100 (BST) (envelope-from dra-news@metastack.com) Received: from romulus.metastack.com (26.77-31-62.static.virginmediabusiness.co.uk [62.31.77.26]) (authenticated bits=0) by mail.authsmtp.com (8.15.2/8.15.2) with ESMTPSA id x5U8tXbl036062 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 Jun 2019 09:55:34 +0100 (BST) (envelope-from dra-news@metastack.com) Received: from Libera ([148.253.209.219]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id x5U8tWH4006639; Sun, 30 Jun 2019 09:55:33 +0100 From: "David Allsopp" To: "'Richard W.M. Jones'" Cc: "Anil Madhavapeddy" , , 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> Date: Sun, 30 Jun 2019 09:55:31 +0100 Organization: MetaStack Solutions Ltd. Message-ID: <000f01d52f21$9374a8a0$ba5df9e0$@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHVLO6qZXrYQwmr9kmYIc7fFfff3aaySS6AgAAKgACAABoLYf//+TuAgAGA5jA= Content-Language: en-gb X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: d2ca506d-9b14-11e9-960e-8434971169dc X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNl8UURhQ KkJXbgYSJgZEAnNE XXkJW1VdQF14U2Zw YQlVIwNffElPQQJt TkpPXVBXCwQmSRlk Dlp2AEVydANGfnw+ ZEVkXngVCEYpJEN9 RBpJHD8HYXphaTUW TUled1ZJeAdJehZC a1F5XSdeLwdybGoL NAY2O3U1PC5DHWxe SwQJNQ5aDw4sNTc5 Q1heW21/dQCA X-Authentic-SMTP: 61633634383431.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] camlp4 & OCaml 4.08 Reply-To: "David Allsopp" X-Loop: caml-list@inria.fr X-Sequence: 17660 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: 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 = 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 > > >>> 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=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 doesn=E2=80=99t = introduce any > new syntax, it just matches on particular function calls and rewrites > them? >=20 > 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