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 20CBB5D5 for ; Tue, 24 Aug 2021 13:44:36 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208,217";a="525031092" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 24 Aug 2021 15:44:33 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 6232BE0276; Tue, 24 Aug 2021 15:44:33 +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 B0AA6E002F for ; Tue, 24 Aug 2021 15:44:28 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=Pass smtp.pra=alan.schmitt@polytechnique.org; spf=Pass smtp.mailfrom=SRS0=AtLG=NP=polytechnique.org=alan.schmitt@bounces.m4x.org; spf=Pass smtp.helo=postmaster@mx1.polytechnique.org IronPort-PHdr: =?us-ascii?q?A9a23=3A16vl4xLXfmy0bn1c/dmcuDlgWUAX0o4c3iYr45Y?= =?us-ascii?q?qw4hDbr6kt8y7ehCFvbM81RSUAs3y0LFts6LuqafuWGgNs96qkUspV9hybSIDk?= =?us-ascii?q?tgchAc6AcSIWgXRJf/uaDEmTowZDAc2t360PlJIF8ngelbcvmO97SIIGhX4KAF?= =?us-ascii?q?5Ovn5FpTdgsipy+y+4ZnebxhHiDe9Y755MQm7oxjWusQKm4VpN7w/ygHOontGe?= =?us-ascii?q?uRWwX1nKFeOlBvi5cm+4YBu/T1It/0u68BPX6P6f78lTbNDFzQpL3o15Mzwuhb?= =?us-ascii?q?dSwaE+2YRXX8XkhpMBAjF8Q36U5LsuSb0quZxxC+XNtDxQr4pRDSi9L9rRwH0h?= =?us-ascii?q?ycbOTA592TXhdZxjKJdvRmtoxNyzorRbIyTNPZwfaXdfc0bRWpaX8ZeTChBDZ2?= =?us-ascii?q?hZIoBCOoBJ/tXr5LgrFcKoxayGQygCeXywTFKm3D2x7U33eQ/Hw/b0gIuHN0Bv?= =?us-ascii?q?2jPodrvKKsfS/q4wLXUwTjBaf5dxDfz6JLPchAkufyBQbZwftDXyUIyCg3KklW?= =?us-ascii?q?QqYnkPzOJyuQGrm+W4PBkVe21jW4rsRpxrSSvxscpi4nJmp4Vx0vc9SV+xIY0J?= =?us-ascii?q?cG4R1Bnbt6kFptQtjiaN5ZoTc84RGFooik6x6QAtJWmcycE1I4pyATDa/ybbYe?= =?us-ascii?q?I+BTjWf6RLzp6mH9oerGyihK8/0WuyeDxUsu53VlFoyRLjtTBtG0A2h3Q58WDS?= =?us-ascii?q?/Zw+lus1SuS2w3Q7uxKL0E5m6rGJpAhxLM7i5QdsUPGHiDsmUX2irebdl069ei?= =?us-ascii?q?06uTnfqvppoebN49xjwHxLL4imsqhDuQkKgQOWHSU9v651L3n50H5R69KjvIun?= =?us-ascii?q?qnWsZDaOcQbprOiDANPzokj7BO/Ay+p0NQZgXkHLE9Fdwmdg4joPFHCOOz3Dfe?= =?us-ascii?q?ljFS2lDdk2evGMaP9AprRNHTMjLDhfbNl505TyQoz0dRf6IhPBb0bPP3zXUrxu?= =?us-ascii?q?MTdDhAnLgO0wvvnCNBn2owCXmKPB7eVMKLPvl6I4uIvJ/OAZIgPuDbyLfUu+v3?= =?us-ascii?q?gjWchlFMAY6Wk2YEbZG2kEvlpOUmUb2bgjs0PHGoFpgYyUeLnhECYXTJNZ3u/U?= =?us-ascii?q?Lgw6iwnBI68EIvORJyhjbqc1ymhBJJWfHpJClWUHHfoaYqEX/AMZTqXIs5ujzA?= =?us-ascii?q?IT6ChS4gl1RCuqA/11aZoLurS+i0ZrJLjycZ66/fUlREo+jx4F8Wd02eTQGFoh?= =?us-ascii?q?m4EWiE60aRlrUBg1luO3rJ0jvJEGdBJ6f5EXR82NZvGwOx7D9DyVBjBftCMSFu?= =?us-ascii?q?+X9uoHSw/Qs4pztISf0ZzHdSsgwjb0SSwG7IVj7uLBJg086LAwXf+O8Z9y3DH1?= =?us-ascii?q?Kk4klkpXNFDNWq8hq5w7wXcHYrJnF+fl6qwbqQTwC7N9GKCzWqSoEFVSxV/UaL?= =?us-ascii?q?YXXAZekTZs8/56lnHT7KhBrUrKAxBydSNKqdScN3mkU1GROv/ONTZe2++h32/B?= =?us-ascii?q?ROMxr+VaIrqen4d3DnGBUgfkwET+G6GOhIkCiegpWLeFj1uGkj1b0Pi6+kt4E+?= =?us-ascii?q?8GwUw0AfAJxllyLyd/gETw/qRV6VXlvgPpyFr430gF0m799bXEMab4QttbaFYJ?= =?us-ascii?q?9Qn7wEDnWnQsgg4Op27M4hjgEQfekJ5pRDAzRJyX6xEmM5il3gqyQtuNerM2Vd?= =?us-ascii?q?IcXWD1pD1O6HLAnH1+AGzZqXW3FDHzdvQ/b0Avqdr427/tR2kQxJxu05s1MNYh?= =?us-ascii?q?iTNjn0rJA8CCNTpVUIm6xVxp7fbezQwoYTO2i81WUFRmifF38M1CeAlzBe5Yto?= =?us-ascii?q?ZN7mLRlaa+yIyDc+zLucngB6sMgJCO/pdpvdcAg=3D=3D?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AcrBht61iJfTZVe4pnp/LyQqjBTByeYIsimQD?= =?us-ascii?q?101hICG9JPbo4/xG+85rpyMc6QxhK03I9urvBEDtex7hHNtOkPgs1NSZLX7bUQ?= =?us-ascii?q?mTXf9fBOLZqlWKcREWtNQtpZuIGJIQNDSfNzRHpPe/yxW3ANYkxdHC2LqzhenY?= =?us-ascii?q?w3oocAcCUdAc0y5JTi2GHF53QQxPQbA5HJ2T6scCiDqtfHkMB/7LeUUtbqzpu9?= =?us-ascii?q?PZlJfiaVotARo/7g6Dii7A0s+eLzGomjwDXSBOxLIrtUfBmwLij5/Tz82T+1v2?= =?us-ascii?q?y2HB75FSkJ/CxstcAteAkKEuW1LRozftT5huSL2GuThwmfqu7k0rjcmkmWZbA+?= =?us-ascii?q?1Dr1jMcHK0pB7knzD61jsz4WKK8y77vVLT5efkSiE7Ds9IwblUegHe7CMb3e1U?= =?us-ascii?q?4eZhw2yLt59TBVf6kD764sTUVxds/3DE2kYKoKo5k3JNUY4aYPtqoZMS50NJAP?= =?us-ascii?q?47bUTHwbFiO/VhH8HY4f4TS06TcmzC11MfuOCEbzAZAhmUQk0GsoipwyFb9UoY?= =?us-ascii?q?82IogOcCkGQB8Zc0D6V+wo3/Q9FVvYALZdMZfqJ5Ae9EfsetEGzKRnv3QQavCG?= =?us-ascii?q?WiP70IKHLJrpay3r0p7uDvQ5AB1p008a6xM29whCoYZ0z8CciK1Nl08xalehTF?= =?us-ascii?q?YQjQ?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AAAQASaxphlyIeaIFahAVZQQFkVzoxA?= =?us-ascii?q?oRFiQSGIAEkgiSDKIV1hleNHANPEAEDAQ0qAQ4FAQIEAQGEHD8EAgJRAQSCFQI?= =?us-ascii?q?eBgEFMxMBAgQVAQEFAQEBAgEDAwQBEwEBAQEBAQEBCRsGXoVoDYIiEwwMAwODd?= =?us-ascii?q?wEhBAY/BAYcIwMUAQYDAhEBFwEUChcBEhqCITYBgwcFCotimwCBCn8ygQGDTQE?= =?us-ascii?q?WGIQ7gWMNAhSBABeFcFNIAYJtCINwKRCBVUSECm6CSxcBAQEBAYE7AQEIToJhF?= =?us-ascii?q?4JNBIMhJg4LMxcbGwwBGwcECgUqAQEEE0ESBiABBwMZGRsCSAsRKZEXEwgWjEO?= =?us-ascii?q?DMocGk1drLQeDK4ExBguHZoEVjEWHe4NlgUihSCGVcIIehleBCwmBdEGTV4Uwg?= =?us-ascii?q?U0qgUwBGwIMBzMaMEOCNQEzCWAOj0YBAoJJgmSBdTuFGjI/MgIBAQcHJgIGAQo?= =?us-ascii?q?BAQMJgQgBAQUTCwGIRwEB?= X-IPAS-Result: =?us-ascii?q?A0AAAQASaxphlyIeaIFahAVZQQFkVzoxAoRFiQSGIAEkgiS?= =?us-ascii?q?DKIV1hleNHANPEAEDAQ0qAQ4FAQIEAQGEHD8EAgJRAQSCFQIeBgEFMxMBAgQVA?= =?us-ascii?q?QEFAQEBAgEDAwQBEwEBAQEBAQEBCRsGXoVoDYIiEwwMAwODdwEhBAY/BAYcIwM?= =?us-ascii?q?UAQYDAhEBFwEUChcBEhqCITYBgwcFCotimwCBCn8ygQGDTQEWGIQ7gWMNAhSBA?= =?us-ascii?q?BeFcFNIAYJtCINwKRCBVUSECm6CSxcBAQEBAYE7AQEIToJhF4JNBIMhJg4LMxc?= =?us-ascii?q?bGwwBGwcECgUqAQEEE0ESBiABBwMZGRsCSAsRKZEXEwgWjEODMocGk1drLQeDK?= =?us-ascii?q?4ExBguHZoEVjEWHe4NlgUihSCGVcIIehleBCwmBdEGTV4UwgU0qgUwBGwIMBzM?= =?us-ascii?q?aMEOCNQEzCWAOj0YBAoJJgmSBdTuFGjI/MgIBAQcHJgIGAQoBAQMJgQgBAQUTC?= =?us-ascii?q?wGIRwEB?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208,217";a="391005435" X-MGA-submission: =?us-ascii?q?MDH/9kkb7DlEQu4jVioUv+TjRCODyfJvRGZ3/+?= =?us-ascii?q?J7yLeLMBPjZ9FK+CUkQPSr3O1s3K6sBue8vMJO0Z+nL9MDS/JNTB4xP8?= =?us-ascii?q?XWyJV0spafvx3msMklo2UIMX8dbkTlmZfl9J7z5ItEcoZTB2TqKPO30R?= =?us-ascii?q?qP1v3Dhd5bSHunSEe601IdKQ=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; 24 Aug 2021 15:44:26 +0200 Received: from set (set.irisa.fr [131.254.10.170]) (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 5DF6F5605BC; Tue, 24 Aug 2021 15:44:25 +0200 (CEST) From: Alan Schmitt To: "lwn" , "cwn" , caml-list@inria.fr Date: Tue, 24 Aug 2021 15:44:25 +0200 Message-ID: <87o89nez46.fsf@m4x.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Tue Aug 24 15:44:25 2021 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.040932, queueID=A5ECB5605BD 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: 18555 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 August 17 to 24, 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 routes v1.0.0 released Feather 0.3.0 Release of GopCaml-mode (0.0.3) and GopCaml-mode-Merlin (0.0.4) - Wizardry = release Share my experience about running OCaml on WebAssembly Old CWN routes v1.0.0 released =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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 release of version 1.0.0 of [routes]. The PR to opam repository has been merged, and the new release should be available via opam once the package cache refreshes. *Routes* provides a DSL for bi-directional URI dispatch. It allows writing route definitions that can be used for both matching, and printing URI paths. Changes since the last opam release: =E2=80=A2 Support for merging two routers by adding a union operation ([#= 115], [@Chattered]) =E2=80=A2 Support for wildcard parameters ([#118], [#129], [@Lupus]) -> Compile time checks ensure that wildcard parameters can only be defined at the end of a route =E2=80=A2 Support `map' operation for path parameter definitions, and sup= port defining path prefixes that can be pre-prended to other routes ([#121], [@Chattered]) =E2=80=A2 Addition of a `ksprintf' style function for routes. ([#123], [@Chattered]) Examples of how to use the library are available in the [tests] and in a [small demo] Documentation can be found [here] *Edit* 1.0.0 is available via opam now - [routes] [#115] [@Chattered] [#118] [#129] [@Lupus] [#121] [#123] [tests] [small demo] [here] Feather 0.3.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 Archive: Charles 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 I'm happy to announce Feather 0.3.0! Feather is a minimal library for bash-like scripting and process execution. ([github/tutorial], [documentation]) This release adds two major features: [github/tutorial] [documentation] 1. A new interface for collecting the exit status, stdout, and stderr of a = Feather command. =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C= =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C= =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C= =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C For example, you can easily print a process's stderr if it exits non-zero: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 open Feather;; =E2=94=82 let stderr, status =3D =E2=94=82 process "ls" [ "/tmp/does-not-exist" ] |> collect stderr_and_= status =E2=94=82 in =E2=94=82 if status <> 0 then failwith ("ls failed with stderr:\n" ^ stde= rr) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 where the types are =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 val process : string -> string list -> cmd =E2=94=82=20 =E2=94=82 type 'a what_to_collect =E2=94=82 val stderr_and_status : (string * int) what_to_collect =E2=94=82=20 =E2=94=82 val collect : =E2=94=82 ?cwd:string -> =E2=94=82 ?env:(string * string) -> =E2=94=82 'a what_to_collect -> =E2=94=82 cmd -> =E2=94=82 'a =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 as you can imagine, we expose several of these `what_to_collect''s. Here's the full set: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 val stdout : string what_to_collect =E2=94=82 val stderr : string what_to_collect =E2=94=82 val status : int what_to_collect =E2=94=82=20 =E2=94=82 val stdout_and_stderr : (string * string) what_to_collect =E2=94=82 val stdout_and_status : (string * int) what_to_collect =E2=94=82 val stderr_and_status : (string * int) what_to_collect =E2=94=82=20 =E2=94=82 type everything =3D { stdout : string; stderr : string; status = : int } =E2=94=82 val everything : everything what_to_collect =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 We considered different design approaches here. I think what we landed on keeps the call site readable and the types of the interface simple. It should be noted: the simplest way to run a command without collecting anything is to use [Feather.run]. [Feather.run] 2. The ability to wait on background processes and collect their output. =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C= =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C= =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C Starting with Feather 0.1.0, you were able to start processes in the background, but the only way to wait for them to complete was to use Feather's [async wrapper]. For those wanting an async-less, direct-style interface, we now expose new methods to do this properly: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 type 'a background_process =E2=94=82=20 =E2=94=82 val run_in_background : =E2=94=82 ?=E2=81=A0cwd:string -> =E2=94=82 ?=E2=81=A0env:(string * string) Base.list -> =E2=94=82 cmd -> =E2=94=82 unit background_process =E2=94=82=20 =E2=94=82 val collect_in_background : =E2=94=82 ?cwd:string -> =E2=94=82 ?env:(string * string) list -> =E2=94=82 'a what_to_collect -> =E2=94=82 cmd -> =E2=94=82 'a background_process =E2=94=82=20 =E2=94=82 val wait : 'a background_process -> 'a =E2=94=82 val wait_all : unit -> unit =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 where an example use might be =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 let server_process =3D =E2=94=82 process "my-server.exe" [] |> collect_in_background stdout_a= nd_status =E2=94=82 in =E2=94=82 ... do other things ... =E2=94=82 match Feather.wait server_process with =E2=94=82 | (stdout, 0) -> ... =E2=94=82 | (_, 1) -> ... =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Thanks again to @Firobe and @tmarti2 for their contributions to this release! I think we've made a lot of progress here and I'm excited to see where things go :slight_smile: [async wrapper] Release of GopCaml-mode (0.0.3) and GopCaml-mode-Merlin (0.0.4) - Wizardry = release =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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 I'm pleased to announce the latest version of *GopCaml-mode* (0.0.3), and the new release of *GopCaml-mode-Merlin* (0.0.4). GopCaml-mode-Merlin is a brand *new!* variant of GopCaml-mode that uses the Merlin parser rather than the OCaml compiler-libs one, and thus has some level of robustness to invalid syntax: If that's piqued your interest, I'd recommend checking out the release posts for the previous versions for more details on what GopCaml can do, and how to get it: [0.0.2 release], [0.0.1 release] The Merlin parser seems to assign text-regions for syntactic constructs slightly more liberally than the standard OCaml parser, so the overlays can feel a bit weird if you're used to the normal GopCaml overlays, but the benefit is that all your favorite structural movement/transformation operations work even when you're dealing with ill-formed programs, allowing for a more fluid editing experience: [0.0.2 release] [0.0.1 release] Detailed Changelog =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95= =8C=E2=95=8C =E2=80=A2 *new!* [for GopCaml-mode-Merlin] *Robustness to ill-formated sy= ntax* =E2=80=A2 Vendored a copy of Merlin to reuse its parser and thereby gain it's robustness to invalid syntax. =E2=80=A2 *new!* *Added support for customisable verbosity* =E2=80=A2 Customise the Emacs variable `gopcaml-messaging-level` to cha= nge the level of messages that are output by GopCaml. Set it to `'none` to disable messages entirely. =E2=80=A2 *new!* *Fixed bug when starting zipper mode at the start of a f= ile.* =E2=80=A2 Zipper mode selects the immediately prior byte position to av= oid inconsistencies when the cursor is just on the edge of an expression, but when the cursor is at position 1, this causes an error as 0 is not a valid point. =E2=80=A2 *new!* *Special casing of shebangs* =E2=80=A2 Added support for handling shebangs at the start of a buffer. =E2=80=A2 Implemented as part of a larger library for preprocessing buffertext before running the parser on it - could be extended to support additional preprocessing in the future. =E2=80=A2 Another possible direction for extension is to use an Emacs callback to modify the text, although this may not be ideal, as the parsing has to be as fast as possible. Get Gopcaml-mode =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C Its as easy as 1, 2, 3! 1. Install from opam (either `gopcaml-mode` xor `gopcaml-mode-merlin`): =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 opam install gopcaml-mode =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 or =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 opam install gopcaml-mode-merlin =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 2. Compile your emacs with support for dynamic modules 3. Load gopcaml-mode in your init.el: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (let ((opam-share (ignore-errors (car (process-lines "opam" = "var" "share"))))) =E2=94=82 (when (and opam-share (file-directory-p opam-share)) =E2=94=82 ;; Register Gopcaml mode =E2=94=82 (add-to-list 'load-path (expand-file-name "emacs/site-= lisp" opam-share)) =E2=94=82 (autoload 'gopcaml-mode "gopcaml-mode" nil t nil) =E2=94=82 (autoload 'tuareg-mode "tuareg" nil t nil) =E2=94=82 (autoload 'merlin-mode "merlin" "Merlin mode" t) =E2=94=82 ;; Automatically start it in OCaml buffers =E2=94=82 (setq auto-mode-alist =E2=94=82 (append '(("\\.ml[ily]?$" . gopcaml-mode) =E2=94=82 ("\\.topml$" . gopcaml-mode)) =E2=94=82 auto-mode-alist)) =E2=94=82 )) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 See the [release post ] for version 0.0.1 for detailed instructions on how you can install it. [release post ] Contribute =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2= =95=8C=E2=95=8C =E2=80=A2 Github: [GitHub - Gopiandcode/gopcaml-mode: [MIRROR] Ultimate O= caml Editing Mode] =E2=80=A2 Gitlab: [Kiran Gopinathan / gopcaml-mode =C2=B7 GitLab ] [GitHub - Gopiandcode/gopcaml-mode: [MIRROR] Ultimate Ocaml Editing Mode] [Kiran Gopinathan / gopcaml-mode =C2=B7 GitLab ] Share my experience about running OCaml on WebAssembly =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Vincent Chan 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 In the last two weeks, I was working on migrating OCaml to WebAssembly. I wrote an article to share my experience. [Run OCaml in the browser by WebAssembly | by Vincent Chan | Aug, 2021 | Medium] [Run OCaml in the browser by WebAssembly | by Vincent Chan | Aug, 2021 | Medium] 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 August 17 to 24, 2021.

routes v1.0.0 released

Anurag Soni announced

I'd like to announce release of version 1.0.0 of routes. The PR to opam repository has been merged, and the new release should be available via opa= m once the package cache refreshes.

Routes provides a DSL for bi-directional URI dispatch. It allows wri= ting route definitions that can be used for both matching, and printing URI paths.

Changes since the last opam release:

  • Support for merging two routers by adding a union operation (#115, @Chattered)
  • Support for wildcard parameters (#118, #129, @Lupus) -&g= t; Compile time checks ensure that wildcard parameters can only be defined = at the end of a route
  • Support map operation for path parameter definitions, and = support defining path prefixes that can be pre-prended to other routes (#121, @Chattered)
  • Addition of a ksprintf style function for routes. (#123, @Chattered)

Examples of how to use the library are available in the tests and in a small demo

Documentation can be found here

Edit

1.0.0 is available via opam now - http://opam.ocaml.org/packages/routes/routes.1.0.0/=

Feather 0.3.0

Charles announced

I'm happy to announce Feather 0.3.0! Feather is a minimal library for bash-= like scripting and process execution. (github/tutorial, d= ocumentation) This release adds two major features:

1. A new interface for collecting the exit status, st= dout, and stderr of a Feather command.

For example, you can easily print a process's stderr if it exits non-zero:

open Feather;;
let stderr, status<=
/span> =3D
  process "ls" [ "/tmp/does-not-exist" ] |> collect stderr_and_status
in
if status <> 0 then failwith ("ls failed with stderr:\n" ^ stderr)

where the types are

val process : string -&g=
t; string list -> cmd

type 'a what_to_collect
val stderr_and_status : (string * int) what_to_coll=
ect

val collect :
  ?cwd:string ->
  ?env:(string * string) ->
  'a what_to_collect ->
  cmd ->
  'a

as you can imagine, we expose several of these what_to_collect= 's. Here's the full set:

val stdout : string what=
_to_collect
val stderr : string what_to_collect
val status : int what_to_collect

val stdout_and_stderr : (string * string) what_to_c=
ollect
val stdout_and_status : (string * int) what_to_coll=
ect
val stderr_and_status : (string * int) what_to_coll=
ect

type everything =3D { stdout : string; stderr : stri=
ng; status : int }
val everything : everything what_to_collect

We considered different design approaches here. I think what we landed on k= eeps the call site readable and the types of the interface simple.

It should be noted: the simplest way to run a command without collecting an= ything is to use Feather.run.

2. The ability to wait on background processes and co= llect their output.

Starting with Feather 0.1.0, you were able to start processes in the backgr= ound, but the only way to wait for them to complete was to use Feather's async wrapper. For those wanting an async-less, direct-style interface, we now expose new methods to do this pr= operly:

type 'a background_process

val run_in_background :
  ?⁠cwd:string ->
  ?⁠env:(string * string) Base.list ->
  cmd ->
  unit background_process

val collect_in_background :
  ?cwd:string ->
  ?env:(string * string) list ->
  'a what_to_collect ->
  cmd ->
  'a background_process

val wait : 'a background_process -> 'a
val wait_all : unit -> unit

where an example use might be

let server_process =3D
   process "my-server.exe" [] |> collect_in_background stdout_and_status
in
... do other things ...
match with
| (stdout, 0) -> ...
| (_, 1) -> ...

Thanks again to @Firobe and @tmarti2 for their contributions to this releas= e! I think we've made a lot of progress here and I'm excited to see where things go :slight_smile:

Release of GopCaml-mode (0.0.3) and GopCaml-mode-Merlin (0.0.4= ) - Wizardry release

Kiran Gopinathan announced

I'm pleased to announce the latest version of GopCaml-mode (0.0.3), = and the new release of GopCaml-mode-Merlin (0.0.4).

GopCaml-mode-Merlin is a brand new! variant of GopCaml-mode that use= s the Merlin parser rather than the OCaml compiler-libs one, and thus has some level of robustness to invalid syntax:

3D"a09586b9db3b=

If that's piqued your interest, I'd recommend checking out the release post= s for the previous versions for more details on what GopCaml can do, and how to get it: 0.0.2 release, 0.0.1 release

The Merlin parser seems to assign text-regions for syntactic constructs sli= ghtly more liberally than the standard OCaml parser, so the overlays can feel a bit weird if you're used to the no= rmal GopCaml overlays, but the benefit is that all your favorite structural movement/transformation operations work e= ven when you're dealing with ill-formed programs, allowing for a more fluid editing experience:

3D"9f2976b47018=

Detailed Changelog

  • new! [for GopCaml-mode-Merlin] Robustness to ill-formated syn= tax
    • Vendored a copy of Merlin to reuse its parser and thereby gain it's rob= ustness to invalid syntax.
  • new! Added support for customisable verbosity
    • Customise the Emacs variable `gopcaml-messaging-level` to change the le= vel of messages that are output by GopCaml. Set it to `'none` to disable me= ssages entirely.
  • new! Fixed bug when starting zipper mode at the start of a fi= le.
    • Zipper mode selects the immediately prior byte position to avoid incons= istencies when the cursor is just on the edge of an expression, but when th= e cursor is at position 1, this causes an error as 0 is not a valid point.<= /li>
  • new! Special casing of shebangs
    • Added support for handling shebangs at the start of a buffer.
    • Implemented as part of a larger library for preprocessing buffertext be= fore running the parser on it - could be extended to support additional pre= processing in the future.
    • Another possible direction for extension is to use an Emacs callback to= modify the text, although this may not be ideal, as the parsing has to be = as fast as possible.

Get Gopcaml-mode

Its as easy as 1, 2, 3!

  1. Install from opam (either `gopcaml-mode` xor `gopcaml-mode-merlin`):

    opam install gopcaml-mode
    

    or

    opam install gopcaml-mode-merlin
    
  2. Compile your emacs with support for dynamic modules
  3. Load gopcaml-mode in your init.el:

    (let ((opam-share (ignore-errors (car =
    (process-lines "opam" "var" "share")))))
        (when (and opam-share (file-directory-p opam-share))
          ;; Register Gopcaml mode
          (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share))
            (autoload 'gopcaml-mode "gopcaml-mo=
    de" nil t nil)
            (autoload 'tuareg-mode "tuareg" nil t nil)
            (autoload 'merlin-mode "merlin" "Merlin mode" t)
          ;; Automatically start it in OCaml buffers
          (setq auto-mode-alist
          (append '(("\\.ml[ily]?$" . go=
    pcaml-mode)
              ("\\.topml$" . gopcaml-mod=
    e))
            auto-mode-alist))
          ))
    

See the release post for version 0.0.1 for detailed instructions on how you can install it.

Share my experience about running OCaml on WebAssembly

Vincent Chan announced

In the last two weeks, I was working on migrating OCaml to WebAssembly. I w= rote an article to share my experience.

Run OCaml in the browser by WebAssembly | by Vincent Chan | = Aug, 2021 | Medium

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.

--=-=-=--