Menu

Post image 1
Post image 2
1 / 2
0

"I implemented PRML in two languages. Three things broke that the spec didn't warn about." published: true

DEV Community·sk8ordie84·about 1 month ago
#IIDAjag1
Reading 0:00
15s threshold

PRML v0.1 is a small specification I drafted three weeks ago. It binds an ML evaluation claim — (metric, comparator, threshold, dataset hash, random seed, producer) — to a SHA-256 digest computed over canonical YAML bytes, before the experiment runs. The spec is at spec.falsify.dev/v0.1 . The Python reference implementation is on GitHub. v0.2 freezes 2026-05-22. A specification with one implementation is indistinguishable from that implementation's bugs. So this past weekend I sat down and built a second reference implementation, in Node.js, from scratch. The goal: take the prose spec, ignore the Python source, and produce byte-identical canonical bytes for all twelve v0.1 conformance vectors. It worked. 12/12 vectors pass byte-for-byte. The implementation is 404 lines of JavaScript with zero runtime dependencies beyond the Node.js standard library. You can run it from impl/js/falsify.js . What's interesting is what didn't work the first time.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More