An Engine For An Editor

A common trope is how, if one wants to build a game, one should build a game, rather than a game engine, because it is all too easy to fall into a trap of building a generic solution, without getting to the game proper. It seems to me that the situation with code editors is the opposite — many people build editors, but few are building “editor engines”. What’s an “editor engine”? A made up term I use to denote a THIN WAIST the editor is build upon, the set of core concepts, entities and APIs which power the variety of editor’s components. In this post, I will highlight Emacs’ thin waist, which I think is worthy of imitation!

Source: An Engine For An Editor, an article by Alex Kladov.

PEP 709 – Inlined comprehensions

Comprehensions are currently compiled as nested functions, which provides isolation of the comprehension’s iteration variable, but is inefficient at runtime. This PEP proposes to inline list, dictionary, and set comprehensions into the code where they are defined, and provide the expected isolation by pushing/popping clashing locals on the stack. This change makes comprehensions much faster: up to 2x faster for a microbenchmark of a comprehension alone, translating to an 11% speedup for one sample benchmark derived from real-world code that makes heavy use of comprehensions in the context of doing actual work.

Source: PEP 709 – Inlined comprehensions, an article by Carl Meyer.

GHC 9.6.1-rc1 is now available!

The GHC team is very pleased to announce the availability of the first (and likely final) release candidate of GHC 9.6.1. As usual, binaries and source distributions are available at

Beginning with GHC 9.6.1, GHC can be built as a cross-compiler to WebAssembly and JavaScript. This is an important step towards robust support for compiling Haskell to the Web, but there are a few caveats to be aware of in the 9.6 series:

  • Both the Javascript and WebAssembly backends are still at an early stage of development and are present in this release as a technology preview
  • Using GHC as a cross-compiler is not as easy as we would like it to be; in particular, there are challenges related to Template Haskell
  • GHC is not yet run-time retargetable; a given GHC binary targets exactly one platform, and both WebAssembly and JavaScript are considered platforms for this purpose. Cross-compilers must be built from source by their users

We hope to lift all of these limitations in future releases.

Additionally, 9.6.1 will include:

  • Significant latency improvements in the non-moving garbage collector
  • Efficient runtime support for delimited continuations
  • Improvements in compiler error messages
  • Numerous improvements in the compiler’s memory usage

See the release notes for a comprehensive accounting of changes in this release.

Source: GHC 9.6.1-rc1 is now available!, an article by Ben Gamari.

Your Client Side State is a Lie

SPAs are really hard to get right, but what exactly is hard about them? As always, its state, but a specific kind of state.

Whenever you fetch data from the server and store that data in any shared state management solution, your application is very often lying to your users.

Source: Your Client Side State is a Lie.

Irregular expressions

Regular expressions are fascinating to me. On one hand, they can be extremely succinct, expressive, and efficient. On the other hand, they can be basically write-only. They come with a simple but powerful theory that leads to efficient implementations. Sadly, many implementations ignore the theory in order to offer additional features, at the cost of worst-case exponential complexity.

It is possible, however, to implement some of those additional features, and still operate in worst-case linear time. The implementation (~400 lines of Rust) even fits in a single blog post! The full code is on GitHub, and the commit history lines up with the blog post if you want to follow along.

Source: Irregular expressions, an article by Tavian Barnes.

My grand unified theory of Nix documentation

Since the last post I've been in contact with some members of the Nix community with regards to joining the documentation team. From that discussion and my experience with other ecosystems I've had some ideas rolling around about what the ideal Nix documentation strategy/ecosystem would look like to me, so I'm putting those ideas in writing to start a discussion and generate ideas. These ideas aren't super concrete and I don't speak for anyone else, but they're my vision for how Nix documentation could better serve experienced users and onboard new ones.

Source: Nix journey part 1: My grand unified theory of Nix documentation, an article by Zach Mitchell.

The limitations of deep learning

In general, anything that requires reasoning—like programming, or applying the scientific method—long-term planning, and algorithmic-like data manipulation, is out of reach for deep learning models, no matter how much data you throw at them. Even learning a sorting algorithm with a deep neural network is tremendously difficult.

Source: The limitations of deep learning, an article by Francois Chollet.

Why I Will Never Use Alpine Linux Ever Again

Nowadays, Alpine Linux is one of the most popular options for container base images. Many people (maybe including you) use it for anything and everything. Some people use it because of its small size, some because of habit and some, just because they copy-pasted a Dockefile from some tutorial. Yet, there are plenty of reasons why you should not use Alpine for your container images, some of which can cause you great amount of grief...

Source: Why I Will Never Use Alpine Linux Ever Again, an article by Martin Heinz.

Safety and Soundness in Rust

