week 45, 2021

How Python list really works

This post is largely about the arrays — the #1 data structure in the world. If you are not a data structure guru yet, I guarantee that you will better understand Python lists, their advantages and limitations. If you already know everything — there is no harm in refreshing the key points.

Source: How Python list really works, an article by Anton Zhiyanov.

It's Now Possible To Sign Arbitrary Data With Your SSH Keys

Did you know that you can use the ssh-keygen command to sign and verify signatures on arbitrary data, like files and software releases? Although this feature isn't super new - it was added in 2019 with OpenSSH 8.0 - it seems to be little-known. That's a shame because it's super useful and the most viable alternative to PGP for signing data. If you're currently using PGP to sign data, you should consider switching to SSH signatures.

Source: It's Now Possible To Sign Arbitrary Data With Your SSH Keys, an article by Andrew Ayer.

Async Cancellation I

Sometimes we start things but decide midway through that we would prefer to rather not be doing them. That process is sometimes referred to as cancellation. Say we accidentally clicked "download" on a large file in the browser. We should have a way to tell the computer to stop downloading it.

Source: Async Cancellation I, an article by Yoshua Wuyts.

Alice Through the Looking Glass (2016)

Alice returns to the whimsical world of Wonderland and travels back in time to help the Mad Hatter.

In the afternoon we watched Alice Through the Looking Glass. I liked the movie and give it a 7 out of 10.

tags: [rust] ...

Rust data structures with circular references

To implement its safety guarantees, the Rust compiler keeps careful track of ownership and references throughout a program. This makes writing certain kinds of data structures challenging; in particular, data structures that have circular references.

Source: Rust data structures with circular references, an article by Eli Bendersky.


In the afternoon, on the way to our new house, Alice and I encountered a duck with four ducklings. Since I had a lunchbox with me with some bread; I had forgotten to take my lunch to work yesterday, we gave some to the ducks. I noticed that there where only four ducklings while I recalled there were five originally.

Five ducklings and their mother
Alice feeding the five ducklings and their mother.

When Alice and I continued our trip by bike we encountered the missing duckling calling for its siblings and mother. Alice tried to goad the duckling back to its family but it was very scared. Luckily we still had some bread left which worked better. And soon the duckling was reunited with its family.

Ready Player One (2018)

When the creator of a virtual reality called the OASIS dies, he makes a posthumous challenge to all OASIS users to find his Easter Egg, which will give the finder his fortune and control of his world.

In the evening we watched Ready Player One. While quite different from the book its based on I did like the movie; 7.5 out of 10.

Make your monorepo feel small with Git’s sparse index

One way that Git scales to the largest monorepos is the sparse-checkout feature, which allows you to focus on a subset of the files. This is supposed to make it feel like you are actually in a small repository, even though you are contributing to a large repository.

There’s only one problem: the Git index is still large in a monorepo, and users can feel it. Until now.

Source: Make your monorepo feel small with Git’s sparse index, an article by Derrick Stolee

Git Techniques at Risk Ledger

Using git can be daunting at first. Like my good friend Chris once said, "everyone knows the happy path but the minute it gets hairy we're all screwed".

I've decided to take a closer look at what git commands our engineering team uses on a day to day to get out of hairy situations.

Source: Git Techniques at Risk Ledger, an article by Bruno Calogero.

Twelve Years of Go

Today we celebrate the twelfth birthday of the Go open source release. We have had an eventful year and have a lot to look forward to next year.

Source: Twelve Years of Go, an article by Russ Cox.

Taming the Moose: Classing up Perl attributes

The lesson as always is to check CPAN (or the appropriate mix of your language’s software repository, forums like Stack Overflow, etc.) for anything that could conceivably have application outside of your particular circumstances. Twenty-five years into my career and I’m still leaping into code without first considering that someone smarter than me has already done the work.

Source: Taming the Moose: Classing up Perl attributes, an article by Mark Gardner.

Upcoming Features in Go 1.18

Go 1.18 will be a significant release of the programming language that will contain some major features that I’m excited about. The upcoming version is scheduled for early 2022. The first beta should be out in a month. Let’s take a look at some of the new features that will be available.

Source: Upcoming Features in Go 1.18, an article by Sebastian Holstein.

The Trouble with Peace

Peace is just another kind of battlefield . . . Savine dan Glokta, once Adua's most powerful investor, finds her judgement, fortune and reputation in tatters. But she still has all her ambitions, and no scruple will be permitted to stand in her way. For heroes like Leo dan Brock and Stour Nightfall, only happy with swords drawn, peace is an ordeal to end as soon as possible. But grievances must be nursed, power seized, and allies gathered first, while Rikke must master the power of the Long Eye . . . before it kills her. Unrest worms into every layer of society. The Breakers still lurk in the shadows, plotting to free the common man from his shackles, while noblemen bicker for their own advantage. Orso struggles to find a safe path through the maze of knives that is politics, only for his enemies, and his debts, to multiply. The old ways are swept aside, and the old leaders with them, but those who would seize the reins of power will find no alliance, no friendship, and no peace lasts forever.

In the evening I started in The Trouble with Peace, The Age of Madness book 2 by Joe Abercrombie.

Plugins in Rust: Reducing the Pain with Dependencies

The last article of this series covered how the plugin system could be implemented from scratch. This is a lot of work if you’re dealing with a relatively large codebase and therefore a complex interface in your plugin system, so let’s see how we can make our lives easier. I’ve been wanting to try abi_stable for this since the beginning, which was specifically created for plugins. But we aren’t really locked to that crate, so I’ll show other alternatives as well, which can even be combined to your liking.

Source: Plugins in Rust: Reducing the Pain with Dependencies.

Lesser Known PostgreSQL Features

Most of us are not aware of all the features in tools we use on a daily basis, especially if it's big and extensive like PostgreSQL. With PostgreSQL 14 released just a few weeks ago, what a better opportunity to shed a light on some lesser known features that already exist in PostgreSQL, but you may not know.

Source: Lesser Known PostgreSQL Features, an article by Haki Benita.