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 5B5E45D4 for ; Sat, 29 Jun 2019 10:53:06 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.63,431,1557180000"; d="scan'208";a="389681602" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 29 Jun 2019 12:53:05 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 722E2826E4; Sat, 29 Jun 2019 12:53:05 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E3A3A7ED69 for ; Sat, 29 Jun 2019 12:52:51 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=rich@annexia.org; spf=Pass smtp.mailfrom=rich@annexia.org; spf=Pass smtp.helo=postmaster@annexia.org IronPort-PHdr: =?us-ascii?q?9a23=3Agf/oxhzOZd1GNGnXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?1OIWIJqq85mqBkHD//Il1AaPAdyBragewLGM++C4ACpcuM/H6ChDOLV3FDY9wf?= =?us-ascii?q?0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6?= =?us-ascii?q?PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjPusUMn4duNKk9xxXXrnBVf+?= =?us-ascii?q?ha2X5kKUickhrh+8u85oJv/zhVt/k868NOTKL2crgiQ7dFFjomKWc15MPqtRnH?= =?us-ascii?q?UwSC42YXX3sVnBRVHQXL9Qn2UZjtvCT0sOp9wzSaMtbtTb8oQzSi7rxkRwHuhS?= =?us-ascii?q?waKjM26mDXish3jKJGvBKsogF0zoDIbI2JMvd1Y7jQds0GS2VfQslRVjRBAoKi?= =?us-ascii?q?YIsJE+oBJvtTo43kq1cTsReyGQygCeXywTFKm3D2x7U33eohHw/YwQIuHNwOv3?= =?us-ascii?q?vIo9roO6kdU+66wbLUzTjAdf5axSvx5ZLKfx0nvPqCXahwcc3UyUQ3GQ/LklSQ?= =?us-ascii?q?ppDlPzyPzOQCrnWQ4Op6WeyokWIstgV/oj+pxsgykYnFiJ8ex1fe9SV43Ik1Jc?= =?us-ascii?q?a1R1R9Yd6iDpRRuCCaOJFsTsMlWWFotz83x7sbspC4ZCgH0JcqywLFZ/GGcIWE?= =?us-ascii?q?+BbuWPuLLTtlhn9oebSyjAuo/0e60O3zTMy03U5KriVbltnMsWgA2AbV6siBVP?= =?us-ascii?q?R88Uah1iyV2wDU8OFELlg4lavdK5E/3r49jpkevVjZEiL3m0j6lqubelg+9uS1?= =?us-ascii?q?6enqY63qppqGOI91jgH+PL4umsu6AekgKAgOXnSU+eSn2bL5+035RqtFj/I3kq?= =?us-ascii?q?bDqpzaIt4bpqGhDw9Pzokj8wq/Dyuh0NkAgXYINldFeBaeg4jtOlHOO+z4AOyk?= =?us-ascii?q?g1WslTdr3+rJMqfgApXLNHjDka3ucaxz605Gm0IPyoVz7oxVBvkoJPboXVfp/I?= =?us-ascii?q?jUBwE4PyS9x+L8D81lzcUYVH7ZUYGDN6aH+2WJ7eImOeXEW8kw/n7fLP4o/LSm?= =?us-ascii?q?2WU4kl81dK+v0IsWYTa/BPswcBbRWmblntpUSTRChQE5VuG/zQTaCWcCNUb3ZL?= =?us-ascii?q?o143QAMKzjCI7CQo63h7nYh3WyGJtbdmFPTFeWHiWxLtjWa7I3cCuXZ/RZvHkE?= =?us-ascii?q?WLymEtRz3BeouR/7wvxgNOWGo3RE56Km78B84qjorT937SZ9Vp/P2meLQnF1ly?= =?us-ascii?q?UPXTBkhK0=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DCBABLQhddWrBbRFBmHgEGBwaBZ4IXJ?= =?us-ascii?q?gGBFDMog1VIknRNAQEBAQEBBoE2mm0JAQMBDCwBAgEBgUuCdQKDABwGAQQ0EwE?= =?us-ascii?q?DAQEEAQECAQIDAQYBGRUFHYpYgjopAYJnAQUjDwE4DhALGAICBRMOAgIPLQcUB?= =?us-ascii?q?hOFGRimB4EyikCBDCiLXxEGeD5JgRGDEj6HToJYBJw0jXsHAgKCFpNuJ4Iriye?= =?us-ascii?q?KF6R7gWeBeX0IO4Jsgk0XjiJBMIEEAY8LAQE?= X-IPAS-Result: =?us-ascii?q?A0DCBABLQhddWrBbRFBmHgEGBwaBZ4IXJgGBFDMog1VIknR?= =?us-ascii?q?NAQEBAQEBBoE2mm0JAQMBDCwBAgEBgUuCdQKDABwGAQQ0EwEDAQEEAQECAQIDA?= =?us-ascii?q?QYBGRUFHYpYgjopAYJnAQUjDwE4DhALGAICBRMOAgIPLQcUBhOFGRimB4EyikC?= =?us-ascii?q?BDCiLXxEGeD5JgRGDEj6HToJYBJw0jXsHAgKCFpNuJ4IriyeKF6R7gWeBeX0IO?= =?us-ascii?q?4Jsgk0XjiJBMIEEAY8LAQE?= X-IronPort-AV: E=Sophos;i="5.63,431,1557180000"; d="scan'208";a="389681513" X-MGA-submission: =?us-ascii?q?MDE1rTODWhaokFpYQphPqXR06rnmbKH1F6h9Z6?= =?us-ascii?q?2GlzzJxPGMbaMsEQBdxA1Anem5NiVV7hj7ADlmHyZS+AwvZYO9EyCC46?= =?us-ascii?q?QoiOuIefpik0SqNTxjVrJJRjjeo+9mXjwS3Gl5Njh1rxebHXkHvsLAqS?= =?us-ascii?q?jPCQHd/3k3+bTgdwTU3WKM1g=3D=3D?= Received: from annexia.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 29 Jun 2019 12:52:51 +0200 Received: from rich by annexia.org with local (Exim 4.89) (envelope-from ) id 1hhAyP-0000tl-B6; Sat, 29 Jun 2019 11:52:50 +0100 Date: Sat, 29 Jun 2019 11:52:49 +0100 From: "Richard W.M. Jones" To: David Allsopp Cc: Anil Madhavapeddy , "caml-list@inria.fr" , "sylvain@le-gall.net" Message-ID: <20190629105248.aqc5fvdjfh6fccpj@annexia.org> References: <20190627134517.hzhbmjkihidxlnkz@annexia.org> <45419C48-63D3-4981-B54C-3EEA1F4A6FE6@recoil.org> <20190629094350.7mw6gif3vz2qxqwp@annexia.org> <12C0FD24-2DCD-4128-B020-84416F228E87@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12C0FD24-2DCD-4128-B020-84416F228E87@metastack.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [Caml-list] camlp4 & OCaml 4.08 Reply-To: "Richard W.M. Jones" X-Loop: caml-list@inria.fr X-Sequence: 17656 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: 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’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. Rich. -- Richard Jones