atomicules

Mostly walking the dogs

Notes On Building Hammerdb On Netbsd

Some initial rough notes on building HammerDB on NetBSD. It has quite a unique build system - I don’t know if it’ll be possible to make a Pkgsrc package of this. For now I just wanted to see if I could get it to build at all.

  1. See github changes
  2. Need to install 7-zip: sudo pkgin install 7-zip
  3. Need to install tcl 9 (just for the header file; Since HammerDB is actually building tcl this step feels superfluous, maybe the header is available locally when building and I just haven’t found it yet?): sudo pkgin install tcl90
  4. To build the pgtcl package need:

     export PG_CONFIG=/usr/pkg/bin
    
  5. I had to set this to get it to find my include files:

     export C_INCLUDE_PATH=/usr/pkg/include/python3.12/:/usr/pkg/tcl/9.0/include/:/usr/include/
    

    The last /usr/include/ isn’t actually required, but I chucked it on there for good measure

  6. And for the pty.h requirement somewhere along the way, we actually need util.h so I had to symlink:

     sudo ln -s /usr/include/util.h /usr/include/pty.h
    
  7. To actually build:

     cd /home/simon/Code/github/TPC-Council/HammerDB/Build/Bawt-2.1.0
     ./Build-Linux.sh x64 Setup/HammerDB-Linux.bawt update
    

    For now I’m just stealing/tweaking the Linux files instead of adding BSD ones.


At some point whilst trying to get things to build I did this:

    sudo ln -s /usr/pkg/bin/python3.12-config /usr/pkg/bin/python3-config

But on a recent rebuild to check through this post this step wasn’t required (I deleted the symlink before rebuilding) and I can’t recall why I did this in the first place. But leaving this as a note just in case


Running the builds

Basically you need to copy and extract the build somewhere:

cd ../BawtBuild/Linux/x64/Release/Distribution
cp HammerDB-5.0-Dev-Linux.tar.gz /to/somewhere/else
cd /to/somewhere/else
tar xvzf HammerDB-5.0-Dev-Linux.tar.gz
cd HammerDB-5.0-Dev-Linux
./hammerdb

I haven’t been able to get the prod one to work yet - for sure it’s got to be linked to “linking” and something has been stripped that shouldn’t have. Not too bothered about figuring this out yet because the Dev build does run!

HammerDB running on NetBSD

For the cli the (default) tcl one works, but the Python one (./hammerdbcli py) doesn’t - I’ve done some initial debugging (editing and putting print statements in; another benefit of the Dev build is you can just edit the “built”scripts) and it’s something to do with not being able to find tclpys even though it is there.


Before going down the building route I did have a brief play with the pre-built binaries and NetBSD’s Linux emulation, but:

