In the afternoon I finally finished To Green Angel Tower, Part 2, part 2 of book 3 of Memory, Sorrow and Thorn by Tad Williams. I liked the trilogy and recommend it if you like to read fantasy.
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.
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.
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.
tmux has an interesting quirk in the way it handles environment variables that if you’re not careful can cause some seemingly strange behavior.
Source: Be Careful Using tmux and Environment Variables, an article by Andrew Jorgensen.
Nox is an incredible tool, I use it for all my Python projects, highly recommend it. One of the best features of nox and tools like it is parameterization. Usually this is done for the test suite portion where you want to run your test suite on many different Python versions (and maybe other things like dependency versions).
Source: Testing multiple Python versions with nox and pyenv, an article by Seth Michael Larson.
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.
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.
git submodules are always the wrong solution. Yes, even the to the problem they were specifically invented to solve.
Source: Never use git submodules.
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.
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.
Follows a woman checking into a psychiatric ward to investigate a homicide.
In the evening Esme and I watched God's Crooked Lines. I liked the movie and give it a 7 out of 10.
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
Readis a low-level and unopinionated abstraction for ingesting data from things like files, network sockets, and process input, while
BufReadrepresents a specific kind of layer you can choose to put on top of
Readto make it slightly higher-level.
Source: Rust's BufRead, And When To Use It, an article by Brandon Smith.
Work on c++23 standardisation is well in progress and we already have a couple of new features to play with. Toolchain support varies but some early testing is already possible. I’ve prepared a list of features that I, personally appreciate a lot and which most definitely will improve my code.
Source: New C++23 features I'm excited about, an article by Tomasz Wisniewski.
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.
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:
Source: Some notes on using nix, an article by Julia Evans.
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.
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.
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.
In short: in my experience, if a single programmer builds something, it’s often hard for others to maintain later. There are several possible reasons why. Even great programmers fall into this trap!
Source: The lone developer problem, an article by Evan Hahn.
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.
We at Determinate Systems are extremely excited to announce the release of the Determinate Nix Installer, a brand-new installer for Nix. You can run the installer on a variety of systems, including macOS, Linux, Windows via WSL2, and more.
Source: Introducing the Determinate Nix Installer, an article by Graham Christensen.
Those are the strengths of the newtype pattern: You create your name and slap a bunch of traits on it to explicitly and intentionally tell what the purpose of this struct is. The API speaks for itself, and it becomes much clearer what we can expect.
Source: Refactoring in Rust: Abstraction with the Newtype Pattern, an article by Stefan Baumgartner.
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ć.