From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: plum.tunbury.org; dkim=pass (1024-bit key; unprotected) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=SVA7XF6G; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.134.164.83; helo=mail2-relais-roc.national.inria.fr; envelope-from=caml-list-owner@inria.fr; receiver=tunbury.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by plum.tunbury.org (Postfix) with ESMTPS id D284B400A0 for ; Tue, 23 Sep 2025 13:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:date:message-id:mime-version:subject:reply-to: sender:list-id:list-help:list-subscribe:list-unsubscribe: list-post:list-owner:list-archive; bh=IuSAF+pps0QraGiLoc4O2Ox9MZABalKtqgoNALikCU4=; b=SVA7XF6Gk//s35xuX29Eb6ScTgyrTdEn/XVE+bCtNngd74k3ksQr0iFg Lpu4hRmI5v6z1KxYptQXas+zoHVBkxww1TQZp2H1wyEgBl2T8m1Av+84K 40bOEUaAiykYUIZt0MhirvxLy7ce+rSgpvdrPYMOFGx4xbg0uWb+qtMTg k=; X-CSE-ConnectionGUID: GwBITAjbQcSpYpxpHTG/5w== X-CSE-MsgGUID: jbvQ+oiHSoi0k3JuRIuIxA== Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=caml-list-owner@inria.fr; spf=None smtp.helo=postmaster@sympa.inria.fr Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of caml-list-owner@inria.fr designates 128.93.162.160 as permitted sender) identity=mailfrom; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="caml-list-owner@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:128.93.162.3 ip4:128.93.162.88 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@sympa.inria.fr) identity=helo; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="postmaster@sympa.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="6.18,288,1751234400"; d="scan'208,217";a="240635494" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 23 Sep 2025 15:24:02 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 54083E0C55; Tue, 23 Sep 2025 15:24:02 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 864AFE0171 for ; Tue, 23 Sep 2025 15:23:59 +0200 (CEST) X-CSE-ConnectionGUID: 4advLFN+RISAvD712mXtGw== X-CSE-MsgGUID: PH84EIYHQP+sX+lKC5LM1w== X-IronPort-AV: E=Sophos;i="6.18,288,1751234400"; d="scan'208,217";a="240635463" Received: from mac-03220211.irisa.fr ([131.254.21.249]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2025 15:23:59 +0200 From: Alan Schmitt To: "lwn" , caml-list@inria.fr Date: Tue, 23 Sep 2025 15:23:59 +0200 Message-ID: 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: 19379 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 September 16 to 23, 2025. 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 Introduction to the Dune build system, by OCamlPro memprof-limits (first official release): Memory limits, allocation limits, = and thread cancellation, with interrupt-safe resources mlfront-shell - reference implementation of a build system Zanuda =E2=80=93 OCaml linter experiment YOCaml, a framework for static site generator Lwt.6.0.0~beta (direct-style, multi-domain parallelism) schm-ocaml detri cmd seven ocaml tutorials Ortac/Wrapper: a new plugin for specification driven unit testing Other OCaml News Old CWN Introduction to the Dune build system, by OCamlPro =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=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: OCamlPro 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 *Greetings Cameleers,* We=E2=80=99ve just released a new blog post: [OCaml Onboarding: Introduct= ion to the Dune build system] This is a practical, compact guide for those starting their OCaml and Dune journey =E2=80=94 or helping others do so. Instead of diving into internals, we focus on what you need to know to get up and running with Dune confidently. We walk through: =E2=80=A2 How Dune thinks about builds and directories =E2=80=A2 The role of dune files and static declarations =E2=80=A2 The tooling one interacts with day-to-day The post keeps things hands-on and beginner-focused, with just enough theory to make the practical bits stick. We end by circling back to `dune init' =E2=80=94 showing how understanding the basics makes the scaffolding tool far more intuitive. =F0=9F=93=9D Read it on the [OCamlPro Blog] Perfect for sharing with colleagues or newcomers dipping their toes into OCaml and Dune. As always, feedback welcome! Until next time, =E2=80=94 The OCamlPro Team [OCaml Onboarding: Introduction to the Dune build system] [OCamlPro Blog] memprof-limits (first official release): Memory limits, allocation limits, = and thread cancellation, with interrupt-safe resources =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Guillaume Munch-Maccagnoni 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 I am pleased to announce the version `0.3.0' of the package `memprof-limits'. The main contribution of this release is the *support for OCaml 5 with multiple parallel domains*. Memprof-limits can henceforth be used to conveniently interrupt (CPU-bound) domains in your parallel computations, using /cancellation tokens/, with the support of features to ensure interrupt-safety and resource-safety. As example of uses, plans are underway to use memprof-limits to ensure the resource-safety of user interrupts in the Rocq prover (eliminating a class of bugs) and to add tactics for portable timeouts (that count allocations rather than elapsed time). =E2=80=A2 Read more: =E2=80=A2 Report bugs and suggestions: mlfront-shell - reference implementation of a build system =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =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: jbeckford 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 There have been many improvements since the last update. Here are some of them: 1. The trace store (needed to not rebuild everything from scratch) has been implemented. 2. Build file ASTs are parsed, marshalled and put into a key-value directory (which can be shared or cached in CI). 3. Build keys are generated and used to protect sharing of the parsed AST. 4. A full walkthrough of =E2=80=9Cbuilding=E2=80=9D the 7zip executable f= rom 7zip binary assets (it is more complicated than it sounds) is on the [documentation page] 5. An `=E2=80=93autofix' option to update build files with checksums, and allowing SHA1 checksum for local files (both are for eventual support of Meta=E2=80=99s watchman tool) 6. A new format for the JSON files (many functions versus one). The old format is deprecated. 7. Many many bug fixes, including specification updates. [documentation page] Zanuda =E2=80=93 OCaml linter 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 Archive: Continuing this thread, Kakadu 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 Zanuda 2.0.0 with OCaml 5.3 support have hit opam. YOCaml, a framework for static site generator =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=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: Xavier Van de Woestyne 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 Release `2.5.0' =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 We are delighted to present the new release of YOCaml: `2.5.0'! As you can see, there have been a few intermediate versions since our last announcement. However, we have reached a new milestone: YOCaml can now be used seamlessly with an Applicative API (instead of the Arrow one), making many tasks much easier to express! We have also finally taken the time to write [a tutorial that explains how to use YOCaml to create a complete blog], step by step, and our goal is to expand it over time to add more and more guides! (The documentation/guide generator ( is also written in YOCaml and gives an idea of what can be done fairly quickly.) =E2=80=A2 [Repository] =E2=80=A2 [YOCaml packages] =E2=80=A2 [Complete release note] We look forward to receiving your feedback! YOCaml is a free and collaborative project, so any contributions (including the guide) are more than welcome! We would also be DELIGHTED to see your creations with YOCaml! /Happy Hacking!/ [a tutorial that explains how to use YOCaml to create a complete blog] [Repository] [YOCaml packages] [Complete release note] Lwt.6.0.0~beta (direct-style, multi-domain parallelism) =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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 After some feedback and some work, I'm happy to announce the release of `lwt.6.0.0~beta00' and `lwt_direct.6.0.0~beta00'! () major CHANGES are: =E2=80=A2 direct style mode (see [alpha release announce]): use `await : = 'a Lwt.t -> 'a' to transform any promises into a simple value. This allows you to break out of the monad which makes it possible to use libraries previously incompatible with Lwt. =E2=80=A2 multi-domain support: run separate schedulers in separate domai= ns (some of the more advanced functions on Lwt are now domain-dependent, e.g., `run_in_main' becomes `run_in_domain' and takes one additional parameter) Feedback is very welcome. Happy beta-testing and good luck with the parallel-programming! [alpha release announce] schm-ocaml =E2=95=90=E2=95=90=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: Florent Monnier 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 schm-ocaml provides a scheme-like syntax. schm3 integrates nicely with the rescript-version that provides the ocaml syntax. schm4 integrates with one of the later ocaml 4 versions, and tries to be accessible from .c There is a tutorial: The oo got lost in a computer crash. So there is no oo. detri cmd =E2=95=90=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: Florent Monnier 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 There is now a fifth variant for detri: This fifth one outputs .html, in-stead of console. If you took a previous version for the console, it was already something you could do by-yourself easily rewriting the console esc-chars to html, but now there is a ready-made one. (There is also a small tutorial, but it should be re-written, ) seven ocaml tutorials =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Florent Monnier 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 You will find seven new ocaml-tutorials on this page that I wrote recently: It was not writen with a chat-bot, but you will maybe notice a difference in the style of writing, since I=E2=80=99m using a chat-bot. Ortac/Wrapper: a new plugin for specification driven unit testing =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=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: Charl=C3=A8ne_Gros 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 Hello everyone, We, at Tarides, are excited to announce the release of a new plugin for `ortac': [Ortac/Wrapper]! This plugin is part of the Gospel project, a contract-based behavioural specification language for OCaml. `ortac' is a tool that converts an OCaml module interface with [Gospel] specifications into code to check those specifications. There are various ways to check specifications, all provided by plugins, and this post announces the new plugin: Ortac/Wrapper! This plugin is designed to generate a wrapped module that exposes the same interface as the original module but instruments all function calls with assertions corresponding to the Gospel specifications. The main objective is to assist with unit testing. You provide the Gospel specification for your file, and Ortac will instrument it. When you run the unit tests on the wrapped version, if a specification is violated, Ortac will crash with an explicit error, telling you which portion of your code is incorrect and which specifications were violated. This work has been started by Cl=C3=A9ment Pascutto during his PhD at LMF and Tarides . I continued his work to support some Gospel features such as the `old' operator and models. [Ortac/Wrapper] [Gospel] Installation =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 To install the Wrapper plugin, use the following command: `opam install ortac-wrapper' This will install the following OPAM packages: =E2=80=A2 `ortac-core.opam' which provides the `ortac' command-line tool = and the core functionalities used by all plugins, =E2=80=A2 `ortac-runtime.opam' which provides the support library for the= code generated by the Wrapper Ortac plugin, =E2=80=A2 `ortac-wrapper.opam' which provides the Wrapper plugin for the `ortac' command-line tool. =E2=97=8A To automatically generate dune files If you need dune rules to integrate Ortac into your project, you can install the Dune plugin: `opam install ortac-dune' This will install the following OPAM packages: =E2=80=A2 `ortac-core.opam' which provides the `ortac' command-line tool = and the core functionalities used by all plugins, =E2=80=A2 `ortac-dune.opam' which provides the Dune plugin for the `ortac' command-line tool. Try it! =E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C=E2=95=8C Let=E2=80=99s dive into a mini tutorial to see how the Ortac/Wrapper plug= in can be used to enhance your unit testing with Gospel specifications. We=E2=80=99ll walk through creating a simple polymorphic container type with limited capacity and see how to specify and test its behavior using Gospel. =E2=97=8A 1- Define the type and models First, we define a polymorphic container type `'a t' with Gospel specifications. This type will have a fixed capacity and a mutable list of contents. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 type 'a t =E2=94=82 (*@ model capacity: int =E2=94=82 mutable model contents: 'a list =E2=94=82 with t =E2=94=82 invariant t.capacity > 0 =E2=94=82 invariant List.length t.contents <=3D t.capacity *) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Here, we define two models: =E2=80=A2 `capacity': Represents the fixed size of the container. =E2=80=A2 `contents': Represents the mutable list of elements currently s= tored in the container. The invariants ensure that the capacity is always positive and that the contents list never exceeds the declared capacity. =E2=97=8A 2- Specify function behavior Next, we specify the behavior of functions that manipulate the type `'a t'. We=E2=80=99ll define a `create' function to initialize the contai= ner and an `add' function to insert elements into the container. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 val create: int -> 'a t =E2=94=82 (*@ t =3D create c =E2=94=82 requires c > 0 =E2=94=82 ensures t.capacity =3D c =E2=94=82 ensures t.contents =3D [] *) =E2=94=82 val add: 'a t -> 'a -> unit =E2=94=82 (*@ add t x =E2=94=82 modifies t.contents =E2=94=82 ensures t.contents =3D x :: (old t.contents) *) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Here the functions `create' and `add' are specified in Gospel. =E2=80=A2 The `create' function requires the capacity `c' to be strictly positive and ensures that the model of the new container has the specified capacity and an empty list of contents. =E2=80=A2 The `add' function modifies the contents of the container and ensures that the new element `x' is added to the list of contents. =E2=97=8A 3- Define projection functions To validate these specifications at runtime, you need to provide projection functions that link OCaml values to their Gospel models. Projection functions can be defined in two ways. =E2=80=A2 Using the same name as the model. =E2=80=A2 Using a different name, annotated with the attribute `@@projection_for' and the name of its Gospel model. For our example, we define the projection functions as follows. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 val capacity : 'a t -> int =E2=94=82 val to_list : 'a t -> 'a list [@@projection_for contents] =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Where we encounter the two types of naming. =E2=80=A2 The `capacity' function directly corresponds to the `capacity' model. =E2=80=A2 The `to_seq' function is explicitly declared as the projection = for the `contents' model using the `@@projection_for' attribute. These projection functions are mandatory for the Wrapper plugin to instrument the specifications. If any projection function is missing, nothing will be generated and an error will be printed. =E2=97=8A 4- Generate the wrapped version Once you have both of the interface file annotated with Gospel and your implementation, you can start the generation. If you have installed the `ortac-dune' package (which is recommended), you need to add the following in the dune file where you want to put the tests. =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (rule =E2=94=82 (alias runtest) =E2=94=82 (mode promote) =E2=94=82 (action =E2=94=82 (with-stdout-to =E2=94=82 dune.wrapper.inc =E2=94=82 (setenv =E2=94=82 ORTAC_ONLY_PLUGIN =E2=94=82 dune-rules =E2=94=82 (run ortac dune wrapper ))))) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 This will generate an additional Dune file called `dune.wrapper.inc' that you will need to include once created: `(include dune.wrapper.inc)'. Also, add the name of the wrapped module to the `libraries' stanza of the test folder. =E2=97=8A 5- Add unit tests In order to test the `Lib' module, we can now simply write a program using the wrapped version. No need to specify the expected behaviour as the instrumentation will take care of that. For example, if you run the following program: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 open Lib_wrapped =E2=94=82 let () =3D =E2=94=82 let q =3D create 3 in =E2=94=82 add q 1; =E2=94=82 let q2 =3D create (-1) in =E2=94=82 add q2 1; =E2=94=82 () =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 You will obtain the following result: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 File "lib.mli", line 8, characters 0-175: =E2=94=82 Runtime error in function ~create' =E2=94=82 - the pre-condition =E2=94=82 `c > 0' =E2=94=82 was violated. =E2=94=82 Fatal error: exception Ortac_runtime.Error(_) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 This process helps ensure that your code adheres to the specified behavior, making your unit tests more robust and informative. Feel free to report =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 more information here is the link of the [dedicated README]. If you encounter any bugs or misunderstandings, please feel free to report them as an issue on [GitHub]. We hope this plugin will be useful to you and look forward to your feedback! [dedicated README] [GitHub] Acknowledgments =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 This work is partly founded by the ANR grant ANR-22-CE48-0013. 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 ocaml.org 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 Here are links from many OCaml blogs aggregated at [the ocaml.org blog]. =E2=80=A2 [Upcoming OCaml Events] =E2=80=A2 [Database Testing in OCaml: From CRUD to Connection Pool Stress Testing] =E2=80=A2 [Vulkan graphics in OCaml vs C] =E2=80=A2 [Apache Parquet Files] =E2=80=A2 [Optimising Data Access in Parquet Files] =E2=80=A2 [FreeBSD unionfs deadlock] =E2=80=A2 [A first foray into agentic coding] =E2=80=A2 [Auto-configuration of MirageOS unikernels] [the ocaml.org blog] [Upcoming OCaml Events] [Database Testing in OCaml: From CRUD to Connection Pool Stress Testing] [Vulkan graphics in OCaml vs C] [Apache Parquet Files] [Optimising Data Access in Parquet Files] [FreeBSD unionfs deadlock] [A first foray into agentic coding] [Auto-configuration of MirageOS unikernels] 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 to the [caml-list]. [Alan Schmitt] [send me a message] [the archive] [RSS feed of the archives] [caml-list] [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 September 16 to 23, 2= 025.

