Purely Random
summary
Argues that an immutable splittable RNG is required for composable, lazy or parallel Clojure code and describes implementing one for test.check by porting Java 8’s SplittableRandom style (mix and mixGamma) instead of bolting splits onto java.util.Random or using SHA-1 hashing. Reports diehard tests showing quality comparable to SHA-1, benchmarks showing ~3–4× slower per-number than java.util.Random but far faster than SHA-1, and test-suite slowdowns typically ~10–20% (reports up to 50%), while enabling deterministic parallel shrinking and an alpha test.check integration.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 0:20Java utilrandom
- 2:54Roadmap
- 3:53Pair of lazy seeks
- 4:26EnclosureCore
- 7:27Mutability and Splitability
- 10:07Immutability
- 10:30Splittable Generator
- 11:06TestCheck
- 11:43Generator
- 12:11Lists
- 13:36Shrink Tree
- 19:20Overview
- 19:32Lowquality implementations
- 22:20Haskell
- 23:04Lesson
- 24:25Pseudorandom
- 26:28Test suites
- 27:00Linear generators
- 27:43Balanced linearization
- 27:53Concatenate
- 28:05Irregular
- 28:17Results
- 29:17Other implementations
- 29:51Splittable Random
- 30:34Algorithm
- 31:17Generating Numbers
- 34:26Benchmarks
- 37:27Summary
related talks
32mGenerative Testing: Properties, State and Beyond
29mRandomness In Tests (Don't Do It)
27mRANDOM DATA GENERATION WITH SCALACHECK
14mChance Makes Good Tests
35mRandom Data Generation With Scalacheck
25mPowerful Testing with test.check
56mUsing, Generating and Testing with Pseudo-Random Numbers
36mTesting Stateful and Concurrent Systems Using test.check
