[series] Step 1 — primitive Series over {Int, Float} #61
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First, primitive tier of the
seriesmilestone (#8). ShipSeries TforT ∈ {Int, Float}as a kernel-tier.aillibrary extension wrappingRawBuf.What ships
series.ailkernel-tier module: aSeriesADT ((ctor S (con RawBuf a) Int Int Int Int)— buffer + lookback/head/count/total),param-in (a Int Float).ownreturns):new,push,at(financial indexing, 0 = newest),len,total_count. Signatures per 0007 §"Series — the library extension".Acceptance
Series.push, not a per-push ~40-byte wrapper realloc. Use the bench harness; record the number. If push falls back to wrapper-realloc, file a follow-up pointing at the 0009boxpath — do NOT block step 1 on it. clang-O2will not rescue a missed elision (D5).Guardrails (milestone #8 decisions)
Anchor:
design/models/0007-kernel-extensions.md. Entry path: brainstorm → planner → implement → fieldtest.Step 1 SHIPPED and closed 2026-06-02. Primitive Series T for T in {Int, Float} ships as a kernel-tier .ail library extension over RawBuf (crates/ailang-kernel/src/series/): 5 ops (new/push/at/len/total_count), financial-style indexing (index 0 = newest), own-in/own-out linear push threading. SMA worked example builds, runs, and prints the correct rolling average; full workspace green; leak-clean (the drop-soundness tail #63, a general pre-existing 3-leg cluster surfaced via this milestone, is fully fixed — legs 1/2/3 across 68f500c/e3a9065/d72fe0c, series_sma live=0).
Commits: precondition
b11a6d9-> RED6b7ee45-> GREEN module35a9bc6-> model-0007 reconcile73fbb24-> fieldtest3b3c8c4.Step 2 (#62, SoA record-of-series) is DEFERRED and detached from this milestone: per its grounding comment it is not a pure-AILang library step (nominal-only language => no generic record-Series) but a base-tier/language decision. The series milestone closes at this delivered primitive tier.