diff options
| author | eunhhu <[email protected]> | 2026-10-18 20:54:10 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-18 20:54:10 +0100 |
| commit | da0d7514b058f1baa99a8bcc8f9e23b43cac12de (patch) | |
| tree | 688106ea656946bd74f36259c2dd2316b9a429d8 /docs/design/027-computation-core.md | |
| parent | 936c08e3424c606855051ee86f25a7df0f162c62 (diff) | |
| download | pure-da0d7514b058f1baa99a8bcc8f9e23b43cac12de.tar.gz pure-da0d7514b058f1baa99a8bcc8f9e23b43cac12de.zip | |
Module format v7, 027's 4d: every input a message: a module's inputs are messages, outputs and arguments (kinds 1 to 3), a message bound to what makes it (PureBinding: a key's press or its release, a text input, a timer, a frame, a pointing at a table), each binding's fields fixed (none; one text; one number, dt; one u32, the item's position, the table its view), one frame input at most; a handler's event its input's number; no DT or TEXT_INPUT (97 opcodes now 95, FIELD reads dt and the text), pure_app_input, frame, tick, text and point, pure_module_position, PureEdge or an app's ticks: every event is pure_app_message, saved after it unless deferred; pure-run sends each command's message to the input bound so (a release or a frame no input takes still an event, clearing the fault, so the workbench parity holds) and defers a stored app's saves past frames as before; pure-serve posts a press with its key's release, refuses timers, frames and pointings (no_input) and ticks timers as messages; holes closed: the tier found a handler's input by the old numbering, reading a message's number field as another input's (aup's numbers caught it), and serve's replies_borrow did too; module-probe presses as messages; unit tests: the test modules' builder (expand) writes the old shapes as bound messages, pointing over a pointing input and its table, stored frames deferred as a host defers them, a press's handler refused a FIELD; counts: b35 against b34 with batches BFS +0.03%, the rest within 0.001%, without batches BFS +0.12%, join +0.01%; the bank's queries (s34 on the 4c aup's module, s35 on 4d's, six each in turns) field -0.23%, found -0.14%, large -0.12%, in_credit +0.11%, the rest within 0.06%; 008 and 027
Diffstat (limited to 'docs/design/027-computation-core.md')
| -rw-r--r-- | docs/design/027-computation-core.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/design/027-computation-core.md b/docs/design/027-computation-core.md index b0a2971..eeebd8b 100644 --- a/docs/design/027-computation-core.md +++ b/docs/design/027-computation-core.md @@ -337,6 +337,30 @@ `on frame`과 `dt`는 숨은 프레임 입력과 그 필드로, `input typed = text`의 `typed`는 그 필드로 낸다. `view X_focus = at.position`은 숨은 가리킴 입력과 `at`을 옮기는 핸들러를 낸다(그래서 앱이 바뀌지 않는다). - Vega: 키, text, 타이머, 프레임, 가리킴을 묶음을 보고 메시지로 보낸다. serve: 키와 text의 POST를 메시지로, 타이머를 주기 묶음으로. + - **만듦(2026-10-18).** 모듈 형식 v7. + - 형식: 입력 항목의 종류는 메시지 1, 출력 2, 인자 3이고, 다음 바이트가 묶음이다(없음, 누름, 뗌, text, 타이머, 프레임, + 가리킴). 인자 자리는 키 이름(누름·뗌), 주기(타이머), 보기(인자, 가리킴의 표)다. 핸들러의 이벤트는 입력의 번호다. DT와 + TEXT_INPUT이 빠져 명령은 97개에서 95개가 되었다(DT 뒤의 번호가 하나, TEXT_INPUT 뒤가 둘 당겨졌다). + - 로드: 묶음마다 필드의 모양을 확인한다(누름·뗌·타이머는 없음, text는 text 하나, 프레임은 수 하나, 가리킴은 u32 하나와 + 표인 보기). 프레임 입력은 하나까지다. 키는 묶음 안에서 겹치지 않는다. + - 코어에서 빠진 것: `pure_app_input`·`frame`·`tick`·`text`·`point`, `pure_module_position`, `PureEdge`, 앱의 `ticks`. 사건은 모두 + `pure_app_message`이고 그 뒤에 저장한다(지연 저장이면 묶음의 저장에서). + - 호스트: pure-run의 `down`·`up`·`type`·`tick`·`frame`은 묶인 입력에 메시지를 보낸다. 받는 입력이 없는 뗌과 프레임은 사건으로 + 세고(워크벤치와의 대조가 그대로다) fault를 지운다. 저장소를 가진 앱은 늘 지연 저장으로 돌리고, 프레임이 아닌 명령 뒤에 + 저장한다(전의 프레임 저장 그대로). pure-serve는 누름의 POST를 누름과 그 키의 뗌으로 넣고, 타이머·프레임·가리킴에는 + `no_input`이다. Vega는 `vega_frame`(지연 저장으로 dt 1/60), 누름 뒤 뗌, 가리킴(항목 위치의 u32)을 메시지로 보낸다. + - aup: 겉은 그대로다. `on k.up`은 숨은 입력 `k.up`(뗌), `on frame`은 숨은 입력 `frame`(필드 `dt`), `view T_focus = + at.position`은 숨은 입력 `T.point`와 그 핸들러(FIELD 0, ANCHOR_AT, ANCHOR_STORE)를 낸다. `dt`는 프레임 핸들러에서 그 필드, + 다른 곳에서 0이다. + - 고친 것: JIT의 계층(tier)이 핸들러의 입력을 옛 번호(`(event − 1) / 2`)로 찾아 메시지의 수 필드를 다른 입력의 필드로 + 읽었다(aup의 numbers가 잡았다). serve의 `replies_borrow`도 옛 번호를 썼다. + - 시험: 단위 시험의 모듈 짓기(`expand`)가 옛 모양의 시험(키, text, 타이머, 이벤트 0과 `2 + 2i`)을 묶인 메시지로 옮겨 쓴다. + `pointing`은 가리킴 입력과 그 표로 다시 썼고, `stored_frames`는 호스트처럼 지연 저장으로 프레임을 넣는다. 키의 누름은 필드 + 없는 메시지라 그 핸들러의 FIELD는 거절된다. + - 명령 수(b35 대 b34): 묶음과 함께 BFS +0.03%, 나머지 ±0.001% 안이다. 실행기만은 BFS +0.12%, join +0.01%, 나머지 ±0.001% 안이다. + 은행 질의(s34는 4c의 aup 모듈, s35는 4d의 것, 번갈아 각 여섯 번의 중앙값)는 field −0.23%, found −0.14%, large −0.12%, + in_credit +0.11%, per_branch +0.06%, ranks +0.04%, none 0.00%다. + - 줄 수: 코어 22,287 → 22,221, serve.c 4,978 그대로, aup의 compiler/ 5,820 → 5,896(숨은 입력 셋). - **4e. 보기는 아무 값(의심 2).** - 보기의 타입은 레코드 필드의 타입이다. 표는 레코드의 리스트를 내는 보기이고, 열은 그 레코드의 필드다. - 게으른 칸 계산과 한 번 훑는 집계는 그 구현으로 남는다. 항목이 리스트를 담을 수 있고, 보기의 본문이 지은 리스트도 낼 수 있다. |