Rust is designed around safety and soundness. Roughly speaking, safe code is code that doesn't use the unsafe keyword, and sound code is code that can't cause memory corruption or other undefined behavior. One of Rust's most important features is the promise that all safe code is sound. But that promise can be broken when unsafe code is involved, and unsafe code is almost always involved somewhere. Data structures like Vec and HashMap have unsafe code in their implementations, as does any function like File::open that talks to the OS. This leads to a common question: "If Rust can't guarantee that all safe code is sound, how can it be a memory-safe language?" It's hard to give a short answer to that question, so this post is my attempt at a medium-length answer.

Source: Safety and Soundness in Rust, an article by Jack O'Connor.

CSS System Colors

In another episode of “I’ve been a web designer for how long and am only now learning about this?” let’s talk about CSS system colors.

Source: CSS System Colors, an article by Jim Nielsen.

You Don't Need a Build Step

Sites take time to build these days. A large Next.js 11 site will take several minutes to build. This is wasted time in the development cycle. Build tools like Vite or Turbopack highlight their ability to get this number down.

But the deeper question hasn't been considered:

Why do we even need a build step?

Source: You Don't Need a Build Step, an article by Andy Jiang.

Sleepy cat

While having a drink inside Brasserie Mirell Esme spotted a cat in one of the planters. When we left the restaurant I checked if the cat was still there, and it was. When I petted it, it woke up just a little.

Sleepy cat
Sleepy cat.

M3GAN (2022)

A robotics engineer at a toy company builds a life-like doll that begins to take on a life of its own.

In the evening Adam, Alice, Esme, and I watched M3GAN. I liked the movie and give it a 7 out of 10.

Unnatural History

Los Angeles is a city of stark contrast, the palaces of the affluent coexisting uneasily with the hellholes of the mad and the needy. That shadow world and the violence it breeds draw brilliant psychologist Dr. Alex Delaware and Detective Milo Sturgis into an unsettling case of altruism gone wrong.

On a superficially lovely morning, a woman shows up for work with her usual enthusiasm. She’s the newly hired personal assistant to a handsome, wealthy photographer and is ready to greet her boss with coffee and good cheer. Instead, she finds him slumped in bed, shot to death.

The victim had recently received rave media attention for his latest project: images of homeless people in their personal “dream” situations, elaborately costumed and enacting unfulfilled fantasies. There are some, however, who view the whole thing as nothing more than crass exploitation, citing token payments and the victim’s avoidance of any long-term relationships with his subjects.

Has disgruntlement blossomed into homicidal rage? Or do the roots of violence reach down to the victim’s family—a clan, sired by an elusive billionaire, that is bizarre in its own right?

Then new murders arise, and Alex and Milo begin peeling back layer after layer of intrigue and complexity, culminating in one of the deadliest threats they’ve ever faced.

In the evening I started in Unnatural History, an Alex Delaware novel by Jonathan Kellerman.

How do Nix builds work?

Hello! For some reason after the last nix post I got nerdsniped by trying to understand how Nix builds work under the hood, so here’s a quick exploration I did today. There are probably some mistakes in here.

Source: How do Nix builds work?, an article by Julia Evans.

Paradise Highway (2022)

A truck driver has been forced to smuggle illicit cargo to save her brother from a deadly prison gang. With FBI operatives hot on her trail, Sally's conscience is challenged when the final package turns out to be a teenage girl.

In the evening Esme and I watched Paradise Highway. I liked the movie and give it a 7 out of 10.

Long time no see! While I have a few other, longer blog posts still cooking, I figured I’d post about a cool bit of CSS I came across on eli_oat’s site which adds a marker to every link on a site that points to an external domain.

Source: Styling External Links, an article by Jake Bauer.

Demystifying bitwise operations, a gentle C tutorial

Bitwise operations are a fundamental part of Computer Science. They help Software Engineers to have a deeper understanding of how computers represent and manipulate data, and they are crucial when writing performance-critical code. Truth being said, nowadays, they are rarely used in the business code we write, and they stay hidden in libraries, frameworks, or low-level system programming codebases. The reason is simple: writing code that operates on bits can be tedious, less readable, not always portable, and, most importantly, error-prone. Modern programming languages nowadays have higher-level abstractions that replace the need for bitwise operations and “constructs”, and trading (potential) small performance and memory gains for readability is not such a bad deal. Plus, compilers are more intelligent nowadays and can optimise your code in ways you (and I) cannot even imagine.

Source: Demystifying bitwise operations, a gentle C tutorial, an article by Andrei Ciobanu.

Rust's BufRead, And When To Use It

Rust is a low-level language, and its standard library is careful to give the programmer lots of control over how things will behave and avoid implicit behavior, especially when that behavior impacts performance. But at the same time, it doesn't want to make the programmer's life harder than it needs to be. As a result, Rust's language features and standard library often give you access to really low-level concepts with no assumptions baked in, but then also give you abstractions you can optionally layer on top.

