Show HN: Ticking Away, a Dark Side of the Moon Watchface Written in Zig
2 points
9 hours ago
| 0 comments
| clebert.github.io
| HN
I built a watchface inspired by Pink Floyd's "Dark Side of the Moon". A prism that refracts light into a rainbow to show the time. The minute hand is a light ray, the rainbow points at the hour.

It's written in Zig, which lets me target the browser (WASM), a Raspberry Pi Zero 2 W driving a 13.3" e-ink display as a wall clock, a Pico 2 for bare-metal battery operation, and eventually the Pebble Round 2 smartwatch.

I built it with Claude Code (Opus) as an experiment in AI-assisted coding while keeping real ownership of the code. Claude does the fast iteration, I make the architecture decisions and refactor by hand. Every line in lib/ is reviewed and curated.

The rendering went through a few iterations. Started with physical dispersion using Cauchy's equation, but tuning the coefficients for all 720 time combinations was a nightmare and some just looked bad. Then I tried bouncing light inside the prism, which was better but had ugly corner cases. In the end I dropped the physics and went with a simple traced path that always looks good.

No one has commented on this post.