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 F0BBF5D5 for ; Tue, 19 Jan 2021 14:28:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.79,359,1602540000"; d="scan'208,217";a="487898981" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 19 Jan 2021 15:28:31 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id 2D3FCE0372; Tue, 19 Jan 2021 15:28:31 +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 D0A45E0264 for ; Tue, 19 Jan 2021 15:28:26 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.79,359,1602540000"; d="scan'208,217";a="370466372" Received: from cbg35-2-78-242-14-140.fbx.proxad.net (HELO set) ([78.242.14.140]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 15:28:24 +0100 From: Alan Schmitt To: "lwn" , "cwn" , caml-list@inria.fr, comp@lists.orbitalfox.eu Date: Tue, 19 Jan 2021 15:28:23 +0100 Message-ID: <87mtx5ypa0.fsf@m4x.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News Reply-To: Alan Schmitt X-Loop: caml-list@inria.fr X-Sequence: 18374 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 January 12 to 19, 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 Irmin 2.3.0 Dune 2.8.0 lwt-canceler.0.3 Interesting OCaml Articles OCaml 4.12.0, first beta release OCaml for ARM MacOS Talk on OCaml Batteries at Houston Functional Programmers Other OCaml News Old CWN Irmin 2.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 Archive: Craig Ferguson 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 I'm very happy to announce the release of the Irmin 2.3.0 family of packages, including: =E2=80=A2 [`irmin-pack.2.3.0'], a storage backend for Irmin designed for = and used by Tezos. This release contains a host of performance improvements as well as offline CLI features such as integrity checking. It also contains a number of high-level design changes, which were discussed in a recent [Tarides blog post]. Finally, `irmin-pack.2.3.0' also contains a prototype of the [_layered_] `irmin-pack' store, which provides an [OverlayFS]-esque mode of operation for `irmin-pack' in which the causal history of the store can be chunked into independently-accessable substores. This feature will eventually be deployed in a [future version of Tezos]. =E2=80=A2 [`irmin-containers'], a collection of pre-defined mergeable data structures built using Irmin and compatible with any backend. These were originally provided by @kayceesrk as part of [`ezirmin'], and has since been modernised and upstreamed by Anirudh S. =E2=80=A2 `irmin-bench', a suite of benchmarks for Irmin for use with [`current-bench'], an experimental continuous benchmarking infrastructure for OCaml projects. Lots of work has been going on behind the scenes to make this a general benchmarking infrastructure for the Mirage ecosystem, including a recent [fancy UI overhaul] by new contributor @rizo. =E2=80=A2 [`repr'], an extraction of the `Irmin.Type' type representation library for use in other packages. This package contains a set of combinators for building run-time representations of types, along with various generic operations defined over those representations, including: equality, comparison, pretty-printing, JSON / binary codecs, etc. The API of this library is currently a work-in-progress, but we hope to use it more widely in the Mirage ecosystem soon. =E2=80=A2 [`semaphore-compat'], an extraction of the `Semaphore' library = in OCaml 4.12, for libraries that want to maintain compatibility with earlier versions of OCaml. The full list of changes to Irmin can be found [here]. Many thanks to our open-source contributors and collaborators. Happy hacking! [`irmin-pack.2.3.0'] [Tarides blog post] [_layered_] [OverlayFS] [future version of Tezos] [`irmin-containers'] [`ezirmin'] [`current-bench'] [fancy UI overhaul] [`repr'] [`semaphore-compat'] [here] Dune 2.8.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 Archive: Rudi Grinberg 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 On behalf of the dune, I'm pleased to announce the release of dune 2.8.0. This release contains many bug fixes, performance improvements, and interesting new features. I'll point out two new features that I'm most excited about. First is the experimental `dune_site' extension that makes it possible to register and load plugins at runtime. This feature is quite involved, but we've documented it extensively [in the manual]. Another cool feature is that we've eliminated the need for .merlin files and all the caveats that came with them. Now, merlin talks to dune directly to get precise configuration for every module. Say goodbye to all those "approximate .merlin file" warnings! I encourage everyone to upgrade as soon as possible, as earlier versions are not compatible with OCaml 4.12. Happy Hacking. Full change log: [in the manual] 2.8.0 (13/01/2021) =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 `dune rules' accepts aliases and other non-path rules (#4063, @mrmr1993) =E2=80=A2 Action `(diff reference test_result)' now accept `reference' to= be absent and in that case consider that the reference is empty. Then running `dune promote' will create the reference file. (#3795, @bobot) =E2=80=A2 Ignore special files (BLK, CHR, FIFO, SOCKET), (#3570, fixes #3= 124, #3546, @ejgallego) =E2=80=A2 Experimental: Simplify loading of additional files (data or cod= e) at runtime in programs by introducing specific installation sites. In particular it allow to define plugins to be installed in these sites. (#3104, #3794, fixes #1185, @bobot) =E2=80=A2 Move all temporary files created by dune to run actions to a si= ngle directory and make sure that actions executed by dune also use this directory by setting `TMPDIR' (or `TEMP' on Windows). (#3691, fixes #3422, @rgrinberg) =E2=80=A2 Fix bootstrap script with custom configuration. (#3757, fixes #= 3774, @marsam) =E2=80=A2 Add the `executable' field to `inline_tests' to customize the compilation flags of the test runner executable (#3747, fixes #3679, @lubegasimon) =E2=80=A2 Add `(enabled_if ...)' to `(copy_files ...)' (#3756, @nojb) =E2=80=A2 Make sure Dune cleans up the status line before exiting (#3767, fixes #3737, @alan-j-hu) =E2=80=A2 Add `{gitlab,bitbucket}' as options for defining project sources with `source' stanza `(source ( user/repo))' in the `dune-project' file. (#3813, @rgrinberg) =E2=80=A2 Fix generation of `META' and `dune-package' files when some tar= gets (byte, native, dynlink) are disabled. Previously, dune would generate all archives for regardless of settings. (#3829, #4041, @rgrinberg) =E2=80=A2 Do not run ocamldep to for single module executables & libraries. The dependency graph for such artifacts is trivial (#3847, @rgrinberg) =E2=80=A2 Fix cram tests inside vendored directories not being interpreted correctly. (#3860, fixes #3843, @rgrinberg) =E2=80=A2 Add `package' field to private libraries. This allows such libr= aries to be installed and to be usable by other public libraries in the same project (#3655, fixes #1017, @rgrinberg) =E2=80=A2 Fix the `%{make}' variable on Windows by only checking for a `g= make' binary on UNIX-like systems as a unrelated `gmake' binary might exist on Windows. (#3853, @kit-ty-kate) =E2=80=A2 Fix `$ dune install' modifying the build directory. This made t= he build directory unusable when `$ sudo dune install' modified permissions. (fix #3857, @rgrinberg) =E2=80=A2 Fix handling of aliases given on the command line (using the `@= ' and `@@' syntax) so as to correctly handle relative paths. (#3874, fixes #3850, @nojb) =E2=80=A2 Allow link time code generation to be used in preprocessing executable. This makes it possible to use the build info module inside the preprocessor. (#3848, fix #3848, @rgrinberg) =E2=80=A2 Correctly call `git ls-tree' so unicode files are not quoted, t= his fixes problems with `dune subst' in the presence of unicode files. Fixes #3219 (#3879, @ejgallego) =E2=80=A2 `dune subst' now accepts common command-line arguments such as `--debug-backtraces' (#3878, @ejgallego) =E2=80=A2 `dune describe' now also includes information about executables= in addition to that of libraries. (#3892, #3895, @nojb) =E2=80=A2 instrumentation backends can now receive arguments via `(instrumentation (backend ))'. (#3906, #3932, @nojb) =E2=80=A2 Tweak auto-formatting of `dune' files to improve readability. (#3928, @nojb) =E2=80=A2 Add a switch argument to opam when context is not default. (#39= 51, @tmattio) =E2=80=A2 Avoid pager when running `$ git diff' (#3912, @AltGr) =E2=80=A2 Add `(root_module ..)' field to libraries & executables. This m= akes it possible to use library dependencies shadowed by local modules (#3825, @rgrinberg) =E2=80=A2 Allow `(formatting ...)' field in `(env ...)' stanza to set per-directory formatting specification. (#3942, @nojb) =E2=80=A2 [coq] In `coq.theory', `:standard' for the `flags' field now us= es the flags set in `env' profile flags (#3931 , @ejgallego @rgrinberg) =E2=80=A2 [coq] Add `-q' flag to `:standard' `coqc' flags , fixes #3924, (#3931 , @ejgallego) =E2=80=A2 Add support for Coq's native compute compilation mode (@ejgalle= go, #3210) =E2=80=A2 Add a `SUFFIX' directive in `.merlin' files for each dialect wi= th no preprocessing, to let merlin know of additional file extensions (#3977, @vouillon) =E2=80=A2 Stop promoting `.merlin' files. Write per-stanza Merlin configurations in binary form. Add a new subcommand `dune ocaml-merlin' that Merlin can use to query the configuration files. The `allow_approximate_merlin' option is now useless and deprecated. Dune now conflicts with `merlin < 3.4.0' and `ocaml-lsp-server < 1.3.0' (#3554, @voodoos) =E2=80=A2 Configurator: fix a bug introduced in 2.6.0 where the configura= tor V1 API doesn't work at all when used outside of dune. (#4046, @aalekseyev) =E2=80=A2 Fix `libexec' and `libexec-private' variables. In cross-compila= tion settings, they now point to the file in the host context. (#4058, fixes #4057, @TheLortex) =E2=80=A2 When running `$ dune subst', use project metadata as a fallback= when package metadata is missing. We also generate a warning when `(name ..)' is missing in `dune-project' files to avoid failures in production builds. =E2=80=A2 Remove support for passing `-nodynlink' for executables. It was bypassed in most cases and not correct in other cases in particular on arm32. (#4085, fixes #4069, fixes #2527, @emillon) =E2=80=A2 Generate archive rules compatible with 4.12. Dune longer attemp= t to generate an archive file if it's unnecessary (#3973, fixes #3766, @rgrinberg) =E2=80=A2 Fix generated Merlin configurations when multiple preprocessors= are defined for different modules in the same folder. (#4092, fixes #2596, #1212 and #3409, @voodoos) =E2=80=A2 Add the option `use_standard_c_and_cxx_flags' to `dune-project'= that 1. disables the unconditional use of the `ocamlc_cflags' and `ocamlc_cppflags' from `ocamlc -config' in C compiler calls, these flags will be present in the `:standard' set instead; and 2. enables the detection of the C compiler family and populates the `:standard' set of flags with common default values when building CXX stubs. (#3875, #3802, fix #3718 and #3528, @voodoos) lwt-canceler.0.3 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Rapha=C3=ABl Proust 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 On behalf of [Nomadic Labs], I'm happy to announce the release of Lwt-canceler version 0.3. Lwt-canceler is a small library to help programs written using Lwt to synchronise promises around resource clean-up. This library was developed as part of the [Tezos codebase] before being released. With this version, the code has matured significantly (including tests, documentation and some refactoring); the next release will probably be a version 1.0 at which point a more robust versioning scheme will be used. The documentation is available online: The code is released under MIT License and hosted on Gitlab: The new version is available on opam: `opam install lwt-canceler' Happy hacking! [Nomadic Labs] [Tezos codebase] Interesting OCaml Articles =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=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: Weng Shiwei 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 Let me share my new blog post on understanding `format6' with examples. It's almost my reading note for the paper Format Unraveled (on module Format) and experiments on utop. I tried not to be too verbose though. Weng Shiwei later said =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 Well, I made a sequel of `format6' post, *Understanding `format6' in OCaml by diagrams* This time I just use four examples with four diagrams e.g. it's the one for `Scanf.sscanf' p.s. It's a pity that I missed Gabriel's post [The 6 parameters of (=E2=80=99a, =E2=80=99b, =E2=80=99c, =E2=80=99d, =E2=80=99e, =E2=80=99f) = format6] after writing that one. [The 6 parameters of (=E2=80=99a, =E2=80=99b, =E2=80=99c, =E2=80=99d, =E2= =80=99e, =E2=80=99f) format6] OCaml 4.12.0, first beta 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 Archive: octachron 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 The release of OCaml 4.12.0 is close. The set of new features has been stabilized, and core opam packages already work with this release. After three alpha releases, we have created a first beta version to help you adapt your software to the new features ahead of the release. Compared to the last alpha, this beta contains only three new bug fixes and one change to the standard library. The base compiler can be installed as an opam switch with the following commands =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 opam update =E2=94=82 opam switch create 4.12.0~beta1 --repositories=3Ddefault,beta= =3Dgit+https://github.com/ocaml/ocaml-beta-repository.git =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 If you want to tweak the configuration of the compiler, you can pick configuration options with =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 opam update =E2=94=82 opam switch create --packages=3Docaml-variants.4.= 12.0~beta1+options, =E2=94=82 --repositories=3Ddefault,beta=3Dgit+https://github.com/ocaml/oc= aml-beta-repository.git =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 where is a comma separated list of ocaml-option-* packages. For instance, for a flambda and afl enabled switch: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 opam switch create 4.12.0~beta1+flambda+afl =E2=94=82 --packages=3Docaml-variants.4.12.0~beta1+options,ocaml-option-f= lambda,ocaml-option-afl =E2=94=82 --repositories=3Ddefault,beta=3Dgit+https://github.com/ocaml/oc= aml-beta-repository.git =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 All available options can be listed with "opam search ocaml-option". The source code is available at these addresses: =E2=80=A2 =E2=80=A2 If you want to test this version, you may want to install the alpha opam repository with opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git This alpha repository contains various packages patched with fixes in the process of being upstreamed. Once the repository installed, these patched packages will take precedence over the non-patched version. If you find any bugs, please report them here: Changes from the third alpha release =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 Postponed features =E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2= =94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94= =84=E2=94=84 =E2=80=A2 [9533], [10105], [10127] : Added String.starts_with and String.ends_with. (Bernhard Schommer, review by Daniel B=C3=BCnzli, Gabriel Scherer and Alain Frisch) [9533] [10105] [10127] Additional bug fixes =E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2= =94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94=84=E2=94= =84=E2=94=84=E2=94=84=E2=94=84 =E2=80=A2 [9096], [10096]: fix a 4.11.0 performance regression in classes/objects declared within a function (Gabriel Scherer, review by Leo White, report by Sacha Ayoun) =E2=80=A2 [10106], [10112]: some expected-type explanations where forgott= en after some let-bindings (Gabriel Scherer, review by Thomas Refis and Florian Angeletti, report by Daniil Baturin) =E2=80=A2 [9326], [10125]: Gc.set incorrectly handles the three `custom_*' fields, causing a performance regression (report by Emilio Jes=C3=BAs Gallego Arias, analysis and fix by Stephen Dolan, code by Xavier Leroy, review by Hugo Heuzard and Gabriel Scherer) [9096] [10096] [10106] [10112] [9326] [10125] OCaml for ARM MacOS =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=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, Xavier Leroy said =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 It's quite easy to get up to speed using the precompiled OPAM binary for macOS/ARM64. =E2=80=A2 Download [opam-2.0.7-arm64-macos]. =E2=80=A2 Move it to some directory in your PATH, rename it to `opam', and make it executable. From a Terminal window: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 mv ~/Downloads/opam-2.0.7-arm64-macos /usr/local/bin/opam =E2=94=82 chmod +x /usr/local/bin/opam =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=80=A2 Try to execute it: `opam init'. You will be blocked by the mac= OS security checks, as the binary is not signed. =E2=80=A2 Open Preferences / Security and Privacy. There should be a not= ice "opam was blocked because=E2=80=A6" and an "Allow Anyway" button. Clic= k on that button. =E2=80=A2 Try again to execute `opam init'. You will be blocked again, b= ut now there is an "Open" button. Click on that button. `opam init' should run and install the OCaml 4.10.2 compiler. =E2=80=A2 From now on, you can run `opam' without being blocked. Use this freedom to `opam install' the packages you need. =E2=80=A2 Some packages that depend on external C libraries may fail to install because these C libraries are not available. Normally we would rely on Homebrew or MacPorts to provide these C libraries, but these package collections are still being ported to macOS/ARM64. As a reward for these minor inconveniences, you'll get excellent performance running OCaml software such as Coq. Single-core performance on a MacBook Air M1 is 20% better than the best x86 workstation I have access to. [opam-2.0.7-arm64-macos] Talk on OCaml Batteries at Houston Functional Programmers =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Claude Jager-Rubinson 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 @UnixJunkie will be speaking (virtually, of course) on *OCaml Batteries Included* at Houston Functional Programmers, this coming Wednesday, Jan 20 at 7pm (U.S. Central time). His talk will cover Batteries' history, place within the OCaml ecosystem, and comparisons with OCaml's other alternative standard libraries. All are welcome to join us, even if you're not from Houston. Complete details and Zoom info are at [hfpug.org]. [hfpug.org] 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 [Coq 8.13.0 is out] [OCaml Planet] [Coq 8.13.0 is out] 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 Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of January 12 to 19, 202= 1.

