aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design/008-module-format.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 03:56:43 +0100
committereunhhu <[email protected]>2026-10-19 03:56:43 +0100
commit1034ff06b1a5742f332365d7069f41db78642c87 (patch)
tree8b09ea988b147e7f7c2d7918a91266096f706a09 /docs/design/008-module-format.md
parent5842b26e8353a38192afb1ebe4c08809da48dbf4 (diff)
downloadpure-1034ff06b1a5742f332365d7069f41db78642c87.tar.gz
pure-1034ff06b1a5742f332365d7069f41db78642c87.zip
Bytes compared (140's decision point: DNS and HTTP both met it): TEXT_COMPARE's argument takes PURE_COMPARE_BYTES (bit 8) beside its relation, its two then bytes (UTF-8 asked of neither), as CONCAT's argument says bytes; verified as A_ORDER (a relation, and the bit), the executor relating by the argument's relation alone; the JIT, the tier and the batch executor leave TEXT_COMPARE to the executor as before; unit test bytes_compared: eight relations of a constant's bytes, none, 0xff and 'A' (0xff after 'A', a longer after its first byte), four refused (the bit on texts, no bit on bytes, a text with bytes, a relation past NE); counts: b46 against b45 the same on all five works, with and without batches; 008
Diffstat (limited to 'docs/design/008-module-format.md')
-rw-r--r--docs/design/008-module-format.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md
index 4d950fd..41abb3b 100644
--- a/docs/design/008-module-format.md
+++ b/docs/design/008-module-format.md
@@ -145,7 +145,7 @@ v7은 027의 4단계(패턴 모으기)의 판이다. 4b로 **키별 문서**를
| 52 | PICK | … → … v | `인자`개 아래의 값을 복사해 올린다(0이면 맨 위). 타입과 대상도 그대로 |
| 53 | SLIDE | … v → v | 맨 위 값 아래의 `인자`개(1 이상)를 버린다 |
| 54 | FOLD | → n 또는 i | 집계. `인자`의 비트 0–7은 종류(0 count, 1 sum, 2 max, 3 min, 4 first, 5 distinct: 포함된 항목의 서로 다른 값의 수, −0은 0), 8–15는 리스트 상태, 16–31은 뒤따르는 블록의 길이 L. 그 L개 명령이 항목마다 그 리스트의 열처럼 돈다(`ROW`가 항목). count는 블록이 참을 남긴 항목을 세고, sum·max·min·distinct는 블록이 남긴 수와 포함 여부(bool)로 계산한다. first는 블록이 참을 남긴 첫 항목의 인덱스(그 리스트의 인덱스)이고 거기서 멈춘다. 포함된 항목이 없으면 count·sum은 0, max·min·first는 `not_found` |
-| 55 | TEXT_COMPARE | t t → bool | 바이트 순서로 비교한다. `인자`는 관계(0 LT, 1 LE, 2 GT, 3 GE, 4 EQ, 5 NE, 수 비교 명령의 순서). 앞이 같으면 짧은 쪽이 앞이다 |
+| 55 | TEXT_COMPARE | t t → bool, b b → bool | 바이트 순서로 비교한다. `인자`의 비트 0–7은 관계(0 LT, 1 LE, 2 GT, 3 GE, 4 EQ, 5 NE, 수 비교 명령의 순서), 비트 8(`PURE_COMPARE_BYTES`)이 서면 둘 다 바이트다(UTF-8을 묻지 않는다, 140의 DNS와 HTTP 뒤). 앞이 같으면 짧은 쪽이 앞이다 |
| 56 | LIST_FIND | k → i | 키 있는 리스트 `인자`에서 키가 k인 항목의 인덱스. 반씩 나눠 찾는다. 없으면 `not_found` |
| 57 | LIST_HAS | k → bool | 그 키의 항목이 있으면 참 |
| 58 | NOW | → n | 이벤트가 보는 지금(1970년부터 ms, UTC). 호스트가 정하고 스크립트는 아무 때나 재현한다. 핸들러 전용: 보기는 상태의 순수 함수로 남는다 |