ringbuffer

Moved over to new API design.

Made the tests pass.

I’ve updated the ringbuffer API page to the new API design. Will write the per-API docs tomoz.