hclang 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/lib/bundle/hc-sources.js +132 -0
- package/esm/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -1279,6 +1279,53 @@ export const HC_SOURCES = new Map([
|
|
|
1279
1279
|
" .absent (_ &| {.f _; ((kids &| {(_ === f) ? {[f]}}) = []) ? {[f]}});",
|
|
1280
1280
|
" (absent = []) ? {B} : {A}};",
|
|
1281
1281
|
"```",
|
|
1282
|
+
"**Gap**, `x.gap()`: the absolute value of the alternating sum of the Sizes of",
|
|
1283
|
+
"x's immediate children, `|Size(F₁) − Size(F₂) + Size(F₃) − …|`, read as a",
|
|
1284
|
+
"FrameCount. The empty Figure has Gap `0`, and each child contributes its",
|
|
1285
|
+
"existing Size with a sign that starts positive and flips child by child; Gap",
|
|
1286
|
+
"keeps the sum's size and drops its sign, so it is never negative. Nesting",
|
|
1287
|
+
"reaches a child only through that Size, never through its construction. Gap",
|
|
1288
|
+
"observes rather than constructs, so like Cells, Form and Text it leaves the",
|
|
1289
|
+
"class on purpose: the sum it folds can go negative where no Figure does, so it",
|
|
1290
|
+
"is read as a number rather than a tally (#445). It reads each child's Size the",
|
|
1291
|
+
"way the semiring examples do, as `(_.size()).children.#`, and folds those",
|
|
1292
|
+
"readings with native arithmetic without touching construction, so it never",
|
|
1293
|
+
"asserts arithmetic equations or actual closure: a zero Gap is an observed",
|
|
1294
|
+
"value, not a proof. `_^`",
|
|
1295
|
+
"names the receiver so the alternating fold can read the children in order; the",
|
|
1296
|
+
"fold subtracts the sum of the rest, which flips the sign of every later child,",
|
|
1297
|
+
"and the sign of the whole is dropped last",
|
|
1298
|
+
"```;",
|
|
1299
|
+
" .gap {.kids _^.children;",
|
|
1300
|
+
" .count {(_.size()).children.#};",
|
|
1301
|
+
" .tail {(_ && {(((_ .0) = .0) ? {[()]} : {[[__ .1]]}) .0}) &| {_}};",
|
|
1302
|
+
" .alt {.cs _; (cs = []) ? {0} : {(count (cs .0)) - (alt (tail cs))}};",
|
|
1303
|
+
" .signed (alt kids);",
|
|
1304
|
+
" (signed .< 0) ? {0 - signed} : {signed}};",
|
|
1305
|
+
"```",
|
|
1306
|
+
"**Spin**, `x.spin N`: the signed alternating sum of the Sizes of x's immediate",
|
|
1307
|
+
"children, `Size(F₁) − Size(F₂) + Size(F₃) − …`, divided by a positive integer",
|
|
1308
|
+
"resolution N, read as an exact FrameRational in revolutions (#447). It folds the",
|
|
1309
|
+
"same readings Gap does, in the same order and with the same alternating signs",
|
|
1310
|
+
"that start positive, but it keeps the sign Gap drops, so the two directions read",
|
|
1311
|
+
"as `−` and `+`; the empty Figure has Spin `0` at every N. The signed sum is a",
|
|
1312
|
+
"whole count of revolutions, and `signed / N` divides it into N-ths, which the",
|
|
1313
|
+
"divisor's rung makes an exact ratio that collapses to a whole FrameInt when N",
|
|
1314
|
+
"divides it (#445, FrameCount). Gap is `|signed|`; Spin is `signed / N`, so Spin",
|
|
1315
|
+
"at N and Gap read the same fold and never disagree, and neither constructs: a",
|
|
1316
|
+
"zero Spin is an observed value, not a Fact that a Walk closed. N must be a",
|
|
1317
|
+
"positive resolution: `N=0` is the native `$!.division-by-zero`, and a non-positive",
|
|
1318
|
+
"N is refused the same way, by dividing into zero, so the observable never answers",
|
|
1319
|
+
"a sign-flipped ratio for a negative N. `_^` names the receiver so the fold can",
|
|
1320
|
+
"read the children in order, and N is bound as `n` before the fold reads it",
|
|
1321
|
+
"```;",
|
|
1322
|
+
" .spin {.n _; .kids _^.children;",
|
|
1323
|
+
" .count {(_.size()).children.#};",
|
|
1324
|
+
" .tail {(_ && {(((_ .0) = .0) ? {[()]} : {[[__ .1]]}) .0}) &| {_}};",
|
|
1325
|
+
" .alt {.cs _; (cs = []) ? {0} : {(count (cs .0)) - (alt (tail cs))}};",
|
|
1326
|
+
" .signed (alt kids);",
|
|
1327
|
+
" (n .< 1) ? {signed / 0} : {signed / n}};",
|
|
1328
|
+
"```",
|
|
1282
1329
|
"**Form**, `x.form()`: the plain bracket tree of x, one bracket per Figure, the",
|
|
1283
1330
|
"way 005.30c wrote Figures before they were a class. It keeps shape and order,",
|
|
1284
1331
|
"and forgets identity and the methods",
|
|
@@ -1549,6 +1596,91 @@ export const HC_SOURCES = new Map([
|
|
|
1549
1596
|
"; [A.withness [B], B.withness []] = [A, B]",
|
|
1550
1597
|
"# <>",
|
|
1551
1598
|
"```",
|
|
1599
|
+
"## Gap",
|
|
1600
|
+
"",
|
|
1601
|
+
"Gap reads the Sizes of a Figure's immediate children, folds them with",
|
|
1602
|
+
"alternating signs, `Size(F₁) − Size(F₂) + Size(F₃) − …`, starting positive, and",
|
|
1603
|
+
"drops the sign. It observes rather than constructs, so it answers a FrameCount,",
|
|
1604
|
+
"never negative, and the empty Figure has Gap `0`. One child is its",
|
|
1605
|
+
"own Size, so `A` and `U` both have Gap `0` because `U`'s one child `Z` has Size",
|
|
1606
|
+
"`0`, while a Figure holding `row2` has Gap `2`. Two children are the difference",
|
|
1607
|
+
"of their Sizes, whichever comes first",
|
|
1608
|
+
"```",
|
|
1609
|
+
"; [(A.gap()) = 0, (U.gap()) = 0, ((Figure [row2]).gap()) = 2, ((Figure [row2, row3]).gap()) = 1, ((Figure [row3, row2]).gap()) = 1]",
|
|
1610
|
+
"# [<>, <>, <>, <>, <>]",
|
|
1611
|
+
"```",
|
|
1612
|
+
"Each child contributes its existing Size, so nesting reaches a child only",
|
|
1613
|
+
"through that Size: a one-child Figure's Gap is that child's Size whatever its",
|
|
1614
|
+
"nesting, and `deep4` nests `row4` to Size 4. The minimal witness is three",
|
|
1615
|
+
"children of Sizes 2, 5 and 3, whose Gap is `0`; the Sizes come from ordinary",
|
|
1616
|
+
"Figures and `row5` is one of Size 5",
|
|
1617
|
+
"```",
|
|
1618
|
+
"; .row5 (Figure [U, U, U, U, U]);",
|
|
1619
|
+
"; [(row5.size()).children.# = 5, ((Figure [row2, row5, row3]).gap()) = 0, ((Figure [row4]).gap()) = 4]",
|
|
1620
|
+
"# [<>, <>, <>]",
|
|
1621
|
+
"; [((Figure [row2, row5, row3]).gap()) = (((row2.size()).children.#) - ((row5.size()).children.#) + ((row3.size()).children.#))]",
|
|
1622
|
+
"# [<>]",
|
|
1623
|
+
"```",
|
|
1624
|
+
"Order still matters: reordering the same three children can change Gap,",
|
|
1625
|
+
"and it is an observation only, never a claim that a Walk is closed",
|
|
1626
|
+
"```",
|
|
1627
|
+
"; [((Figure [row2, row3, row5]).gap()) = 4, ((Figure [row5, row2, row3]).gap()) = 6, ((Figure [row3, row2, row5]).gap()) = 6]",
|
|
1628
|
+
"# [<>, <>, <>]",
|
|
1629
|
+
"```",
|
|
1630
|
+
"A child's own Size decides its contribution, so a child built differently but of",
|
|
1631
|
+
"equal Size contributes the same, and construction, observation and",
|
|
1632
|
+
"interpretation stay apart: Gap reports a number, not a meaning",
|
|
1633
|
+
"```",
|
|
1634
|
+
"; [((Figure [deep4, row2, row3]).gap()) = ((Figure [row4, row2, row3]).gap()), ((Figure [Z, U]).gap()) = 1]",
|
|
1635
|
+
"# [<>, <>]",
|
|
1636
|
+
"```",
|
|
1637
|
+
"## Spin",
|
|
1638
|
+
"",
|
|
1639
|
+
"Spin folds the same Sizes Gap does, in the same order with the same signs that",
|
|
1640
|
+
"start positive, but keeps the sign and divides by a positive resolution N,",
|
|
1641
|
+
"answering an exact FrameRational in revolutions. The division selects its rung",
|
|
1642
|
+
"from the divisor, so `signed / N` is a ratio that collapses to a whole FrameInt",
|
|
1643
|
+
"when N divides it, and a positive reading prints without a `+`. The same three",
|
|
1644
|
+
"children of Sizes 2, 5 and 3 whose Gap is `0` have Spin `0` at every N, and",
|
|
1645
|
+
"reversing the two children of a two-child Figure flips the sign: `(2,5)` reads",
|
|
1646
|
+
"`−3/4` and `(5,2)` reads `+3/4` at N=4. The Sizes come from ordinary Figures,",
|
|
1647
|
+
"`row5` of Size 5 above among them, and `Figure [U, Z, U]` has children of Sizes",
|
|
1648
|
+
"1, 0 and 1",
|
|
1649
|
+
"```",
|
|
1650
|
+
"; [((Figure [row2, row5, row3]).spin 4) = 0, ((Figure [row2, row5]).spin 4) = (0 - (3 / 4)), ((Figure [row5, row2]).spin 4) = (3 / 4), ((Figure [U, Z, U]).spin 4) = (1 / 2)]",
|
|
1651
|
+
"# [<>, <>, <>, <>]",
|
|
1652
|
+
"```",
|
|
1653
|
+
"Spin reads each child's Size the way Gap does, so it equals the signed fold",
|
|
1654
|
+
"divided by N, and Gap is its absolute value: the two observers never disagree on",
|
|
1655
|
+
"the same fold",
|
|
1656
|
+
"```",
|
|
1657
|
+
"; [((Figure [row2, row5]).spin 4) = ((((row2.size()).children.#) - ((row5.size()).children.#)) / 4), ((Figure [row5, row2]).spin 4) = (((Figure [row5, row2]).gap()) / 4), ((Figure [row2, row5]).spin 4) = (0 - (((Figure [row2, row5]).gap()) / 4))]",
|
|
1658
|
+
"# [<>, <>, <>]",
|
|
1659
|
+
"```",
|
|
1660
|
+
"The resolution N scales the same signed sum, and `N=1` reads whole signed",
|
|
1661
|
+
"revolutions, so `(2,5)` is `−3` at N=1, `−1` at N=3, and `(5,2)` is `+3/2` at",
|
|
1662
|
+
"N=2. Every reading is exact, keeping both direction and resolution",
|
|
1663
|
+
"```",
|
|
1664
|
+
"; [((Figure [row2, row5]).spin 1) = (0 - 3), ((Figure [row2, row5]).spin 3) = (0 - 1), ((Figure [row5, row2]).spin 2) = (3 / 2)]",
|
|
1665
|
+
"# [<>, <>, <>]",
|
|
1666
|
+
"```",
|
|
1667
|
+
"Spin keeps the sign Gap drops, so a one-child Figure reads its child's Size as a",
|
|
1668
|
+
"positive reading, the empty Figure reads `0` at every N, and nesting reaches a",
|
|
1669
|
+
"child only through its Size: `deep4` contributes 4 just as `row4` does",
|
|
1670
|
+
"```",
|
|
1671
|
+
"; [((Figure [row2]).spin 1) = 2, ((Figure [row2]).spin 4) = (1 / 2), (A.spin 4) = 0, (A.spin 1) = 0]",
|
|
1672
|
+
"# [<>, <>, <>, <>]",
|
|
1673
|
+
"; [((Figure [deep4, row2, row3]).spin 4) = ((Figure [row4, row2, row3]).spin 4), ((Figure [Z, U]).spin 4) = (0 - (1 / 4))]",
|
|
1674
|
+
"# [<>, <>]",
|
|
1675
|
+
"```",
|
|
1676
|
+
"A positive resolution is required: `N=0` is the native division-by-zero, and a",
|
|
1677
|
+
"negative N is refused the same way rather than answering a sign-flipped ratio",
|
|
1678
|
+
"```",
|
|
1679
|
+
"; (Figure [row2, row5]).spin 0",
|
|
1680
|
+
"# $!.division-by-zero /",
|
|
1681
|
+
"; (Figure [row5, row2]).spin (0 - 4)",
|
|
1682
|
+
"# $!.division-by-zero /",
|
|
1683
|
+
"```",
|
|
1552
1684
|
"## The Fano plane",
|
|
1553
1685
|
"",
|
|
1554
1686
|
"Seven originals of identical form, each a fresh `Figure []`, and seven triples",
|
package/esm/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.32.0";
|