Introduction to the Dune build system, by OCamlPro

OCamlPro announced

Greetings Cameleers,

We=E2=80=99ve just released a new blog post: OCaml Onboarding:= Introduction to the Dune build system

This is a practical, compact guide for those starting their OCaml and Dune = journey =E2=80=94 or helping others do so. Instead of diving into internals= , we focus on what you need to know to get up and running with Dune confide= ntly.

We walk through:

  • How Dune thinks about builds and directories
  • The role of dune files and static declarations
  • The tooling one interacts with day-to-day

The post keeps things hands-on and beginner-focused, with just enough theor= y to make the practical bits stick. We end by circling back to dune i= nit =E2=80=94 showing how understanding the basics makes the scaffol= ding tool far more intuitive.

=F0=9F=93=9D Read it on the OCamlPro= Blog

Perfect for sharing with colleagues or newcomers dipping their toes into OC= aml and Dune.

As always, feedback welcome! Until next time, =E2=80=94 The OCamlPro Team

memprof-limits (first official release): Memory limits, alloca= tion limits, and thread cancellation, with interrupt-safe resources

Guillaume Munch-Maccagnoni announced

I am pleased to announce the version 0.3.0 of the package memprof-limits. The main contribution of this release is the su= pport for OCaml 5 with multiple parallel domains.