One example of this is the Read and BufRead traits. Read is a low-level and unopinionated abstraction for ingesting data from things like files, network sockets, and process input, while BufRead represents a specific kind of layer you can choose to put on top of Read to make it slightly higher-level.

Source: Rust's BufRead, And When To Use It, an article by Brandon Smith.

Beware microbenchmarks bearing gifts

Benchmarks are only a tool for debugging efficiency: Production is ultimately what matters. Benchmarks analyze the performance of code under the specific circumstances created and maintained by the benchmark. They cannot perfectly predict the performance of code in the real world. In this episode, we discuss some of the pitfalls of microbenchmarks and mitigation strategies.

Source: Performance Tip of the Week #39: Beware microbenchmarks bearing gifts, an article by Chris Kennelly and Alkis Evlogimenos.

Some notes on using nix

Recently I started using a Mac for the first time. The biggest downside I’ve noticed so far is that the package management is much worse than on Linux. At some point I got frustrated with homebrew because I felt like it was spending too much time upgrading when I installed new packages, and so I thought – maybe I’ll try the nix package manager!

nix has a reputation for being confusing (it has its whole own programming language!), so I’ve been trying to figure out how to use nix in a way that’s as simple as possible and does not involve managing any configuration files or learning a new programming language. Here’s what I’ve figured out so far! We’ll talk about how to:

  1. install packages with nix
  2. build a custom nix package for a C++ program called paperjam
  3. install a 5-year-old version of hugo with nix

Source: Some notes on using nix, an article by Julia Evans.

Stop insisting that Git branches are nothing but refs

Git users think about branches and talk about branches. The Git documentation talks about branches and many of the commands mention branches. Pay attention to what experienced users say about branches while using Git, and it will be clear that they do not think of branches simply as just refs. In that sense, branches do exist: they are part of our mental model of how the repository works.

Source: I wish people would stop insisting that Git branches are nothing but refs, an article by Mark Dominus.

Use GNU Emacs

This document was originally written around 1997 for GNU Emacs version 19.29 and published under the title A Tutorial Introduction to GNU Emacs. It has subsequently been updated for version 28.2, and thoroughly revised and expanded. This is document version 28.2.43 and is an unfinished work-in-progress.

Source: Use GNU Emacs, an article by Keith Waclena.

The Most Useful Command Line Tools (2023 edition)

In the last few years, there has been a renaissance in command-line utilities. If you are still using utilities written 30 years ago (groan) you will be in for a surprise. The functionality might be the same but the UX(or is it developer experience) is a million times better.

These are some of the best command line utilities I've come across, ones I highly recommend.

Source: The Most Useful Command Line Tools (2023 edition), an article by Shantnu Tiwari.

Nix journey part 0: Learning and reference

I've been following the Nix project for a while but now that I'm done with my PhD I finally have some free time and energy to try using it in earnest. This series is going to be me learning Nix by showing you how things work and how to put the pieces together.

For those of you unaware, Nix takes reproducible builds to their logical conclusion by making package builds (mostly) pure functions of their dependencies. The binary artifacts of builds are stored in a content-addressed store (the Nix store) so you can be sure that you're always getting the same package if you have its name and hash. Not only can you build programs this way, but you can also build development environments ("I want these libraries available in my build environment and nothing else", for example), run commands in throw-away environments with specific packages installed without polluting your global environment. There's even an operating system, NixOS, based on this packaging system that allows you to configure your whole system (installed packages, system settings, etc) from a single file.

Source: Nix journey part 0: Learning and reference materials, an article by Zach Mitchell.

Python is two languages now, and that's actually great

I am of the belief that currently, Python is actually two very similar programming languages sharing the same name. This certainly isn't a surprise to anyone who's been using Python for a while. What might be a surprise, though, is that I think this is actually a good thing. The languages, let's call them untyped Python and typed Python, even though sharing a very large common base are fundamentally different in how they enable the developers using them to solve problems.

Source: Python is two languages now, and that's actually great, an article by Tin Tvrtković.

Terraria Expo Houten

In the morning my brother Marco picked us up to go to the Terraria Expo in the city of Houten, near the city of Utrecht. I had been looking forward to this expo for quite some time and was considering to buy two tarantulas that were on my wish list for some time:

  • Monocentropus balfouri (Socotra Island Blue Baboon tarantula)
  • Tliltocatl albopilosus (Curlyhair tarantula)

Soon after we had entered the expo building a man walked towards us holding a ferret. Alice loved the ferret and soon was holding the excited animal. While I took some photos she got softly bitten in her chin by the ferret.

