lobsters__fanf@crustaceanson.theshelf.topM to Lobsters - all tags@crustaceanson.theshelf.topEnglish · 15 days ago[programming] When random is not actually random enoughlockersc.ioexternal-linkmessage-square7linkfedilinkarrow-up11file-textcross-posted to: hackernews@lemmy.bestiver.se
arrow-up11external-link[programming] When random is not actually random enoughlockersc.iolobsters__fanf@crustaceanson.theshelf.topM to Lobsters - all tags@crustaceanson.theshelf.topEnglish · 15 days agomessage-square7linkfedilinkfile-textcross-posted to: hackernews@lemmy.bestiver.se
minus-squarelobsters__fanf@crustaceanson.theshelf.topOPMlinkfedilinkarrow-up1·14 days agoAnother reason for using an API like random_range() or random_choice() is that they can be faster than naïvely using % (I wonder how much we are fussing over uniformity out of habit, because it used to matter back in the days of bad 16 bit RNGs.) score 1 · canonical
Another reason for using an API like
random_range()orrandom_choice()is that they can be faster than naïvely using %(I wonder how much we are fussing over uniformity out of habit, because it used to matter back in the days of bad 16 bit RNGs.)
score 1 · canonical