Memprof-limits can henceforth be used to conveniently interrupt (CPU-bound)= domains in your parallel computations, using cancellation tokens, w= ith the support of features to ensure interrupt-safety and resource-safety.

As example of uses, plans are underway to use memprof-limits to ensure the = resource-safety of user interrupts in the Rocq prover (eliminating a class = of bugs) and to add tactics for portable timeouts (that count allocations r= ather than elapsed time).

mlfront-shell - reference implementation of a build system

jbeckford announced

There have been many improvements since the last update. Here are some of t= hem:

  1. The trace store (needed to not rebuild everything from scratch) has bee= n implemented.
  2. Build file ASTs are parsed, marshalled and put into a key-value directo= ry (which can be shared or cached in CI).
  3. Build keys are generated and used to protect sharing of the parsed AST.=
  4. A full walkthrough of =E2=80=9Cbuilding=E2=80=9D the 7zip executable fr= om 7zip binary assets (it is more complicated than it sounds) is on the documentation page
  5. An =E2=80=93autofix option to update build files with chec= ksums, and allowing SHA1 checksum for local files (both are for eventual su= pport of Meta=E2=80=99s watchman tool)
  6. A new format for the JSON files (many functions versus one). The old fo= rmat is deprecated.
  7. Many many bug fixes, including specification updates.

