Live data from Hacker News

Logarithmically-Spaced Snapshots (2022)

madebyevan.com

11–16 of 16 posts

Re: Logarithmically-Spaced Snapshots (2022)

#14
post #5

I guess a funny randomized algorithm is just "if snapshots.size() > capacity delete random snapshot" (depending on complexity of random deletions.) If they're in a B-tree not bad. Snapshots have a half life so they fall off exponentially. Maybe not hard to get a deterministically good distribution (haven't properly read TFA) but I guess you'd be sad if you didn't do better than the most obvious thing. I guess also an…

Reading again, I don't think the distribution in TFA ends up logarithmically spaced. The "first zero bit" function is biased low, so elements don't have an even half-life: elements towards one end are preferentially deleted.

Given uniformly-spaced elements that preference might initially move the distribution in the direction of log-spaced, but it won't trend closely to it. (I think...)

Re: Logarithmically-Spaced Snapshots (2022)

#15
I've used a similar approach to save debug images in video stream processing system that basically scans vehicles going near the camera. Since the length and speed of vehicles is varying, memory is constrained, and keeping too many images of each vehicles isn't useful, a progressively decimated buffer (along with images of entry and exit events) worked well.

Re: Logarithmically-Spaced Snapshots (2022)

#16
post #4

this is a very nice family of structures; perhaps you could use it to choose which previous line in a poem to rhyme with, or which previous day to reflect on

to avoid the collapse from transitive equality, I think rhyming would need to work in pairs, rather than in lines, something like AABBAACCAABBAADD... (giving an ostinato effect, similar to a ghazal?) (...GCAABBCDEEFFDG... might be interesting to write with the quatrains displayed block inline but the longer-range rhymes just set as normal prose; it would be up to the reader to notice the maintenance of metre and rhym…

these are really good points, thank you
Post reply on HN