Wilfred

@wilfredh.bsky.social

Programming languages, human factors, and a healthy dose of Emacs.

I've started using DNSControl for configuring DNS for my personal domains and it's been delightful. Declarative DNS! I get comments (the DSL is just JS), history (it's in git) and trivial rollback! I've switched my DNS provider to Hetzner (which is free!) to use this.

I eventually learned that there's a 'correct way up' for USB A cables. The two small holes should be on top. Tragically not all power adapters get this right, even for name brands. My ability to get the cable right first time still isn't much better than 50%!

I love how JS makes project-specific imports unambiguous: `import "./project-dir/foo"` versus `import "installed-pkg/foo". I've been doing the same in my PL. I've just realised that `import "/home/wilfred/project/foo"` now works too. It's weird but probably harmless?

I've had a surprising amount of success asking an LLM to try projects in my toy programming language and report language or tooling issues. Today it noticed that foo(bar,) is syntactically legal but assert(bar,) is not. The parser error is poor in this case too. A real UX bug!

Difftastic 0.71 is out! This is a polish release, still well worth upgrading: * A ton of performance improvements, especially for nasty corner cases. * Improved C++, Dockerfile, Haskell, JavaScript, Makefile, Perl, Ruby, Rust, Scala and TypeScript. github.com/Wilfred/diff...

Release 0.71.0 · Wilfred/difftastic

Difftastic is a structural diff tool that understands syntax. See the manual to get started, and the changelog for historical changes. Diffing Improved performance, particularly for line-based diff...

github.com

I've been experimenting with LLM autoresearch. I prompted Sol to make difftastic faster without changing output on the test suite, and log everything it tried: github.com/Wilfred/diff... It found some interesting performance tweaks, although it's too tolerant of complexity.

difftastic/PERF_RESEARCH_LOG.md at c6e9c6fed4c71276a8b0e377c92695c3d929dc7f · Wilfred/difftastic

a structural diff that understands syntax 🟥🟩. Contribute to Wilfred/difftastic development by creating an account on GitHub.

github.com

Are there many good static analysis tools for CSS? I have website projects in both Django and Express that almost certainly have unused rules due to unused classes.

I've given up migrating my VPS hosts to newer distro versions. Instead, I'm trying to rebuild a new host with the newer distro version. I'm slowly making all my server config reproducible and automated as a result :)

The literal 0xffu8 in Rust is pretty tricky to read without syntax highlighting. It looks like a plain hexadecimal value at first. (Why not have syntax highlighting? Ironically I was debugging and improving VS Code's Rust highlighting.)

I don't use subagents much: I usually want to discuss and iterate on the subtask. Subagents are typically unattended. I find myself writing md files for a new session to read. Are there any harnesses that treat forking as a first class feature?

Implementation chicken: When there's an obvious feature gap in an ecosystem and everyone is waiting for someone else to write it. I see this most frequently with OSS toolchains. Basic functionality in new programming languages is another common scenario.

I'm debating whether `from foo import *` is a bad feature for my toy programming language. Forcing `import foo as f` and later `f::bar()` is so much more amenable to local static analysis. You also don't get issues with name clashes. It's certainly convenient though.

As a kid I didn't particularly like bosses in games: they were a bother that you couldn't skip. Now, I see so many bosses with *amazing* designs. I think I'm just less intimidated. Platformers also let you wait until you're ready more often too.

I carefully document `cargo install --locked` for difftastic users, I carefully use `--locked` for CI, and I've just realised that all my release builds totally ignore it! Oops. Anyone using my prebuilt binaries have been getting different Unicode width calculations in display.

Today in cursed C code: void foo(int32_t int32_t, int32_t bar); Since C puts identifiers and typedefs in the same namespace, this code just produces a confusing compile error about the type of bar! (This occurred in some real code after macro expansion.)

I've learning more about Zellij, and it increasingly feels like a nice tiling window manager for working in terminals. My mental model for tmux and screen was that their main focus was persistence (detach/attach between SSH sessions). Zellij seems to focus on layout.

I find myself just taking photos of documents for submitting forms, rather than scanning. Scanning still feels more 'official' (a PDF instead of a JPG) but the sheer convenience of using a phone wins every time. I've rarely seen organisations complain about photos.

Playing with Zellij this week (a terminal multiplexer like screen/tmux) and it's worked great so far. It's nice having many short-lived, named terminal sessions on a remote machine. Normally I'd have multiple iTerm windows, but they end up with huge histories.

Compiler error messages is such a deep topic. Even in rustc, a mature compiler that invests effort in diagnostic quality, I find interesting issues every few months. (The majority have been fixed pretty quickly, so it's really rewarding to file issues.)

I'm reaching a point where I want a declarative, GitOps style workflow for DNS for my personal projects. Anyone have opinions? The obvious options seem to be Terraform or DNSControl.

I'm surprised there aren't more interpreted languages with a first party type checker. Python has several good type checkers, Ruby has Sorbet, and there are others. Having zero compilation time *and* a full IDE seems like such a compelling design, at least on paper.

I periodically see "diffstatic" as a typo of difftastic. I quite like it: makes me think of 'ecstatic' rather than 'fantastic'. I've eventually configured typos CLI to prevent this spelling on the difftastic repo, but it makes me smile every time.