19 lines
413 B
V
19 lines
413 B
V
module main
|
|
|
|
import rand
|
|
import rand.wyrand
|
|
import rand.splitmix64
|
|
|
|
fn main() {
|
|
mut wyrand_rng := &rand.PRNG(&wyrand.WyRandRNG{})
|
|
mut splitmix_rng := &rand.PRNG(&splitmix64.SplitMix64RNG{})
|
|
|
|
mut generators := [wyrand_rng, splitmix_rng]
|
|
for mut rng in generators {
|
|
seed_len := rng.block_size() / 32
|
|
// NB: `seed_len := (*rng).block_size() / 32` does compile
|
|
dump(seed_len)
|
|
println(rng.string(15))
|
|
}
|
|
}
|