Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

Ring Buffer

A fixed-capacity FIFO that overwrites its oldest entry, demoing the p/moul/x/daily/ringbuffer library.

Capacity 4, pushing 6 entries:

push evicted contents (oldest → newest)
alpha — alpha
bravo — alpha bravo
charlie — alpha bravo charlie
delta — alpha bravo charlie delta
echo alpha bravo charlie delta echo
foxtrot bravo charlie delta echo foxtrot

The buffer never grows: once full, each push costs the oldest entry. On chain that bound is the point — an unbounded queue is an unbounded storage bill.