What datastructure would be appropriate for storing the last N elements of a fas...

@jann@infosec.exchange

What datastructure would be appropriate for storing the last N elements of a fast data stream? Maybe a ring buffer.

I think for showing fast live log output, it similarly makes sense to organize the visual screen elements like a ring buffer, to minimize how much stuff on the screen is changing and make it easier to actually read some lines in between.

Here's a video demo.

hacky demo code: git.thejh.net/?p=logscroll.git