Aether 30.2 — a standard library worth the name#675
Merged
Conversation
Adds 15 list combinators, all written in Aether itself (so the type checker and all three backends cost nothing new): zipWith, concatMap, takeWhile, dropWhile, span, partition, scanl, insert, sort (polymorphic insertion sort), product, maximum, minimum, last, init, iterate. They compose directly with 30.0 comprehensions and 30.1 sections, e.g. sort (concatMap (fn x -> [x, 0 - x]) [1 .. n]). Verification: a new 200-program stdlib fuzzer (stdlibFuzz.ts) generating random calls across all 11 order-sensitive combinators, each checked against an independent TypeScript reference and the JS backend (300/300 across four seeds); a 15-case in-app `stdlib` battery (suite 182 -> 197, WASM 166 -> 181); a gallery example; About/stdlib updates. No regression across the property suite and every optimizer/comprehension/section fuzzer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BSXUJbL86qsEW8zJqvUppq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves the existing
aether-lang-c3d8project. Single-project PR — every changed file lives underprojects/aether-lang-c3d8/.What changed
30.0 (comprehensions/ranges) and 30.1 (operator sections) made Aether pleasant to write; this makes it productive to write, by giving it the list vocabulary every functional programmer expects. All fifteen combinators are written in Aether itself on top of the existing primitives — so they cost the type checker and the three backends (VM · JS · WASM) nothing new, and the differential suite covers them exactly like user code:
zipWith,concatMap(the list-monad bind),scanl(foldl keeping every running accumulator),iterate(a bounded orbit).takeWhile,dropWhile,span,partition(order preserved in both halves).insert(into a sorted list) and a polymorphicsort(ascending insertion sort on the structural≤, sosort ["pear", "apple"]works as readily as on ints).product,maximum,minimum,last,init.They compose directly with the new syntax:
sort (concatMap (fn x -> [x, 0 - x]) [1 .. n]),partition (> 0),zipWith (+).Verification
stdlibFuzz.ts): random calls across all 11 order-sensitive combinators, each proved against an independent TypeScript reference and the JS backend — 300/300 across four seeds.stdlibbattery: suite grows 182 → 197, WASM ≡ VM 166 → 181.scripts/verify-project.mjs: scope + conformance + lint +tsc+ build) green locally.A new gallery "Standard-library tour" example; an About feature-list bullet and the stdlib listing;
JOURNAL.mdcarries the plan and a session-log entry.🤖 Generated with Claude Code
https://claude.ai/code/session_01BSXUJbL86qsEW8zJqvUppq
Generated by Claude Code