Alice holding a Mustela furo (ferret)
Alice holding a Mustela furo (ferret).

After we had looked a bit around in the small area with mostly rodents we entered the large one with many tables. Soon we came upon the table of Dawid Staroń's Exotic Spiders. In the past I had ordered three tarantula slings with Dawid. Sadly, after some time, two died. I still keep the Ephebopus cyanognathus, which remains mostly well hidden.

Dawid Staroń's Exotic Spiders
Dawid Staroń's Exotic Spiders.

The majority of the tables was assigned to selling reptiles and amphibians. We looked at the beautiful but pricey snakes on display. At the table of EC Reptiles I took several photos of Python regius on display.

Python regius on display
Python regius on display.

After some more walking we came upon the table of the Belgian Tarantula Breeding Team. They had both spiders I wanted; a large female Monocentropus balfouri and an even larger female Tliltocatl albopilosum [sic]. But since we where half way the large expo area I decided to keep looking around a bit more.

Belgian Tarantula Breeding Team
Belgian Tarantula Breeding Team

A while later I decided to return and make the purchase of the two tarantulas I had seen. I paid €70 for the Monocentropus balfouri and €50 for the Tliltocatl albopilosus. Female tarantulas are more expensive because they live much longer compared to males.

After the expo we decided to have lunch. My brother knew a place nearby but sadly it was loaded and no space for us. So we went to another restaurant he knew in the city of Zoetermeer. After a nice late lunch he dropped us of at our home.

Tliltocatl albopilosus in her terrarium
Tliltocatl albopilosus in her terrarium.

Back home I repurposed two terrariums, large plastic containers, that belonged to animals that sadly had passed away. The first one for the Tliltocatl albopilosus female. Moving her from the small plastic container into the terrarium went easy. The terrarium had already a starter burrow which she soon after found and used to hide from view.

Monocentropus balfouri in her terrarium
Monocentropus balfouri in her terrarium.

Next, I moved the Monocentropus balfouri into her terrarium. This was a bit more challenging: the spider moved way faster than the previous one even before I had opened the container she came in. After I carefully had removed the lid I carefully pushed her with a large tweezer I had also bought at the expo. She threat posed a few times but nothing serious.

Acanthoscurria geniculata eating a superworm Zophobas morio
Acanthoscurria geniculata eating a superworm Zophobas morio

After I had housed the two new tarantulas I fed the following four tarantulas each a superworm Zophobas morio — I had bought two small containers at the expo as well:

  • Acanthoscurria geniculata female (actually Adam's tarantula)
  • Chromatopelma cyaneopubescens
  • Pterinochilus murinus RFC
  • Ephebopus cyanognathus

I didn't feed the Psalmopoeus irminia because the spider had closed its cork tube with silk.

Critical or High-Severity Vulnerabilities in Containers

An alarming 87% of container images running in production have critical or high-severity vulnerabilities, up from 75% a year ago, according to the "Sysdig 2023 Cloud-Native Security and Usage Report." Yet only 15% of those unpatched critical and high-severity vulnerabilities are in packages in use at runtime when patches are available.

Source: 87% of Container Images in Production Have Critical or High-Severity Vulnerabilities, an article by Jeffrey Schwartz.

Go test and parallelism

I was recently debugging an issue in some integration-style Go tests which made me realize that I didn't have a very deep understanding of how parallelism works when using go test. I knew that there were ways that Go could parallelize tests, and I thought it had something to do with using t.Parallel() inline in each of my test functions.

Because I feel the concurrency behavior of go test is non-obvious, and for posterity so I don't forget in the future, I wanted to write something up here to document my understanding of how go test parallelization works as of Go 1.19.

Source: go test and parallelism, an article by Bryce Neal.

The Whale (2022)

A reclusive, morbidly obese English teacher attempts to reconnect with his estranged teenage daughter.

In the evening Esme and I watched The Whale. I liked the movie and give it an 8 out of 10.

Wordsmithing in Emacs

Emacs has long had a competent spell checker, and it's capable of distinguishing code from prose, which is useful to many. But Emacs 28 adds a compelling dictionary lookup feature that warrants a much closer look.

Source: Wordsmithing in Emacs, an article by Mickey Petersen.

Step-by-Step Guide: Installing Proxmox VE

Looking to set up a virtualization server? Proxmox is a popular choice for IT professionals and tech enthusiasts alike. With its user-friendly interface and powerful features, Proxmox makes it easy to run virtual machines on your own hardware. In this guide, we’ll walk you through the process of installing Proxmox on your server. Whether you’re new to virtualization or a seasoned pro, we’ve got you covered.

Source: Step-by-Step Guide: Installing Proxmox VE, an article by Silvester Benjamin.