• Effekt Logo Effekt Library
    • random
      • random
        • random
      • minstd
      • minstd
      • devurandom
      • randomByte
      • randomBytes
      • randomBool
      • randomBools
      • randomInt32
      • randomInt32s
      • randomInt
      • randomInts
      • randomDouble
      • randomDoubles
      • main
      • prngRandom
      • unixRandom
    • random
    • Jump to source: libraries/common/random.effekt
      Example usage: examples/stdlib/random
      • random
      • Infinite pull stream of random bytes.
        • random : Byte / {}
        • Infinite pull stream of random bytes.
      • minstd (seed: Int): Unit / {emit[Byte]}
      • A streaming source (push stream) of byte-level randomness
        based on Park and Miller's MINSTD with revised parameters.
        
        Deterministic: needs a 32bit `seed` -- you can use `bench::timestamp`.
      • minstd (seed: Int) { randomnessReader: => Unit / {random} }: Unit / {}
      • A thin wrapper over `minstd`, handling a reader of random bytes.
        
        Deterministic: needs a 32bit `seed` -- you can use `bench::timestamp`.
        
        Implementation is similar to `stream::source`, specialized for bytes and the `random` effect.
      • devurandom { randomnessReader: => Unit / {random} }: Unit / {Exception[IOError]}
      • CSPRNG from `/dev/urandom`, handling a reader of random bytes.
        Only works on Unix-like OSes!
      • randomByte : Byte / {random}
      • randomBytes : Unit / {emit[Byte], random}
      • randomBool : Bool / {random}
      • randomBools : Unit / {emit[Bool], random}
      • randomInt32 : Int / {random}
      • randomInt32s : Unit / {emit[Int], random}
      • randomInt (min: Int, max: Int): Int / {random}
      • `max` is _inclusive_!
      • randomInts (min: Int, max: Int): Unit / {emit[Int], random}
      • `max` is _inclusive_!
      • randomDouble : Double / {random}
      • Random double between 0.0 and 1.0
      • randomDoubles : Unit / {emit[Double], random}
      • main
      • prngRandom : Unit / {}
      • unixRandom : Unit / {}