#131

Mar 21, 2021

Open Source

I released patch versions of concurrency and dejafu fixing a couple of compilation errors under GHC 9.0.1. There’s been a change to type inference in the presence of higher-ranked types, meaning code like this no longer typechecks:

forkWithUnmask :: MonadConc m => ((forall a. m a -> m a) -> m ()) -> m (ThreadId m)
-- forkWithUnmask = ...

fork :: MonadConc m => m () -> m (ThreadId m)
fork ma = forkWithUnmask (const ma)

The const just isn’t polymorphic enough, and has to be changed to:

fork :: MonadConc m => m () -> m (ThreadId m)
fork ma = forkWithUnmask (\_ -> ma)

A little disappointing, but I’m sure it’s changed for a good reason. Which may be something like “this was an unavoidable consequence of fixing a soundness error somewhere.”

dejafu now supports GHC 9.0, 8.10, 8.8, 8.6, 8.4, 8.2, and 8.0. Yet the documentation only promises to support the latest four GHC releases. GHC 8.0 was released in 2016 and I don’t think many people are using it any more. Even Debian Stable is on GHC 8.4.

Supporting older versions requires using CPP and living with warnings from newer compilers (for doing some things in the old way). I’m going to look into how much of a benefit dropping a few old versions would be, and make a call.

Work

Friday marked one year at home: my last day in the office, since which I’ve only gone out for shopping. It’s been an interesting year for sure. I quite like working from home, and I won’t be in a rush to go back.

This week I’ve been mostly working on API contract testing, using Pact. I’ve not written tests like this before, so it’s been a new thing to learn. This is the last thing to do before we can switch on continuous deployment for our new API app, so it’ll be good to get it done.

I’ve also been writing API documentation, but stopped when I noticed one of the endpoints had a fairly awkward interface which could be simplified. I found this a lot when I was writing documentation or blog posts for dejafu.

Books

This week I read:

CI / CD

After setting up secrets management for Concourse last week I continued with simplifying and rewriting things, and moved all of my Concourse pipelines to the repositories which use them. For example, the pipeline to deploy this site.

I now have a small repository with the rest of my cloud configuration in.

I also set up GitHub Actions more consistently across my repos: some of them had Actions, some didn’t. Now they all do, doing some basic linting & correctness checks. To help keep the Actions I’m using up to date, I enabled Dependabot for everything too.

Dependabot then immediately opened a bunch of PRs updating old Python dependencies I’d frozen months or years ago and never touched since. Handy.

I’m now pretty happy with my CI / CD set-up, and have written a memo about it, though there are a few more areas of potential improvement.

Gaming

We began the England chapter of Masks of Nyarlathotep in my Call of Cthulhu campaign. I tried to write a good intro / recap summarising what they’ve got themselves into so far. The players had a bit of an “oh shit” moment when they realised just how much time they used up by going to Australia, and how likely it is that tales of their exploits in New York have spread to the rest of the cults by now.

Miscellaneous

I changed up the layout of this site a little, drawing inspiration from my RPG blog. I think it’s a big improvement, and it’s also somewhat more mobile friendly, with memos dropping to a single-column display at 800px and listings at 600px.