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 492DF5D5 for ; Tue, 14 Dec 2021 11:02:52 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.88,205,1635199200"; d="scan'208,217";a="10854856" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 14 Dec 2021 12:02:30 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id AC530E01A7; Tue, 14 Dec 2021 12:02:30 +0100 (CET) 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 1CBD2E00D1 for ; Tue, 14 Dec 2021 12:02:29 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=Pass smtp.pra=alan.schmitt@polytechnique.org; spf=Pass smtp.mailfrom=SRS0=THyk=Q7=polytechnique.org=alan.schmitt@bounces.m4x.org; spf=Pass smtp.helo=postmaster@mx1.polytechnique.org IronPort-PHdr: =?us-ascii?q?A9a23=3AiEMP1xMbLZ+wyziy+y0l6nb1CxdPi9zP1u491JM?= =?us-ascii?q?rhvp0f7i5+Ny6ZQqDv6wr3ACCBNyTwskHotKei7rnV20E7MTJm1E5W7sIaSU4j?= =?us-ascii?q?94LlRcrGs+PBB6zBvfraysnAJYKDwc9rDm0PkdPBcnxeUDZrGGs4j4OABX/Mhd?= =?us-ascii?q?+KvjoFoLIgMm7yf2+94fQbghKizaxfK5+JwiqoAvMscUbnZFsIbsrxBvTpXtId?= =?us-ascii?q?eVWxWd2Kl+Wgh3x+MS+8oN9/ipJo/4u+NJOXqv8f6QjULxXFy8mPHwv5M3qrhb?= =?us-ascii?q?MUw2C7WYBX2oMkxpIBw/F7AzmXpr0ryD3uPZx1DWcMMbrSr86RCmi77xzSBD2l?= =?us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E2D3rJ9g/FAFdxc+fdJUgAiOJ7ZwO12Fsr+WhrGfteNSFe?= =?us-ascii?q?mXsupDi0xTtI3wt8Oelt9FMu4ghDExSqqDKcZl72NBJMq7qLRx2X9K9h5xnrcy?= =?us-ascii?q?aUtk1YrTtFBOGG6nKJy+QfeC5bMk0qDlqaqcaoc3DTK9GeG1WeAoV1WXhNsXaj?= =?us-ascii?q?dQ34RZEvXrdfh603ZTbKjEawnMgxFyc+CNqtFdMHmjVVARPfiIdTefny+l323B?= =?us-ascii?q?RaSybOBdJDle2EH0yXbEkQEiBwc/XaDNQg/Giehv3nTAydpFVLyZUPj7fdxqGi?= =?us-ascii?q?hQk8xwAyLYFdt172v+h4anfCcUe8c3qoYuCc9rDV5BEqy0MjTC9qEvgZheKRcY?= =?us-ascii?q?cgh4FpczmLYtwl9PoS6IKx4h14edR53v0L02BltBIVAi5tikHR/hg5tL+jQhFd?= =?us-ascii?q?ecRucwpa2PLDLfC26thuwbeSekgXVz9C+/qYU9O9+qlnyuAXvEVAtpTEv2NBQ1?= =?us-ascii?q?z6Y547WJAsUS5P4FEgtpDZgoLSPSy004cvv3n1pMLWo+mvL39svQvAuyhOhY8t?= =?us-ascii?q?3KKSABRP/GM0cBtGzJaotgVf/PUFMB/xb6KNhZ5DuTPCBwqP+Y7cIdNOOiHQep?= =?us-ascii?q?ph61lOQ+iF8TO/RwptDxOuXjFLvv9LUlFClo9z6koBCZCgPEyy40ye2Xea5iYV?= =?us-ascii?q?4epsNAmq1Zcjr1pN5nZG/AhZl?= IronPort-Data: =?us-ascii?q?A9a23=3AyxKkMaJN0gIZfKDxFE+RypQlxSXFcZb7ZxGrkP8?= =?us-ascii?q?bfHC71Tor12YCmGFLUGuEa/iOZ2r3c9lwbIS0/UwDucfcyKc2QQE+nZ1PZyIT+?= =?us-ascii?q?JCdXbx1DW+pYnjMdpWbJK5fAnR3huDodKjYdVeB4Ef9WlTdhSMkj/jRHOOgULS?= =?us-ascii?q?s1h1ZHGeIdg9x0XqPpMZi2uaEsfDha++8kYuaT//3YDdJ6BYoWo4g0J9vnTs01?= =?us-ascii?q?BjEVJz0iXRlDRxDlAe2e3D4l/vzL4npR5fzatE88uJX24/+IL+FEmPxp3/BC/u?= =?us-ascii?q?ggu+9akoOU6LfNgiIi2NLVu6lmBcqSi4ai/xqcqNENQEM03PSw7idy/0V3XC0Y?= =?us-ascii?q?TwTBfWZpMQMUExhTHRmOqlX5LLMIX6+qNGeiUrcfC7lx/xoSlo9PYgZ5vpfC2Z?= =?us-ascii?q?T8/cVM3YIMgDFgPi5qF6+YrYx2Z59RCXsFNlG4C4wnGux4ewdaZvKRqGP4d5Dw?= =?us-ascii?q?B8rl8VWFLDfYdAYYHxhdnz9j7dnLg9CU9RjiL793j+nZ2cN8BTP+PRp9zOGlEo?= =?us-ascii?q?sxOe4GcTzUdmsacVxv0++mnjg6z2hV0lebMj3JSGt92L1wPfImTLnVYkSEryh6?= =?us-ascii?q?/Msh0ecrlH/wSY+DTOTycRVQGbnMz6eF6AVxsbqha0irQqzSd3sQxCzoHiFpwM?= =?us-ascii?q?RHd1KHIXWLSmTn7HM7V/x6ncsF1Z8hB4O7afahgDGEneDmM7vDjF09rjJWTSa7?= =?us-ascii?q?Lj8QfaaIjAbdylaDcMbZVJt3jQgyb3fSjrXSdJyDKO+jtv0ACz9hTeQo0DSQp0?= =?us-ascii?q?IlcBRkf3TEU/v2lqRm3QCcuL5Csg7kI5oAsOVqbNJv7CV1GU=3D?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AFl7k/ahcJ795jb4pMVJw6VSOv3BQXrQji2hC?= =?us-ascii?q?6mlwRA09TyX4rauTdZsguyMc5Ax8ZJhCo7q90cu7IE80nKQdibX5Vo3OYOCJgg?= =?us-ascii?q?SVEL0=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DdAQAcebhhhyIeaIFahANeQQFfBlc6M?= =?us-ascii?q?YRHiQOIEIMrhhmPBoQ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ZQYFgG?= =?us-ascii?q?FHYFOKmpiHgwHMxowQ4I1ATMJYQ+GZoE7hVcBMxaBBAEIBoI9gmSBdTuFS0AzA?= =?us-ascii?q?gEBNAIGAQoBAQMJhWMBAQUTCwGIIoJFAQE?= X-IronPort-AV: E=Sophos;i="5.88,205,1635199200"; d="scan'208,217";a="75726" X-MGA-submission: =?us-ascii?q?MDF8H6JEw89f7xDGuxzNT9dXGlajfa0Ua7zdX3?= =?us-ascii?q?S+WLomkv7xrYGxhYqrh9TjpoXdSbKobBwdh4Niy6L3Y6K6IvIi7dT/jQ?= =?us-ascii?q?0GCPPb1OVBPo3zX7jjPefzXrW4FEDO0V53B8GgDAFqOH3DNp/msV6DRB?= =?us-ascii?q?9Fz0A9O5KWKnX6LxhMGsYlrg=3D=3D?= Received: from mx1.polytechnique.org ([129.104.30.34]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2021 12:02:28 +0100 Received: from set (cbg35-2-78-242-14-140.fbx.proxad.net [78.242.14.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 7798B564EDD; Tue, 14 Dec 2021 12:02:26 +0100 (CET) From: Alan Schmitt To: "lwn" , "cwn" , caml-list@inria.fr Date: Tue, 14 Dec 2021 12:02:26 +0100 Message-ID: <87a6h3a1q5.fsf@m4x.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Tue Dec 14 12:02:27 2021 +0100 (CET)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.368074, queueID=DEB38564EDE X-Org-Mail: alan.schmitt.1995@polytechnique.org Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News Reply-To: Alan Schmitt X-Loop: caml-list@inria.fr X-Sequence: 18627 Errors-To: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Here is the latest OCaml Weekly News, for the week of December 07 to 14, 2021. Table of Contents =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80 kqueue-ml 0.2.0 and poll 0.1.0 SWIPl-OCaml v0.5 - Never write your own unification algorithms again! opam 2.1.2 Set up OCaml 2.0.0-beta10 A hassle-free setup to release binaries for different platforms: the opam r= elease process experiment Set up OCaml 2.0.0-beta11 What's the best way to save an huge amount of data in a file p5scm 0.1.0 nanoid 1.0.0 Other OCaml News Old CWN kqueue-ml 0.2.0 and poll 0.1.0 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 Archive: Anurag Soni announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I'd like to announce new releases for [kqueue-ml] (version 0.2.0) and an initial release of [poll] (version 0.1.0). *Kqueue-ml*: Thin bindings to the kqueue event notification system. Changes since the last release: =E2=80=A2 Remove dependency on ctypes =E2=80=A2 Limit support to 64 bit systems =E2=80=A2 Adds constant values to be used as filter flags in the public A= PI Installation: [opam install kqueue] Caveat: This is again mostly tested on macOS, but I plan to work on testing and fixing bugs for getting the library to work well on the various BSD systems, so please open issues if you use it on a BSD system and notice problems (Thanks!). *Poll*: Portable OCaml interface to macOS/Linux/Windows native IO event notification mechanisms Installation: [opam install poll] This is the first release of poll, which builds on top of `kqueue-ml' and adds bindings to the system IO event notifications on linux and windows to provide a portable polling interface. It uses kqueue on macOS, epoll on linux, and uses [wepoll] on windows so it can leverage IOCP on windows instead of select. All io events will be level triggered, i.e. there will be a notification as long as the file descriptor being watched is ready to read/write. If you experience any problems, please open an issue on the Github Issue tracker :slightly_smiling_face: [kqueue-ml] [poll] [opam install kqueue] [opam install poll] [wepoll] SWIPl-OCaml v0.5 - Never write your own unification algorithms again! =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90 Archive: Kiran Gopinathan announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 Hey all! I am just posting to announce a new package I've been working on: OCaml bindings to SWI-Prolog (ver 8.5 or higher)! It's currently in the process of being submitted to OPAM, but it's my first time writing a package with bindings to C (using ctypes), so some further changes might be needed? maybe?, but you can find the source code repository here: [repo]/[github mirror]. As a sneak peek of what the API looks like, here's a hello world: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (* initialise SWIProlog *) =E2=94=82 let () =3D Swipl.initialise () =E2=94=82 (* setup the prolog database with some facts *) =E2=94=82 let () =3D Swipl.load_source "hello :- writeln('hello world')." =E2=94=82 (* construct a Swipl term in OCaml *) =E2=94=82 let hello =3D Swipl.Syntax.(!"hello") =E2=94=82 (* send the term to the Prolog engine *) =E2=94=82 let () =3D Swipl.with_ctx @@ fun ctx -> Swipl.call ctx hello =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I've taken care to provide some detailed documentation + quick start guide using odoc (see ) - the quick start guide shows a step by step walkthrough on using the library to write a type inference algorithm for lambda calculus using OCaml+Prolog (no need to write your own UF). Anyway, hope this might be useful for others - I have spent way too long racking my brains on writing dumb custom unification algorithms, but now, no more! [repo] [github mirror] Kiran Gopinathan later added =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80 Here's another example that might be interesting for those who have experience with SWI-Prolog. You can even get native interaction with CHR: is a very elegant framework which comes bundled with SWI Prolog that allows users to write complex domain specific constraint solving engines in a concise declaritive way. Here's a CHR system that models the interaction between `salt' and `water' (basic I know, but look up CHR to see some more powerful examples): =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 let () =3D Swipl.load_source " =E2=94=82 :- use_module(library(chr)). =E2=94=82=20 =E2=94=82 :- chr_constraint salt/0, water/0, salt_water/0. =E2=94=82=20 =E2=94=82 salt, water <=3D> salt_water. =E2=94=82=20 =E2=94=82 reducesTo_(Goal, C) :- =E2=94=82 call(Goal), =E2=94=82 call(user:'$enumerate_constraints'(C)). =E2=94=82 reducesTo(Goal, Constraints) :- =E2=94=82 findall(Constraint, reducesTo_(Goal, Constraint), Constraints). =E2=94=82 " =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Which we can then embed into OCaml using the following code: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 let solve_constraints ls =3D =E2=94=82 (* Create a new term variable context *) =E2=94=82 Swipl.with_ctx (fun ctx -> =E2=94=82 (* create a term for the result *) =E2=94=82 let result =3D Swipl.fresh ctx in =E2=94=82 (* encode the constraint store *) =E2=94=82 let goal =3D encode ls in =E2=94=82 (* send the query to the Prolog engine *) =E2=94=82 Swipl.call ctx (reducesTo goal result); =E2=94=82 (* extract the result *) =E2=94=82 decode ctx result =E2=94=82 ) =E2=94=82 (* val solve_constraints: t list -> t list *) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 (Again, some steps have been omitted for brevity, and you should check out the quick start guide for a step by step walkthrough). opam 2.1.2 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90 Archive: Kate announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 We are pleased to announce the minor release of [opam 2.1.2]. This opam release consists of [backported] fixes, including: =E2=80=A2 Fallback on `dnf' if `yum' does not exist on RHEL-based systems ([#4825]) =E2=80=A2 Use `--no-depexts' in CLI 2.0 mode. This further improves the u= se of opam 2.1 as a drop-in replacement for opam 2.0 in CI, for example with setup-ocaml in GitHub Actions. ([#4908]) To upgrade simply run: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocam= l/opam/master/shell/install.sh) --version 2.1.2" =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 [opam 2.1.2] [backported] [#4825] [#4908] Set up OCaml 2.0.0-beta10 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 Archive: Sora Morimoto announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Added =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C =E2=80=A2 Added "extends" experimentally. Changed =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C =E2=80=A2 Remove some hacks as `--no-depexts' is now used in CLI 2.0 mode= from opam 2.1.2. A hassle-free setup to release binaries for different platforms: the opam r= elease process experiment =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 Archive: Kate announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 On top of the [opam 2.1.2 announcement], I=E2=80=99d like share an experi= ment with the opam release script used for this release. As you might know, for each releases of opam we provide pre-compiled binaries for ease of use. We=E2=80=99ve had a release script which up to= this point required a specific setup to get it running correctly. For instance we had to setup a local OpenBSD machine (possibliy virtualised), a macOS/x86_64 machine and a macOS/arm64. This setup is rather tedious to reproduce. To improve this situation I=E2=80=99ve experimented over the past week wi= th [QEMU] and [Rosetta 2] to make it a "one click script": This change makes so that the script now only requires a macOS/arm64. From there you can: =E2=80=A2 compile locally for macOS/arm64 binaries =E2=80=A2 compile locally for macOS/x86_64 binaries (using Rosetta 2) =E2=80=A2 compile for BSDs (using QEMU) =E2=80=A2 compile for Linux (using Docker) With this, the [binaries] for this release have been compiled with this more reproducible setup, and now include FreeBSD/x86_64 binaries as well :sparkles: If someone wants to have a similar setup to distribute binaries here is the git repository (using Git LFS to store the large files). Feel free to use and experiment with it: For now it only has OpenBSD/x86_64 and FreeBSD/x86_64 images but it could theoretically have more. Although I=E2=80=99m not accepting PRs for= now (for obvious security reasons), I=E2=80=99m open to suggestions to add mo= re platforms. See the [README] for high level details about the setup. [opam 2.1.2 announcement] [QEMU] [Rosetta 2] [binaries] [README] Set up OCaml 2.0.0-beta11 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 Archive: Sora Morimoto announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Fixed =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C =E2=80=A2 Add support for more styles for the ocamlformat configuration in lint-fmt action. What's the best way to save an huge amount of data in a file =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90 Archive: Deep in this thread, Simon Cruanes announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80 What a coincidence, I wrote an [Avro library] very recently. The paint is still fresh. However, it might be worth giving it a try as it's exactly the targeted use case: many rows of relatively simple data, encoded as binary; it also supports gzip compression (per "block" of N many rows, with N configurable). And there's no need to worry about endianess. It typically uses code generation from a schema (a json file). There's libraries for Avro in java (with all the Spark ecosystem) and also python (see "fastavro"). [Avro library] p5scm 0.1.0 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90 Archive: Jason Nielsen announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I=E2=80=99ve released [p5scm] which is now up on `opam'. It is a scheme-= like implementation on top of `camlp5''s [pa_schemer.ml] extension. I know that `camlp5' isn't the cool kid on the block these days but it is a powerful tool and pretty cool in my estimation ;-). [p5scm] [pa_schemer.ml] nanoid 1.0.0 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90 Archive: mefyl announced =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I'm pleased to announce the release of [nanoid 1.0.0]. NanoID are [popular unique ids] amongst the javascript ecosystem. This library brings an equivalent native implementation and a virtual library to transparently branch between the native implementation and the original javascript one. The intent is to enable pieces of code generating such ids to be moved transparently between frontend and backend of a web stack. This is an humble first contribution to gain some experience and will hopefully be followed by more of our internal developments. [nanoid 1.0.0] [popular unique ids] Other OCaml News =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 >>From the ocamlcore planet blog =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Here are links from many OCaml blogs aggregated at [OCaml Planet]. =E2=80=A2 [Monorobot: a Slack bot for monorepos] =E2=80=A2 [opam 2.1.2 release] [OCaml Planet] [Monorobot: a Slack bot for monorepos] [opam 2.1.2 release] Old CWN =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 If you happen to miss a CWN, you can [send me a message] and I'll mail it to you, or go take a look at [the archive] or the [RSS feed of the archives]. If you also wish to receive it every week by mail, you may subscribe [online]. [Alan Schmitt] [send me a message] [the archive] [RSS feed of the archives] [online] [Alan Schmitt] --=-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable OCaml Weekly News

OCaml Weekly News

Previous Week<= /a> Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of December 07 to 14, 20= 21.

kqueue-ml 0.2.0 and poll 0.1.0

Anurag Soni announced

I'd like to announce new releases for kqueue-ml (version 0.2.0) and an initial release of poll = (version 0.1.0).

Kqueue-ml: Thin bindings to the kqueue event notification system. Ch= anges since the last release:

  • Remove dependency on ctypes
  • Limit support to 64 bit systems
  • Adds constant values to be used as filter flags in the public API

Installation: opam inst= all kqueue

Caveat: This is again mostly tested on macOS, but I plan to work on testing= and fixing bugs for getting the library to work well on the various BSD systems, so please open issues if you use i= t on a BSD system and notice problems (Thanks!).

Poll: Portable OCaml interface to macOS/Linux/Windows native IO even= t notification mechanisms

Installation: = opam install poll

This is the first release of poll, which builds on top of kqueue-ml and adds bindings to the system IO event notifications on linux and windows to provide a portable polling interface.= It uses kqueue on macOS, epoll on linux, and uses wepoll on w= indows so it can leverage IOCP on windows instead of select. All io events will be level triggered, i.e. there will be a notific= ation as long as the file descriptor being watched is ready to read/write.

If you experience any problems, please open an issue on the Github Issue tr= acker :slightly_smiling_face:

SWIPl-OCaml v0.5 - Never write your own unification algorithms= again!

Kiran Gopinathan announced

Hey all! I am just posting to announce a new package I've been working on: = OCaml bindings to SWI-Prolog (ver 8.5 or higher)!

3D"b5a466fc6bc9=

It's currently in the process of being submitted to OPAM, but it's my first= time writing a package with bindings to C (using ctypes), so some further changes might be needed? maybe?, but you ca= n find the source code repository here: repo/github mirror.

As a sneak peek of what the API looks like, here's a hello world:

(* initialise SWIProlog *)
let () =3D Swipl.initialise ()
(* s=
etup the prolog database with some facts *)
let () =3D Swipl.load_source "hello :- writeln('hello world')."
(* c=
onstruct a Swipl term in OCaml *)
let hello =3D Swipl=
.Syntax.(!"hello")
(* s=
end the term to the Prolog engine *)=

let () =3D Swipl.with_ctx @@ fun ctx -> Swipl.call ctx hello

I've taken care to provide some detailed documentation + quick start guide = using odoc (see http= s://gopiandcode.github.io/SWIPL-OCaml/swipl/index.html) - the quick sta= rt guide shows a step by step walkthrough on using the library to write a type inference algorithm for lambda calculu= s using OCaml+Prolog (no need to write your own UF).

Anyway, hope this might be useful for others - I have spent way too long ra= cking my brains on writing dumb custom unification algorithms, but now, no more!

Kiran Gopinathan later added

Here's another example that might be interesting for those who have experie= nce with SWI-Prolog.

You can even get native interaction with CHR: https://en.wikipedia.org/wiki/Constr= aint_Handling_Rules is a very elegant framework which comes bundled with SWI Prolog that allows users to = write complex domain specific constraint solving engines in a concise declaritive way.

Here's a CHR system that models the interaction between salt a= nd water (basic I know, but look up CHR to see some more powerful examples):

let () =3D Swipl.load_so=
urce "
:- use_module(library(chr)).

:- chr_constraint salt/0, water/0, salt_wat=
er/0.

salt, water <=3D> salt_water.

reducesTo_(Goal, C) :-
        call(Goal),
        call(user:'$enumerate_constraints'(=
C)).
reducesTo(Goal, Constraints) :-
        findall(Constraint, reducesTo_(Goal=
, Constraint), Constraints).
"

Which we can then embed into OCaml using the following code:

let solve_constraints ls =3D
  (* Create a new term variable context =
*)
  Swipl.with_ctx (fun ctx ->
    (* create a term for the result *)
    let result =3D Sw=
ipl.fresh ctx in<=
/span>
    (* encode the constraint store *)
    let goal =3D encode ls in
    (* send the query to the Prolog engine *)
    Swipl.call ctx (reducesTo goal r=
esult);
    (* extract the result *)
    decode ctx result
  )
(* v=
al solve_constraints: t list -> t list *)

(Again, some steps have been omitted for brevity, and you should check out = the quick start guide for a step by step walkthrough).

opam 2.1.2

Kate announced

We are pleased to announce the minor release of opam 2.1.2.

This opam release consists of backported fixes, including:

To upgrade simply run:

bash -c "sh &l=
t;(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/ins=
tall.sh) --version 2.1.2"

Set up OCaml 2.0.0-beta10

Sora Morimoto announced

Added

  • Added "extends" experimentally.

Changed

  • Remove some hacks as --no-depexts is now used in CLI 2.0 m= ode from opam 2.1.2.

https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta10

A hassle-free setup to release binaries for different platform= s: the opam release process experiment

Kate announced

On top of the o= pam 2.1.2 announcement, I=E2=80=99d like share an experiment with the opam release script used for this release.

As you might know, for each releases of opam we provide pre-compiled binari= es for ease of use. We=E2=80=99ve had a release script which up to this point required a specif= ic setup to get it running correctly. For instance we had to setup a local OpenBSD machine (possibliy virtualised), a macOS/x8= 6_64 machine and a macOS/arm64. This setup is rather tedious to reproduce.

To improve this situation I=E2=80=99ve experimented over the past week with= QEMU and Rose= tta 2 to make it a "one click script":

https://github.com/ocam= l/opam/pull/4947

This change makes so that the script now only requires a macOS/arm64. From = there you can:

  • compile locally for macOS/arm64 binaries
  • compile locally for macOS/x86_64 binaries (using Rosetta 2)
  • compile for BSDs (using QEMU)
  • compile for Linux (using Docker)

With this, the binaries for this release have been compiled with this more reproducible setup, and now include FreeBSD/x86_64 binaries as we= ll :sparkles:

If someone wants to have a similar setup to distribute binaries here is the= git repository (using Git LFS to store the large files). Feel free to use and experiment with it:

https://gitlab.= com/kit-ty-kate/qemu-base-images

For now it only has OpenBSD/x86_64 and FreeBSD/x86_64 images but it could t= heoretically have more. Although I=E2=80=99m not accepting PRs for now (for obvious security reasons), I=E2=80=99m open to s= uggestions to add more platforms. See the README for high level details about the setup.

Set up OCaml 2.0.0-beta11

Sora Morimoto announced

Fixed

  • Add support for more styles for the ocamlformat configuration in lint-f= mt action.

https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta11

What's the best way to save an huge amount of data in a file

Deep in this thread, Simon Cruanes announced

What a coincidence, I wrote an Avro library very rece= ntly. The paint is still fresh. However, it might be worth giving it a try as it's exactly the targeted use case: many rows of relatively simple data, encoded as binary; it also supports gzip compression (per "block" of N many rows, with N configurable). And there's no need to worry about endianess.

It typically uses code generation from a schema (a json file).

There's libraries for Avro in java (with all the Spark ecosystem) and also python (see "fastavro").

p5scm 0.1.0

Jason Nielsen announced

I=E2=80=99ve released p5scm = which is now up on opam. It is a scheme-like implementation on top of camlp5's pa_schemer.ml extension. I know that camlp5 isn't the cool kid on the block these days bu= t it is a powerful tool and pretty cool in my estimation ;-).

nanoid 1.0.0

mefyl announced

I'm pleased to announce the release of nanoid 1.0.0. NanoID are popular unique ids amongst the= javascript ecosystem. This library brings an equivalent native implementation and a virtual library to transparently bra= nch between the native implementation and the original javascript one. The intent is to enable pieces of code generat= ing such ids to be moved transparently between frontend and backend of a web stack.

This is an humble first contribution to gain some experience and will hopef= ully be followed by more of our internal developments.

Other OCaml News

From the ocamlcore planet blog

Here are links from many OCaml blogs aggregated at OCaml Planet.

Old CWN

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a loo= k at the archive or the <= a href=3D"https://alan.petitepomme.net/cwn/cwn.rss">RSS feed of the archive= s.

If you also wish to receive it every week by mail, you may subscribe online.

--=-=-=--