/home/simo...-ubuntu-22  $ ./hammerdbcli
./hammerdbcli: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by ./hammerdbcli)
./hammerdbcli: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./hammerdbcli)
./hammerdbcli: /lib64/libm.so.6: version `GLIBC_2.35' not found (required by ./hammerdbcli)

I.e. I didn’t have a modern enough glibc available, I only had 2.15 from the Suse Linux Compatibility package. I could, in theory, have tried tracking down a more modern one (because that’s how it works), but it felt easier to try to get the build working.

Exploring Syncing Notes With Fossil

For a long time I’ve toyed with the idea of replacing Simplenote with a Fossil repo of text files, more from an “owning your own data” point of view than anything else, but more “recently” since I stopped using Vim and switched to Helix. It’s probably not happening any time soon as Simplenote is still too convienent on mobile, but I thought I’d have a little play just because Fossil’s auto-sync is really neat.

  1. Created a repo on my (this) server, but a private one for now, not public
  2. Cloned that via ssh to my local machine: fossil clone ssh://me@linode/Code/fossil/repos/notes.fossil
  3. Then added a little “hook” to Helix via my mksh config like so:

     function hx {
       /usr/pkg/bin/hx $@
       if [[ $(pwd) == '/home/simon/Code/fossil/checkouts/notes' ]]
       then
         if [[ $(fossil extras) != "" ]]
         then
           fossil add $(fossil extras)
         fi
         fossil commit -m 'Auto-sync notes'
       fi
     }
    

    The idea being that if I am editing a note and then exit and save, Fossil will then automatically sync changes, including adding it if it’s a new note. The only downside to this is that if I suspend Helix (Ctrl+z) then that also triggers this and if I resume (fg) and then quit it won’t automatically sync.

  4. So I’ve also added a keybinding of fs to Helix to manually trigger a sync:

    [keys.normal.f]
    s = [":write", ':sh if [ "$(fossil extras)" != "" ]; then fossil add $(fossil extras); fi; fossil commit -m "Auto-sync notes"']
    

    (Slightly different syntax as it’s sh as opposed to mksh)

I can’t see me fully switching from Simplenote yet as I don’t have a good mobile solution (apart from using a sftp client on Android… hmmm… maybe), but it’s interesting to play about.

Just under three months later, got my revenge after the first attempt wrecked my knee. Now I need to decide if I’m going to try even further.

Back dated this post to match the run date

Note: Finally stopped pointlessly gzipping images on this site. Saves me 0.4GB. Worth it as space is tight.

Cadence

I can’t say I ever really cared about my running cadence - I just ran at what felt natural and comfortable. Turns out that is about 166 spm which seems to be the most average cadence out there.

I’ve had many knee issues over the years, but I don’t think I’ve had ITB issues until this year - the big difference there was how sudden it would come on and how debilitating it was. This was not a struggling through thing. I had to stop and walk. Which was an obvious concern for me on longer runs - I did not want to be facing a 10k+ walk/hobble back. So I did take it seriously.

I had a full week off running when I just did knee strengthening instead (I found it frustrating that this happened to me as I have actually taken lower body strength exercises seriously for the past three years) and then four weeks of building up gradually, running on the flat only and working on cadence. Cadence and stride/gait alignment (width) seem to be the recommended changes for ITB. I know I have a bad crossover gait as I kick my own feet sometimes when running, but I feel like it’s harder to consciously change this. Increasing cadence means a smaller and quicker stride and so perhaps because I am more conscious of my feet landing closer together this will actually naturally also push out my gait width.

I felt really stupid when I first tried to increase my cadence. It felt very unnatural, but having a boring out and back flat route was very useful for practising with this. I tried both slow paces with a high cadence and then my natural pace (between 4 to 5 mins per km) at a high cadence as well. I was mostly my own metronome and counted to myself, but some high paced punk (Snõõper) or dance (Ela Minus) does help. After some experimentation I found a smaller step cadence and pace that felt ok. I think it’s actually slowed my pace ever so slightly.

There aren’t many practical steps for increasing cadence (and not increasing pace at the same time), but basically it means intentionally taking smaller quicker baby steps. If you do high cadence running on the spot and then also at a slow a pace as possible then you should find your cadence increase at your natural pace. At times I’ve also found it helpful to think about moving my feet from my glutes as opposed to my knees (i.e. barely moving my knees) and also taking lighter floaty steps (almost skipping). It is 100% worthwhile doing all this on the flat as it’s harder to keep a consistent cadence uphill and off-road.

I have managed to make this change stick. Doing a before and after with my last six runs (i.e. some of my common routes) I’ve gone from an average of 164 spm to 175 spm. I’m happy with this. If I can keep it around 175 that is a decent difference.

Note: Strava embeds now seem to require a data-token

Garmin Forerunner 55 Vs Apple Watch Series 3

Garmin Forerunner 55 Vs Apple Watch Series 3

No one is buying either of these in 2026*. Unless you are me. And you got a Forerunner 55 for £60 on Vinted. So these are just observations and notes for my benefit really.

  • It turns off and on so quickly! To be fair, I didn’t often need to restart my Apple Watch and have only got in the habit of restarting the Forerunner after charging because of this bug.
  • I can almost do my base level of exercise and charge once a week going from 80% to 20% battery.
  • On that note, it’s a little depressing that I got this so I had the battery to do longer runs again and immediately injured my knee doing a 30k. Fortunately my knee is much better now and I’m back at half-marathon distance already
  • I like that Garmin tracks Intensity Minutes. My base level of exercise is based on hitting 75 minutes of vigorous activity and then doing the same amount of strength because I didn’t think I could fit in 150 minutes of moderate exercise. I’ve never counted all the dog walking so it’s been interesting seeing my actual Intensity Minutes end up much higher - last week I had 551 Intensity Minutes made up of 113 moderate and 219 vigorous (which count double).
  • WormNav is pretty cool. I have found an issue where it appears to get a GPS lock, but then isn’t actually updating or tracking. A restart will help. I suspect where I start might be in a GPS dead spot because I’ve noticed the same issue with Mappily. Mappily is a closer match to WorkOutDoors which is a fantastic Apple Watch App. I’m going to play about with Mappily and WormNav since there are pros and cons to both: WormNav can have a white background which is very visible, it also refreshes a bit faster; Mappily has a cadence field and having some context (background maps) for the route is very helpful.
  • Buttons are great. I don’t miss a touch screen.
  • I don’t miss the altimeter - it was great novelty value for steps climbed when moving my daughters from third floor flat to third floor flat, etc.
  • The MIP screen is fine for me. I love being able to glance at my wrist and see Pace, Cadence, etc without fully having to raise my wrist.
  • The vibration is more noisy than vibratory. Apple’s vibration is a LOT stronger and more discrete. But it is enough to wake me up.
  • It’s a round display so I’m using a round watch face, like how on the Apple Watch I used a square one.
  • The heartrate monitor on the Forerunner 55 is a billion times better. I thought the Apple Watch was bad just because it was my wrist. Nope.
  • The Apple Watch is still my favourite Apple product. Being able to run ssh commands and web-browse from your wrist is pretty amazing even if not really necessary.

Since the Series 3 was a couple of years old when I got it I thought of replacing it with an equivalently old device such as a Coros Pace 3 or a Garmin Forerunner 165. I was also interested in “something different” like a Suunto Run or 9 Peak Pro. I.e. watches around £200 new, but that can be found for £150 on Vinted, but then realised there are so many Forerunner 55s it is easy to pick a barely used one up cheap (it seems a lot of people buy them to run a marathon and then discard after one season). It is my price point after all as nothing really changes; £37 of the £60 was contributed by my Dad for my birthday.

* - Especially since recently Garmin finally replaced the Forerunner 55 with the 70

First decent length run after injuring my knee. Had one full week off and then four weeks of flat-work (no hills) working on my cadence; More on that soon.

Patching the Synaptics driver on NetBSD to disable tap-to-click

This has bugged me since I got a ThinkPad X270, so much so that I actually found/made time for Frustration Driven Development, figured out a patch for the source code, built the kernel and tested it out. This has MASSIVELY IMPROVED my laptop experience. Honestly, not overstating that. Due to the Synaptics driver doing tap-to-click by default I would frequently make mis-clicks with my palm, etc when typing and would often mis-click and accidentally drag tabs, etc in Firefox. I was coming very close to disabling the trackpad altogether and using the pointer instead, but then “solved” half the problem by disabling mouse mode in Helix - although it was still annoying me elsewhere.

I patched it so tap to click is the default behaviour and I can just easily disable via sudo sysctl -w hw.synaptics.tap_to_click=0:

--- /usr/src/sys/dev/pckbport/synaptics.c.orig	2024-06-22 11:02:05.000000000 +0100
+++ /usr/src/sys/dev/pckbport/synaptics.c	2026-04-22 17:21:33.087414774 +0100
@@ -118,6 +118,7 @@
 static int synaptics_button_boundary = SYNAPTICS_EDGE_BOTTOM;
 static int synaptics_button2;
 static int synaptics_button3;
+static int synaptics_tap_to_click = 1;
 static int synaptics_two_fingers_emul = 0;
 static int synaptics_scale_x = 8;
 static int synaptics_scale_y = 8;
@@ -155,6 +156,7 @@
 static int synaptics_edge_motion_delta_nodenum;
 static int synaptics_finger_high_nodenum;
 static int synaptics_finger_low_nodenum;
+static int synaptics_tap_to_click_nodenum;
 static int synaptics_two_fingers_emul_nodenum;
 static int synaptics_scale_x_nodenum;
 static int synaptics_scale_y_nodenum;
@@ -865,6 +867,18 @@
 
 	if ((rc = sysctl_createv(clog, 0, NULL, &node,
 	    CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
+	    CTLTYPE_INT, "tap_to_click",
+	    SYSCTL_DESCR("Enable tap to click"),
+	    pms_sysctl_synaptics_verify, 0,
+	    &synaptics_tap_to_click,
+	    0, CTL_HW, root_num, CTL_CREATE,
+	    CTL_EOL)) != 0)
+		goto err;
+
+	synaptics_tap_to_click_nodenum = node->sysctl_num;
+
+	if ((rc = sysctl_createv(clog, 0, NULL, &node,
+	    CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
 	    CTLTYPE_INT, "two_fingers_emulation",
 	    SYSCTL_DESCR("Map two fingers to middle button"),
 	    pms_sysctl_synaptics_verify, 0,
@@ -1101,6 +1115,10 @@
 		if (t < 0 || t > 3)
 			return (EINVAL);
 	} else
+	if (node.sysctl_num == synaptics_tap_to_click_nodenum) {
+		if (t < 0 || t > 1)
+			return (EINVAL);
+	} else
 	if (node.sysctl_num == synaptics_two_fingers_emul_nodenum) {
 		if (t < 0 || t > 2)
 			return (EINVAL);
@@ -2293,7 +2311,7 @@
 	/*
 	 * Do gesture processing only if we didn't detect a palm.
 	 */
-	if (palm == 0)
+	if (palm == 0 && synaptics_tap_to_click)
 		synaptics_gesture_detect(sc, sp, fingers);
 	else
 		sc->gesture_type = sc->gesture_buttons = 0;

I haven’t noticed any downsides to this at all yet. I have physical buttons that I can use for clicking anyway PLUS it turns out if I press hard enough (I’d never done this because of tap-to-click) on the trackpad it actually physically clicks (and that still registers as a click with this patch).

I must be some kind of freak for hating tap to click (I hate it on macOS as well) since no one has bothered to change this over the years. Or even moaned that much about it.

I couldn’t recall trackpad usage on my previous NetBSD laptop being this bad, but then I looked up that hardware and realised it didn’t have a trackpad.


[EDIT: 2026-05-04] It got committed. Whoop!

Note: But managed my base level of running of 3x 25mins this week. Hopefully on the mend.

Note: Forgot to say, but since the 30k I've had ITB issues on my right knee. Had a whole week off running last week (miserable).

Visiting Virginia

Visiting Virginia

Back when I sponsored the Virginia Woolf statue I didn’t imagine I’d get to see it any time soon - afterall, Richmond is a bit out of the way from Aberdeen. But we were recently down that way so A could finally see Arlo Parks at Circuit in Kingston so we stopped off for a look-around Richmond and immediately stumbled on the statue. I did have a sit next to her.

Note: The Magic Faraway Tree: No magic and tree not really far away. 1/5

Note: Legit album of the year contender.

Note: Managed to pretty much stay off Spotify for first quarter of the year, but had to listen to Teezandos eventually. And. Oh my. Superb.

Where am I running AI in Tmux?

Since using lots of Vim sessions in a terminal I had a brief dalliance with Nova (I did/do like it, but it’s not cross-platform) and then ended up with Helix. At work I tend to use Helix in the same way I was using Vim but instead of Terminal.app it’s Alacritty with one huuuuge Tmux session with multiple windows (“tabs”) per each Git repository I’m working on. I haven’t bothered figuring out renaming the tmux windows automatically and just rename them manually - it tends to be a very long running Tmux session that I also save and restore so renaming manually is a one-time thing. It is easy to find whichever repo I want (across 70+ windows) by using CTRL, b, w to bring up Tmux’s window search and then using / to search for the name I want.

Since starting to play about with AI clis, I’ll split the Tmux window so I have a pane for running the cli in and a pane for Helix. But I won’t be running an AI cli in all of these windows which has lead me to wonder, “How do I find where I’m running AI clis?”.

What I’ve done is add a simple wrapper to the AI cli command to set and unset Tmux window titles on launch and quit of the AI cli:

function ai {
	# Let me know where I'm running an AI cli session
	
	# Find tmux window this command was called from
	# This way can target window. 
	# And avoid racey style stuff where wrong "current window" gets renamed
	twin=$(tmux list-panes -a | grep "$TMUX_PANE " | cut -d : -f 2 | cut -d . -f 1)
	twse=$(tmux list-panes -a | grep "$TMUX_PANE " | cut -d : -f 1)
	# I don't think I'd ever use an asterisk as a window name, but this would fallover if I did
	twnm=$(tmux list-windows -a | grep "$twse:$twin:" | cut -d : -f 3 | cut -d ' ' -f 2 | cut -d '*' -f 1)
	tmux rename-window -t $twin "$twnm + ai"
	/path/to/ai/cli
	tmux rename-window -t $twin $twnm
}

And now I can easily search through my Tmux windows.

LINK: Using Gemini Cli For Software Development

Meant to link to this at the time, but I meant to write my own blog post (see yesterday) before that, but it’s taken me until now to do either; AI certainly isn’t freeing up any spare time in my life.

These are the ten most recent posts (not counting any note drivel), for older posts see the Archive.