Skip to content

docs(t27o): RFC for heap-free collections, owned strings and inlined closures (Closes #11177) - #11180

Merged
gHashTag merged 2 commits into
masterfrom
t27o/rfc-heap-free-r2
Oct 20, 2026
Merged

gHashTag merged 2 commits into
masterfrom
t27o/rfc-heap-free-r2

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #11177

What

One document, docs/now/2026-10-20-heap-free-collections-rfc.md (981 lines, ASCII). No compiler, spec, ledger, seal or Rust is changed.

Result

  • Demand (section 1): the Rust sweep (1,388 files, 19,392 fns, 16,057 first refusals) by family and repository: lists 2,168 direct / 2,813 root, owned strings 922 / 1,655, iterator chains and closures 419 / 588; tuples, paths and I/O, maps and sets are the same order and are not addressed by any option. Python: 6,004 distinct lines (1.8%) are blocked by heap values alone, 2,075 by owned strings alone; the rest of the 5.0% (16,577 lines) also needs things that are not heap features. Two numbers of the brief did not reproduce as stated and the document says so: the 38.5% type share is 6,180 refused items over 16,057 fns (30.8% counting fns alone), and the saved sweep has 854 tuple first refusals, not 650.
  • Options (section 2): (a) Buf(T), (b) Vec(T, N), (c) arena, (d) closures inlined at their single call site, (e) owned strings as buffer plus count, (f) none. Each has its t27 source, what Zig, Rust, C and Verilog emit, what it unlocks and its cost, set against two measured precedents of a back-end change (lexer: \xNN in a string lowers to one byte, and every backend writes the byte back #10812: 49 files, 42 seals; gen-rust: eight constructs that passed test-report now compile under rustc (Closes #8891) #9135: 290 files, 286 seals) and the hand-line budget.
  • Recommendation (section 3): none of (a)-(e) as a language construct now; option (f) plus three steps that change no language (fix the back-end defects the experiment found, keep the buffer forms as one shared library, run a sized pilot). At the end-to-end rates measured so far (0.6% to 1.3%) the three-family package converts 30 to 64 more fns and deletes 15 to 139 hand lines; deleting 1,000 needs 9.1% of the package to convert, seven times the best rate measured.
  • Experiment X1 (section 4, no compiler change): four census functions (three Rust, one Python) written by hand in the forms: t27c test-report 9/9 with 0 vacuous passes, t27b test 9/9, 9 of 9 mutants killed, generated Rust agrees with the Python and Rust originals; generated C (12 errors) and Verilog (20 errors) do not compile. Exit criteria E1-E6 and a sized pilot X2 (15 of 100) are stated.
  • Found on the way (section 6.1): seven back-end defects (D1-D7), none fixed here, each with a reproduction.

Not run

No cargo build (the shared t27c 0.5.2 and t27b binaries were used); tri t27o-sweep was run on this checkout only, the five-repository numbers are lane A4's saved outputs read back with a reader that reproduces the published counts; the Python heap decomposition could not be split by repository (lane A9's scratch was removed meanwhile); X2 and the second half of X1 are sized, not run. The commit-time gates that need a tri binary did not run locally.

Checks run locally

python3 -I tools/check_devhome_paths.py OK; the document has no non-ASCII byte and no home-directory path.

🤖 Generated with Claude Code

…closures -- the measured demand, six options, one experiment, and the recommendation to build none yet (Closes #11177)

A document only: no compiler, spec, ledger, seal or Rust is changed.

Demand. The Rust sweep (1,388 files, 19,392 fns, 16,057 first refusals) read back by family and repository, the headline
38.5% reproduced with its denominator stated (6,180 refused items over 16,057 fns; 30.8% counting fns alone), the Vec
split (#11135), the iterator funnel (#11145), the golden prize (#11149, #11159) and the Python census (#11168), including
the 5.0% ceiling split into the 6,004 lines blocked by heap values alone and the rest.

Options. (a) Buf(T), (b) Vec(T, N), (c) arena, (d) closures inlined at their single call site, (e) owned strings as buffer
plus count, (f) none; each with its t27 source, what Zig, Rust, C and Verilog emit, what it unlocks and what it costs, set
against two measured precedents (#10812: 49 files; #9135: 290 files) and the hand-line budget.

Experiment X1, no compiler change: four census functions written by hand in the forms, 9 tests pass under t27c test-report
(0 vacuous) and t27b test, 9 of 9 mutants killed, generated Rust agrees with the Python and Rust originals, generated C
(12 errors) and Verilog (20 errors) do not compile; seven back-end defects found, none fixed. Exit criteria and a sized
pilot X2 are stated; the recommendation is option (f) plus three steps that change no language.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 23:56:26 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 46
PRs with All Checks Green 4
READY 2
FAILING 46
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 46 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e34e1b174c96 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

… the reader reproduces exactly and which differ by two (Closes #11177)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 23:57:14 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 2
FAILING 47
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 47 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e34e1b174c96 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag marked this pull request as ready for review October 20, 2026 00:10
@gHashTag
gHashTag merged commit 876d3c2 into master Oct 20, 2026
28 of 29 checks passed
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.

RFC: heap-free collections, owned strings and inlined closures in t27, with the measured demand of the Rust and Python censuses

2 participants