Closed
Description
There should be some sort of seedable implementation of rand::rng so that sequences of random operations can be easily reproduced.
The gen_* methods in the rand::rng iface should be separated out into an iface-less implementation for the rand::rng iface-type, i.e.:
impl gen for rng {
fn gen_str (len: uint) -> str { ... }
....
}
This will allow multiple implementations of the rand::rng iface to use the gen_* methods.
There should be more gen_* methods available, for example:
- there should be one for each primitive integer/float type
- there should be shuffle-vector, choose-from-vector, choose-from-weighted-vector methods
- the functions from /src/fuzzer/rand_util.rs should become gen_methods
Motivation
I have been writing a fuzzer and I would have found these things useful to have in the core/std library.