Available
amalgame-random
PCG-32 + crypto-grade entropy.
Overview
Two APIs: Random (PCG-32, deterministic with seed) for simulations and tests, and CryptoRandom (reads /dev/urandom on Unix, BCryptGenRandom on Windows) for anything needing unpredictable randomness.
Features
- ✓
Random: PCG-32, deterministic viaSeed(n) - ✓
CryptoRandom: OS entropy for secrets/IDs - ✓
Int,Float01,Bytes(n),Choice(list) - ✓
Shufflein-place Fisher-Yates - ✓Pure Amalgame (except the system entropy call)
Example
Minimal usage example — copy-paste runnable after install.
amc package add random let r = Random.Seed(42) let rolls = [r.IntRange(1, 6) for _ in 0..10] let id = CryptoRandom.Hex(16) // 256 bits of OS entropy
At a glance
- License: Apache-2.0
- Install:
amc package add random - Source: amalgame-lang/amalgame-random
- Official index: amalgame-lang/packages-index