@@ 6,34 6,50 @@
# What is this?
-`oorandom` is a minimalistic pseudorandom number generator in Rust. For those times when the `rand` crate is just too big and you want something a bit dumber.
+`oorandom` is a minimalistic pseudorandom number generator in Rust. For
+those times when the `rand` crate is just too big and you want something
+a bit dumber.
More specifically, it implements ONE prng, which is currently a permuted
-congruential generator (PCG). It may change if something better comes along,
-but that seems unlikely and will probably be a major version bump. It will
-give you `u32` or `u64`, and signed or floating-point equivalents. It is also
-`#[no_std]`. Anything else is gravy.
+congruential generator (PCG). It may change if something better comes
+along, but that seems unlikely and will probably be a major version
+bump. It will give you `u32` or `u64`, and signed or floating-point
+equivalents. It is also `#[no_std]`. Anything else is gravy.
-Thanks to Lokathor for making [`randomize`](https://github.com/Lokathor/randomize),
-which inspired me to do my own equivalent.
+Thanks to Lokathor for making
+[`randomize`](https://github.com/Lokathor/randomize), which inspired me
+to do my own equivalent.
-The name comes from my attempts to find a good way to pronounce `/dev/urandom`.
+The name comes from my attempts to find a good way to pronounce
+`/dev/urandom`.
-Please direct questions, discussions and bugs to the [issue tracker](https://todo.sr.ht/~icefox/oorandom).
+Please direct questions, discussions and bugs to the [issue
+tracker](https://todo.sr.ht/~icefox/oorandom).
# Why use `oorandom` instead of...
- * `rand` -- `oorandom` is simpler and has zero choices you need to make. It also compiles in 1/10th the time and
- has a stable API.
- * `getrandom` -- They solve different problems; `getrandom` gives you whatever secure randomness the OS
- decides to give you, not a deterministic and seedable PRNG. It's generally a good idea to use `getrandom` to
- seed this RNG though.
+ * `rand` -- `oorandom` is simpler and has zero choices you need to
+ make. It also compiles in 1/10th the time and has a stable API.
+ * `getrandom` -- They solve different problems; `getrandom` gives you
+ whatever secure randomness the OS decides to give you, not a
+ deterministic and seedable PRNG. It's generally a good idea to use
+ `getrandom` to seed this RNG though.
* `randomize` -- `randomize` used to be more complicated, but
- `randomize` 3 is about equivalent to `oorandom`.
- * `rand_pcg` and `rand_core` -- Yes you can take `rand` apart into its pieces and use those individually, if
- you want to abandon having an all-in-one solution, still deal with the lack of stability in `rand_core` and
- actually figure out which pieces you need. It works just fine. Seems more complicated than it needs to be
- though.
+ `randomize` 3.x is quite similar to `oorandom` in functionality and
+ design. Go for it.
+ * `rand_pcg` and `rand_core` -- Yes you can take `rand` apart into its
+ pieces and use those individually, if you want to abandon having an
+ all-in-one solution, still deal with the lack of stability in
+ `rand_core` and actually figure out which pieces you need. It works
+ just fine. Seems more complicated than it needs to be though.
+ * `nanorand` -- `nanorand` uses the
+ [WyRand](https://github.com/wangyi-fudan/wyhash) PRNG algorithm,
+ which is supposedly faster than PCG and at least as good quality. I
+ haven't verified these claims, and I don't know of any *really*
+ thorough 3rd party investigation into them, though it apparently
+ passes [Dr. Lemire's tests](https://github.com/lemire/testingRNG).
+ So for now I personally consider WyRand to be in the "trust but
+ verify" level of quality. It's probably fine.
# This is not...