~ / cmdr2

projects: freebird, easy diffusion

hacks: carbon editor, torchruntime, findstarlink

  # filter by: [ posts | worklogs ]
  • #git
  • #hacks

Distributed locking using git tags Hacky way to get distributed locking. I needed parallel runners to claim tasks without two of them starting work on the same one. The task store has no locking, and I didn’t want to host an extra service like Redis. My runners already talk to GitHub, and I can get this locking behavior using an empty repo (creatively called “locks”). The hack uses Git’s built-in atomic operation: creating a ref. If the name exists, the push fails. So a tag named lock-<task-id> is the lock, and whoever creates it holds it.

  • #rust

// These are notes for myself, and can be misleading since they may not represent the entire picture, and because I’m still learning Rust. C pointers vs Rust references: C Rust Can Change Value? Can Change Pointer? (To something else) const int *const ptr let ptr: &i32 ❌ No ❌ No const int *ptr let mut ptr: &i32 ❌ No 🟢 Yes int *const ptr let ptr: &mut i32 🟢 Yes ❌ No int *ptr let mut ptr: &mut i32 🟢 Yes 🟢 Yes These govern whether the pointer reference allows modifications to the referenced value, and whether the pointer itself can be modified to point to something else.

  • #ai
  • #agents

Experimented with a barebones agent that forced the model to reply only in Python, and then automatically executed the generated python. I tried it with Qwen-2.5-Coder, Gemma4 E4B, and Qwen3-4B-Instruct. The idea was to remove the need for a bash/powershell tool, and have the agent write complex tool call chains in a single program output. The first approach extracted python code blocks from the reply and executed them. The second approach exposed python as a regular tool.

  • #easydiffusion
  • #v4

tl;dr - Right now, what annoys me the most with Easy Diffusion is the startup time and friction, and how Easy Diffusion isn’t actually “easy” anymore - the default model (SD 1.5) is bad, users take too long to get productive, and new models require a lot of configuration. That’s what v4 aims to bring under control. Easy Diffusion v4 needs to ship soon, this has gone on long enough.

  • #ai
  • #zed

Zed quietly calls your selected model to generate the title of an agent session, and sends a huge amount of input context along with it (including tool call results). And we pay for that. That’s really not cool. This ends up using a frontier model to generate a 4-5 word summary for the chat window title, which is crazy. Noticed this in my OpenRouter logs.

  • #ox
  • #blender

Shipped a bunch of regression tests that test Blender’s XR API automatically - https://github.com/cmdr2/blender-xr-regression-tests Next: Contribute a patch to Blender so that it can run headless in XR. This will unblock running these regression tests weekly in a CI runner.

  • #easydiffusion

Added support for Krea2 in Easy Diffusion v4, in the beta channel.

  • #blender
  • #programming
  • #vr

Helped investigate a recent regression in Blender, which broke ‘pass-through’ (i.e. AR) support on Quest 3. Pass-through works reliably on Blender 4.3, 4.4, 4.5 and 5.0, but has been broken since Blender 5.1. git bisect didn’t help, because “good” commits would suddenly turn “bad” (and vice versa). It was really strange. And most of the code for passthrough hasn’t changed in 2 years (when it was first committed). The root-cause turned out to be a bad struct initialization. Without proper initialization, we’d OR against garbage values, instead of zero-initialized flags. That is:

  • #zed
  • #vscode
  • #ai

Switched to Zed from VS Code. It’s really quite cool, mainly in terms of RAM usage and startup time. For my projects, a single VS Code window consumes around 2 GB of RAM, while the same project in Zed consumes around 90 MB. It really is quite insane. And Zed’s cold-start bootup latency is around 3 seconds (for me), compared to around 10-12 seconds in VS Code (before it’s ready to use). I don’t use a lot of extensions in VS Code.

  • #flare
  • #carbon
  • #ai

Bah. I just lost all of the work that I did yesterday. I’ve been using a new text editor over the past few months, which I “vibe-coded” for myself using AI. I never really reviewed its code, and it’s worked fairly well so far. Yes, it is vibe-coded in the full sense of the word, and now the bill has come due. Today, a weird race-condition bug in the editor caused an open file to get deleted (along with my work).