Show HN: Simple way to obtain pseudorandomness from CPU context switch in Go

By maxamel - a day ago

Showing first level comment(s)

Does this not imply that its usefulness degrades depending on how much random data you need / the frequency at which you need it? For example if you ask for 8 bits of randomness within the same time-slice (either as a chunk of 8 bits or 8 separate invocations) - then you're only ever going to get 00000000 or 11111111 as your "pseudorandom" values (and this feels like it would be an easily re-producible outcome)

qoi2ijds0 - an hour ago

> BitGenGo is actually a small program which spawns off two goroutines(threads) and they take turns setting a shared variable with a value(zero/one). Every time the user requests a bit, the current value of the shared variable is returned.

dakarand!

zkms - 6 hours ago

interesting project!

will be great if the author can add some Go benchmark results comparing this library to the one in Go's stdlib, will be useful for potential users to know what kind of CPU performance they can expect.

dis-sys - 7 hours ago