A port of Python's pseudo-random generator, whrandom