Latest posts
- Article previews in RSSMay 06, 2026[email protected] (kqr)
Since about three years past time immemorial, the RSS feed for this site has been very anaemic. It had article titles and dates, and that was it. Many readers have requested that I include the full article in the feed, or at least a preview, but I’ve always put it off because it has sounded difficult to accomplish technically. The way the RSS feed for this site is generated is in two steps:
- Fizz Buzz Through MonoidsMay 04, 2026[email protected] (kqr)
Some decade ago I read a good implementation of fizzbuzz. What set it apart was its excellent modularity. The original article is no longer on the web, but this is my reconstruction: In[1]: module Main where import Control.Monad (guard) import Data.Foldable (for_) import Data.Maybe (fromMaybe) fizzbuzz i = fromMaybe (show i) . mconcat $ [ "fizz" <$ guard (rem i 3 == 0) , "buzz" <$
- Understanding systemsApr 27, 2026[email protected] (kqr)
Some time ago I read an article on what makes a good tutor. It explicated many of the things I do when tutoring, so obviously I thought it was a great article. When I had a side gig as a private tutor, I covered mostly maths and physics, so that’s how I’ll frame things in this article. The same thing applies to other fields too, but it might be harder the further away from maths they are. The
- Spaced Repetition: Beginner Guide/FAQApr 20, 2026[email protected] (kqr)
Spaced repetition is best introduced in the words of Gwern: it is a mechanical golem that will never forget, and never let us forget whatever we chose to. If this was a medical treatment or lessons from a personal coach, it would be priced so that only high-ranking politicians, CEOs of big companies, and Silicon Valley programmers could afford it. But spaced repetition is available to
- Object Oriented Programming in AdaApr 13, 2026[email protected] (kqr)
Ada is incredibly well designed. One way this shows is that it takes the big, monolithic features of other languages and breaks them down into their constituent parts, so we can choose which portions of those features we want. The example I often reach for to explain this is object-oriented programming. I never truly understood object-oriented programming until I learned Ada, which breaks dow
- Readership maths skillsApr 06, 2026[email protected] (kqr)
Many of you get notified of new articles via RSS, and some of you stay tuned through the email newsletter. The email subscribers have, in the past three weeks, answered a survey on their understanding of maths topics. I asked three questions of increasing difficulty: How advanced maths have you formally studied? How advanced maths are you still comfortable using? How advanced maths do you kno
- The MVC MistakeMar 30, 2026[email protected] (kqr)
Creating abstractions should not be left to beginners. Richard Gabriel says puts it well:: Abstractions must be carefully and expertly designed, especially when reuse or compression is intended. However, because abstractions are designed in a particular context and for a particular purpose, it is hard to design them while anticipating all purposes and forgetting all purposes, which is the ha
- Lines of code are usefulMar 23, 2026[email protected] (kqr)
The internet is full of people dismissing lines of code as a measurement. People say things like Lines of code written has been firmly established over the decades as a largely meaningless metric. and (Continue reading the full article on the web.)
- Esqueleto TutorialMar 16, 2026[email protected] (kqr)
When interacting with databases in Haskell, we use a library called Persistent to create mappings between database content and Haskell data types. This library can also query for records and update them, as long as the operations involved are very basic. Once operations become more complicated, we turn to Esqueleto, a lower-level library which reuses Persistent data mappings but let us write
- Are LLMs not getting better?Mar 11, 2026[email protected] (kqr)
I was reading the METR article on how LLM code passes test much more often than it is of mergeable quality. They look at the performance of LLMs doing programming when the success criterion is “passes all tests” and compare it to when the success criterion is “would get approved by the maintainer”. Unsurprisingly, LLM performance is much worse under the more stringent success criterion. Their 50 %
- Rebasing in MagitMar 09, 2026[email protected] (kqr)
I read Ian Whitlock’s article on why he can’t quit Magit and it inspired me to share more about Magit from my perspective. This article will focus on rebasing. Here I have opened the git log, by first opening Magit (which I have bound to the F3 key), and then pressing lL. The first l is the prefix key for dealing with the git log, and the second L is to to view the log for all local branches
- Teaching Children to BicycleMar 02, 2026[email protected] (kqr)
Teaching an adult to ride a bike is easy. This is how: You hand them a smaller bike so they can comfortably reach the ground. You instruct them to not focus on going in any particular direction, but instead always steer into the fall. That’s it. That’s the whole trick to cycling. 99 % of the time, the handlebars are only there to keep the bike under your body. 1 % of the time you use the
- Flake Checks in ShellFeb 23, 2026[email protected] (kqr)
TL;DR: To use a shell script as a Nix flake check, turn it into a derivation with runCommand. It must Create a file named as suggested in the environment variable $out. Print the desired “how to fix” information to stdout. Exit with status code 1 if the check failed, otherwise 0. These three steps are not strictly documented anywhere, but are all needed for a shell script to work as a go
- Learning KeyBeeFeb 16, 2026[email protected] (kqr)
The problem with Qwerty keyboards on small touchscreen devices is that they are designed for ten-finger typing, and we typically only use two thumbs to type. Surely there must be ways input can be optimised for two thumbs beyond the Qwerty keyboard. Obviously, one of the best alternatives would be treating the touchscreen as a proper iambic morse code key. Unfortunately, no good implementatio
- Wilks' Tolerance IntervalsFeb 09, 2026[email protected] (kqr)
Imagine we want to figure out what round-trip times we can expect between Sweden and New Zealand. We ping a server belonging to the University of Waikato from Stockholm, and record the following round-trip times in milliseconds. 290 388 299 290 462 292 291 293 293 308 292 292 290 294 292 333 348 292 292 293 293 292 460 408 290 350 475 290 We want to tell our
- Laws of SuccessionFeb 02, 2026[email protected] (kqr)
Rajiv Prabhakar presents us with a hypothetical: You and your friend are walking by a magic store and find a trick coin. You toss it 14 times and end up with 10 heads. Your friend thinks at least one of the next two tosses will end up tails, and is willing to offer you $10 in an even-money bet on it. Should you take him up? This is a fancy way of asking, (Continue reading the full
- Solving Systems of Equations FasterJan 28, 2026[email protected] (kqr)
Here’s an example of a system of equations I came across. \[\left\{\begin{array}{l} & 4x & - & 3y & = & -17 \\ - & 2x & + & y & = & 7 \end{array} \right.\] There’s a fast way to solve this, which is to take two of the lower equation and add to the upper equation. This makes the \(x\)’s cancel out and removes some of the \(y\)’s, leaving us with (Continue reading the full article on
- Survival Analysis of the Supreme CourtJan 26, 2026[email protected] (kqr)
The 2026 ACX prediction contest asks whether any justice of the Supreme Court (SCOTUS) will leave during the year. Well, actually it asks whether one of two things will happen: Congress enacts a bill that changes the number of seats in the SCOTUS; or a sitting justice officially leaves office. The first condition seems extremely unlikely. All actual changes to the size of the SCOTUS happ
- Nvidia Stock Crash PredictionJan 19, 2026[email protected] (kqr)
One of the questions of the 2026 ACX prediction contest is whether Nvidia’s stock price will close below $100 on any day in 2026. At the time of writing, it trades at $184 and a bit, so going down to $100 would be a near halving of the stock value of the highest valued company in the world. It’s an interesting question, and it’s worth spending some time on it. If you just want the answer
- ACX 2025 Prediction Contest RetrospectiveJan 14, 2026[email protected] (kqr)
The last few questions of the ACX 2025 prediction contest just resolved. This means we can take stock of what went right and what went wrong. My preferred metric of forecasting performance is the average blind Brier score, since this is what’s popularly used as a reference for comparison across forecasting contexts. In the ACX 2025 contest, I achieved a Brier score of 0.21 – the same as in th
- You Need A Kitchen Slide RuleJan 12, 2026[email protected] (kqr)
Kitchen work is all about proportions: sometimes the recipe is for four servings but you need six; maybe the recipe calls for 80 g of butter but you only have 57 g, so you have to adjust the other ingredients to match. We could use an electronic calculator to figure out the rescaled amounts, but a slide rule makes it so much easier. The picture above was taken while following a recip
- Disaster Costs, 1900–2024Jan 05, 2026[email protected] (kqr)
Here are the costliest natural disasters per year, since 1900. This covers only single events; it does not count longer-running processes like multi-year droughts. (Continue reading the full article on the web.)
- Updated LLM Benchmark (Gemini 3 Flash)Dec 29, 2025[email protected] (kqr)
I evaluate LLMs by how well they play text adventures. The last update I made was when Haiku 4.5 was released. Now that Google has released a preview of Gemini 3 Flash, I had to run the benchmark again. I had expected it to blow the other models out of the water, which it did … almost. The following plot illustrates the distribution of the relative scores achieved by each tested model. (
- Go in 9×9 is AwesomeDec 21, 2025[email protected] (kqr)
As readers of the premium newsletter know, I have been playing some more go recently. In particular, thanks to the release of the book Mastering Mini Go, I have discovered how exciting go on a 9×9 board is. I feel like this faster-paced, smaller game has taught me a lot, because it is so rich in feedback. This comes from it being very unforgiving. Small-ish mistakes quickly lose the game, and that
- Military Standard on Software Control LevelsDec 17, 2025[email protected] (kqr)
The MIL-STD-882E standard specifies levels of software control, i.e. how dangerous the software can be based on what it is responsible for. Although the standard is a little more complicated, we can simplify to essentially four levels: The most alarming case is when the software has direct control of something that can be immediately dangerous if the software does the wrong thing. Still dange