Slow Moving

Posted on Oct 15, 2022

Its been hard to marshal energy to get up to much. The combination of changing weather, a birthday, and Thanksgiving in short succession makes me a bit of a slug. Rather than get too hung up on it I’ve been embracing 🎃 Spooky October vibes 🎃 and watching a lot of horror movies (some good, most bad).

Monarch

Lately

Despite being a slug I did find some time for a small project that needs a bit of backstory.

Blightmud

The Backstory

Most MUDs are played over Telnet, but using a vanilla Telnet client makes for a miserable experience. Serious enjoyment requires niceties like scripting and support for extra protocol additions like GMCP, TLS, and charset negotiation. Some folks prefer graphical clients, and excellent free software like Mudlet sprung up in recent years to offer a polished, multi-platform, graphical MUD client perfect for those people.

Personally I’ve always preferred terminal clients because of how nicely they work over SSH paired with Tmux. Historically my MUD client of choice (for 15+ years!) has been TinyFugue. Unfortunately, its development is fragmented, it uses a custom scripting language (ugh) and it’s implemented in C (ugh++).

Thankfully within the last year I discovered an excellent alternative: Blightmud. It’s actively developed, supports TLS, uses Lua for its scripting language, and is implemented in Rust. What’s not to love?

In A Bind

Writing an initial NixPkgs derivation turned out to be a little bit challenging because of Blightmud’s optional text-to-speech accessibility feature (MUDs are quite popular with people that have visual impairments). Getting this working requires customizing rust-bindgen and the LIBCLANG_PATH so that the Cargo build of the speech-dispatcher-sys crate can find the speechd libraries it requires. At the time I wrote the first derivation I found Hoverbear’s blog post on the subject and it made this 100x easier to figure out. 🦸

The derivation has remained mostly unchanged until last week when I discovered a nice way to clean up all that extra configuration. It turns out the extra preBuild and path fiddling to get bindgen configured can be replaced by a hook that was added to the shared Rust platform framework in ~Feb: rustPlatform.bindgenHook.

A quick cleanup PR later and the derivation is now much shorter and a lot less custom. It felt good to cut out that complexity and it was interesting to read through the platform framework implementation of the hook (see here, here, and here) to compare to the approach I used.

Thinking about

Chopping Mall

Until next time

🤖💬 THANK YOU, HAVE A NICE DAY