lundi 18 juillet 2016

Deterministic pseudo-random data in Elixir?

I need a large amount of pseudo-random data in Elixir. And I need it to be deterministic between runs. And efficient to run concurrently.

Seeding one prng per thread in the parent thread and giving them to each child would work fine, but Elixir doesn't seem to have prng I can hold on to; they are all mutable calls. I only need floats between [0,1] like :rand.uniform/0 returns.

Is there a good high-performant module that does this in Elixir, or some built-in that I've missed, or a solution that is short enough to fit in an SO answer?




Aucun commentaire:

Enregistrer un commentaire