Compaction in Pi
A blog post I wrote for Earendil, where I'm currently working: How Compaction Works in Pi
Software engineer from Norway
A blog post I wrote for Earendil, where I'm currently working: How Compaction Works in Pi
A while ago I wrote a small file watcher in Go for my own use with an accompanying blog post . I needed a tool that I could just plop in front of the command I was running as part of my iteration loop. I use it for recompiling C files when I modify them, reload gcc main.c -o main && ./main and for rebuilding and reloading my static site on file changes. reload make It has two modes. If one or more…
I want to write more! I like the format of Tom MacWright 's Recently posts. So here's what I've been doing and thinking about recently, for the first month of 2026. # Family My wife and I just had our third child at the start of this year - our third son! The older boys are 5 and 3, and they are very proud to have a baby brother. I have to say, it's so lovely to have a baby! And family life with…
This site is now built using a static site builder that Claude Code wrote for me. Iterating on the site is so much fun now! If you're a software engineer and not currently using AI for coding, I hope this post can entice you into giving it a try. You might be underestimating how good it is! # Previous version The site used to be built using Hugo which is a popular, feature complete static site…
I read 16 books this year. The full list is at the bottom, and on Goodreads . These are the books I recommend. Mostly nonfiction, one fiction. # Breakneck: China's Quest to Engineer the Future by Dan Wang Dan Wang is a China expert whose book came out this year. The main idea in Breakneck is that the US is a lawyerly society while China is an engineering state, and at the same time the two peoples…
I finished 9 books this year, in total 2006 pages . That is on the lower end of reading since I started tracking, not that anyone's counting! ▁▃█▅▃▄▃▁ As usual, recommendations in bold. Below I'll briefly say something about each book. Tidy First? A Personal Exercise in Empirical Software Design (2024) by Kent Beck The Death of Ivan Ilyich (1886) by Leo Tolstoy Blood Meridian (1985) by Cormac…
I wrote reload , my own file watcher! The last year and a half I've been making my way through CSPrimer . It consists of hundreds of computer science problems, so working through these means I'm writing hundreds of small programs. Like most programming, it's a very iterative process where I tweak my program and rerun it, typically switching from my editor to run a command. gcc main.c -o main &&…
This is a living document. Martin Hafskjold Thoresen Andrew Healey Ben Hoyt Phil Eaton Justin Jaffray ( newsletter ) Julia Evans Dan Luu Erik Bernhardsson James Routley Ben Kuhn Evan Miller Paul Graham Steve Yegge 1 Steve Yegge 2 Thomas Ballinger Eli Bendersky Simon Eskildsen Bryan Cantrill Adam Leventhal Sean Goedecke Patrick Dubroy
I read 11 books this year, in total 4488 pages . I would recommend all of the books in bold. That turned out to be almost all of them. Below the list I'll group the books and talk a bit about each book. How the World Really Works: A Scientist's Guide to Our Past, Present and Future (2022) by Vaclav Smil A Promised Land (2020) by Barack Obama Working in Public: The Making and Maintenance of Open…
I read 14 books this year, spanning 5878 pages . Not too bad with two kids of 0 and 2 years. I'm trying something new this year, so instead of just listing out the books I'm also going to group them and say something about them. As always, those in bold were my favourites. Master of the Senate (2002) by Robert Caro The Making of Prince of Persia: Journals 1985 - 1993 (2011) Jordan Mechner The…
I wrote a paid blog post for LWN.net on a freelance basis: What's coming in Go 1.18
I've worked full time as a software engineer for around two and a half years, since May 2019. Almost all of the code I've written has been in closed-source repos, but occasionally I've ran into something somewhere else that I was able to fix. I compiled a list of the pull requests (PRs) I've submitted that have been accepted upstream. There are 15 PRs in total, and most of them are typos in…
Below is a list of the 12 books I read this year, spanning 4244 pages ( according to Goodreads ). This is less than 2018 (16) , 2019 (40) , and 2020 (23) , but considering this is my first full year with a toddler, I'm pleased! Those in bold were my favourites. Hard Drive: Bill Gates and the Making of the Microsoft Empire by James Wallace and Jim Erickson The Dark Forest by Liu Cixin How the…
Simon Willison and others ( Josh Branchaud , David Winterbottom ) have started posting their Today I Learned snippets, or TILs for short. Occasionally over the past couple years, I've noted down a useful command, fact or code snippet in a folder. Instead of just keeping these in a private Git repo, I decided to do the same: I created a site on Netlify with the subdomain - which was super easy, by…
As part of my development workflow, I usually run some integration tests. An integration test means that code interacts with some outside dependency. This could be a temporary Postgres server in a Docker container, or it could be an HTTP server. These dependencies usually take some time to start. In particular, enough time to start that our tests would fail if we ran them immediately after…
Below is a list of the 23 books I read this year ( 8151 pages ). Those in bold were my favourites. See also what I read in 2018 and 2019 . Flow by Mihaly Csikszentmihalyi Super Pumped by Mike Isaac Educated by Tara Westover In the Company of Giants by Rama Dev Jager and Ortiz Rafael Uncanny Valley by Anna Wiener Inside the Mind of Xi Jinping by François Bougon Founders at Work by Jessica…
Pipes are cool! We saw how handy they are in a previous blog post . Let's look at a typical way to use the pipe operator. We have some output, and we want to look at the first lines of the output. Let's download The Brothers Karamazov by Fyodor Dostoevsky, a fairly long novel. > wc -l karamazov.txt 36484 karamazov.txt If we cat this file, it will be printed to the terminal. > cat…
This fall, my colleague and I discovered a bug in the unittest module in Python. In January, my PR was merged onto the cpython master!
This year I read 40 books, surpassing my goal of 30 ( see my year in books on Goodreads ). I'm pleasantly surprised at how much reading it's possible to get in, just by reading when commuting and in various idle windows during the afternoon. Last year I read 5k pages over 16 books , whereas this year I read 12k (12137). Below is a list of the books I read. Those in bold are especially recommended,…
I wrote an op-ed in DN, the biggest Norwegian financial daily newspaper about how entrance to Norwegian universities is broken and extremely expensive for the Norwegian state: https://www.dn.no/innlegg/utdannelse/samordna-opptak/medisin/forbedring-av-vitnemal-gir-meningslos-slosing/2-1-643154
I am starting to realize that the Unix command-line toolbox can fix absolutely any problem related to text wrangling. Let me tell you about a problem I had, and how I used some Unix command-line utilities to solve it. # The problem I'm working on research for my master thesis. As with many statisticians, I am running a lot of simulations. I first simulate some data according to some numerical seed…
As a kid I read a lot of books. Not so the last couple of years. In 2018 I managed to get thoroughly into reading again. There is just so much to learn, and the more I read, the more I want to read. If you're interested, this is my Goodreads account . In 2018, I apparently read 5267 pages total over 16 books (see My Year in Books on Goodreads ). I'm pretty satisfied with that. The themes of the…
Today I learned that in Python 3, one can enforce the use of keyword arguments in functions! Consider a function for doing safe division. Several things can go wrong when doing division directly, and therefore we might want to use a function which could handle possible errors. One possible error is dividing by zero. This is an undefined operation, and it will raise an error. Another is that in…