The other day I saw a link to delta, which is a tool that integrates with git to add both add better diff highlighting (similar to what you’d see in the GitHub/GitLab web UI) and syntax highlighting. I decided to give it a try. There’s even a note in the JJ docs on how to set it … | Continue reading
Just over four months ago—in a post celebrating the 10th birthday of my website—I wrote: What will the site look like in another ten years? Have I reached the optimal design, or has drudging through ten years of website screenshots inspired a proper redesign? Wait until 2034 to f … | Continue reading
In response to my previous post I got asked when something is a DSL versus just being an API. Of course if you’ve defined a separate grammar and written a parser for that grammar and use that to solve a problem in your specific domain, then you’ve got a DSL. But a lot of the time … | Continue reading
So this one takes a bit of explaining but we’ll get there in the end. The Mockito when() function has a really subtle trap that can lead to unexpected behaviour. For the longest time I thought it was because the authors wanted a slightly cleaner API, but after some more thought I … | Continue reading
I just came across this post while doing some background reading for another project. I know people that do this kind of thing and it always seemed like a bit of a hack, but putting the non-breaking space in the prompt just pushes this over the line of being probably-robust enoug … | Continue reading
JJ has become enough of a must-have tool that I wanted to have my dotfiles install it automatically. In install.sh I install a handful of utilities via apt, but JJ does not have a Debian/Ubuntu package so I have improvised something. It’s a little bit of a hack. You can download … | Continue reading
Ok I need to put a really heavy caveat at the start here: I am not a Rust expert. I wouldn’t even call myself a Rust novice. I’m more of a Rust admirer. I’ve spent plenty of time trying to learn Rust and then just going back to Crystal whenever I actually want to get something do … | Continue reading
I just bought a new (second-hand) TV—upgrading from my 42” 1080p second-hand TV to the latest 55” 4K second-hand TV1—and I can’t get over the volume control. This is what it looks like: The TV was cheap because of the panel defect around the edge. It appears on the left edge of t … | Continue reading
In git you can do something like HEAD~ to refer to the parent commit of HEAD. Mercurial has a similar feature called revsets which JJ took inspiration from (including the name). The revset language is a declarative query language—not unlike SQL—that lets you specify a set of revi … | Continue reading
A few weeks ago Eugen Rochko (creator of Mastodon) published a new photography portfolio website. This quickly made me want to improve my own photography website. Eugen’s site puts more of a focus on small groups of photos, and makes the photo metadata prominent—Eugen shoots on f … | Continue reading
So here’s something terrible that I’ve just done. Enthusiastic readers with an attention to detail (especially those who read the RSS feed) will notice that all my posts are published at midnight. This is actually a lie—I do usually write posts late at night, but I don’t carefull … | Continue reading
Imagine for a minute that I had a pair of apricot trees in my garden. I don’t actually have a garden, so you’ll have to imagine that I have one of those too. I love a nice fresh ripe apricot. However, I can’t eat every single apricot that comes off the trees—there are just too ma … | Continue reading
So here’s a weird thought: can you merge two repositories in JJ? I have just ended up in a weird state (for unimportant reasons) where I had a remote repo and a local repo that diverged entirely due to me rewriting the commit history. I was going to delete the local copy and re-c … | Continue reading
There is almost nothing built-in to your computer, phone, tablet, etc that allows you to interact directly with someone else’s computer. If you have a photo on your phone, and your sitting next to someone with their phone, the easiest way to transfer the data between those two de … | Continue reading
I love a good closure, but not all languages have a good syntax for writing them. What makes a good closure? What does your closure syntax say about your language? Do you call them lambdas, blocks, closures, or anonymous functions? Does Will know how to end this intro? Go Let’s s … | Continue reading
This year I’m running the Sydney Marathon, and so I’ve got a lot of running on the cards for the next few months. I’ve been using an Apple Watch to track my runs since early 2019, first a series 3 and now a series 8. Here’s what I’m using to keep track of training and races. Work … | Continue reading
About three weeks ago my previously-trusty Roborock S6 (named Henry) stopped halfway through a clean. Usually this means that he found a tasty looking cable or shoelace and got tangled up, but when I got home he was just sitting in the hallway unobstructed. I popped him on his ba … | Continue reading
So I just wrote about the version control operations that I use day-to-day. My new favourite thing is JJ—a git-compatible version control system that I’ve also written about before—so I thought I would explain how each of these operations are done with JJ. View what’s about to be … | Continue reading
Often I see people dismiss complaints about a particular version control system’s usability1 because you “just need to learn like six commands”2, and so it doesn’t matter that some things are complicated, because you won’t use them day-to-day. If you do use them, it’ll be infrequ … | Continue reading
I spent a bunch of time learning how to use JJ properly after I gave up on git. Up until this point, I had been dumping commits directly onto main and just pushing the branch occasionally. I had avoided learning the pull/merge request flow because it’s not something I use on pers … | Continue reading
My website is now ten years old! How willhbr.net appeared as this was posted. Ten years ago today I made the first commit to this website, consisting of just an index.html with the contents: Sup. Thankfully it didn’t stay like that for long (just over three hours) and soon after … | Continue reading
On Mastodon I saw this toot showing a tangle of interconnected AWS services used to host a Wordpress site. I don’t speak AWS so it looks confusing.1 One of the replies linked to this post, which I’d come across last week. Seeing it twice was clearly a sign to share my thoughts. O … | Continue reading
Blogroll, incomplete, early 2024, presented without comment, in no particular order. 500 Mile Email: The Wi-Fi only works when it’s raining Bob Nystrom stuffwithstuff: What Color is Your Function? Mat Duggan: Fixing Macs Door to Door Nikita Prokopov: The Absolute Minimum Every So … | Continue reading
tl;dr: I’ve been using jj for version control in my personal projects and it makes me much happier than using git. Continue reading for lukewarm takes on the git CLI. Firstly I’ll just get some disclaimers out of the way: I only use git (now JJ) for personal projects, I don’t use … | Continue reading
In my previous post about how I wrote a compiler that turns Python code into a tmux config file that makes tmux evaluate the program by performing actions while switching between windows. My implementation relies on a feature in tmux called “hooks” which run an command whenever a … | Continue reading
You can use features of tmux to implement a Turing-complete instruction set, allowing you to compile code that runs in tmux by moving windows. I feel like I really have to emphasise this: I’m not running a command-line program in tmux, or using tmux to launch a program. I can get … | Continue reading
I’m a very heavy user of tmux, and like to share how I make the most of it. This was going to be a short list of some nice things to know and some pointers to features people might not be aware of, but then I realised it’s probably easier to just explain the stuff that I have con … | Continue reading
It is an accepted wisdom that it’s more important to write code that is easily read and understood, in contrast to writing code that is fast to write1. This is typically used in discussions around verbose or statically typed languages versus terser dynamically typed languages. Th … | Continue reading
For just over a month, my RSS reading has been self-hosted. Usually I’d write about this kind of thing because there was an interesting challenge or something that I learnt in the process, but it has basically been a completely transparent change. I’m still using NetNewsWire to d … | Continue reading
I thought of this as a single topic, but when I started writing it I realised that I was really thinking about two different things—scalability and capability—but after writing half of this I also realised that the broader idea that I’ve been thinking about needs to include both. … | Continue reading
The Upgrade Podcast just did a special episode with panellists drafting various Mac-related things for the 40th anniversary of the original Macintosh. Here are my pics: First Mac I was looking for an upgrade to my Acer netbook, trawling through second-hand computers. This was in … | Continue reading
At some point you’ve probably written or edited a config file that had the same block of config repeated over and over again with just one or two fields changed each time. Every time you added a new block you’d just duplicate the previous block and change the one field. Maybe you … | Continue reading
I find Discord baffling. Not in its popularity in group messaging for a class, team, or friend group—it seems fine at that—but the other, larger use cases. In 2020 and 2021 I learnt how to create digital art in Blender, the 3D modelling software. I watched both Clinton Jones’s vi … | Continue reading
Another challenge in my quest to not have any programming languages installed directly on my computer is installing programs that need to be built from source. I’ve been using jj in place of Git for the last few months1. To install it you can either download the pre-build binarie … | Continue reading
This site that you’re reading now is generated by Jekyll and hosted on GitHub Pages. Originally when I set this site up, GitHub Pages only supported their own limited set of plugins, and if you wanted to do anything extra you had to generate the HTML content yourself. In the inte … | Continue reading
On the topic of “thinking too much about things that you didn’t really want to think about”, have you considered just how hard it is to parse command-line arguments? Most tools—especially the battle-tested standard POSIX command-line tools—have this worked out pretty well, and wo … | Continue reading
Doing more than one thing at a time is still a somewhat unsolved problem in programming languages. We’ve largely settled on how variables, types, exceptions, functions, and suchlike usually work, but when it comes to concurrency the options vary between “just use threads” and som … | Continue reading
One of the major usability misses with pod was that it was tricky to setup a new project. My goal was remove the need for language-specific development tools installed directly onto my computer, but whenever I started a new project with pod, I would need to run crystal init to cr … | Continue reading
Since the start of this year—for some reason, I can’t put my finger on what—I’ve been reading far more RSS feeds and articles that I’ve come across. I’ve sporadically used RSS in the past, but never really got into a groove with it. Currently I’m using NetNewsWire, which is good … | Continue reading
Recently I attempted to learn about Swift’s async support by doing my favourite thing—writing an RPC framework. In this case the “RPC framework” is just a request/response abstraction over websockets (which are message-based), which makes the actual RPC bit very simple, as all it … | Continue reading
Yesterday I came across Warp Terminal via their advertisement on Daring Fireball.1 Immediately I was fascinated to know what their backwards-compatibility story was, and how their features were implemented. This is in a similar vein to the difficulties of modernising shells, that … | Continue reading
The curse of knowledge is the idea that as you become more of an expert in an area, it becomes harder to explain basic concepts in that area, because your assumed based level of knowledge is much greater than the typical level of understanding. Basically you might try and explain … | Continue reading
Avid readers will know that I like to fly my drone around the beaches in Sydney. The airspace is fairly heavily trafficked, and so I take the drone rules very seriously. This means no flying in restricted airspace (leading to other solutions for getting photos in these areas), no … | Continue reading
The next step in my containerising journey is setting up Prometheus monitoring. I’m not going to use this for alerts or anything fancy yet, just to collect data and see what the load and health of my server is and be able to track trends over time. In doing this I wanted: I don’t … | Continue reading
On the topic of the design decisions of a low-level system limiting the design space of things built on top of them, the design of programming languages has a significant impact on the APIs and software built using them. Go is heralded by the likes of Hacker News and r/programmin … | Continue reading
Anyone that knows me is probably aware that I spend a lot of time in the terminal. One of the many things that I have wasted time learning is the various oddities of shell scripting, and so I am cursed with the knowledge of the tradeoffs in their design. It seems to be something … | Continue reading
One of the key characteristics you want from a backup system is reliability. You want to minimise the number of things that can fail, and reduce the impact of each failure for when they do happen. These are not characteristics that would be used to describe my original backup sys … | Continue reading
Crystal is a statically typed language with the syntax of a dynamically typed one. I first used Crystal in 2016—about version 0.20.0 or so. The type of projects I usually work on in my spare time are things like pod, or my server that posts photos to my photos website. Type Syste … | Continue reading