<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pure/docs/design/016-bool-and-i64.md, 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-09-30T16:59:52Z</updated>
<entry>
<title>Say that i64 is in, and what it found (016)</title>
<updated>2026-09-30T16:59:52Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-30T16:59:52Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=d5b3fe85d7da3131b315410e316d8abe95dab61e'/>
<id>urn:sha1:d5b3fe85d7da3131b315410e316d8abe95dab61e</id>
<content type='text'>
016 is built: bool and i64. The second stage's findings: an integer
literal takes the other side's type, found by compiling it on trial
(linear once the wanted type is passed down); a literal with no context
stays a number, so no program changes meaning and modules without i64
are the same bytes; one rule carries values between numbers, bools and
i64s; and the number paths passed the timing criterion, with what i64
had added to them counted and halved (110). The checkpoint lists bool
and i64 in the app model and drops i64 from what is left.
</content>
</entry>
<entry>
<title>Say how i64 will be built, and what it must not slow down (016)</title>
<updated>2026-09-30T14:38:35Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-30T14:38:35Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=ee21aec10726863d8e812643e1419e4b7d0f2b51'/>
<id>urn:sha1:ee21aec10726863d8e812643e1419e4b7d0f2b51</id>
<content type='text'>
Before building i64: a value slot holds a number or an i64 in the same 8
bytes (the stack, states, list cells, locals, constants), moves copy the
bits and only computing opcodes look at the type; eleven opcodes are
appended (arithmetic that fails as overflow, floor division and modulo,
compare, min, max, the two conversions), CONST and NUM_TEXT take
argument 2, and type codes are added, so v6 stays. i64-keyed lists compare
as integers without guide keys for now; folds over i64 run item by item.
JSON and queries take plain integer digits in range; views, tables and
deliveries show every digit. u32 widens to i64; i64, numbers and bools do
not deliver to each other; replacing converts when the value fits.

It is in when every check is green and the number paths keep their
speed: bank queries and TPC-C (RAM) no more than 3% slower at the median
of six interleaved pairs.
</content>
</entry>
<entry>
<title>Say that bool is in, and what its first stage found (016)</title>
<updated>2026-09-30T14:29:49Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-30T14:29:49Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=57fc44fc853da1c271f287afde62cfb4077930d2'/>
<id>urn:sha1:57fc44fc853da1c271f287afde62cfb4077930d2</id>
<content type='text'>
016's first stage is built and checked: no opcode was new, a stored
send's bool was refused on the way back in (found by server_meaning's
restart, fixed), -0 becomes false as 015 says zero has no sign, and
True in JSON is no JSON at all. i64 is what is left of 016.
</content>
</entry>
<entry>
<title>Give bools their own type in the module format (v6, 016 stage 1)</title>
<updated>2026-09-30T14:24:56Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-30T14:24:56Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=bfa54e02881f56b3a969220ecaac706542046149'/>
<id>urn:sha1:bfa54e02881f56b3a969220ecaac706542046149</id>
<content type='text'>
A condition was a number, non-zero being true: a flag was a number field,
a view showed 1 for true, and nothing kept a number from standing for a
bool or a bool from being added to. Now the verifier has a bool among its
stack types, and a verified module never mixes the two. No opcode is new:

- CONST with argument 1 is a bool (+0 or 1), NUM_TEXT with argument 1
  writes one as true or false; LOAD and STORE take a number or a bool
  state, locals may hold a bool (2).
- Comparisons (LT to NE, TEXT_COMPARE) and LIST_HAS give a bool; AND, OR
  and NOT take and give them; JZ, REQUIRE, filters and folds' tests take
  one (count and first leave a bool, sum, max, min and distinct a number
  and a bool); EQ and NE compare two bools too.
- Type codes: state 5, record field 2, message field 6 (one byte in the
  prefix, 0 or 1, or the message fails as limit), view 3. A bool's
  constant, initial value and default are +0 or 1; a list is not keyed by
  one. PUREMOD6: v5 modules are built again.

At run time a bool is a number's 0 or 1, so leaf-at-a-time folds run as
before. A number that becomes a bool (a module replaced, a stored state
or item read again, a waiting send recast) keeps 0 (either sign) and 1
and takes the default otherwise; a bool that becomes a number is 0 or 1.

The host carries bools on every boundary: JSON true and false only (a
row's field too), a query's true and false, true and false in views,
table JSON and HTTP deliveries; a link takes a bool only into a bool.

A stored outbox's field types were read back with a check that refused
bool (at or past rows): a node whose output had a bool field and a send
waiting could not start again. test-module now stores such a send and
opens it (it fails on the old check), beside 28 bool refusals of the
verifier and bool states, fields, views, sends, links and migration.
The lane generator makes numbers and bools apart.
</content>
</entry>
<entry>
<title>Say what bool and i64 mean at every boundary, before building them (016)</title>
<updated>2026-09-30T13:20:00Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-30T13:20:00Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=16fab9f3d71fa1fdb4cd38f7e9ae1e1eb4e75340'/>
<id>urn:sha1:16fab9f3d71fa1fdb4cd38f7e9ae1e1eb4e75340</id>
<content type='text'>
</content>
</entry>
</feed>
