news
Programming Leftovers
-
Undeadly ☛ Game of Trees 0.123 released
The Game of Trees Hub now hosts an OpenBSD git repository mirror.
-
Brent Simmons ☛ inessential: Why Not Objective-C
At my last job, at Audible (hi Audible folks, if you’re reading this!), I led the effort to port our remaining Objective-C to Swift. When I started that project, Objective-C was about 25% of the code; when I retired it was in the low single digits (and has gone even lower since, I’ve heard).
Why do this? It was working code! Don’t we all know not to rewrite working code?
-
Curling IO ☛ Background Jobs Without the Baggage
In most web stacks, adding background jobs means adding infrastructure: Redis, Sidekiq, a separate worker process, a monitoring dashboard, another thing to deploy and keep running. Curling IO Version 2 uses Delayed Job backed by PostgreSQL, which works well but requires a separate worker daemon alongside the web process.
Curling IO Version 3 runs on the BEAM (Erlang's virtual machine), and background jobs are just another process in the same runtime. No Redis. No separate worker. No additional infrastructure. This post covers how we built it, why we chose SQLite persistence over in-memory queues, and how the whole thing fits into a few hundred lines of Gleam.
-
The Builders ☛ Gleam is boring, so I went to a conference about it
What I actually mean is that it’s a straightforward, predictable and stable language. It’s simple, and coming from the fast-moving world of TypeScript, where every month brings a new framework and every problem brings 10 ways to solve it, I am not used to simplicity.
-
Andrew Nesbitt ☛ Git in Postgres
A git repository is a content-addressable object store where objects go in indexed by the SHA1 of their content, plus a set of named references pointing at specific objects by hash. The on-disk format (loose objects as individual files, packfiles as delta-compressed archives with a separate index, a ref store split between a directory of files and a packed-refs flat file with a locking protocol that breaks on NFS) is an implementation detail. The protocol for synchronising objects and refs between repositories is what actually matters, and since git-the-program is just one implementation of it, you can swap the storage backend without clients noticing.
-
ITNEXT ☛ Cell. An architectural pattern.
As a matter of fact, forming a Cell tackles the complexity of an overgrown service without leaking any implementation details to its clients or committing to irrevocable architectural decisions. We will be able to make gradual changes to our Cell’s code and structure as our clients see only the Published Language [DDD] of our Cell’s API via its Cell Gateway, which thus becomes an Open Host Service [DDD].
-
Python
-
Jeff Triplett ☛ How I Use django-simple-nav for Dashboards, Command Palettes, and More
I first got exposed to django-simple-nav while working with Josh Thomas at the Westervelt Corporation over the last two or three years. It quickly became a go-to library in my toolkit. django-simple-nav lets you define nav items and groupings in Python, then hand them off to a Django template to render. I use it for sidebars, headers, dashboards, and other spots where I need a menu.
Since then, I have also started using it on a lot of personal projects. It has been a great fit every time.
-
Wrlach ☛ `uv run` isn't always what you want
Like many others, I've joined the cult of uv. One superpower is that you no longer really need to think of activating a virtual environment in a project managed with this tool, uv run path/to/script.py will do the right thing. You don't have to think about whether the virtual environment exists or is up to date, uv takes care of that under the hood and then runs your script inside the environment.
-
-
Shell/Bash/Zsh/Ksh
-
University of Toronto ☛ How to redirect a Bash process substitution into a while loop
In some sorts of shell scripts, you often find yourself wanting to work through a bunch of input in the shell; some examples of this for me are here and here. One of the tools for this is a 'while read -r ...' loop, using the shell's builtin read to pull in one or more fields of data (hopefully not making a mistake). Suppose, not hypothetically, that you have a situation where you want to use such a 'while read' loop to accumulate some information from the input, setting shell variables, and then using them later. The innocent and non-working way to write this is: [...]
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 640
Hello and welcome to another issue of This Week in Rust!
-