Irmin 2.3.0

Craig Ferguson announced

I'm very happy to announce the release of the Irmin 2.3.0 family of package= s, including:

  • irmin-pack.= 2.3.0, a storage backend for Irmin designed for and used by Tezo= s. This release contains a host of performance improvements as well as offl= ine CLI features such as integrity checking. It also contains a number of h= igh-level design changes, which were discussed in a recent Tarides blog po= st.

    Finally, irmin-pack.2.3.0 also contains a prototype of the layered irmin-pack stor= e, which provides an Ov= erlayFS-esque mode of operation for irmin-pack in which th= e causal history of the store can be chunked into independently-accessable = substores. This feature will eventually be deployed in a future version of Tezos.

  • irmin-containers, a collection of pre-def= ined mergeable data structures built using Irmin and compatible with any ba= ckend. These were originally provided by @kayceesrk as part of ezirmin, and has sinc= e been modernised and upstreamed by Anirudh S.
  • irmin-bench, a suite of benchmarks for Irmin for use with = current-bench<= /code>, an experimental continuous benchmarking infrastructure for OCam= l projects. Lots of work has been going on behind the scenes to make this a= general benchmarking infrastructure for the Mirage ecosystem, including a = recent fancy = UI overhaul by new contributor @rizo.
  • repr, an ex= traction of the Irmin.Type type representation library for use= in other packages. This package contains a set of combinators for building= run-time representations of types, along with various generic operations d= efined over those representations, including: equality, comparison, pretty-= printing, JSON / binary codecs, etc. The API of this library is currently a= work-in-progress, but we hope to use it more widely in the Mirage ecosyste= m soon.
  • semaphore-= compat, an extraction of the Semaphore library in O= Caml 4.12, for libraries that want to maintain compatibility with earlier v= ersions of OCaml.

