~/runtimelab $ cat ./ringbuffer-go/README
The Ring Buffer (Go)
One array, allocated once, that bytes go into and come out of forever. Four exercises: the wraparound arithmetic, safety under a concurrent reader and writer, waiting on a condition variable instead of spinning, and then the property the whole thing exists for — zero allocations per operation, error paths included.
what you end up with
A fixed-capacity, zero-allocation byte ring
- stages
- 4
- estimated
- ~2 h
- level
- Beginner
- track
- Backend Engineering
- language
- Go
- a circular buffer over a fixed array
- telling full from empty when both heads agree
- one lock over one state, not two over halves of it
- sync.Cond, and re-checking the predicate in a loop
- allocation on the hot path, including the error path
The stage list opens once you sign in — it is the challenge, not the pitch. Signing in is free, and the first stages of every challenge are too.