diff options
| author | eunhhu <[email protected]> | 2026-10-19 04:42:05 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-19 04:42:05 +0100 |
| commit | 6596533b0d5fe10f3cab028d7fa69a40e5416ecd (patch) | |
| tree | 9c5a64858ac749d892e673b7aab04928cd3bbe60 /docs/design/028-bytes-state.md | |
| parent | 5a2292a389989b71b99ea582cf306cf1719d8aae (diff) | |
| download | pure-6596533b0d5fe10f3cab028d7fa69a40e5416ecd.tar.gz pure-6596533b0d5fe10f3cab028d7fa69a40e5416ecd.zip | |
028's bytes alone as a state, made: module state type 6 read as a text state flagged PURE_TEXT_BYTES in state_flags (so serve's same_states compares it for queries and replaces), its TEXT_LOAD giving bytes and its TEXT_SET taking them, a cursor's ops on it refused (anchor in bytes) and an anchor in it refused at load; one store file text-NAME, the values record marking each bytes state (kind 7, its name, 8 zero bytes), a text state's file that is no UTF-8 its initial value when marked and store_error when not (as before); a replace carrying bytes to a text only when its draft is UTF-8, else opening the store's draft anew; pure-run shows a bytes state's hex; unit test bytes_states (seven starts from a store: 0xff and 0x00 kept, bytes to text to bytes to text with no UTF-8 and with it; three replaces; four refused); counts: b47 against b46 BFS with batches +0.12%, the rest within 0.001%; the bank's queries (s45 and s47 in turns, six each, bytes compared among them) in_credit -0.31%, per_branch -0.18%, ranks -0.11%, the rest within 0.01%, the seven answers the same bytes; Pure, Vega and aup checks green; 008, 028
Diffstat (limited to 'docs/design/028-bytes-state.md')
| -rw-r--r-- | docs/design/028-bytes-state.md | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/design/028-bytes-state.md b/docs/design/028-bytes-state.md index 9396105..7e760fa 100644 --- a/docs/design/028-bytes-state.md +++ b/docs/design/028-bytes-state.md @@ -1,6 +1,6 @@ # 028 — 바이트 하나인 상태 -작성일: 2026-10-19. 상태: 설계. [140](../research/140-spec-suite.md)의 "027 뒤의 결정점"에서 써서 닿은 명세가 둘(inflate, +작성일: 2026-10-19. 상태: 만들었다(아래 "만든 것"). [140](../research/140-spec-suite.md)의 "027 뒤의 결정점"에서 써서 닿은 명세가 둘(inflate, HTTP/1.1)이 된 틈이다. 쌓임을 막는 규칙(둘 이상의 명세)을 넘으므로 핵에 들인다. 같은 결정점의 다른 하나(바이트의 `==`)는 TEXT_COMPARE의 인자 비트로 이미 만들었다(008). @@ -75,3 +75,23 @@ TEXT_COMPARE의 인자 비트로 이미 만들었다(008). - **바꿀 결정.** bytes를 상태의 타입으로 들인다. - **최소 확인.** 위 검증 모두. - **중단 기준.** 실행기만의 길이나 묶음 실행기의 명령 수가 1%를 넘게 바뀌면 멈추고 어디를 건드렸는지 찾는다. + +## 만든 것 (2026-10-19) + +- **Pure.** 상태 타입 6을 text 상태로 읽고 `state_flags`에 `PURE_TEXT_BYTES`를 둔다. 표시가 상태의 모양에 들어가므로, 질의 모듈과 + 교체를 받아들이는 serve의 견주기(`same_states`)가 그것까지 견준다. 검증: bytes 상태의 TEXT_LOAD는 바이트를 놓고 TEXT_SET은 + 바이트를 받는다. 커서의 명령(CUR_START, CUR_END, TEXT_INSERT, TEXT_REMOVE, TEXT_LINE, 앵커의 MOVE·COUNT·AT)은 거절하고("anchor in + bytes"), 앵커가 bytes 상태를 가리키면 로드가 거절한다. 저장: `values`에 종류 7과 이름을 적는다. text 상태의 파일이 UTF-8이 + 아닐 때 그 표시가 있으면 초기값, 없으면 `store_error`다. 교체: bytes → text는 draft가 UTF-8일 때만 남기고, 아니면 초기값으로 + 저장소의 draft를 다시 연다. pure-run은 16진으로 보인다. +- **aup.** `state x: bytes`(`= "..."`), 이름은 바이트 값, `x = …`는 바이트(문자열은 바이트를 만난다), 커서와 text 연산은 진단. +- **검증.** + - 단위 시험 `bytes_states`: 저장소에서 다시 시작하는 일곱 번, 실행 중의 교체 셋, 거절 넷. 0xff와 0x00이 다시 시작을 지나 남는다. + bytes → text → bytes → text를 오가며 UTF-8이 아닌 것은 초기값, UTF-8인 것은 그대로다. 표시 없이 UTF-8이 아닌 text 파일은 기존 + 시험대로 여전히 `store_error`다. + - aup의 `bytes_state`: 300걸음을 저장소로 15번 다시 시작하며 파이썬과 같다. 같은 이름의 text로 저장소에서 시작하고 실행 중에 + 교체한다. 진단 셋. + - Pure, Vega, aup의 전체 검사가 지난다. + - 명령 수(b47 대 b46): 묶음의 BFS +0.12%, 나머지 ±0.001% 안이다. 실행기의 걸음은 그대로다(로드와 저장만 바뀌었다). + - 은행 질의(s45와 s47을 한 번에 번갈아 여섯 번의 중앙값, 바이트의 비교와 함께): in_credit −0.31%, per_branch −0.18%, ranks + −0.11%, 나머지 ±0.01% 안이다. 일곱 질의의 답은 바이트까지 같다. |
