OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of May 17 to 24, 2022.

Table of Contents

ML Family Workshop 2022: Final Call for Presentations

Benoit Montagu announced

We are happy to invite submissions to the ML Family Workshop 2022, to be held during the ICFP conference week on Thursday, September 15th.

The ML family workshop warmly welcomes submission touching on the programming languages traditionally seen as part of the “ML family” (Standard ML, OCaml, F#, CakeML, SML#, Manticore, MetaOCaml, etc.). The scope of the workshop includes all aspects of the design, semantics, theory, application, implementation, and teaching of the members of the ML family. We also encourage presentations from related languages (such as Haskell, Scala, Rust, Nemerle, Links, Koka, F*, Eff, ATS, etc), to exchange experience of further developing ML ideas.

The workshop does not have proceedings, making it the perfect venue to run some ideas with the community or present some work in progress within a friendly environment. The PC has a broad expertise and submissions are 3 pages long: when in doubt, just submit!

Currently, the workshop is scheduled to be an in-person event. We will give to the authors of accepted abstracts the opportunity to give their talks remotely if necessary, in case they could not travel.

See the detailed CFP online on the ICFP website: https://icfp22.sigplan.org/home/mlfamilyworkshop-2022#Call-for-Presentations

Important dates

  • Friday 3th June (any time zone): Abstract submission deadline
  • Tuesday 28th June: Author notification
  • Thursday 15th August: ML Family Workshop

Program committee

  • Kenichi Asai (Ochanomizu University)
  • Arthur Azevedo de Amorim (Boston University)
  • Dariusz Biernacki (University of Wrocław)
  • Stephen Dolan (Jane Street)
  • Kavon Farvardin (Apple)
  • Armaël Guéneau (Inria)
  • Sam Lindley (University of Edinburgh)
  • Guido Martínez (CIFASIS-CONICET)
  • Keiko Nakata (SAP Innovation Center Potsdam)
  • Lionel Parreaux (Hong Kong University of Science and Technology)
  • Matija Pretnar (University of Ljubljana)
  • Mike Rainey (Carnegie Mellon University)
  • Yann Régis-Gianas (Nomadic Labs)
  • KC Sivaramakrishnan (IIT Madras and Tarides)
  • Ningning Xie (University of Cambridge)

Chair: Benoît Montagu (Inria)

Submission details

See the online CFP for the details on the expected submission format.

Submissions must be uploaded to the workshop submission website https://ml2022.hotcrp.com/ before the submission deadline.

Dune 3.2.0

Rudi Grinberg announced

On behalf of the dune team, I'm pleased to announce the availability of version 3.2.0. This release contains few new features, but is packed with bug fixes and usability improvements. In particular, I'd like to point out that we've continued to improve the user experience with the watch mode. I encourage you all to try it out if you haven't already.

Happy Hacking.

3.2.0 (17-05-2022)

  • Fixed dune describe workspace --with-deps so that it correctly handles Reason files, as well as files any other dialect. (#5701, @esope)
  • Disable alerts when compiling code in vendored directories (#5683, @NathanReb)
  • Fixed dune describe --with-deps, that crashed when some preprocessing was required in a dune file using per_module. (#5682, fixes #5680, @esope)
  • Add $ dune describe pp to print the preprocssed ast of sources. (#5615, fixes #4470, @cannorin)
  • Report dune file evaluation errors concurrently. In the same way we report build errors. (#5655, @rgrinberg)
  • Watch mode now default to clearing the terminal on rebuild (#5636, fixes, #5216, @rgrinberg)
  • The output of jobs that finished but were cancelled is now omitted. (#5631, fixes #5482, @rgrinberg)
  • Allows to configure all the default destination directories with ./configure (adds bin, sbin, data, libexec). Use OPAM_SWITCH_PREFIX instead of calling the opam binaries in dune install. Fix handling of multiple libdir in ./configure for handling /usr/lib/ocaml/ and /usr/local/lib/ocaml. In dune install forbid relative directories in libdir, docdir and others specific directory setting because their handling was inconsistent (#5516, fixes #3978 and #5455, @bobot)
  • --terminal-persistence=clear-on-rebuild will no longer destroy scrollback on some terminals (#5646, @rgrinberg)
  • Add a fmt command as a shortcut of dune build @fmt --auto-promote (#5574, @tmattio)
  • Watch mode now tracks copied external files, external directories for dependencies, dune files in OCaml syntax, files used by include stanzas, dune-project, opam files, libraries builtin with compiler, and foreign sources (#5627, #5645, #5652, #5656, #5672, #5691, #5722, fixes #5331, @rgrinberg)
  • Improve metrics for cram tests. Include test names in the event and add a category for cram tests (#5626, @rgrinberg)
  • Allow specifying multiple licenses in project file (#5579, fixes #5574, @liyishuai)
  • Match glob_files only against files in external directories (#5614, fixes #5540, @rgrinberg)
  • Add pid's to chrome trace output (#5617, @rgrinberg)
  • Fix race when creating local cache directory (#5613, fixes #5461, @rgrinberg)
  • Add not to boolean expressions (#5610, fix #5503, @rgrinberg)
  • Fix relative dependencies outside the workspace (#4035, fixes #5572, @bobot)
  • Allow to specify --prefix via the environment variable DUNE_INSTALL_PREFIX (#5589, @vapourismo)
  • Dune-site.plugin: add support for archive(native|byte, plugin) used in the wild before findlib documented plugin(native|byte) in 2015 (#5518, @bobot)
  • Fix a bug where Dune would not correctly interpret META files in alternative layout (ie when the META file is named META.$pkg). The Llvm bindings were affected by this issue. (#5619, fixes #5616, @nojb)
  • Support (binaries) in (env) in dune-workspace files (#5560, fix #5555, @emillon)
  • (mdx) stanza: add support for (locks). (#5628, fixes #5489, @emillon)
  • (mdx) stanza: support including files in different directories using relative paths, and provide better error messages when paths are invalid (#5703, #5704, fixes #5596, @emillon)
  • Fix ctypes rules for external lib names which aren't valid ocaml names (#5667, fixes #5511, @Khady)

Hardcaml MIPS CPU Learning Project and Blog

Alexander (Sasha) Skvortsov announced

Hi everyone! Last fall, we completed our original plan for this project, rewriting the verilog MIPS CPU we had designed for a class into Hardcaml. A few weeks later, we got an invite to video-meet with the Hardcaml team to talk about our experience. They even sent us actual Arty A-7 FPGAs so we could test out our simulation on real hardware!

Junior year ended up much busier than expected, and although we had gotten our code onto the FPGAs by January, we’ve only just now fully finished our project. Our blog now has 2 bonus installments:

  1. Running Hardcaml on an actual FPGA. Here, we lit up LEDs to display the output of a hardcoded program.
  2. Hardcaml MIPS and I/O. Here, we restructured our CPU so that programs can communicate with an external device using UART.

With these changes, our full design is now a simplified but realistic processor that can run meaningful programs.

Thank you very much to @andyman, @fyquah95, Ben Devlin, and the rest of the Jane Street FPGA team for creating Hardcaml, meeting with us, and answering our numerous questions throughout this process. Thank you also to @yaron_minsky and Jane Street for sending us the FPGAs to try out our code.

This has been an incredibly interesting, challenging, and rewarding journey. We hope that our blog posts and sample project are useful for learning Hardcaml in the future, and welcome any questions or comments.

A tutorial on parallel programming in OCaml 5

KC Sivaramakrishnan announced

I ran a hands-on tutorial on the new parallel programming primitives in the upcoming OCaml 5 at the Tarides off-site last week. It covers the low-level parallelism primitives exposed by the OCaml 5 compiler as well as high-level parallel programming using domainslib. I hope you like it and find it useful. Please feel free to open issues if you find anything amiss.

https://github.com/kayceesrk/ocaml5-tutorial

Alain De Vos asked and Olivier Nicole replied

As it is not immediately clear for me, does it uses threads , green threads, processes , fibers ? And who is responsible for the scheduling ,the Ocaml application or the underlying operating system ?

Each domain corresponds to one system thread. The scheduling between them is therefore performed by the operating system.

The tutorial only covers domains, which are the way to perform parallelism in OCaml 5. To use concurrency (e.g. having several IO-depending operations that run concurrently on the same core), the main mechanism is effects (which at the level of the runtime system, are implemented using small stack segments called fibers), as in the eio library. Effects allow such libraries to provide a form a lightweight threads (aka green threads) whose scheduling is implemented in the OCaml application using effect mechanisms.

UnixJunkie then said

Here is a very simple tutorial on parallel programming in OCaml: use parany ! https://github.com/UnixJunkie/parany For OCaml 5, use the right branch of parany: https://github.com/UnixJunkie/parany/tree/domains

Happy hacking!

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.