Zanuda – OCaml linter experiment

Continuing this thread, Kakadu announced

Zanuda 2.0.0 with OCaml 5.3 support have hit opam.

YOCaml, a framework for static site generator

Xavier Van de Woestyne announced

Release 2.5.0

We are delighted to present the new release of YOCaml: 2.5.0! As you can see, there have been a few intermediate versions since our last = announcement. However, we have reached a new milestone: YOCaml can now be u= sed seamlessly with an Applicative API (instead of the Arrow one), making m= any tasks much easier to express!

We have also finally taken the time to write a tutorial that explains how to use YOCaml to create a comp= lete blog, step by step, and our goal is to expand it over time to add = more and more guides! (The documentation/guide generator (https://github.com/yocaml/yocaml-www is= also written in YOCaml and gives an idea of what can be done fairly quickl= y.)

We look forward to receiving your feedback! YOCaml is a free and collaborat= ive project, so any contributions (including the guide) are more than welco= me! We would also be DELIGHTED to see your creations with YOCaml!=20=20

Happy Hacking!

Lwt.6.0.0~beta (direct-style, multi-domain parallelism)

Rapha=C3=ABl Proust announced

After some feedback and some work, I'm happy to announce the release of lwt.6.0.0~beta00 and lwt_direct.6.0.0~beta00! (https://github.c= om/ocaml/opam-repository/pull/28558)

major CHANGES are:

  • direct style mode (see alpha release announce): use aw= ait : 'a Lwt.t -> 'a to transform any promises into a simple valu= e. This allows you to break out of the monad which makes it possible to use= libraries previously incompatible with Lwt.
  • multi-domain support: run separate schedulers in separate domains (some= of the more advanced functions on Lwt are now domain-dependent, e.g., run_in_main becomes run_in_domain and takes one addit= ional parameter)

Feedback is very welcome. Happy beta-testing and good luck with the paralle= l-programming!

schm-ocaml

Florent Monnier announced

schm-ocaml provides a scheme-like syntax.

schm3 integrates nicely with the rescript-version that provides the ocaml s= yntax.

schm4 integrates with one of the later ocaml 4 versions, and tries to be ac= cessible from .c

http://decapode314.free= .fr/ocaml2/schm/

There is a tutorial:

http://dec= apode314.free.fr/ocaml2/schm/schm-tut.html

http:/= /decapode314.free.fr/ocaml2/schm/dl/schm4-0.03.zip

The oo got lost in a computer crash.

So there is no oo.

detri cmd

Florent Monnier announced

There is now a fifth variant for detri:

http://decapode314= .free.fr/ocaml/detris.html

This fifth one outputs .html, in-stead of console.

If you took a previous version for the console, it was already something yo= u could do by-yourself easily rewriting the console esc-chars to html, but = now there is a ready-made one.

(There is also a small tutorial, but it should be re-written,

http:= //decapode314.free.fr/ocaml/detri/tut/detri-tut.html

)

seven ocaml tutorials

Florent Monnier announced

You will find seven new ocaml-tutorials on this page that I wrote recently:

http://decapode314.free= .fr/ocaml2/blog/

It was not writen with a chat-bot, but you will maybe notice a difference i= n the style of writing, since I=E2=80=99m using a chat-bot.

Ortac/Wrapper: a new plugin for specification driven unit tes= ting

Charl=C3=A8ne_Gros announced

Hello everyone,

We, at Tarides, are excited to announce the release of a new plugin for ortac: Ortac/Wrapper!

This plugin is part of the Gospel project, a contract-based behavioural spe= cification language for OCaml. ortac is a tool that converts a= n OCaml module interface with Gospel specifications into code to check those specifications. Th= ere are various ways to check specifications, all provided by plugins, and = this post announces the new plugin: Ortac/Wrapper!

This plugin is designed to generate a wrapped module that exposes the same = interface as the original module but instruments all function calls with as= sertions corresponding to the Gospel specifications. The main objective is to assist with unit testing. You provide the Gospel s= pecification for your file, and Ortac will instrument it. When you run the = unit tests on the wrapped version, if a specification is violated, Ortac wi= ll crash with an explicit error, telling you which portion of your code is = incorrect and which specifications were violated.

This work has been started by Cl=C3=A9ment Pascutto during his PhD at LMF a= nd Tarides https://th= eses.hal.science/tel-04696708v1. I continued his work to support some Gospel features such as the old<= /code> operator and models.

Installation

To install the Wrapper plugin, use the following command: opam install ortac-wrapper

This will install the following OPAM packages:

  • ortac-core.opam which provides the ortac comm= and-line tool and the core functionalities used by all plugins,
  • ortac-runtime.opam which provides the support library for = the code generated by the Wrapper Ortac plugin,
  • ortac-wrapper.opam which provides the Wrapper plugin for t= he ortac command-line tool.
  • To automatically generate dune files

    If you need dune rules to integrate Ortac into your project, you can instal= l the Dune plugin: opam install ortac-dune This will install the following OPAM packages:

    • ortac-core.opam which provides the ortac comm= and-line tool and the core functionalities used by all plugins,
    • ortac-dune.opam which provides the Dune plugin for the ortac command-line tool.

Try it!

Let=E2=80=99s dive into a mini tutorial to see how the Ortac/Wrapper plugin= can be used to enhance your unit testing with Gospel specifications. We=E2= =80=99ll walk through creating a simple polymorphic container type with lim= ited capacity and see how to specify and test its behavior using Gospel.

  • 1- Define the type and models

    First, we define a polymorphic container type 'a t with Gospel= specifications. This type will have a fixed capacity and a mutable list of= contents.

    type 'a t
    (*@ model capacity: int
            mutable model contents: 'a list
            with t
            invariant t.capacity > 0
            invariant List.length t.contents <=3D t.capacity *)
    

    Here, we define two models:

    • capacity: Represents the fixed size of the container.
    • contents: Represents the mutable list of elements currentl= y stored in the container.

    The invariants ensure that the capacity is always positive and that the con= tents list never exceeds the declared capacity.

  • 2- Specify function behavior

    Next, we specify the behavior of functions that manipulate the type '= a t. We=E2=80=99ll define a create function to initiali= ze the container and an add function to insert elements into t= he container.

    val create: int -&=
    gt; 'a t
    (*@ t =3D create c
            requires c > 0
            ensures t.capacity =3D c
            ensures t.contents =3D [] *)
    val add: 'a t -> 'a -> unit
    (*@ add t x
            modifies t.contents
            ensures t.contents =3D x :: (old t.contents) *)
    

    Here the functions create and add are specified i= n Gospel.

    • The create function requires the capacity c t= o be strictly positive and ensures that the model of the new container has = the specified capacity and an empty list of contents.
    • The add function modifies the contents of the container an= d ensures that the new element x is added to the list of conte= nts.
  • 3- Define projection functions

    To validate these specifications at runtime, you need to provide projection= functions that link OCaml values to their Gospel models. Projection functi= ons can be defined in two ways.

    • Using the same name as the model.
    • Using a different name, annotated with the attribute @@projection= _for and the name of its Gospel model.

    For our example, we define the projection functions as follows.

    val capacity : 'a =
    t -> int
    val to_list : 'a t -> 'a list [@@projection_for contents]
    

    Where we encounter the two types of naming.

    • The capacity function directly corresponds to the ca= pacity model.
    • The to_seq function is explicitly declared as the projecti= on for the contents model using the @@projection_for attribute.

    These projection functions are mandatory for the Wrapper plugin to instrume= nt the specifications. If any projection function is missing, nothing will = be generated and an error will be printed.

  • 4- Generate the wrapped version

    Once you have both of the interface file annotated with Gospel and your imp= lementation, you can start the generation. If you have installed the ortac-dune package (which is recomme= nded), you need to add the following in the dune file where you want to put= the tests.

    (rule
     (alias runtest)
     (mode promote)
     (action
      (with-stdout-to
       dune.wrapper.inc
       (setenv
        ORTAC_ONLY_PLUGIN
        dune-rules
        (run ortac dune wrapper <path to lib/lib.mli>)))))
    

    This will generate an additional Dune file called dune.wrapper.inc that you will need to include once created: (include dune.wrappe= r.inc). Also, add the name of the wrapped module to the librar= ies stanza of the test folder.

  • 5- Add unit tests

    In order to test the Lib module, we can now simply write a pro= gram using the wrapped version. No need to specify the expected behaviour a= s the instrumentation will take care of that.

    For example, if you run the following program:

    open Lib_wrapped
    let () =3D
      let q =3D create 3 in
      add q 1;
      let q2 =3D create (-1) in
      add q2 1;
      ()
    

    You will obtain the following result:

    File "lib.mli", line 8, characters 0-175:
    Runtime error in function ~create'
      - the pre-condition
          `c > 0'
        was violated.
    Fatal error: exception Ortac_runtime.Error(_)
    

    This process helps ensure that your code adheres to the specified behavior,= making your unit tests more robust and informative.

Feel free to report

For more information here is the link of the dedicated README. If you encounter any bugs or misunderstandings, please feel free to report = them as an issue on GitHub.

We hope this plugin will be useful to you and look forward to your feedback!

Acknowledgments

This work is partly founded by the ANR grant ANR-22-CE48-0013.

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 to the= caml-list.

--=-=-=--