I am going out on a limb here, as I used Rust for the examples, but I think this might be an interesting read for Zig systems programmers non-the-less. And there are at least four different fun but simple Zig libraries waiting to be written in that post:
a library that turns an []const u8 into a PRNG,
a library that implements property-based-testing loop on top of that,
a library that plugs coverage guided fuzzing into that interface,
the topic of the post, a library for pausing concurrent operations and implementing deterministic thread scheduling,
I like the ideas in the article. Took a few reads to wrap my head around them, but they’re pretty neat.
I’m trying my hand at putting together the PBT library with the finite-entropy number generator.
I plan on adding model-based testing in the upcoming weeks - I want to test state machines with it. I dunno whether I’ll go as far as implementing the thread-pausing library, though.