OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of April 12 to 19, 2022.

Table of Contents

Lwt informal user survey

Raphaël Proust announced

In order to make some decisions relating to the maintenance of Lwt, I'd like to know a little bit more about how the library is used in the wild. Do not hesitate to respond to the poll and/or as a message in this thread, or even to contact me via other means in case discuss is not your jam.

Editor’s note: please follow the link above to reply to the survey.

pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications

Continuing this thread, Ryan Moore announced

I wrote a blog post providing an introduction to pyml_bindgen. It gives an intro in a slightly different style as compared to the docs and the examples, and includes some of the latest features I've been working on.

Creating a library for use from JS with js_of_ocaml

Deep in this thread, threepwood said

Cautionary note for anyone reading this in the future: dynamic imports are asynchronous, and initializing the jsoo runtime takes some milliseconds, so that if you just do:

import("ocaml/export.bc.js");
var x = mylib.myfunction();

the second line will fail as mylib is not defined yet (at least this is what I think is happening). You need to guarantee the module is done initializing in some way or other.

Kim Nguyễn then said

import should return a promise of the loaded module. So you can just await for it (if your current context allows you to write await) or just :

 import("ocaml/export.bc.js").then ((_) => {

 mylib.myfunction();

});

ocaml-lsp-server 1.11.0

Rudi Grinberg announced

On behalf of the ocamllsp team, I'm excited to announce the availability of version 1.11.0. This release is an important milestone for the project because it introduces integration with our favorite build system. When you run dune in watch mode, you will now be able to see build errors in the diagnostics panel of your editor. It's all rather experimental for now, so your feedback and bug reports are appreciated.

As usual, the full change log is below.

Happy hacking.

1.11.0

Features

  • Add support for dune in watch mode. The lsp server will now display build errors in the diagnostics and offer promotion code actions.
  • Re-introduce ocamlformat-rpc (#599, fixes #495)

Fixes

  • Fix workspace symbols that could have a wrong path in some cases (#675)

OCaml summer school in Spain, call for industry speakers

Roberto Blanco announced

Dear all, Ricardo Rodríguez and I are organizing an introductory OCaml course as part of the annual summer school of the University of Zaragoza in Spain. (This is the oldest summer university in the country, nearing its centennial anniversary!). The country's computing programs are quite excellent, although we have found them to generally not pay serious attention to modern functional programming. Our goal is to use OCaml to begin to address this dearth.

In addition to the regular academic program we are planning a satellite event open to the general public. This is meant to introduce the OCaml ecosystem to a wider audience of students and academics, as well as professionals. As part of this, we would like to hold a round table discussion of industrial OCaml users to demonstrate the width and depth of practical uses of the language. There will be time for participants to present their work in more detail, if they wish to do so.

If you may be interested in participating or have any questions, feel free to write to me here or send email to either of us. The course is currently in its planning stages; it is scheduled to take place in early to mid July, in all likelihood in the city of Zaragoza and in hybrid format. The OCaml Software Foundation is backing the initiative and we thank them for their generous support.

Updated information about the course will be available on its website: https://webdiis.unizar.es/evpf/

Dune 3.1.0

Rudi Grinberg announced

On behalf of the dune team, I'm pleased to announce version 3.1.0. This release contains some small, but interesting features, and some important quality of life bug fixes. I encourage everyone to upgrade as soon as possible.

Happy Hacking.

3.1.0 (15/04/2022)

  • Add sourcehut as an option for defining project sources in dune-project files. For example, (source (sourcehut user/repo)). (#5564, @rgrinberg)
  • Add dune coq top command for running a Coq toplevel (#5457, @rlepigre)
  • Fix dune exec dumping database in wrong directory (#5544, @bobot)
  • Always output absolute paths for locations in RPC reported diagnostics (#5539, @rgrinberg)
  • Add (deps <deps>) in ctype field (#5346, @bobot)
  • Add (include <file>) constructor to dependency specifications. This can be used to introduce dynamic dependencies (#5442, @anmonteiro)
  • Ensure that dune describe computes a transitively closed set of libraries (#5395, @esope)
  • Add direct dependencies to $ dune describe output (#5412, @esope)
  • Show auto-detected concurrency on Windows too (#5502, @MisterDA)
  • Fix operations that remove folders with absolute path. This happens when using esy (#5507, @EduardoRFS)
  • Dune will not fail if some directories are non-empty when uninstalling. (#5543, fixes #5542, @nojb)
  • coqdep now depends only on the filesystem layout of the .v files, and not on their contents (#5547, helps with #5100, @ejgallego)
  • The mdx stanza 0.2 can now be used with (implicit_transitive_deps false) (#5558, fixes #5499, @emillon)
  • Fix missing parenthesis in printing of corresponding terminal command for (with-outputs-to ) (#5551, fixes #5546, @Alizter)

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.