Posted by bundie 6/24/2025
I can't afford much n the way of software, so I've been trying to learn to make do with FOSS.
Here's a little toy I made. Try to keep the comet on-screen by clicking to spawn a planet: https://ssl.pepas.com/gravity/gravity.html
Written in C / SDL 1.2: https://ssl.pepas.com/gravity/
Checking out Linus’ first commit of Git and comparing it with my own solution was also very interesting (and humbling).
If anyone is interested, here’s my toy Git implementation in Go https://github.com/emanueldonalds/shit
I'm sure I'll keep buying commercial games from companies with reasonable terms (GOG, maybe?). But writing my own is great fun. It'd be nice if someone else enjoys them, but they're mainly for my own enjoyment.
Oh, and I "vibe code" the old fashioned way: with a REPL and some chill tunes.
2) Console must be registered online before becoming playable in handheld mode.
3) Nintendo recently released a terms of service update in which they reserve the right to disable your console if they catch you violating acceptable use. Switch 2s found using piracy carts have not yet been bricked this way, only locked out of internet play (like original Switches were), but still...
4) Some Switch 2 games will not get a physical release, only a cartridge which provides an "activation key" for a digitally downloaded game. Why even bother with this bullshit, I don't know, because it's all of the downsides of physical media and all of the downsides of digital downloads, with none of the upsides of either. On a console.
But I do like writing programs in some strange new, non-CS domain where very little software to address my very particular needs already exists. Most of the software I've written in the last few years has been of this kind, for the purposes of learning Finnish. It is amazing what a few shell scripts, fzf wrappers, and well-timed calls to an LLM can do for accelerating one's own learning process.
It's like cooking a beautiful and tasty gourmet recipe that serves only one.
I work on Dart professionally. I've also been tinkering on a toy programming language that may never see the light of day. My toy language has gone through several incarnations but a while back I was working on adding algebraic datatypes, pattern matching, and exhaustiveness checking to it.
The canonical algorithm for exhaustiveness checking is this paper by Luc Maranget: http://moscova.inria.fr/~maranget/papers/warn/warn.pdf
When I first started dabbling in programming languages over a decade ago, I tried to understand that paper for weeks and just could not wrap my head around it. I don't have much of a formal CS background and that paper was impenetrable to me.
So here I am tinkering on my toy programming language and I run into again. I give it another try and laboriously implement it in my interpreter, basically doing a straight translation. I don't understand the code, but it seems to sort of work. So then I start refactoring it a tiny bit at a time into a style that fits the way I think about code. Eventually the algorithm sort of folds into itself and before I know it, I finally understand how it works. The end result was only a page or so of code, but my toy language had real exhaustiveness checking work.
Meanwhile, at work, I am working on adding pattern matching and exhaustiveness checking to Dart [1]. Exhaustiveness checking here is a much harder proposition because Dart has subtyping, unlike my toy language and the ML languages that Maranget's paper works on.
I'd been hacking away at an exhaustiveness algorithm for Dart based on a couple of papers about Scala's approach but they were sort of approximative and inelegant (in my opinion, maybe they are a great fit for Scala).
But once I understood Maranget's algorithm from implementing it in my toy project, it finally clicked for me how it could be adapted to work with subtyping in a sound, coherent way. I wrote it up as quickly as I could and (with a lot of additional help from a teammate to handle generics), that became the algorithm we shipped:
https://github.com/dart-lang/language/blob/main/accepted/3.0...
It wouldn't have happened if I hadn't coincidentally been working on a toy pattern matching implementation at home.