pull down to refresh

Wouldn't you be taking the exponent of a negative, so it would only shrink down to zero at some point?

51 sats \ 6 replies \ @k00b 11 Feb

Not when I factor out the current time (as a global constant) to get the static sort key above.

By factoring out the current time, items exponentially decay without us having to update them (new stuff is exponentially fresher is how I think about it).

reply

I see. You're wanting to update the sum incrementally by adding the right-most component each time. Newer zaps have a larger zap_time and thus a higher weight. But the weights are enormous because of the exponent.

Wasn't quite sure what you meant by only having to store the time of the last zap and the moving sum though.

reply
53 sats \ 4 replies \ @k00b 11 Feb

Yes that's right. I store the sum because it's like the mantissa and the time because it's like the exponent. When a new zap comes in, the time allows me to discount the old sum.

I think that's right.

reply

I think you'd have to update the rank of all the other items at the same time that item gets zapped, otherwise item 's rank relative to other items might actually go down, because its old rank gets down-weighted via the exponent.

(As an example, imagine item gets a zap of just 1 sat. Its old rank gets down-weighted for time, by the increase from the 1 sat is negligible.)

reply
68 sats \ 1 reply \ @k00b 11 Feb

That’s not the full sort key. My bad.

I’ll try to write it in a way I understand tomorrow.

reply
74 sats \ 0 replies \ @k00b 11 Feb

Last night what I shared as is hot_s.

We store hot_t and hot_s:

with

Substituting those definitions directly:

reply

(This mostly MathGPT btw. I'm barely hanging on trying to read forms like this.)

reply