ICFP 2022 Review

by Tim McGilchrist on Oct 10th, 2022

After two years of online conferences, it was fantastic to have ICFP 2022 in person. The conference organisers had done a fantastic job adjusting to online conferences, but nothing beats the hallway track for meeting new people and catching up with old friends. This year, Slovenia's capital hosted the event. Ljubljana was a beautiful city to visit, with plenty of classic European architecture and even a castle to explore.

My conference schedule was packed. I had a talk to present on Friday and five preceding days of conference talks to attend. The first three days were a whirlwind of talks (some on the edge of my understanding) and hallway track conversations.

OCaml's Trajectory Image by Yaron Minsky of Jane Street

OCaml Reaches for the Stars

Although it happened mid-week, I want to start with KC Sivaramakrishnan's keynote, Retrofitting Concurrency – Lessons from the Engine Room, as it was definitely the highlight of ICFP. He covered the full story of introducing parallelism and concurrency into OCaml, along with references to papers published along the way. Watch the video of his keynote. The "Where do we go from here?" slide ties together the effect system with targeting Javascript, modal types to avoid heap allocations, unboxed types to control memory layout, and Flambda2 for aggressive compiler optimisation. This is hugely exciting for the OCaml community. It brought together many threads of work into a coherent picture.

There was a real buzz afterwards from both OCaml and Haskell people I talked with. It set the stage for the ML Workshop on Thursday, which included Efficient and Scalable Parallel Functional Programming Through Disentanglement, Unboxed Types for OCaml, Module Shapes for Modern Tooling, Stack Allocation for OCaml, and Boxroot, Fast Movable GC Roots for a Better FFI, picking up themes from the keynote. The full playlist for the ML Workshop is available on YouTube.

Sudha OCaml Workshop

Thursday also featured the OCaml 5.0 for the Working Programmer tutorial, presented by my colleague Sudha Parimala (above) and Marek Kubica at Tarides. There are slides and exercises to work through to help you understand effects and parallelism in OCaml.

Friday: A Full Day of OCaml

The final day was dedicated to OCaml Workshops. KC kicked off the first session with a keynote on the "here and now" of OCaml 5.0. His presentation addressed developers' frequently asked questions when moving from sequential OCaml 4 to 5.0, discussed the details of the merge process, and included a deep dive of the developments since the merge of Multicore OCaml early this year. His talk concluded with a call to action, encouraging OCaml developers to start migrating to OCaml 5.0, even if they do not immediately plan to use the new concurrency and parallelism features.

The keynote was followed by Jan Midtgaard, Principal Engineer at Tarides, talking about a number of testing techniques and tools for concurrent programs that Tarides has developed for OCaml 5.0. This was followed by Deepali Ande, KC's student at IIT Madras, presenting a novel way to enable different schedulers written using effect handlers to communicate with each other.

These talks ended up being so popular that there was standing room only, so during the coffee break after the first session, the ICFP organisers announced to everyone that the remaining OCaml presentations would be in "the fanciest theatre ever," an amphitheatre known as the Štih Room (below).

Full Ampitheatre OCaml

I presented our collective work on bringing OBuilder to non-Linux platforms. OBuilder is the underlying library responsible for providing sandboxed build environments for ocaml-ci, opam-repo-ci, and opam-healthcheck. The talk covered the architecture of OBuilder, showing how it gets used in our multi-archtecture cluster of build machines. I also reviewed the Linux implementation that uses native Linux containerisation technology, like runC and cgroups. Then, moving onto the implementation on macOS, I demonstrated using user isolation to provide sandboxing with some file system tricks, followed by the implementation on Windows using Docker for Windows, which during testing found a number of interesting bugs in LWT and GNU Tar. The full details are available in the Extended Abstract and on GitHub https://github.com/ocurrent/obuilder/.

The OCaml Workshop also featured an impressive back-to-back presentation from David Allsopp on opam's CLI compatibility work and the upcoming opam 2.2 features. He also covered how to make the OCaml compiler relocatable and how that will allow for fast switch creation in opam. Congratulations to David for making such a polished and well-received double show!

ICFP

Functional Programming Development

Although OCaml certainly stole the show after KC's keynote, earlier in the week I attended several fascinating workshops, a few of which I outline below. There was also a strong theme of Effects talks throughout the third day of ICFP, which I plan to come back to and review the papers in more detail. Below are some highlights, but the full Haskell Implementors Workshop (HIW) is available on YouTube.

Haskell

On Sunday, I spent my day in the Haskell Implementors Workshop, which kicked off with the "State of GHC" talk from Simon Peyton Jones. Simon covered all the new and important developments in 9.4 and 9.6. For me, the complete overhaul of GHC’s Windows support, including many fixes in WinIO, refactoring of GHC's error messages, and the ongoing work to upsteam GHCJS and WebAssembly backends into GHC, were the most exciting changes. The other takeaway was how Cabal development has been overhauled with a new team managing the project and the resulting acceleration of improvements making their way into Cabal, starting from Cabal 3.6. That, combined with the significantly improved Haskell LSP support, means Haskell tooling is in a great place.

GHC & Racket

Alexis King's talk, "A Look Across the Pond: A Comparison Between GHC and Racket Compilation Models," was a great highlight on how Racket tooling works and how Cabal could be further improved, and perhaps how we could improve opam. The key idea was that Racket uses a set of core data structures to represent packages and provides functions across those data structures, with the end-user tooling being a very thin wrapper around these functions. Alexis demonstrated how to query and manipulate the set of installed packages within Racket in a way that's impossible with current Cabal. This is an intriguing idea that hopefully gets some attention, and I wonder if the more dynamic representation available in Racket makes this easier compared to Haskell.

GHC & Mu

My second recommendation is "Compiling Mu with GHC: Halfway Down the Rabbit Hole" by Georgo Erdi, which covered the effort to port Mu to reuse the GHC compiler frontend and backend as much as possible. Currently Mu uses a custom compiler for its strict Haskell variant that includes MultiParam Typeclasses and Functional Dependencies, along with a variation on Type Families. I like hearing about compiler engineering efforts that need to handle existing codebases and think through the trade-offs. The choice of Functional Dependencies and Multiparam Typeclasses is a sweet spot in the design space for typeclasses, with Purescript choosing a similar approach.

OCaml Reception

Overall the ICFP had a huge buzz of excitement around OCaml 5.0 featuring Multicore support and effects. The palpable enthusiasm after KC's impressive keynote lasted throughout the rest of the week. I had many great conversations with both OCaml and Haskell people about the new features and how exciting the future is for OCaml. In fact, the OCaml Farewell Reception, held at the Ljubljana Zoo, attracted three times the expected number of attendees because everyone wanted to keep talking about the new features coming soon in OCaml 5.0. I spoke at length with a senior Haskell programmer who was very interested in OCaml Multicore, and we all enjoyed sampling a local honey liqueur and having a hot meal, which helped warm us that cool, rainy evening. As a special treat, the ICFP organisers even arranged for a real live camel to make an appearance! It was a delightful evening, and the perfect ending to ICFP 2022.

In the end, the week in Ljubljana was fulfilling, both on a personal and professional level. After over two years of limited in-person events, it was truly refreshing to meet and network with colleagues face to face.

Ljubljana Dragon The Famous Ljubljana Dragon Bridge