nix-freeze-tree

Posted on January 25, 2020 by Jack Kelly
Tags: nix, haskell, coding

I really like using Nix to build and manage my computers. Declarative machine definitions are incredibly powerful, and NixOS actually achieves what tools like Ansible and Chef have tried to reach for.

This web site is served from a NixOS machine, and is a collection of static files which get copied across by nix copy when it sends the built NixOS expression to the server. Until recently, my built website lived in a single derivation, which meant that any time I changed anything, a full rebuild of the site would get sent up my terrible internet connection.

I have written a tool to split up the big derivation called nix-freeze-tree (Hackage). It lets me split the website derivation down to individual files, and symlink them together back into the tree I want. The individual derivations are fixed-output derivations, which means that Nix knows the hash of the files before it builds the derivation, and can check the hash of the files to copy and skip files that haven’t changed.

If you’re reading this, then I’ve successfully wired nix-freeze-tree into my site build pipeline and deployed it.

Ergodox Firmware with Nix

Posted on January 8, 2020 by Jack Kelly
Tags: keyboards, nix

A few years back, I bought an Infinity Ergodox. I’ve been very happy with it, especially once I customised the firmware to add keybindings for my Haskell work.

Unfortunately, the kiibohd repos have broken Infinity Ergodox support for some time, and nobody seems to care. Getting a working build involves jumping through some hoops, and even then modern GCC has slightly different semantics for inline functions, so it needs another patch on top of that.

Pulling all this together is the sort of thing that Nix excels at, so I threw together some Nix expressions to build the firmware, and to give me a shell with dfu-util for flashing. I’ve uploaded them to SourceHut for reference.

Texturing the Game

Posted on October 31, 2019 by Jack Kelly
Tags: netrunner, gaming, game-design

Android: Netrunner (A:NR) was one of Fantasy Flight’s “Living Card Games” (LCGs). These are a line of card games where you buy some base or “core” set of cards, and the publisher releases smaller additional packs each with a fixed set of cards.

In the early years of A:NR’s run, the single most controversial card was Account Siphon (“Siphon”), pictured below alongside other cards that synergised with it. A lot of words were written about Siphon, arguing that it was “overpowered”, or “balanced”, or “unfair”. In this article, I’m not going to argue those questions. I’m instead going to talk about how Siphon warped the rest of A:NR around itself, and that it is good to have cards like because they give a game something I call “texture”.

The Big 3 Criminal Cards: Account Siphon, Gabriel Santiago, Desperado

Read more...

Avoid "Just" and "Simply" in Documentation

Posted on September 20, 2019 by Jack Kelly
Tags: writing, rants

I am often annoyed by technical documentation that uses words like “just” and “simply” to prefix procedures that users are expected to perform. Such words are almost always waffle, and cutting them is almost always an improvement. When you see “just” or “simply”, you can be almost certain the action that follows is anything but. Instead of fixing the root problem, the documentation unconvincingly tries to paper over it.

“Just” and “simply” also insult the reader’s intelligence: the author is afraid that readers will run screaming if not constantly reassured that It Really Isn’t That Bad. If the instructions are deficient in any way, the reader will blame him or herself instead of the responsible party - the author. Again, there are better fixes: make the procedures acutally simple, and make the documentation actually clear and concise. Strunk and White may have gone out of fashion, but I believe that “omit needless words” is timeless. If you disagree, take it up with Orwell. (“If it is possible to cut a word out, always cut it out.”)

Just use the delete key and simply remove the offending words from documentation you write.

On Jank, or: Why aren't you Playing the Main Game?

Posted on September 15, 2019 by Jack Kelly
Tags: netrunner, gaming

Between 2012 and 2015, I played a lot of Android: Netrunner, almost all of it at organised competitive events. Despite all that, my tournament results were never particularly good. I made Top 4 at a Store Championship once, and at larger events (regionals or above) I’d sometimes squeak into Top 16 if I had a lucky strength of schedule (the sum of all your opponents’ points, used as a tiebreaker at the end of the Swiss rounds).

Why wasn’t I doing better? A big part of that was my refusal to play the known-good decks other people were playing. Why not? To answer that, we need to talk about Jank.

Read more...
All Posts | RSS | Atom
Copyright © 2020 Jack Kelly
Site generated by Hakyll (source)