pull down to refresh
132 sats \ 14 replies \ @k00b OP 3 Aug \ parent \ on: SN release: random zap amounts, webln attached wallet meta
The problem is the turbo zapping loop.
If the range is 1-100, and the first random zap is 1 sat, and the next random value chosen is 2 sats, we don’t multiply by 10 because that loop only executes if zapN-1 >= zapN.
I’ll patch in a second.
This is more tricky than it seems because the range grows exponentially with the bounds. And, if the upper bound starts as more than a power of 10 greater than the lower bound, the lower bound of the next zap range LBN+1 will be exponentially less than upper bound of the current range UBN (as N grows) which is extra counterintuitive.
reply
Well now I feel bad for clearly not going through turbo zapping with enough detail for this change
reply
It's fun discovering unexpected consequences.
reply
No doubt, definitely part of the fun!
reply
reply
Looking good
reply
Thank you 🙏
reply
It's always fun when seemingly simple problems turn out to be a bit thorny.
If people want to get really wild, you could only scale the upper bound.
reply
reply
That's neat.
reply
reply
If I understand the second one, there should be a 211-1000. That seems fun, too. The first option seems lame.
Ah!
reply