Skip to main content

Phase 6. Strings and I/O

FieldValue
MEPMEP-45 §Phases · Phase 6
StatusNOT STARTED
Started
Landed
Tracking issue
Tracking PR

Gate

Strings + stdlib I/O fixture suite (~40 cases: utf-8 iteration, slicing, concat, format, file read, file write, stdin read) compiles + runs byte-equal vs vm3 on host triple.

Goal-alignment audit

To be written before sub-phase 6.0 starts. Strings + I/O is how a program talks to the outside world; without them most realistic Mochi programs do not run. Aligns.

Sub-phases

#ScopeStatusCommitPR
6.0mochi_str: immutable utf-8 slice; short-string optimisation (≤15 bytes inline); precomputed BLAKE3-trimmed hashNOT STARTED
6.1+, len, [i], contains, startsWith, endsWith, split, join, toUpper/toLower via utf8procNOT STARTED
6.2print, println, format-string interpolation ("{name} is {age}")NOT STARTED
6.3File I/O: readFile, writeFile, lines, appendFile; stdin, stdout, stderr handlesNOT STARTED
6.4simdutf utf-8 validation on read; rejected input raises MOCHI_ERR_PARSENOT STARTED

Decisions made

Fill in along the way.

Deferred work

Locale-aware collation: v2 (utf8proc default order is enough for v1).

Closeout notes

Fill in after gate green.