3 ms·
you would therefore not object to a PR which added if randf32() < P { panic } to the beginning of every function in your code base, if P was sufficiently
by preseinger 3y ago
you would therefore not object to a PR which added
if randf32() < P { panic }
to the beginning of every function in your code base, if P was sufficiently small?
- Dylan16807 3y agoFor f32, there is no sufficiently small P. If it was a random 1/2^200 chance, I would not object to it for the random chance. But it would have to actually improve the program execution in a significant way before I accept it. I wouldn't accept "if rand() < P { NOP }" being stuck into every function without a tangible benefit either, despite how safe it is. I didn't notice https://news.ycombinator.com/item?id=36330673 https://news.ycombinator.com/item?id=36330673 until just now but the first half sounds like you're agreeing with me. You can't remove the risk of solar rays, so you just have to live with it. 0% risk is an unreasonable standard. Certain things have to be outside your execution model, even though they're technically possible. Small small chances of logic errors don't have to be outside your execution model, obviously. But if they're a lot rarer than the errors you have to ignore, then you get no benefit from including them in your execution model. > if you want to make the assumption that secure_rand_u128 will never return 0, then you have to justify that assumption in the context of your specific use case -- it absolutely cannot be assumed in the general case I can agree with this... but my use case is 99.9% of all computing in the year 2023. Normal computers are not reliable enough to measure the difference in error rate of an occasional 1/2^128 chance.