pull down to refresh

shouldn't it be based on when the zaps came in rather than when the post was created?

I've explored this some. Ranking works on item age and sats. To let new zaps on old items pull an item up in ranking, we'd replace item age with an effective_age that's influenced by the recency of zaps. Computing effective_age is where it gets tricky but I think I can figure it out.

is the item and is the zaps on item

controls the half life

reply
191 sats \ 8 replies \ @k00b 11 Feb

I think I've got a static (time invariant) sort key for this. The exponent is huge and I can't store a log value because negative zap amounts are a thing. I have to store the time of the last zap along with the moving sum in order to incrementally update the sum right, but it isn't that bad (especially for how cool it is).

reply

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

reply
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.

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

reply

Probably just drop the zaps that are older than some preset amount too

reply
101 sats \ 2 replies \ @k00b 8 Jan

we can weight it by the exchange rate at the time ~lol

reply

NONO

Because then the units of the rank would be in dollars not sats!

reply
reply

the exponential decay pretty much zeros out old zaps contributions anyway, so the only different it'd make would be the computational speed of filtering out old zaps vs. extra calculations by including them

reply

Computation is what I was thinking about, but I didn't think about the computation of filtering

reply
70 sats \ 2 replies \ @k00b 8 Jan

Nice! That's roughly what I arrived at as an accumulator for making a resurface decision. When it exceeds a dynamic threshold, I'd move forward the effective_age.

I've been a little hesitant to give full control to recent zaps alone, but I'm probably just FUDing myself and it's worth experimenting with.

Edit: It also hadn't occurred to me to use it raw like this until your comment. I think this would make it worth being in the back catalog.

reply
I've been a little hesitant to give full control to recent zaps alone, but I'm probably just FUDing myself and it's worth experimenting with.

I think the difference would be pretty marginal. 95% of zaps happen in the first 48 hours. At least this gives a chance of good old posts to resurface.

reply

We'll see. I think if posts are able to resurface and people can earn rewards for zapping them when they do, then we'll see more zaps on older posts.

reply