Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

Nocter v0.63.0 Release Notes

Nocter v0.63.0 adds operating-system cryptographic randomness to the standard library. Programs can fill caller-owned byte storage, generate full-width or unbiased bounded unsigned values, and shuffle mutable slices without allocating. The release changes no Nocter source-language syntax.

Cryptographic Random Bytes and Scalars

std/random.fill writes every byte of a mutable slice from the operating-system entropy source. It accepts empty storage without contacting the target. If a target request fails, the function clears the complete destination before returning std.random.unavailable, so a generated prefix cannot be mistaken for a complete value.

next_u64 and next_usize cover their complete unsigned domains. They retain no generator state and assemble bytes through the standard library's existing little-endian codec.

use std/random
use std/vec.Vec

blocking func generate(): void! {
    var bytes: Vec<u8> = Vec [0, 0, 0, 0, 0, 0, 0, 0]
    random.fill(&+bytes as &+[u8])?
    let identifier = random.next_u64()?
}

Unbiased Ranges and In-place Shuffling

below_u64 and below_usize return a uniformly distributed value below an exclusive nonzero bound. They use rejection sampling rather than remainder-only reduction, and a zero bound returns std.random.empty_range before consuming entropy.

shuffle applies Fisher–Yates directly to a mutable slice. It allocates nothing, supports move-only elements, and consumes no entropy for empty or singleton slices. An entropy failure can leave a valid partial permutation and returns the same stable unavailable error.

use std/random
use std/vec.Vec

blocking func choose(): usize! {
    var values: Vec<i32> = Vec [10, 20, 30, 40]
    random.shuffle(&+values as &+[i32])?
    return random.below_usize(values.len())?
}

One Entropy Authority

The compiler recognizes one pointer-and-length target operation. It does not know public random errors, request limits, byte order, distributions, shuffling, or collection policy. std/internal/entropy alone owns native request limits and interruption retry. Both std/random and hidden hash-table seeding consume that adapter; the former owns recoverable public failure, while the latter retains its fail-stop collection-construction policy.

Scalar decoding remains in std/bytes. Raw initialized-value exchange remains in std/internal/ptr and is shared by sorting and shuffling. No second entropy, bounded-sampling, or element-swap implementation is retained.

Compatibility and Non-goals

v0.63.0 adds standard-library APIs and removes no source-language syntax. Random operations are blocking because obtaining operating-system entropy may synchronously wait. The module does not provide deterministic seeded streams, floating-point distributions, password hashing, encryption, signatures, key management, or a general cryptographic protocol API.

Release Qualification

Release-content commit ab02c05564404fe5a7c9ee4fbd34baa5ee6af30b passed the complete disposable compiler gate and deterministic generation of 341 documentation pages. Two independent optimized builds produced the same archive bytes and recursively identical installed homes. The retained archive then passed fresh and replacement nocter install, installed-home workflows, every public example, interactive LSP checks, immutability checks, and compiler and standard-library tamper rejection.

The qualified nocter-v0.63.0-arm64-darwin.tar.gz archive is 9,423,314 bytes and has SHA-256 93a3c9bb6238d73dbbcc0aca24f2c93d71e32f252b31f1a2f24d528e0b264697. Publication reuses these exact retained bytes without rebuilding them.