feat(text): Char.category and case folding #815
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!815
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/373-text-category-casefold"
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?
Commit 2 of 2 for #366 (the Unicode tables of #372 are merged).
What
GeneralCategory(public, the 29 categories aCharcan have;Cshas no case) withabbreviation(),fromAbbreviation()and the seven group predicates.Char.category()over a privatecategoryCode()native.Char.toCaseFolded()(simple folding),Char.nextCaseVariant()(cyclic step through a fold class) andString.toCaseFolded()(full folding), all natives from #372.docs/standard-library/text.md, CONCEPT, ROADMAP, regenerated skills.character-category(one code point per category,fromAbbreviationincl.Cs/xx/empty, group predicates, BMP sweep whereisLetter()agrees withcategory().isLetter()) andcharacter-case-folding(K/k/Kelvin, sigma, theta class of four, ss/ffi, no Turkic folding, Armenian, Cherokee, Georgian, Deseret, ASCII, empty text, idempotence, and a sweep over planes 0-2 that every fold class closes and folds alike).Verified locally (VM-only
torb)docs check docs --no-native,docs index --check,doc --check --no-run std,format --check,check tests/conformance,docs skill --check; both conformance programs run in the VM and match.expected.Not verifiable here
.allocationsof both programs areunbudgeted: ...(no C compiler on the worker): runsh tools/conformance.sh --filter <name> --update-budgetson linux x86_64 and commit the numbers.Stringis always valid UTF-8); the runtime C test of #372 covers it.String.toCaseFoldedalways allocates for non-empty text, so no shared-storage claim is made or asserted.Closes #373
CI red on
a083171:ci / tier A (linux-x64)failed after 48m20s (run 2999, job 5;gatesfollows from it); the job log is not readable with my token, so the cause is not confirmed. The two new.allocationsfiles areunbudgeted: ...and CI is exactly the linux x86_64 box the PR body asks for, so check that first.Not mergeable on
a083171: conflict with main (base50dd5cf, merge base420a4fe), rebase and resolve..pdisc-sidecar.yamland the docs touched here are the likely spots; re-stamp afterwards.No review yet: the next CI run on the new head brings me back.
a083171799c76438d975Approved on
c76438d(CI combined status success, tier A green in 43m; earlier red run and conflict ona083171are resolved: mergeable).character-category(29 categories,fromAbbreviationincl.Cs/xx/empty, group predicates, BMP sweepisLetter()vscategory().isLetter()) andcharacter-case-folding(K/k/Kelvin, sigma, thetas, ss/ffi, no Turkic, Armenian, Cherokee, Georgian, Deseret, ASCII, empty, idempotence, planes 0-2 class-closure sweep) with.expected/.exit; tier A and the Node/PHP/WASM/same-C jobs pass.category()maps 0-26, 28 and_(29/out-of-range) toUnassigned; 27 (Cs) is unreachable and commented. Folding semantics in the docs match CaseFolding.txt (simple C+S, full C+F, no T;İsimple = itself, Cherokee folds up). The three natives and the privatecategoryCodeare declared as in the issue.String.toCaseFoldedalways allocates, so no shared-storage claim is made.text.md, its skill copy, CONCEPT and ROADMAP updated; sidecar re-stamped; pdisc check green.Non-blocking:
.allocationsfiles areunbudgeted: ...(harness accepts that form). Please commit measured budgets fromsh tools/conformance.sh --filter <name> --update-budgetson linux x86_64 as a follow-up.docs/ROADMAP.mdnow lists the Unicode tables as built while segmentation is stated as not built; fine, just keep the "planned" wording in sync when that issue lands.