[ANN] bitgenerators v0.1.0

Hi everyone. I’d like to announce the first release of bitgenerators. This library implements an OCaml port of NumPy’s bitgenerator interface for working with Psuedo-random numbers (see: Bit Generators — NumPy v1.26 Manual).

  • This library implements several PRNGs that are exposed through this common interface. It also implements an SeedSequence module for seeding PRNGs using high quality initial states based on the ideas discussed here.
  • Morever, the module provides functions that help easily generate independent and non-overlapping instances of a PRNG for use in parallel computation in a reproducible manner.
  • Implemented PRNG’s include PCG64, SFC64, Philox4x64, Xoshiro256** and ChaCha. All of which pass stringent statistical randomness tests like PractRand and Testu01. The implementations have been tested against those of NumPy and Randomgen to ensure their correctness. See the test/data directory in the source code for more info.
  • The API documentation can be found here
  • The source code is hosted on github: GitHub - zoj613/bitgenerators: Psuedo-random number bitgenerators for OCaml users.
  • The README file contains examples of how the library can be used.

This is my first Ocaml project and therefore I would highly appreciate feedback from experienced users regarding it’s usefulness and possibly how it could be improved (e.g. usability and performance). I tried to keep the implementation as functional as possible, though not very sure if that’s the best approach here.