Programming Language

Nocter

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

Nocter v0.64.0 Release Notes

Nocter v0.64.0 adds a coherent application-data identity layer to the standard library. Programs can encode bytes as strict hexadecimal or Base64, compute SHA-256 incrementally, create and inspect canonical UUID values, and generate cryptographic URL-safe tokens without application-local formats. The release changes no Nocter source-language syntax.

Strict Byte-to-Text Codecs

std/hex encodes complete byte sequences as lowercase hexadecimal. Its decoder rejects uppercase, non-ASCII digits, and incomplete pairs instead of normalizing them. std/base64 exposes standard padded and URL-safe unpadded RFC 4648 profiles as separate operations; decoders reject mixed alphabets, whitespace, repaired padding, and noncanonical unused bits.

Both modules provide allocating convenience operations and noalloc caller-owned *_into operations. Invalid input and insufficient output are detected before destination mutation.

use std/base64
use std/hex

func representations(): void {
    let fingerprint_text = hex.encode("Nocter".bytes())
    let token_text = base64.encode_url("opaque bytes".bytes())
    return
}

Incremental SHA-256

std/digest.Sha256 owns allocation-free incremental computation. Sha256Digest is a copyable 32-byte value with strict lowercase parsing, canonical formatting, byte observation, equality, ordering, and hashing. The one-shot digest.sha256 operation composes the same state machine.

use std/digest

func fingerprint(): void {
    var state = digest.Sha256.new()
    state.update("first ".bytes())
    state.update("second".bytes())
    let value = state.finish()
    return
}

The implementation is checked Nocter source. The compiler does not contain an application-facing SHA-256 primitive or infer digest meaning from the type name.

UUIDs and URL-safe Random Tokens

std/uuid.Uuid owns exactly 16 bytes and parses or renders only the canonical lowercase 8-4-4-4-12 spelling. It exposes nil, bytes, version, variant, equality, ordering, formatting, and hashing from that one representation. Uuid.v4() obtains entropy through std/random and sets the RFC 9562 version and variant fields.

random.url_token(entropy_bytes) fills exactly the requested number of random bytes and encodes them through the standard library's URL-safe unpadded Base64 profile. Random UUIDs are suitable as opaque identifiers; URL tokens are the API intended for secret bearer material.

use std/random
use std/uuid.Uuid

func identity(): void! {
    let request_id = Uuid.v4()?
    let bearer = random.url_token(24)?
}

The bounded Darwin entropy operation does not carry Nocter's blocking effect because it does not wait for caller-controlled external progress. Entropy failure remains recoverable as std.random.unavailable.

One Representation Authority

Hexadecimal digit decisions used by hexadecimal, URL, JSON, network, and HTTP source now share one package-internal ASCII authority. std/hex owns complete-byte hexadecimal policy, std/base64 owns its two explicit profiles, each digest or UUID value owns its canonical bytes, and std/random remains the only public entropy policy. Compiler-side artifact integrity and transport encoders are host-tool responsibilities and cannot be imported by Nocter applications.

Compatibility and Non-goals

v0.64.0 adds standard-library modules and operations without removing a source-language form. It does not add encryption, signatures, password hashing, key storage, deterministic random streams, permissive Base64 decoding, arbitrary UUID generation, or a constant-time execution guarantee.

Release Qualification

Release-content commit a5944bbea8c6ed7ba691a78df46b2dae77e4edb1 passed the complete disposable compiler gate, deterministic 351-page documentation generation, two independent byte-identical package builds, installed-home workflows, fresh and replacement nocter install, every public example, interactive LSP checks, immutability checks, and compiler and standard-library tamper rejection. The retained arm64-darwin archive is 9,437,663 bytes with SHA-256 357cfbf8e80ff3b5c5774176dc4193f808f532400cfe9396fb253443ad0f36f0. Publication reuses this exact archive without rebuilding it.