Skip to content

docs: refresh user-facing docs for v0.11.2 features#8

Merged
danieljohnmorris merged 6 commits into
mainfrom
docs/v0.11.2-feature-refresh
May 18, 2026
Merged

docs: refresh user-facing docs for v0.11.2 features#8
danieljohnmorris merged 6 commits into
mainfrom
docs/v0.11.2-feature-refresh

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Contributor

Summary

The user-facing site had drifted behind the main repo. Roughly half the standard library was missing from the builtin reference, the AOT scope claim was multiple versions stale, and several v0.11.x features (negative indices, typed map keys, !! panic-unwrap, inline lambdas) weren't documented anywhere on the public site. This PR catches the site up to v0.11.2 and aligns it with the SPEC drift fix in ilo/pull/290.

What's in the diff

reference/builtins.md — full refresh

Roughly half the standard library was missing. Adds entries for take, drop, at, lst, uniqby, zip, enumerate, range, chunks, window, cumsum, frq, flatmap, partition, plus the stats / linalg / set / FFT families, the text-case + padding + regex helpers, chars / ord / chr, datetime, JSONL, get-many, sleep, fmt2, rsrt, and the full transcendental math suite (sqrt, pow, exp, log, log10, log2, sin, cos, tan, atan2). Map section rewritten for typed keys. slc / take / drop entries note negative-index semantics. New Inline lambdas subsection. !! added alongside ! in the auto-unwrap section.

guide/error-handling.md — add !! panic-unwrap

Documents the symmetric panic-unwrap that aborts the program with a runtime diagnostic and exit 1 on ^e / nil. Same R/O callee shape as !, no constraint on the enclosing return type, so main>t scripts can use it directly.

guide/collections.md — feature pickups

Negative indices on slc / at / take / drop with the common idioms (slc xs 0 -1 to drop the last, slc xs -2 (len xs) to keep the last two, etc.). Map keys are typed (text or integer), with the integer-key idiom inline. New Inline lambdas subsection showing closure capture.

reference/cli.md — AOT parity + top-level output contract

The AOT scope claim was numeric-only-arithmetic-loops. AOT now matches the Cranelift JIT surface — the whole language minus closure capture. New Top-level program output section covers the stdout / stderr / exit-code split for ~v / ^e / non-Result returns, and calls out that the contract holds byte-for-byte across in-process runners and AOT binaries.

Test plan

  • npm run build clean (30 pages built, no broken links)
  • Spot-checked rendered builtin tables in dev preview
  • Cross-referenced every new entry against SPEC.md and examples/ in the main repo
  • No content removed that's still accurate; only stale claims replaced

Out of scope

  • Engine-specific framing (tree / VM / Cranelift) deliberately stays in SPEC.md. The site is for users; engine choice is a CLI flag, not a language feature.
  • Marketing pages (index.astro, manifesto.md) didn't have stale feature claims, so they're untouched.

The reference was missing roughly half the standard library and the
shape of the surviving entries had drifted from the engine. Bring it
back into line with SPEC.md as of 0.11.2.

Adds entries for take, drop, at, lst, uniqby, zip, enumerate, range,
chunks, window, cumsum, frq, flatmap, partition, plus the stats /
linalg / set / FFT families, the text-case + padding + regex helpers,
chars / ord / chr, datetime, JSONL, get-many, sleep, fmt2, rsrt, and
the full transcendental math suite.

Map keys are now typed (text or integer) with float keys flooring at
the builtin boundary; documented inline with an example showing
Int(7) and Text("7") as distinct keys.

slc / take / drop accept negative indices counting from the end with
clamp-on-overflow.

Adds the !! panic-unwrap operator alongside ! in the auto-unwrap
section, with the same R/O callee shape but no constraint on the
enclosing return type, so main>t scripts can use it.

Adds an Inline lambdas subsection showing the (params>ret;body)
literal as an HOF argument, including closure capture from the
enclosing scope.
! propagates errors via the enclosing function's return type, which
means scripts and one-shot main entry points have to wrap everything
in >R t t and emit ~v just to bail on a missing file. !! is the
symmetric form that aborts the program with a runtime diagnostic and
exit 1 on ^e / nil, with no constraint on the enclosing return type.

Same R/O callee shape as !; pick !! when failure is a programming or
environmental error the caller cannot recover from.
…line lambdas

slc / at / take / drop accept Python-style negative indices counting
from the end with clamp-on-overflow. Documents the common idioms
(slc xs 0 -1 to drop the last, slc xs -2 (len xs) to keep the last
two, take -1 / drop -1, etc.) inline with the slc section.

Map keys are typed: text or integer. Int(1) and Text("1") are
distinct, so an index lookup map can use numeric keys directly
without an str j tax on every iteration.

Inline lambdas (params>ret;body) can be passed directly to any HOF
in place of a one-off helper decl, including with closure capture
from the enclosing scope.
The AOT compilation section claimed numeric-only scope, but ilo
compile now matches the Cranelift JIT surface, which is the whole
language minus closure capture. Update the disclaimer accordingly.

Add a Top-level program output section to the CLI reference covering
the stdout / stderr / exit-code split for ~v / ^e / non-Result
returns. Calls out that the contract holds byte-for-byte across
in-process runners and AOT-compiled binaries — output is identical
whether you ilo run or ilo compile && ./binary.
…refresh

# Conflicts:
#	src/content/docs/docs/reference/builtins.md
@danieljohnmorris danieljohnmorris merged commit d30ca83 into main May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant