Notes.

Shorter things. Links, observations, photos. Things that don't need a full article but are worth writing down.

November 2026.

I missed the colour palette I used to have on my site, black on white. So I have been working on a redesign of this site for a while. It is nothing groundbreaking, more tweaking really. It has the same minimalistic layout and the Tufte-inspired sidenotes.

The site is monochrome apart from the red dot that has been the signature mark for my site for many years now. I am quite fond of that.

I temporarily removed the list of music albums, as I did not update it as often as I originally planned. Also, I have been thinking about replacing it with a catalogue of my records. Then I can ditch Discogs, which I find absolutely terrible to use.

An "about me" page was introduced during the redesign. Nothing special really, but I plan to make it more résumé-like eventually.

The shout box is still there, this time disguised as a postcard. I hope that will invite a few more visitors to send some messages.

The most designed element on the site is without a doubt the skyline footer! It is an illustration of the city of Karlskrona seen from a distance. The city is located in the archipelago of south-eastern Sweden, and I live in a small village just outside it.

I write small, very small. And I only use blank or dotted paper, and I never write on the left-hand page. My favourite notebook is the LEUCHTTURM1917, which I have used for a few years now.

Some evenings ago I came across this video ranking the most popular pens.

My favourite pen is the Sakura Pigma Micron 02 with a 0.3 mm tip. It is included in the video in the top tier (obviously). I like it very much, and it is still my favourite. But watching that video made me want a fountain pen. I have always wanted one, but I was afraid the ink would smear.

Well, the only way to tell was to try one, so I ordered a TWSBI SWIPE. It was not part of the test (other TWSBIs were). I was close to ordering a Lamy Safari at first, but after reading up, the TWSBI generally received better reviews.

It arrived yesterday. Oh my, what a lovely feeling! Writing is super smooth, and I wrote a few really nice signatures with it (nothing binding of course, I live in Sweden, where we're all for digital signing). It was supposed to be extra fine, but I think it is still slightly too wide for me to use for day-to-day note-taking. But I will definitely use it for doodling and nicer writing. I am super happy with it!

The last few days I have started to receive quite a lot of spam from the shout box on this page. I knew the Internet have terrible citizens when I added it, and it lasted quite a while until it became a problem.

It is not shut down, but I filter for common words (yes, you almost certain can guess the types for words) and drop message that contains any of them.

Why not just shut it down? Well, the few actual greetings and comments I receive from visitors are still worth the trouble. Thank you!

August 2026.

A few days ago I announced Garanti on the Gleam Discord. It did not receive too many comments, but out of the few it seems that people like assert x == y over custom matchers.

I like (my) matchers though, and maybe I phrased the USP badly in my post and in the README.

I have started to use Garanti in my (yet) private Gleam project. And Garanti makes it very easy to add custom matchers that behave just like the built-in matchers, both when calling and how failures are reported!

import garanti
import gleam/list
import gleam/string

/// Asserts that a string contains a given substring.
pub fn to_contain_string(
  actual: String,
  substring: String,
) -> garanti.AssertionResult {
  case string.contains(actual, substring) {
    True -> garanti.Pass
    False ->
      garanti.Fail(
        "Expected string to contain " <> string.inspect(substring) <> ".",
        [garanti.Actual(actual), garanti.Expected(substring)],
      )
  }
}

A test would then fail with this message (using ANSI colours):

 Test an unexpected error includes the raw detail:
   Expected string to contain "port error".
   Actual:  Could not start due to an obscure error.
   Expected:  port error

This needs to be better communicated and exemplified in the README. Because, what I think makes a test clear is a 50/50 split between reading the test code and reading the test failure message. Here I think custom matchers has an advantage!

July 2026.

I have been working on my Gleam test-framework, Garanti, recently. It now supports both Erlang and JavaScript targets!

import garanti.{Suite, Test}
import garanti/expect

pub fn math_suite() -> Suite {
  Suite("math", [
    Test("should add two numbers", fn() {
      math.add(2, 2)
      |> expect.to_be_equal(4)
    }),

    Test("should divide by two", fn() {
      use result <- expect.to_be_ok_then(math.divide(4, 2))
      expect.to_be_equal(result, 2)
    })
  ])
}

The next feature is to add support for richer assertion messages. A single string is too limited, so I need to add something with a bit more structure. Then it might be time to release it on hex.pm.

Check it out at Garanti.

April 2026.

Yesterday I watched the Clojure Documentary which I think was wonderful. Rich and the community around Clojure seems like such a nice place that I instantly get keen on revisiting Clojure.

I did some programming in Clojure back in 2013 and I quite like it. But at that point in time I enjoyed dynamically typed languages. Today I value type-safety very highly. So, maybe it is time to challenge myself and use Clojure again for something?

Even if you do not use Clojure, I recommend you to watch the documentary. It is an interesting piece of computer science history nonetheless.

Clojure - The Documentary

My new project Albumklubben (Swedish for "The Album Club") is progressing nicely!

This is a project I have started several times but never finished. It is one of these projects that you spend an unreasonable amount of time thinking about, but that might never take off.

What is it? It is a small social network for music lovers. I used to have a Facebook group that took turns pitching an album every week. I am rarely on Facebook any more, and this is a great excuse to build something new!

Albumklubben screenshot

The club will start invite only, and, as you can see, in Swedish (as I enjoy quite a lot of Swedish music).

Inspired by this blog, I decided to also add a shoutbox to my site. It is wired to a Telegram bot on my phone, which turned out to be super simple and free!

Silly me, I thought I needed to jump through the hoops to host a mail server.