aconfmgr is a configuration manager for Arch Linux.


You can read the details of what aconfmgr is and what it does in the README; instead, here I’m going to write my personal reasons for creating aconfmgr.

Setting up my Arch Linux system (to how I liked it) was a non-trivial effort. As I was going to switch my laptop to Arch soon as well (it was running Kubuntu at the time), I did not look forward to redoing all that work again, or any time I’d need to set up a new machine. I also did not look forward to having to install and configure the same packages on other machines after doing so on one; and I especially did not look forward to having to set up the system from scratch all over again should I mess something up (and not even knowing what broke it).

So, I decided to spend a month (yeah, how hard can writing a simple pacman wrapper be?) on writing aconfmgr instead. Continue reading →


Snipes is a 1983 text-mode action game.

David Ellsworth (Deadcode) managed to reverse-engineer and reimplement it as a Windows program, perfectly preserving the original game’s behavior, and adding replay recording and playback. The source code of the port has been published on GitHub, with the game’s original authors’ permission.


My contribution was to port the game to SDL / Linux. (David then later ported the SDL code back to Windows, thus making it an option.)

More info on the vogons.org thread.

Note: this article is back-dated, and was originally written on 2018-11-05.

Infinifactory mod

Infinifactory is a wonderful 3D puzzle game from Zachtronics. I’ve had a lot of fun with it, but was dissatisfied with some aspects of the UI, and decided to have a go at fixing these myself.

Feature summary:

  • Solution management
    • Unlimited solution slots
    • Solution renaming
  • Block editing
    • Rotate selection
    • Flip selection
    • Clone selection
    • Add to selection
    • Select thing
    • Quick delete

More information and download link in the announcement on reddit.

Unfortunately, the mod is now outdated, and difficult to update due to the game’s use of obfuscation. (I might still do this if there is enough demand and further game updates become unlikely, but probably not otherwise.)

Note: this article is back-dated, and was originally written on 2018-11-06.


hax11 is a hackbrary to Hook and Augment X11 protocol calls.

I initially created hax11 to work around poor MST support in Linux GPU drivers; however, its use outgrew its initial purpose. hax11 was initially based on kislotniq’s simple dell4khack library, however it no longer shares any code with its ancestor, and now uses a different approach (intercepting the X11 socket connection instead of library calls). Continue reading →

One year with the Truly Ergonomic keyboard

In late 2013 I started thinking about switching to an ergonomic keyboard. I did not have wrist pain or other health issues – although preventing them is a good reason as well, I mainly wanted to improve my productivity.

The key layouts on typical keyboards are vastly suboptimal: the alphanumeric keys are staggered (a carryover from mechanical typewriters), and important keys (modifiers, Backspace, Return, arrow keys) are too hard to reach. Although this is often worked around in software (e.g. hjkl movement keys in vi, Colemak remapping Caps Lock as Backspace), it is much more effective to fix the keyboard instead.

I was looking at three options:

I ruled out TypeMatrix due to keylock (I think lack of NKRO is not acceptable for a high-end keyboard), and the Kinesis struck me as overly bulky – I wanted something I could take with my laptop (the TECK’s hand rest is removable).

Truly Ergonomic’s customization choices basically boil down to whether you want one big button (Model 227) or two small ones (Model 229) on the bottom corners of the keyboard, whether you want blue, brown or clear Cherry MX switches, and whether you want blank or QWERTY keycaps. My selection was Model 229 with brown switches and blank keycaps (using Dvorak for a decade, and I planned to reprogram the keyboard anyway). I ordered it on 2014-02-02 from The Keyboard Company and received it on 2014-02-06.

Model 229 TECK with blank caps.

I’m writing this on 2015-05-25, so it’s been about 16 months. Here are my notes so far: Continue reading →

The amazing template that does nothing

I’ve recently started using a new pattern more often in new D code, namely use of the Identity template.

The Identity template (available in std.traits, although undocumented), is declared as follows:

alias Identity(alias X) = X;

This is a short-form of a template declaration, and is synonymous with the explicit form:

template Identity(alias X)
    alias Identity = X;

As this is an eponymous template, the instantiation is replaced with X (the only template parameter). Thus, Identity!(anything) is aliased away to anything.

So, what use is a template which does nothing?

I’ve found a number of interesting uses for it: Continue reading →

Very Sleepy CS is now Very Sleepy

I am delighted to announce that my fork of the Very Sleepy profiler, Very Sleepy CS, has been blessed as the official repository by Richard Mitton (Very Sleepy maintainer). As such, the Very Sleepy homepage has been updated to point to the GitHub repository and list the forked releases since Richard’s last release. You can also read Richard’s announcement on his blog.

I have already reverted the name change in the source code, though the currently-newest release (v0.90) is still labeled with the old name. The next release will call itself Very Sleepy again.


ae.utils.funopt is a std.getopt enhancer:

import std.stdio, ae.utils.funopt;

int run(bool verbose, string input, string output)
	// ...
	return 0;

int main(string[] args)
		return funopt!run(args);
	catch (Exception e)
		stderr.writeln("Error: ", e.msg);
		return 1;

Running program --verbose input.txt output.txt will cause run to be called with the appropriate arguments. Continue reading →