Null Test

Null Test is a terminal tool that compares two files by playing both through the same plucked string and keeping what is left when one is taken from the other: identical files give exact silence, and any difference rings. Build it with go build -o nulltest . (Go 1.22 or later, standard library only) and run ./nulltest A B on any two files on your machine, up to 256 MiB each. It prints a 64 by 20 report sheet, writes the recording to null.wav, plays it if a terminal is attached and a player exists (afplay, paplay, aplay, play or ffplay), and exits 0 for identical, 1 for different and 2 for trouble, as cmp does. ./nulltest A alone plays one file as a string.

nulltest [-s seconds] [-o file] [-q] A [B]

  -s   longest stretch to render, from the start of the recording, 2 to 120 (default 10)
  -o   WAV path (default null.wav, overwritten without asking)
  -q   never play, and write no WAV unless -o is given; the sheet still prints

nulltest -q a b >/dev/null && echo same      # works like cmp -s

How it listens

Limits

Checks

go test ./... runs the unit tests on the test binary itself as real input. bash check.sh builds the tool and runs every acceptance check of CARD.md end to end (needs cmp, tmux, uv); it keeps the sheets, the terminal captures and the recordings in out/.

Colophon

Form NT-1. Built from a delay line of 400 samples, a two point average and a 44 byte header. Set in the monospace your terminal already has, with no colour. The instrument was inspected at the time of building and found 1.8 cents sharp. It was left as found.

normal is dead

Files