The full list of changes to Irmin can be found here.

Many thanks to our open-source contributors and collaborators. Happy hackin= g!

Dune 2.8.0

Rudi Grinberg announced

On behalf of the dune, I'm pleased to announce the release of dune 2.8.0. T= his release contains many bug fixes, performance improvements, and interesting new features. I'll point out two = new features that I'm most excited about.

First is the experimental dune_site extension that makes it po= ssible to register and load plugins at runtime. This feature is quite involved, but we've documented it extensively in the manual.

Another cool feature is that we've eliminated the need for .merlin files an= d all the caveats that came with them. Now, merlin talks to dune directly to get precise configuration for every m= odule. Say goodbye to all those "approximate .merlin file" warnings!

I encourage everyone to upgrade as soon as possible, as earlier versions ar= e not compatible with OCaml 4.12. Happy Hacking.

Full change log:

2.8.0 (13/01/2021)

  • dune rules accepts aliases and other non-path rules (#4063= , @mrmr1993)
  • Action (diff reference test_result) now accept refer= ence to be absent and in that case consider that the reference is empty. Then running dune = promote will create the reference file. (#3795, @bobot)
  • Ignore special files (BLK, CHR, FIFO, SOCKET), (#3570, fixes #3124, #35= 46, @ejgallego)
  • Experimental: Simplify loading of additional files (data or code) at ru= ntime in programs by introducing specific installation sites. In particular it al= low to define plugins to be installed in these sites. (#3104, #3794, fixes #118= 5, @bobot)
  • Move all temporary files created by dune to run actions to a single dir= ectory and make sure that actions executed by dune also use this directory by sett= ing TMPDIR (or TEMP on Windows). (#3691, fixes #3422,= @rgrinberg)
  • Fix bootstrap script with custom configuration. (#3757, fixes #3774, @m= arsam)
  • Add the executable field to inline_tests to c= ustomize the compilation flags of the test runner executable (#3747, fixes #3679, @lubegasimon)
  • Add (enabled_if ...) to (copy_files ...) (#37= 56, @nojb)
  • Make sure Dune cleans up the status line before exiting (#3767, fixes #3737, @alan-j-hu)
  • Add {gitlab,bitbucket} as options for defining project sou= rces with source stanza (source (<host> user/repo)) in the dune-pro= ject file. (#3813, @rgrinberg)
  • Fix generation of META and dune-package files= when some targets (byte, native, dynlink) are disabled. Previously, dune would generate all archives for regardless of settings. (#3829, #4041, @rgrinberg)
  • Do not run ocamldep to for single module executables & libraries. T= he dependency graph for such artifacts is trivial (#3847, @rgrinberg)
  • Fix cram tests inside vendored directories not being interpreted correc= tly. (#3860, fixes #3843, @rgrinberg)
  • Add package field to private libraries. This allows such l= ibraries to be installed and to be usable by other public libraries in the same project (#3655, fixes #1017, @rgrinberg)
  • Fix the %{make} variable on Windows by only checking for a= gmake binary on UNIX-like systems as a unrelated gmake binary might exist o= n Windows. (#3853, @kit-ty-kate)
  • Fix $ dune install modifying the build directory. This mad= e the build directory unusable when $ sudo dune install modified permissio= ns. (fix #3857, @rgrinberg)
  • Fix handling of aliases given on the command line (using the @ and @@ syntax) so as to correctly handle relative paths. (#3874, fixes #3850, @noj= b)
  • Allow link time code generation to be used in preprocessing executable.= This makes it possible to use the build info module inside the preprocessor. (#3848, fix #3848, @rgrinberg)
  • Correctly call git ls-tree so unicode files are not quoted= , this fixes problems with dune subst in the presence of unicode files. Fix= es #3219 (#3879, @ejgallego)
  • dune subst now accepts common command-line arguments such = as --debug-backtraces (#3878, @ejgallego)
  • dune describe now also includes information about executab= les in addition to that of libraries. (#3892, #3895, @nojb)
  • instrumentation backends can now receive arguments via (instrumen= tation (backend <name> <args>)). (#3906, #3932, @nojb)
  • Tweak auto-formatting of dune files to improve readability= . (#3928, @nojb)
  • Add a switch argument to opam when context is not default. (#3951, @tma= ttio)
  • Avoid pager when running $ git diff (#3912, @AltGr)
  • Add (root_module ..) field to libraries & executables.= This makes it possible to use library dependencies shadowed by local modules (#3825, @rgrinberg)
  • Allow (formatting ...) field in (env ...) sta= nza to set per-directory formatting specification. (#3942, @nojb)
  • [coq] In coq.theory, :standard for the = flags field now uses the flags set in env profile flags (#3931 , @ejgallego @rgrinberg)=
  • [coq] Add -q flag to :standard coqc flags , fixes #3924, (#3931 , @ejgallego)
  • Add support for Coq's native compute compilation mode (@ejgallego, #321= 0)
  • Add a SUFFIX directive in .merlin files for e= ach dialect with no preprocessing, to let merlin know of additional file extensions (#3977, @vouillon)
  • Stop promoting .merlin files. Write per-stanza Merlin conf= igurations in binary form. Add a new subcommand dune ocaml-merlin that Merli= n can use to query the configuration files. The allow_approximate_merlin op= tion is now useless and deprecated. Dune now conflicts with merlin < 3.4.0 and ocaml-lsp-server < 1.3.0 (#3554, @voodoos)
  • Configurator: fix a bug introduced in 2.6.0 where the configurator V1 A= PI doesn't work at all when used outside of dune. (#4046, @aalekseyev)
  • Fix libexec and libexec-private variables. In= cross-compilation settings, they now point to the file in the host context. (#4058, fixes #4057, @TheLortex)
  • When running $ dune subst, use project metadata as a fallb= ack when package metadata is missing. We also generate a warning when (name ..)= is missing in dune-project files to avoid failures in production builds.
  • Remove support for passing -nodynlink for executables. It = was bypassed in most cases and not correct in other cases in particular on arm32. (#4085, fixes #4069, fixes #2527, @emillon)
  • Generate archive rules compatible with 4.12. Dune longer attempt to gen= erate an archive file if it's unnecessary (#3973, fixes #3766, @rgrinberg)
  • Fix generated Merlin configurations when multiple preprocessors are def= ined for different modules in the same folder. (#4092, fixes #2596, #1212 and #3409, @voodoos)
  • Add the option use_standard_c_and_cxx_flags to dune-= project that 1. disables the unconditional use of the ocamlc_cflags and = ocamlc_cppflags from ocamlc -config in C compiler calls, these flags will be p= resent in the :standard set instead; and 2. enables the detection of the C c= ompiler family and populates the :standard set of flags with common default v= alues when building CXX stubs. (#3875, #3802, fix #3718 and #3528, @voodoos)

lwt-canceler.0.3

Rapha=C3=ABl Proust announced

On behalf of Nomadic Labs, I'm ha= ppy to announce the release of Lwt-canceler version 0.3. Lwt-canceler is a small library to help programs written using Lwt to = synchronise promises around resource clean-up. This library was developed as part of the Tezos codebase before being released.

With this version, the code has matured significantly (including tests, doc= umentation and some refactoring); the next release will probably be a version 1.0 at which point a more robust version= ing scheme will be used.

The documentation is available online: https://nomadic-labs.gitlab.io/lwt-canceler/lwt-canceler/= Lwt_canceler/index.html The code is released under MIT License and hosted on Gitlab: https://gitlab.com/nomadic-labs/= lwt-canceler The new version is available on opam: opam install lwt-canceler

Happy hacking!

Interesting OCaml Articles

Weng Shiwei announced

Let me share my new blog post on understanding format6 with ex= amples. https://blog.tail= .moe/2021/01/13/format6.html

It's almost my reading note for the paper Format Unraveled (on module Forma= t) and experiments on utop. I tried not to be too verbose though.

Weng Shiwei later said

Well, I made a sequel of format6 post, Understanding format6 in OCaml by diagrams https://b= log.tail.moe/2021/01/15/format6-diagram.html

This time I just use four examples with four diagrams e.g. it's the one for= Scanf.sscanf

3D"=

p.s. It's a pity that I missed Gabriel's post The 6 parameters of (=E2=80=99a, =E2=80=99b, =E2=80=99= c, =E2=80=99d, =E2=80=99e, =E2=80=99f) format6 after writing that one.

OCaml 4.12.0, first beta release

octachron announced

The release of OCaml 4.12.0 is close.

The set of new features has been stabilized, and core opam packages already work with this release. After three alpha releases, we have created a first beta version to help you adapt your software to the new features ahead of t= he release. Compared to the last alpha, this beta contains only three new bug = fixes and one change to the standard library.

The base compiler can be installed as an opam switch with the following com= mands

opam update
opam switch create 4.12.0~beta1 --repositories=3Ddefault,beta=3Dgit+https:/=
/github.com/ocaml/ocaml-beta-repository.git

If you want to tweak the configuration of the compiler, you can pick config= uration options with

opam update
opam switch create <switch_name> --packages=3Docaml-variants.4.12.0~b=
eta1+options,<option_list>
--repositories=3Ddefault,beta=3Dgit+https://github.com/ocaml/ocaml-beta-rep=
ository.git

where <option_list> is a comma separated list of ocaml-option-* packa= ges. For instance, for a flambda and afl enabled switch:

opam switch create 4.12.0~beta1+flambda+afl
--packages=3Docaml-variants.4.12.0~beta1+options,ocaml-option-flambda,ocaml=
-option-afl
--repositories=3Ddefault,beta=3Dgit+https://github.com/ocaml/ocaml-beta-rep=
ository.git

All available options can be listed with "opam search ocaml-option".

The source code is available at these addresses:

If you want to test this version, you may want to install the alpha opam re= pository

https://gi= thub.com/kit-ty-kate/opam-alpha-repository

with

opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git

This alpha repository contains various packages patched with fixes in the process of being upstreamed. Once the repository installed, these patched packages will take precedence over the non-patched version.

If you find any bugs, please report them here: https://github.com/ocaml= /ocaml/issues

Changes from the third alpha release

Postponed features
  • 9533, 10105, 10127 : Added String.starts_w= ith and String.ends_with. (Bernhard Schommer, review by Daniel B=C3=BCnzli,= Gabriel Scherer and Alain Frisch)
Additional bug fixes
  • 9096, 10096: fix a 4.11.0 p= erformance regression in classes/objects declared within a function (Gabrie= l Scherer, review by Leo White, report by Sacha Ayoun)
  • 10106, 10112: some expecte= d-type explanations where forgotten after some let-bindings (Gabriel Schere= r, review by Thomas Refis and Florian Angeletti, report by Daniil Baturin)<= /li>
  • 9326, 10125: Gc.set incorre= ctly handles the three custom_* fields, causing a performance = regression (report by Emilio Jes=C3=BAs Gallego Arias, analysis and fix by = Stephen Dolan, code by Xavier Leroy, review by Hugo Heuzard and Gabriel Sch= erer)

OCaml for ARM MacOS

Deep in this thread, Xavier Leroy said

It's quite easy to get up to speed using the precompiled OPAM binary for ma= cOS/ARM64.

  • Download opam-2.0.7-arm64-macos.
  • Move it to some directory in your PATH, rename it to opam,= and make it executable. From a Terminal window:
mv ~/Downloads/opam-2.0.7-arm64-macos /usr/local/bin/opam
chmod +x /usr/local/bin/opam
  • Try to execute it: opam init. You will be blocked by the = macOS security checks, as the binary is not signed.
  • Open Preferences / Security and Privacy. There should be a notice "opa= m was blocked because…" and an "Allow Anyway" button. Click on that= button.
  • Try again to execute opam init. You will be blocked again= , but now there is an "Open" button. Click on that button. opam init= should run and install the OCaml 4.10.2 compiler.
  • From now on, you can run opam without being blocked. Use = this freedom to opam install the packages you need.
  • Some packages that depend on external C libraries may fail to install b= ecause these C libraries are not available. Normally we would rely on Homeb= rew or MacPorts to provide these C libraries, but these package collections= are still being ported to macOS/ARM64.

As a reward for these minor inconveniences, you'll get excellent performanc= e running OCaml software such as Coq. Single-core performance on a MacBook Air M1 is 20% better than the best x86= workstation I have access to.

Talk on OCaml Batteries at Houston Functional Programmers

Claude Jager-Rubinson announced

@UnixJunkie will be speaking (virtually, of course) on OCaml Batteries I= ncluded at Houston Functional Programmers, this coming Wednesday, Jan 20 at 7pm (U.S. Central time). His talk will co= ver Batteries' history, place within the OCaml ecosystem, and comparisons with OCaml's other alternative standard li= braries. All are welcome to join us, even if you're not from Houston. Complete details and Zoom info are at hfpug.org.

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 RSS feed of the archives<= /a>.

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

--=-=-=--