FunctionalScriptCLIPRsReleasesPlaygroundGitHub ↗

root / changelog / 0.57.0

← Previous: 0.56.0 · Next: 0.58.0 →
  • compiler: default parameters, (a, b = a, ...r) => …, with JavaScript's length and defaults evaluated only for undefined, once per call; rest parameters cannot have defaults. (#2963)
  • compiler: let declarations and assignments in bodies and modules, including binding patterns; closures cannot capture reassigned variables. let x;, export let and module-level loops remain refused. (#3168, #3194)
  • compiler: terminating switch statements, with braced cases, stacked labels and an optional final default; cases end in return or throw, with no fallthrough. (#3045)
  • compiler: call statements such as assert(a); evaluate the call where written and discard its result; the parenthesized comma operator (a, b) evaluates both operands and returns the second. (#3075, #3097)
  • compiler: array destructuring patterns admit elisions, such as const [, b] = v and ([, v]) => v; array literal holes remain refused. (#3100)
  • compiler: admits Object.entries as a static function, including const { entries } = Object; every executor implements it natively. Optional guards on namespaces, such as Object?.is, are refused. (#2984, #3093)
  • cas/git: new Git branch CAS, with snapshot and branchCas, and fjs cas git add, get and list; SHA-1 and SHA-256 repositories work, and writes leave the worktree and index alone. (#3197, #3198, #3200)
  • cas: add contentKey(sha2)(payload), computing a payload's key without storing it. (#3195)
  • zlib: chunked FunctionalScript DEFLATE decoding and Adler-32. Git readers use it to read objects larger than 128 KiB; delta chains have an 8 MiB ceiling. nanvm-effects-node also answers inflate. (#3009, #3016)
  • compiler/serializer: shared expressions are named once by identity, rather than copied into every use; equal but distinct nodes stay distinct. Nested regions reuse enclosing bindings. (#2965, #3144)
  • compiler, js/ast, edag: structured source normalizes through Foundation AST (FAST), and JavaScript and Rust share output preparation. Folded AstModule and AstConst are retired. (#3141, #3142, #3143, #3144)
  • edag: canonical invocation reads can change graph bytes and hashes; source &&, || and ?? lower to conditionals, and the former logical node tags are rejected. (#3141, #3143, #3145)
  • edag/from_fast: canonical invocation loops with zero to sixteen fixed inputs can reconstruct their enclosing function directly, preserving arity and self calls without an extra wrapper. (#3146)
  • js/runtime: the runtime value is { static, dot }, both functions; statics and member are separate table exports. codePointAt joins startsWith as a FunctionalScript member body. (#3006, #3031, #3052, #3056)
  • nanvm-lib: compiled modules take a runtime value, and member calls consult its dot before the native fallback. Built-ins have native function text; the former lifted runtime tables are removed. (#3005, #3049, #3051, #3055, #3056)
  • js/intrinsic: add slice and charCodeAt, function helpers recognized whole by the compiler and answered natively on every executor. (#3048, #3052)
  • types/object/entry: add hasEntry for enumerable own-property presence, including an own undefined. entry still returns the value or undefined; the js/entry re-export is removed. (#3024, #3037, #3038)
  • emergent_testing: a proof module that fails to load becomes a named failed test; neighbouring modules still run, and Node, Bun and Deno report failure instead of silently passing it. (#3072)
  • effects/spidermonkey: run CLI commands with npm run sm, including npm run sm t and npm run sm c; the host can create directories, remove files and write outputs larger than 128 KiB. (#2986, #2990, #2991)
  • text/shell: tryShellQuote moves here from website/demo/code, quoting one POSIX shell word and refusing NUL. (#2991)
  • effects/node: imports correctly escape filesystem paths, including spaces, #, % and POSIX colons, while preserving file: URLs; other URL schemes are treated as paths. (#2949)
  • effects: add attemptStep, carrying an effect's whole Result as a success value, and host-side asyncRunAll, which handles all itself. (#3117, #3157)
  • effects/memory: add slotId; the Node memory handler factory is renamed from memoryOperationMap to asyncMemoryOperationMap. (#2967)
  • effects/common: randomInt moves here, with its Node re-export retained, and the browser demo host answers it too. Unreadable thrown values share effects.unreadableThrownValue. (#3053, #3106)
  • media: dialectEntry is removed; register jsonDialect(schema).entry instead. media/json adds stringifySorted, canonical JSON with sorted keys. (#2952, #3089)
  • media/rust/item: add constSlice and generatedHeader; indent moves here from edag/rust. Generated string rows refuse names Rust cannot represent instead of emitting invalid Rust. (#2951)
  • media/markdown: add block parsing for README content, including GitHub task list items; directory pages render their README above the demo. (#3138, #3218)
  • text/utf8: utf8ToString moves here from text; the removed vecToCodePointList(v) is toCodePointList(u8ListMsb(v)). text/utf16 adds codeUnitToString. (#2975, #3068)
  • text/ascii: add charIs, isDigits, codePoints and decimalValue; text/code_point adds unicodeNotation, and js/identifier exports isIdentifierStart and isIdentifierPart. (#3067, #3122, #3133, #3150)
  • basen/base16: add byte-list hex encoding and checked decoding, including lowercase-only decoding, and encodeScalar(width)(value) for zero-padded scalar hex. (#3069, #3137)
  • types/list, types/array: add findMap, returning the first non-null mapped answer; types/function adds fixpoint, moved from ebnf/data._fixpoint. (#3102, #3151)
  • types/stack_walk: add walkFold, walk and pushOk for explicit-stack walks. types/btree/find adds findValue and contains. (#3070, #3110)
  • types/bit_vec: add u8ListToVecChunksMsb and u8ArrayMsb; types/string adds occurrences(needle)(text), counting non-overlapping occurrences of a non-empty needle. (#3101, #3153, #3159)
  • git/format: tryOidBytes and oidBytes move here from git/store. git/bytes adds cString, untilNul and cmp; git/oid adds oidAt. (#3090, #3103)
  • path/import, cli: add specifierKind and exactArgs, respectively. ebnf/lib/json adds entry and valueCases; rtti/common adds readerOf. (#2954, #2968, #3104, #3105, #3113)
  • edag/analysis: add ownOperandsOf; edag/operations adds invokerWith; edag owns stepOperands, mapSteps and mapItems. (#3088, #3115, #3176)
  • edag/value/semantics: add tagUndefined, isUndefined and isNullish; edag/value/convert adds toIntegerOrInfinity. (#3156, #3175)
  • compiler/tokenizer: DjsToken and DjsTokenWithMetadata become ModuleToken and ModuleTokenWithMetadata; _djsTokenKinds becomes _moduleTokenKinds, and grammar djsModule becomes module. (#3123)
  • asserts, ebnf/ast, ebnf/token_symbol, types/nullable, types/object/structurally_same: module.f.mjs becomes module.f.js; update direct imports. (#3063, #3077, #3079, #3082)
  • git/config, git/refstore/scope, text/ascii, media/rust/item, website/demo/code, website/issue and compiler/ast: module.f.mjs becomes module.f.js. (#2960, #2983, #3062, #3099, #3124, #3165)
  • sul: add pushWithHeight and endWithHeights, reporting each bit's completed levels without changing roots; the stripes demo draws hash levels up to the root and offers named examples. (#3190, #3191, #3204)
  • rtti/ts: add dataToTsMarked. Schema graphs expand nested named definitions once and draw recursive back edges, with interactive connection highlighting. (#3036, #3207, #3208, #3224, #3225)
  • website: specification pages show their examples as JavaScript and WebAssembly, alongside EDAG, Rust and WAT; the playground adds an animated B-tree compaction game. (#3059, #3060, #3092, #3096, #3139)
  • website/demo: initial views are prerendered, highlighted fields keep their colours during editing, and code fields disable spell checking. Graphs scroll within their column and support recursive back edges. (#2977, #2978, #2982, #3019, #3202)
  • website/demo/graph: edge rows beside values name their targets. website/demo adds dragValue, and website/demo/versions adds binaryKeys. (#3033, #3134, #3158)
  • mcp: the CAS server advertises the package version, now 0.57.0, rather than the stale 0.30.0. (#3111, #3236)
  • ci: checks reuse successful results keyed by inputs, commands, platform and tool pins; concurrent cache publications merge and retry, and unchanged cache trees are not pushed. (#3227, #3229, #3233, #3235)
  • Tested toolset: Node 26.12.1, Deno 2.8.3, Bun 1.4.4, Rust 1.99.1, TypeScript (typescript-go) 7.0.2, Wasmtime 45.0.2, Wasmer 7.1.0; SpiderMonkey 140.14.0. (#2988, #3169)
Support FunctionalScript: GitHub Sponsors ↗ · Open Collective ↗ · Patreon ↗