<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pure/research/experiments/044-specs, branch master</title>
<subtitle>Verified execution runtime unifying state, persistence, and replication.
</subtitle>
<id>http://git.yeowoo.org/pure/atom?h=master</id>
<link rel='self' href='http://git.yeowoo.org/pure/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/'/>
<updated>2026-10-19T07:05:53Z</updated>
<entry>
<title>140: LIST_VALUE's copy reviewed before building (measured by spec: UAX #14 about 10% of its time, JSON tree 6%, HTTP 2%, inflate 0.06%, the rest none; the cost a tree built item by item, 64 ns an item and 250 ns a copy): lend and detach (CoW) noted as the decision point (a branch on every event list's change for 10/6/2/0/0/0), a compile-time move ruled out (it changes LIST_VALUE's contract), the arrays copied whole built (UAX #14 -6.8%, its share to about 3%); 041's five works within 0.03% (b49, b50), the bank's queries within 0.3% (s49, s50), noise between builds larger</title>
<updated>2026-10-19T07:05:53Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T07:05:53Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=4a7e780278df740e5e37c3307fe687405df72448'/>
<id>urn:sha1:4a7e780278df740e5e37c3307fe687405df72448</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140: aup's frictions written away and the apps measured again (no core change, no new opcode): lists declared together, targets together (straight when no value can read what a target changes), a list given a list value whole, abs, tick.period, hex where numbers go; lines to Python 1.47-2.04x (were 1.47-2.15x): UAX #14 176 to 169, layout 116 to 110, HTTP 148 to 146 and its last workaround gone; instructions of the four whose modules changed within 0.2%, inflate's and UAX #14's modules the same; the six specs' checks pass on the three paths, module_specs nine; RTO's checks no longer rewrite G (tick.period); the suite table's rows 5, 8 and 9</title>
<updated>2026-10-19T06:34:12Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T06:34:12Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=f1bb9de4ac72136a1b0722ce77ac4ea6fd4fa413'/>
<id>urn:sha1:f1bb9de4ac72136a1b0722ce77ac4ea6fd4fa413</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 8, box layout, written in aup with no new opcode (aup's examples/layout.aup: a subset of CSS Flexbox 1 written down first, one line, row or column, padding, gap, six justify-content, four align-items, grow and shrink with 9.7's loop, cross sizes stretched, nothing sized by content): 2,000 random trees (29,388 nodes; 7,659 items frozen at their padding by the loop) are Taffy 0.15's within 0.01 (layout_taffy, built by cargo; the worst 8.3e-5) and layout.py's bit for bit on the three paths, the paths the same; the single-pass subset first tried refused 66% of trees, so the loop came in; Taffy given min sizes equal to the padding (given 0 it floors at 0 while resolving lengths, where 9.7 floors the content box), the reference adding from the left (sum compensates since Python 3.12); module_specs in make check: 100 trees (tests/specs/layout); bars: 116 lines against Python's 54, 4,754 ns a node, Taffy's 644 (7.4x), pure Python 5,396 (Pure 1.14x faster), 1,494 instructions a node (9.7's loop 44%); four frictions; aup's rows read by position no longer copy (99,067 ns a node before); the suite table's row 8; CHECKPOINT's direction row</title>
<updated>2026-10-19T05:18:49Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T05:18:49Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=6215b1177e377b512aaa1296faa6311f809135f2'/>
<id>urn:sha1:6215b1177e377b512aaa1296faa6311f809135f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 10, RFC 6298's retransmission timer, written in aup with no new opcode (aup's examples/rto.aup, the timer a deadline in the state seen at each periodic tick): 20 scenarios (10 seeds, ticks every 10 and 100 ms; a closed loop: first sendings lost one in five, the receiver acknowledging cumulatively) and their 241,612 events right against rto.py, the model of the same rules (no known implementation takes given events), on the three paths, the paths the same; module_specs in make check: one scenario at both periods (tests/specs/rto, 2,297 events); bars: one workaround (the periodic tick: 2,795.8 ticks a timeout at 10 ms, 281.6 at 100, seen 4.27 and 49.23 ms late on average; ticks 93% and 57% of the counted work), 56 lines against Python's 30, three frictions (an input's period not readable, no abs, send a keyword); the one-shot timer's shape as a decision point, one spec needing it: noted, not made; the suite table's row 10</title>
<updated>2026-10-19T04:54:45Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T04:54:45Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=8071832bc7857634f66c94592b27b188c882ea54'/>
<id>urn:sha1:8071832bc7857634f66c94592b27b188c882ea54</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 5, line breaking (UAX #14, Unicode 16.0), written in aup with no new opcode (aup's examples/linebreak.aup, the properties as data: 2,787 ranges from the UCD 16.0 Vega's text is frozen at, built by Vega's text/unicode.py, loaded once): every line of LineBreakTest.txt (16,672) and 2,000 random lines (their boundaries as linebreak.py, the Python reference, which passes the test whole, works them out) right on the three paths, the paths' outputs the same; module_specs in make check: the ranges and the lines kept in tests/specs/linebreak (derived from the UCD, the Unicode License v3's notice), run by pure-run --views; bars: written, no workaround (three frictions: hex literals always i64, number no let's name, a let's list one a line), 176 lines against Python's 99, 6,920 ns a code point against Vega's C 34.7 (199x), pure Python 2,523 (Pure 2.7x slower), 1,774 instructions a code point (setup 260, the ranges' binary search 360, decide about 1,150 a boundary); the decisions before 8 (box layout: Taffy can be fetched by cargo, a subset to choose first; as a handler) and 10 (a one-shot timer is a core primitive one spec needs: noted, not made); the suite table's row 5; CHECKPOINT's direction row</title>
<updated>2026-10-19T04:42:00Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T04:42:00Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=c545227f2461e92afc38a0e1317a288e8c653cc6'/>
<id>urn:sha1:c545227f2461e92afc38a0e1317a288e8c653cc6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140 measured again without the workarounds: the three specs' checks pass on the three paths as before (zlib's 640 streams and 240 damaged, dnspython's 400 messages and 300 damaged, h11's 200 streams on every cut and 200 damaged); lines inflate 132 to 121, DNS 115 to 106, HTTP 159 to 148 (Python's 1.5-1.9x, was 1.6-2.0x); time inflate 1,152 to 1,139 ns a byte (102x C), DNS 244 to 221 (61x, instructions 63.6 to 49.9 a byte: == in its compression), HTTP 278 to 270 (83x, with the free empty join); left: DNS's view calls no block fn, HTTP's let list takes no list value; module_specs, the checks and the timing tools read the bytes states (inflated, pending); the suite table's rows for 1, 3 and 9</title>
<updated>2026-10-19T04:16:07Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T04:16:07Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=bcf9a88ee0ac71168ef2372b360cf063fa3a82b9'/>
<id>urn:sha1:bcf9a88ee0ac71168ef2372b360cf063fa3a82b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140: small block fns inlined in aup, made and measured, not merged (the patch kept): a block fn whose only return is its last line, with no loop or called where the stack is empty, written out where it is called, its parameters slots of its own (one set a fn and kinds of arguments in a handler); the three specs' checks passed, but inflate 191.2 instructions a byte as before and HTTP 61.4 to 62.1 (+1.1%, 277.7 to 274.9 ns): the hot fns (inflate's decode, HTTP's crlf) return early inside a loop, a fn with a loop cannot be written out where values are on the stack (Pure opens no loop above values), and storing a short body's parameters costs what CALL and PICK did; inflate's 23% was the expression fn bit's (a loop, a let and conversions gone with the call); what would make it pay is Pure's (loops above values, or a cheaper frame), one spec behind it; the decision point's list of what was made after it</title>
<updated>2026-10-19T03:52:42Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T03:52:42Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=c80ac23fd74fe07e7e02514486fd0ecfbc8da779'/>
<id>urn:sha1:c80ac23fd74fe07e7e02514486fd0ecfbc8da779</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 9, HTTP/1.1 requests a packet at a time (RFC 9112), written in aup with no new opcode (aup's examples/http.aup: each packet an event, its bytes added to what the last left, every request they complete read, h11's grammar): 200 streams (132,623 bytes, 578 requests: methods, targets, HTTP/1.1 and a last 1.0, mixed-case names, spaces around values, Content-Length and chunked bodies with extensions and trailers, some ending in part of a request) fed whole, at random boundaries and a byte at a time (the 50 under 400 bytes), the requests read h11's on every cut and the bytes left those after them, the three paths' outputs the same bytes; 200 damaged streams fed whole as http_requests.py (the Python reference) reads them, 35 refused by both and 165 the same; module_specs in make check: 80 streams and their reading (tests/specs/http, no h11 at check time) whole on the three paths and cut 88 ways; bars: written, three workarounds (the bytes left in a list of one: bytes are no state; names and codings compared as text: bytes have no ==; field lines returned in a record: a fn returns no bare list), 159 lines against Python's 79, 278 ns a byte against the same algorithm in C 3.27 (85x), pure Python 67 (its bytes methods are C: Pure 4.1x slower), h11 284; 140's decision point after 027: bytes alone as a state (inflate, HTTP) and bytes' == (DNS, HTTP) now each met by two written specs, so the two-spec rule lets them into the core (their design not begun); a view calling a block fn met by one (DNS); aup's three its compiler's; CHECKPOINT's direction row</title>
<updated>2026-10-19T02:02:51Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T02:02:51Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=5842b26e8353a38192afb1ebe4c08809da48dbf4'/>
<id>urn:sha1:5842b26e8353a38192afb1ebe4c08809da48dbf4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 1, DNS messages (RFC 1035), written in aup with no new opcode (aup's examples/dns.aup: a message read by a handler into its header and records, names uncompressed in their wire form, those in NS, CNAME, PTR, MX, SOA and SRV data too, each pointer pointing before the last; written back by the view wire, the owners compressed): 400 messages dnspython made (148,582 bytes, 3,466 records: A, AAAA, NS, CNAME, PTR, MX, SOA, TXT, SRV, EDNS, shared suffixes, 63-byte labels, bytes above 0x7f, 245-byte names) read on the three paths as dnspython reads them (each section's records as a set) and written back to bytes dnspython reads as the same message, the paths' outputs the same bytes; 300 damaged messages as dns_message.py (the Python reference) reads them, 185 refused by both and 115 the same records and bytes; module_specs in make check: 200 of those messages (tests/specs/dns, no dnspython at check time) read on the three paths, written back and read again to the same state and bytes, 23 cut ones failing; dnspython shuffles a set's records unless want_shuffle is off, and merges a set's differing TTLs to the least; bars: written, two workarounds both the core's (bytes have no ==: TEXT_COMPARE takes text alone; a view calls no block fn: CALL is in handlers and functions alone), 115 lines against Python's 72, 244 ns a message byte read and written against the same algorithm in C 3.65 (67x), glibc's resolver reading alone 4.4, pure Python 131 (Pure 1.9x slower), 218 compiled; 63.6 instructions a byte, reading 42%, writing 58%; CHECKPOINT's direction row</title>
<updated>2026-10-19T01:48:58Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T01:48:58Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=7d41626b1c8f343b5b59a35ea3bce6570b996213'/>
<id>urn:sha1:7d41626b1c8f343b5b59a35ea3bce6570b996213</id>
<content type='text'>
</content>
</entry>
<entry>
<title>140's 3, inflate (RFC 1951), written in aup with no new opcode (aup's examples/inflate.aup, codes read a bit at a time from canonical counts as zlib's puff.c): 640 streams zlib made (6,488,480 bytes: random bytes, words, runs and repeats 32,768 back; levels 0, 1, 6, 9 and zlib's five strategies, so stored, fixed and dynamic blocks) inflated to the original's bytes on the three paths, the paths' outputs the same bytes; 240 damaged streams (cut, a bit flipped) read as inflate.py (the Python reference) reads them, 165 refused by both and 75 the same bytes; module_specs in make check: 144 streams on the three paths, 21 cut ones failing and leaving the last bytes; bars: written (no new opcode), three workarounds (lists passed in records: a fn takes no list; the output a list of one: a bytes value is no state; a block's tables built in a fn: a let's list lives in the handler's own block), 132 lines against Python's 81, 1,152 ns an output byte against the same algorithm in C 10.7 (108x) and zlib 3.5 (329x), pure Python 1,214; 191 instructions a byte (a block fn called for each bit was 246 and 1,553 ns: small block fns' inlining is 2c's leftover); the four timing tools' message calls fixed for 4b's API (no keys); CHECKPOINT's direction row</title>
<updated>2026-10-19T01:28:34Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-19T01:28:34Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=ca214af2684b3c6e6982d1fe8be4e7ecc0849b00'/>
<id>urn:sha1:ca214af2684b3c6e6982d1fe8be4e7ecc0849b00</id>
<content type='text'>
</content>
</entry>
</feed>
