A place for musings, observations, design notes, code snippets - my thought gists.
btop of your resources
btop
is now my default terminal resource monitor, supplanting top
, htop
, and all the others of that ilk. I wanted to spare a few words for its beautiful (and functional!) text-based user interface (TUI):
- pane management:
btop
divides your terminal window into multiple information-dense panes displaying CPU, memory, network, and process information simultaneously. What’s fantastic aboutbtop
is that user ergonomics and customisation are clearly front and centre: each pane is numbered, and toggling off/on a pane is as simple as pressing the corresponding pane number. Instead of fiddling with a config file and refreshing (as many other command-line tools require), you can effortlessly switch between panes on-the-fly. - command input: In a similar vein, attached to each pane is a set of commands that configure that view. A single letter of the command is highlighted in red, and pressing that letter will toggle that filter/sort/configuration in that panel. Putting the commands front-and-centre shifts the mental burden of recalling “What command displays my processes hierarchically” (
e
) from searching the manual to just looking at the screen. - global configuration: if you want your customisations to be sticky across sessions, there’s a cleanly navigable and expressive configuration window that lets you apply globally persistent configurations. This is much nicer than setting command line flags or editing a config file.
- cursor support: Despite running in a terminal, you can simply click on processes to select them, or use scroll wheels to navigate long lists. This blending of terminal efficiency with GUI-like interactions creates a really slick experience that respects both keyboard purists and those who don’t mind the forbidden practice of mouse navigation.
- process management: As an added bonus, selecting any process will allow you to send any signal straight from the TUI.
What makes btop
stand out is its intuitive keyboard navigation system. Unlike many other CLIs, btop
maps essential functions to single keystrokes. This design philosophy means the interaction mode gets out of the way - toggling through complex system information and controls is always just a keystroke away. To borrow from The Design of Everyday Things, this feels like a set of masterfully crafted affordances.
Of course, this only works because of the constraints of what btop
provides - unlike other CLIs with more complex combinations of configurations, resource management is effectively a set of independent components tied together into a master ‘view controller’.
The Outsider by Albert Camus
Just finished The Outsider by Albert Camus (also known as The Stranger). Reading it felt like walking through an impressionist painting. Finishing it, one is left with a slightly blurred picture of a life — bleak yet nostalgic, emotionally distant yet resoundingly poignant.
One feels as much an Outsider to the book as the protagonist himself.
Some highlights:
- New word learnt: “lading”: put cargo onboard a ship
- Wine with lunch! How quintessentially French…
- Trams everywhere! A halcyon stalwart construction of bygone days
Despite the surrealism, everything feels strangely real - detached, yet vivid. The first-person voice and inner monologue makes everything feel in equal parts clear and blurry. I don’t know how much the various English translations differ, but this edition felt super crisp and readable. I was expecting it to be a more ponderous read, but the langauge was fresh and crisp.
Reading it in the autumn made me think
Existentialism is to falling leaves as a book is to trees — both are susurrations of impermanence; one traces the shedding of meaning, the other preserves. What is lost and what remains.
2025 Australian Election Forecast Model
My friend, Dania Freidgeim, created a probabilistic model of First Preference votes for the 2025 Australian Federal Election. Australia uses a Preferential voting (Instant-runoff) system, which makes this a really interesting exercise! Please go check it out!
Structured outputs from LLMs
This is more of a “to-do” than anything, but I really love the idea of inference-time next-token probability-distribution hacking to enforce structured outputs. There’s this neat Python library outlines that I’d love to explore in more depth - it even supports context-free grammars for output guiding!
To uv or not to uv
uv
is a blazing fast Python package manager that aims to displace pip
. It’s a really slick tool that lets you go from git clone
to executing code with all the dependencies seamlessly. All the standard accolades apply: written in Rust, beautiful terminal UI, well thought-out user ergonomics … all written by Astral, the same company that gave the Python community ruff
.
But what makes it so damn fast? Under the rusty hood, the magic is even more impressive. Charlie Marsh, the project lead, presented at Jane Street and revealed some of the inner workings. The whole talk is super interesting, but some standout highlights are:
uv
has it’s own SAT solver implementation to resolve dependency package versions much faster than e.g.pip
orconda
. (@16:09
)- Interesting tricks around implementing efficient representations of dependency metadata in Rust data structures to allow super-fast solves. The team effectively wrote their own package version number parser and represented them cleverly inside a single
u64
to enable fast dependency comparisons as scalar integer comparisons. (@25:47
) - Some very clever usage of HTTP Range Requests to heuristically slice into compressed PyPi
.zip
package archives to parse package metadata from package registries, without having to retrieve the entire.zip
from PyPi first. (@31:42
) - A very clever cache design to enable super fast ephemeral Python venv creation, with some Rust zero-copy serialisation magic. (
@34:49
,@37:27
)
So, to uv
or not to uv
? I’d definitely give uv
a try - it really makes Python feel like magic.
Inverse UMAP transforms
TIL that the dimensionality reduction algorithm UMAP1 has support for inverse transforms!
Naturally, these are lossy inverses, but being able to generate novel examples of, for example, handwritten digits (yep, classic MNIST once again) is exceedingly cool.
The example images of handwritten digits here are sampled from the compressed planar space, and “inverted” into the original “image space”.
On a related note, the whole explanatory article for UMAP is a beautiful work of exposition, full of rich ideas that make one ponder deeply. I only wish I understood everything in here end-to-end.