OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of September 24 to October 01, 2024.
Table of Contents
- Dune Developer Preview Updates
- Uuidm 0.9.9
- first release of ppx_deriving_jsonschema
- Bogue, the OCaml GUI
- New release of Merlin
- Releases of mirage-crypto 1.0.0, tls 1.0.0, x509 1.0.0, asn1-combinators 0.3.0, let's encrypt 1.0.0, awa 0.4.0, kdf 1.0.0, paf 0.7.0, git 3.17.0
- ICFP 2023 OCaml Presentations on YouTube
- Dune dev meeting
- Other OCaml News
- Old CWN
Dune Developer Preview Updates
ostera announced
Hello folks! :wave:
Call for Feedback
We'd like to welcome everyone to try and play with the Dune Developer Preview! :tada:
This experimental nightly release of dune includes a lot of improvements, including the much expected package management features, and it can be installed from that website or by using the new installation script:
$ curl https://dune.ci.dev/install | bash
In a few seconds you should be ready to OCaml by calling dune
– you can watch a demo of this here: X, Mastodon.
Please try it out and let us know what you think :pray:
:calendar: You can book a feedback call with us here
:memo: You can submit feedback using this form
:bug: You can submit issues to Github on ocaml/dune
Changes since last update
The Dune shared cache has been enabled by default. We're starting off by caching all downloads and dependencies.
We have improved support for dev tools. We're working to streamline this but in the latest binary you can:
- Configure your LSP (in Neovim, Vim, Emacs, etc) to call
dune tools exec ocamllsp
to get LSP support for your projects out of the box – this may take a little bit the first time it builds the LSP for a compiler version, but its pretty much instant afterwards. - Call
dune fmt
to get your project formatted – remember to add an.ocamlformat
file if you don't have one yet. An empty one is enough. - Call
dune ocaml doc
to get documentation built
What's next?
We're looking forward to streamlining the DX, working on better dependency locks, and looking into supporting Windows.
In particular, we're considering work on a few things:
dune create <repo>
– to let the community create templates that can be easily used from within dunedune pkg fetch
– to prefetch packages and prepare a repository for working in offline modedune build @deps
- to build all dependencies, useful for staged builds in Dockerfilesdune pkg add <name>
- to make adding packages straightforward- a short-hand syntax for pins on github
- and more!
If you've got any ideas, we'd love to hear them, so please open a feature request on Github :pray:
Other updates
- FunOCaml Presentation
At FunOCaml we had a last-minute opportunity to present the work being done on Dune and we used it to introduce the Developer Preview to the community, and even tested Package Management live with suggestions from the audience (thanks @anmonteiro and Paul-Elliot for participating!) – you can watch it on Twitch.
- New design
We're working with @Claire_Vandenberghe on redesigning the Developer Preview website so that it'd feel like a seamless extension of OCaml.org – in this current iteration we've made it easier to get started and we're putting the FAQ front and center.
We'll be iterating on this design in the coming weeks until it fits perfectly within the OCaml.org design system :art:
You can check the new website here: https://dune.ci.dev
- Upcoming Blog posts
In the near future we'll be publishing blog posts about the Developer Preview and Package Management, which we're working on with @professor.rose :clap:
Uuidm 0.9.9
Daniel Bünzli announced
There's a new release of Uuidm, a library to handle universally unique identifiers (UUIDs).
This very old module has been slightly renovated implying a few deprecations, a quick start has been added to the docs and foremost new constructors and generators were added to support the latest RFC 9562 V7 time and random based UUID definitions; thanks to xen-api
folks for getting the ball rolling on this. See the release notes for the details.
A big thanks to my donors.
first release of ppx_deriving_jsonschema
Louis Roché announced
Released 0.0.2 on opam. It feels like the project is in a good shape now.
Changes:
- support for nativeint, bytes, ref, unit
- add ~variant_as_array for compatibility with ppx_deriving_yojson
- support variant payloads
- support polymorphic variants inheritance
- fix encoding of tuples
- change encoding of variants from enum to anyOf
I'm considering making variant_as_array
the default in 0.0.3 as it would be more consistent with the ocaml ecosystem.
Bogue, the OCaml GUI
sanette announced
I'm happy to announce a brand new version of Bogue, version 20240928, now availble on opam
.
Changes are mostly under the hood. We have nice improvements by @edwin : automatic monitor vsync is now enabled by default, for smoother animations, and most importantly we finally align with the latest version of tsdl
. It will simplify maintenance, but it also implies that too old versions of SDL will not work anymore. On the other hand we were kind of obliged to move forward, because tsdl.0.9.8
won't install on ocaml 5.2
.
- if you're on Ubuntu 20.04, installing Bogue with
opam install bogue
will by default pulltsdl.1.1.0
in, which requires SDL >= 2.0.18, not shipped by the OS. A workaround is to explicitly requireopam install tsdl.1.0.0
(or manually installing a newer SDL) - if your OS ships SDL < 2.0.10 you have no other choice than manually installing a newer SDL (which is not that complicated)
Happy bogue-ing!
New release of Merlin
vds announced
I am very pleased to announce a new release of Merlin for OCaml 5.2, 5.1 and 4.14. This release brings a handful of fixes but also a handful of of new commands:
signature_help
andinlay_hint
have been upstreamed fromocaml-lsp-server
expand_node
a command to get the ppxed-source when called on relevant annotations- 🕵️♀️
search-by-type
a sherlodoc-inspired syntax to search for values in the environment, that superseedspolarity-search
.
Only search-by-type
has an Emacs binding right now (and one for vim on is in the works), we hope to have some time to work on more client implementations in the near future.
Complete changelog:
Fri Sep 27 12:02:42 CEST 2024
- merlin binary
- A new
WRAPPING_PREFIX
configuration directive that can be used to tell Merlin what to append to the current unit name in the presence of wrapping (ocaml/merlin#1788) - Add
-unboxed-types
and-no-unboxed-types
as ocaml ignored flags (ocaml/merlin#1795, fixes ocaml/merlin#1794) - destruct: Refinement in the presence of optional arguments (ocaml/merlin#1800 ocaml/merlin#1807, fixes ocaml/merlin#1770)
- Implement new expand-node command for expanding PPX annotations (ocaml/merlin#1745)
- Implement new inlay-hints command for adding hints on a sourcetree (ocaml/merlin#1812)
- Implement new search-by-type command for searching values by types (ocaml/merlin#1828)
- Canonicalize paths in occurrences. This helps deduplicate the results and show more user-friendly paths. (ocaml/merlin#1840)
- Fix dot-merlin-reader ignoring
SOURCE_ROOT
andSTDLIB
directives (ocaml/merlin#1839, ocaml/merlin#1803)
- A new
- editor modes
- vim: fix python-3.12 syntax warnings in merlin.py (ocaml/merlin#1798)
- vim: Dead code / doc removal for previously deleted MerlinPhrase command (ocaml/merlin#1804)
- emacs: Improve the way that result of polarity search is displayed (ocaml/merlin#1814)
- emacs: Add
merlin-search-by-type
,merlin-search-by-polarity
and change the behaviour ofmerlin-search
to switch betweenby-type
orby-polarity
depending on the query (ocaml/merlin#1828)
cc @xvw @PizieDust
Releases of mirage-crypto 1.0.0, tls 1.0.0, x509 1.0.0, asn1-combinators 0.3.0, let's encrypt 1.0.0, awa 0.4.0, kdf 1.0.0, paf 0.7.0, git 3.17.0
Hannes Mehnert announced
Dear OCaml developers,
we're pleased to finally release a full stack of packages that do not rely on Cstruct.t/Bigarray, but use string / bytes instead. This brings us a massive performance boost (e.g. a factor of 3 in tls), and brings a easier to comprehend API. It also makes performance tooling work much more smoothly with our released packages. We announced this upcoming change earlier this year https://discuss.ocaml.org/t/ann-mirage-crypto-0-11-3-with-more-speed-for-elliptic-curves-and-the-future-roadmap-of-mirage-crypto
For further details, please see the specific release pages:
- mirage-crypto 1.0.0 (also 1.0.1, and 1.1.0) - cryptographic operations in OCaml (symmetric ciphers, asymmetric ciphers (RSA, DSA, DH), fortuna (a cryptographic secure pseudo random number generator), elliptic curves (from fiat-crypto) – the hash algorithms have been removed - use digestif instead
- tls 1.0.0 (also 1.0.1, 1.0.2, and 1.0.3) - a Transport layer security implementation (HTTPS) in OCaml, supporting TLS 1.0, 1.1, 1.2, and 1.3
- x509 1.0.0 (also 1.0.1, 1.0.2, 1.0.3, and 1.0.4) - X509 certificates (signing requests, certificate revocation lists, PKCS12)
- asn1-combinators 0.3.0 (also 0.3.1 and 0.3.2) - ASN.1 parser combinators
- let's encrypt 1.0.0 - a client for https://letsencrypt.org - automated TLS certificate issuance
- awa 0.4.0 - a SSH client and server implementation
- kdf 1.0.0 - supporting different key derivation functions: hkdf (used in TLS), PBKDF2, SCRYPT
- paf 0.7.0 - protocol-agnostic client (http / http2)
- git 3.17.0 - an implementation of the version control system git https://git-scm.com
- dns 9.0.0 (also 9.0.1) - an implementation of the domain name system
As you can envision, there was a lot of coordination and releasing involved in preparing these API-breaking changes. The list above likely misses various packages that have been released to support the new mirage-crypto and tls API.
There have already been various issues reported and fixed in the subsequent minor releases. We encourage you to upgrade your software stack to the new release series, and report issues while you encounter them (being it API questions, or correctness issues). Earlier releases are not maintained anymore (due to lack of interest and lack of time), thus if you encounter issues in earlier releases, please first update to the most recent releases (although this may need some effort – a PR that uses the packages heavily is https://github.com/robur-coop/miragevpn/pull/279). If you're stuck or lack time to port your code to the new API, we at robur offer commercial support in upgrading your codebase. Reach out to us via email: team@robur.coop.
This work has been conducted by the robur collective. Parts of this work was sponsored by Tarides.
ICFP 2023 OCaml Presentations on YouTube
Anil Madhavapeddy announced
After a respectable pause, I've now imported these videos into the Watch.OCaml.org instance so we have a non-YouTube mirror. They're up on the OCaml Workshop 2023 channel now. Enjoy your ad-free viewing! :slight_smile:
Dune dev meeting
Etienne Marais announced
Hi Dune enthusiasts! :camel:
We will hold our regular Dune dev meeting tomorrow, on Wednesday, October, 2nd at 16:00 CET. As usual, the session will be one hour long.
Whether you are a maintainer, a regular contributor, a new joiner or just curious, you are welcome to join: these discussions are opened! The goal of these meetings is to provide a place to discuss the ongoing work together and synchronise between the Dune developers :smile:
:calendar: Agenda
The agenda is available on the meeting dedicated page . Feel free to ask if you want to add more items in it.
:computer: Links
- Meeting link: zoom
- Calendar event: google calendar
- Wiki with information and previous notes: GitHub Wiki
Other OCaml News
From the ocaml.org blog
Here are links from many OCaml blogs aggregated at the ocaml.org blog.
- [OCaML'23] Modern DSL compiler architecture in OCaml our experience with Catala
- [OCaML'23] Eio 1.0 – Effects-based IO for OCaml 5
- [OCaML'23] Less Power for More Learning: Restricting OCaml Features for Effective Teaching
- [OCaML'23] Efficient OCaml compilation with Flambda 2
- [OCaML'23] Buck2 for OCaml Users & Developers
- [OCaML'23] Parallel Sequences in Multicore OCaml
- [OCaML'23] Building a lock-free STM for OCaml
- [OCaML'23] MetaOCaml Theory and Implementation
- [OCaML'23] Osiris: an Iris-based program logic for OCaml
- [OCaML'23] State of the OCaml Platform 2023
- [OCaML'23] Owi: an interpreter and a toolkit for WebAssembly written in OCaml
- [OCaML'23] Targeted Static Analysis for OCaml C Stubs: Eliminating gremlins from the code
- Introducing Dune: The Essential Build System for OCaml Developers
- Summer of Internships: Projects From the OCaml Compiler Team
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 to the caml-list.