OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of June 20 to 27, 2023.

Table of Contents

dune 3.8.0

Etienne Millon announced

3.8.2 is now available, please find the changelog below (with that of 3.8.1).

3.8.2 (2023-06-16)

  • Switch back to threaded console for all systems; fix unresponsive console on Windows (#7906, @nojb)
  • Respect -p / --only-packages for melange.emit artifacts (#7849, @anmonteiro)
  • Fix scanning of Coq installed files (@ejgallego, reported by @palmskog, #7895 , fixes #7893)
  • Fix RPC buffer corruption issues due to multi threading. This issue was only reproducible with large RPC payloads (#7418)
  • Fix printing errors from excerpts whenever character offsets span multiple lines (#7950, fixes #7905, @rgrinberg)

3.8.1 (2023-06-05)

  • Fix a crash when using a version of Coq < 8.13 due to the native compiler config variable being missing. We now explicitly default to (mode vo) for these older versions of Coq. (#7847, fixes #7846, @Alizter)
  • Duplicate installed Coq theories are now allowed with the first appearing in COQPATH being preferred. This is inline with Coq’s loadpath semantics. This fixes an issue with install layouts based on COQPATH such as those found in nixpkgs. (#7790, @Alizter)
  • Revert #7415 and #7450 (Resolve ppx_runtime_libraries in the target context when cross compiling) (#7887, fixes #7875, @emillon)

moonpool 0.2

Simon Cruanes announced

Moonpool 0.2 just hit the shelves, fleshing out the feature list for futures and pools. Alongside a handful of bugfixes and performance improvements.[^1] The changelog can be found here.

[^1]: notable, using multiple queues with some basic version of work-stealing to reduce contention under load. The queues are still using Mutex.t for now, but with try_lock there should be no actual syscall, just atomic operations.

Sneak peek at the next version: plans include support for Fut.await using effects (only on OCaml 5), and interoperability with other libraries using domain-local-await.

aeroon, wrapper to Aeron

Mika Illouz announced

I’d like to announce the availability of aeroon, an OCaml wrapper to the Aeron C library. Typically used in financial systems with low-latency requirements, Aeron is a multi-transport communication toolset, with support for C, C++, Java, and now OCaml.

Feedback welcome!

Representing OCaml on Lemmy

Andreas Poisel announced

Some days ago I created a “community” for OCaml on Tchncs (a Lemmy instance): c/ocaml.

I’m looking forward to seeing your links or comments.

awa-ssh release 0.3

Hannes Mehnert announced

I’m pleased to announce the release 0.3.0 of awa-ssh. This is a pure implementation of the SSH protocol in OCaml. It started out as a server implementation by @haesbaert, and was then further developed by @hannes (client), Pierre Alain (sshfs), @reynir, @dinosaure

These days, it is both a server and a client implementation, and is used in ocaml-git to fetch git repositories from ssh remotes.

The initial release is a few years back (see https://discuss.ocaml.org/t/ann-first-release-of-awa-ssh/7057), the code is even older ;)

The highlights since the initial release include:

  • support RSA-SHA2 signature algorithms (October 2021)
  • support ED25519 (October 2021)
  • SSH server subsystem in MirageOS (January 2022)
  • ECDSA support of NIST curves (March 2023)
  • client: password authentication (previously, only key authentication was supported) (March 2023)
  • add Pty/Set_env/Start_shell events (March 2023)
  • server: handle unknown public keys (June 2023)
  • server: fix rekey (leading to out of memory) (June 2023)
  • server: window change events (June 2023)
  • server: implement ext-info and server-sig-algs extensions (June 2023)

One example application is a chat system with trust on first use banawa-chat, as described in this article – join us for discussion at ssh [-i path/to/key_ed25519] myusername@chat.reyn.ir.

The password authentication allows awa to be used for network infrastructure monitoring and management (which usually do not support key-based authentication).

There’s also a work-in-progress IRC client as MirageOS unikernel catty, which uses lwd for user interaction.

There’s also a sshfs unikernel.

Ppxlib dev meetings

Continuing this thread, Sonja Heinze announced

As a follow-up: It has been @panglesd, @Burnley and me in the meeting today. So nobody “from outside” has joined. Still, we think it’s good that the decision not to participate is taken by each community member, not by us. So we’ll keep the meetings open. You can add the monthly event to your Google calendar, and we will try to send a notification here on discuss each month.

And here are today’s meeting notes: https://github.com/ocaml-ppx/ppxlib/wiki/Dev-meeting-22-06-2023

User-friendly continuations over OCaml 5 effects?

KC Sivaramakrishnan announced

Raising the minimum tested version of OCaml to 4.05 or 4.11 (from 4.02)

Anil Madhavapeddy asked

In the opam repository, we have been testing submitted packages on all versions of OCaml from 4.02.3 onwards, all the way up to 5.2-trunk. We need to come up a way to reduce this testing matrix, and in particular determine if there are a non-zero number of users who need these historical releases tested. There are thousands of potentially unnecessary builds running at the moment if these results are not needed.

The latest release of OCaml 4.02 was in 2014, and I am now proposing to increase the “floor” tested release of OCaml to 4.05, which is the version distributed in Debian 10 “buster”. This is a conservative choice, since Debian 10 “buster” is already at its end of life, with the long-term support coming to an end in mid-2024.

If we move onto Debian 11 “bookworm”, this packages up OCaml 4.11, which can become the next “floor” target for supported OCaml versions in 2024.

So my question to the community is: are any of you still using OCaml releases earlier than 4.11? If so, which version, and what configurations/platforms are of most interest to you?

After many replies, Anil Madhavapeddy said

Thanks everyone; sounds like 4.11 is too much of a leap, but 4.08 is a reasonable choice.

If anyone is using an OCaml version between 4.05 and 4.08, please do chirp up in the next few weeks. Otherwise, we’re converging on OCaml 4.08 being the new minimum version tested.

For those curious about the versions of OCaml shipped in distros other than Ubuntu and Debian, there’s a mapping in OCaml-Dockerfile.

guroobi, wrapper to Gurobi

Mika Illouz announced

I’d like to announce the availability of guroobi, an OCaml wrapper to the (commercial) Gurobi optimization library.

Feedback welcome!

euler, an arithmetic library for native integers

glen announced

In case anyone is interested, I let you know of euler, a small arithmetic library of mine. Unfortunately it is not published on opam (but there is an opam file), and I won’t be working on it anymore, so anyone is welcome to take over the project or just steal code from it. If you see fun in it, I left plenty of TODOs! :-)

The library is documented, with a focus on algorithmic complexities, and implementation code has a lot of comments too.

What’s in it?

euler is a library for doing integer arithmetic with OCaml’s standard integers (31 or 63 bits). It provides:

  • Drop-in, overflow-detecting base arithmetic: if you are paranoid about vicious bugs sneaking in silently, this library detects overflows and signal them by throwing an exception; the module can be used as a drop-in replacement for the standard library (beware that Euler.Arith.min_int differs from Stdlib.min_int, the latter being a forbidden value). There are also a few additional functions such as integer logarithms and square roots.
  • More advanced arithmetic: for the weird folks (like myself) who are interested in advanced arithmetic but do not care about integers larger than 2<sup>62</sup>, and thus do not want the burden of using an arbitrary-precision library (zarith of GMP), there you are. The library provides some classic functions such as
    • the GCD,
    • the Jacobi symbol,
    • primality testing (fast and deterministic for all 63-bit integers!),
    • integer factorization (implementing Lenstra’s elliptic curve factorization, which was apparently one of the best known algorithms back when I wrote that code, but obviously it is still very slow! — and I must say I understand very little about it…),
    • a prime sieve (heavily optimized) and a factorization sieve,
    • Euler’s totient function (slow too, of course),
    • and so on.
  • Solvers for some forms of integer equations (so-called “Diophantine equations”):
    • linear congruence systems (the Chinese remainder theorem),
    • Pell-Fermat’s equations (the Chakravala method) — preliminary code that just needs some packaging effort).
  • Modular arithmetic: including finding modular inverses (and pseudo-inverses). A nice functorial interface provides convenient notations and uses a private type to enforce that values are always normalized in the range 0..*m*−1 where m is the modulus. Example use:

        module M = Euler.Modular.Make (struct let modulo = 42 end)
        let () = assert (M.( !:1 /: (!:33 +: !:4) = !:5 **:(-4) ))
        (* said otherwise, modulo 42, the inverse of (33 + 4) is equal to 5^(−4) *)
    

But why?

Writing this library was fun and educative for me, and allowed me to solidify my math training in code. In fact, as the name suggests, the initial incentive was playing with Project Euler (hence the focus on integers that fit in a machine word) while sparing me the boredom of implementing a prime sieve for the hundredth time.

Nevertheless, I believe euler might prove actually useful outside of the playground. Overflow detection is an actual need in some software, and implementing it is not trivial, even less so after some amount of micro-optimization (see code). Modular arithmetic is not trivial either (e.g. multiplication is not as simple as (a * b) mod m because this computation might overflow). And well, even integer logarithms and square roots are handy at times, and again they not trivial to implement (as using their floating-point counterpart gives incorrect results for large integers).

project-euler: https://projecteuler.net/

CFP - JFLA 2024 - Journées Francophones des Langages Applicatifs

adrgt announced

This message is intentionally written in French. It is a call for papers for the “Francophone Days on Functional Languages” to be held at the end of January 2024 in Brittany. Papers can be written in English, but the presentations themselves are expected to be given in French.

Merci de faire circuler : premier appel à communications

JFLA 2024 : Journées Francophones des Langages Applicatifs

http://jfla.inria.fr/jfla2024.html

30 janvier au 2 février 2024

Abbaye de Saint-Jacut, Saint-Jacut-de-la-Mer

Les 35es Journées Francophones des Langages Applicatifs (JFLA) se tiendront en Bretagne, à Saint-Jacut-de-la-Mer (Côtes-d’Armor), du mardi 30 janvier 2024 au vendredi 2 février 2024.

Les JFLA réunissent concepteurs, utilisateurs et théoriciens ; elles ont pour ambition de couvrir les domaines des langages applicatifs, de la preuve formelle, de la vérification de programmes, et des objets mathématiques qui sous-tendent ces outils. Ces domaines doivent être pris au sens large : nous souhaitons promouvoir les ponts entre les différentes thématiques.

  • Langages fonctionnels et applicatifs : sémantique, compilation, optimisation, typage, mesures, extensions à d’autres paradigmes.
  • Assistants de preuve : implémentation, nouvelles tactiques, développements présentant un intérêt théorique, technique ou méthodologique.
  • Logique, correspondance de Curry-Howard, réalisabilité, extraction de programmes, modèles.
  • Spécification, prototypage, développements formels d’algorithmes.
  • Vérification de programmes ou de modèles, vérification déductive, interprétation abstraite, raffinement.
  • Utilisation industrielle des langages fonctionnels et applicatifs, ou des méthodes issues de la communauté scientifique. Outils et plateformes pour le web.
  • Problématiques d’enseignement, de formation, ou de diffusion des langages fonctionnels et applicatifs. Environnements et méthodologies de développement, retours d’expérience.

Les articles soumis aux JFLA sont relus par au moins deux personnes s’ils sont acceptés, et au moins trois personnes s’ils sont rejetés. Les critiques des relecteurs sont toujours bienveillantes et la plupart du temps encourageantes et constructives, même en cas de rejet.

Il n’y a donc pas de raison de ne pas soumettre aux JFLA !

Dates importantes

Attention : les dates limites sont fermes et définitives. Il n’y aura pas d’extension.

  • Soumission des résumés et articles : 19 octobre 2023, AoE
  • Notification aux auteurs : 1er décembre 2023, AoE
  • Version finale des articles : 18 décembre 2023, AoE

Soumissions

Nous acceptons quatre types de soumissions :

  • Article de recherche (18 pages max.) portant sur des travaux originaux. Nous acceptons des travaux en cours, pour lesquels l’aspect recherche n’est pas entièrement finalisé. Nous encourageons aussi la soumission d’articles présentant avec élégance un résultat connu sous un angle nouveau.
  • Article court (9 pages max.) décrivant un problème particulier, les pistes en cours d’investigation, et visant à rechercher de l’aide de la part de la communauté. Les articles courts peuvent également présenter de manière synthétique et cohérente un ou plusieurs résultats déjà publié(s).
  • Tutoriel (3 pages max.) exposant clairement les objectifs et l’intérêt de la présentation, ainsi que l’environnement informatique nécessaire à sa réalisation.
  • Démonstration de logiciel (3 pages max.) décrivant l’intérêt du logiciel, qu’il soit prototypique ou abouti, ainsi que ses spécificités.

Consignes aux auteurs

Les articles peuvent être rédigés en français ou en anglais.

La forme de l’article doit être soignée, et le contenu rédigé de manière structurée et claire.

Le style LaTeX jflart doit impérativement être utilisé sans modification de la mise en page. Le style LaTeX et sa documentation sont disponibles depuis le site web de la conférence.

Les limites de pages sont strictes. Les références bibliographiques ne sont pas comptabilisées dans la limite de pages. Les annexes aux articles ne sont pas autorisées.

Les auteurs peuvent soumettre du matériel supplémentaire, séparé de l’article soumis, sous forme de texte (version longue, sans limite de pages) et/ou de développement logiciel. L’évaluation de ce matériel supplémentaire est à la discrétion des relecteurs. Les articles soumis doivent donc être auto-contenus et évaluables sans ce matériel supplémentaire.

Les soumissions parallèles dans d’autres conférences, journaux ou workshops avec actes ne sont pas autorisées.

Les membres du comité de programme sont autorisés à soumettre un article. Les présidents du comité ne le sont pas.

Les articles doivent être soumis via HotCRP.

L’évaluation des articles suit un processus en simple-aveugle : les relecteurs des articles sont anonymes, mais pas les auteurs.

Les articles acceptés seront publiés dans les actes de la conférence, sur HAL (portail institutionnel Inria), et les auteurs en donneront une présentation lors des journées. Les présentations seront, de préférence, données en français.

Delphine Demange et Adrien Guatto, JFLA 2024

OCaml.org Newsletter: May 2023

Thibaut Mattio announced

Welcome to the May 2023 edition of the OCaml.org newsletter! As with the previous update, this has been compiled by @sabine and @tmattio.

The OCaml.org newsletter provides an overview of changes on the OCaml.org website and gives you a glimpse into what has been going on behind the scenes. You can find a list of previous issues here.

Our goal is to make OCaml.org the best resource for anyone who wants to get started and be productive in OCaml. We couldn’t do it without all the amazing OCaml community members who help us review, revise, and create better OCaml documentation. Your feedback enables us to better prioritise our work and make progress towards our goal. Thank you!

We present the work we’ve been doing this month in three sections:

  • Learn area: We’re working towards making OCaml.org a great resource to learn OCaml and discover its ecosystem. This month, we worked on the first wireframes of the new Learn section, and we published a couple of new documentation pages.
  • Package documentation search: In-package search is now available for every package on OCaml.org! We released the first, minimal version of the feature and will continue to improve it in the coming months.
  • General Improvements: We also worked on general maintenance and improvements. We’ll highlight some of them in this newsletter.

Learn Area

  • 1. Redesign of the Learn Area

    As part of our effort to make OCaml.org a great resource to learn OCaml, we published a survey to conduct user research in April. We received tons of insightful feedback. This month, we analysed all the results we got (57 answers!) and we conducted user interviews with those who volunteered to be interviewed.

    As a follow-up to the user survey conducted last month, we posted a summary for the Learn area survey.

    After we analysed the interview data, created user insight cards, and went through all the resources recommended by the survey responses, we prioritised tasks and began creating wireframes for the Learn section. The work-in-progress wireframes are accessible on Figma.

    In June, we’ll start gathering user feedback on the wireframes and eventually start creating designs for the new Learn pages.

  • 2. OCaml Documentation

    We completed the Sequences and Error Handling tutorials. The Install page went live, and improvements were made to the First Day tutorial.

    Asking the community to help review the initial versions of the new documentation page has been successful, so we’re planning on opening more Discuss posts for pages that are ready to review in the coming months.

    We’re deeply grateful to all the contributors who helped review the documentation, either by sharing insights on Discuss or participating in the PR review on GitHub. This is exactly how we envisioned the effort on creating the new OCaml.org Documentation, so we’re appreciative of everyone who engaged to make this a community initiative!

    Relevant PRs and Activities:

In-Package Documentation Search

In April, we started working on building an in-package search feature for OCaml packages on OCaml.org. We continued this effort through May, and we released the feature at the end of the month. In-package search is now accessible for every package on OCaml.org! :tada:

Note that this is the first, minimal version of the feature. We’re planning many improvements in the coming months, especially as the odoc team is currently working on adding search capabilities to odoc.

Relevant PRs and Activities:

General Improvements

We approved and merged numerous changes, including serving OCaml.org’s static assets under cache-busting URLs, refactorings for better code health, and scraping OCaml Planet feeds individually. A big thank you to the contributors!

We initiated work on a design system for OCaml.org, emphasising buttons, dropdowns, and typography. As part of this work, we invested time researching potential improvements to our CSS, including a potential migration from Tailwind to UnoCSS for better custom rules support. We opened an issue with UnoCSS to explore options for a standalone CLI and have begun to create Dream components for UI elements that occur repeatedly.

We began working on adding tags to facilitate blog search and added several RSS feeds from the old OCaml Planet to the OCaml blog. As a consequence, we had to address issues relating to these new RSS sources.

Relevant PRs and Activities:

Other OCaml News

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 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.