hclang 0.52.0 → 0.53.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.
@@ -2793,10 +2793,11 @@ export const HC_SOURCES = new Map([
2793
2793
  "```",
2794
2794
  "## Geometric observers, `.##%` … `.###%%%`",
2795
2795
  "Six observers read a Denum through a geometry (occurrence/figure 007.41b,",
2796
- "007.41c, 007.43h, 007.43i, 007.44). The Count of the Denum is its rank `r`, and",
2796
+ "007.41c, 007.43h, 007.43i, 007.44, 007.46). The count of percent signs is the",
2797
+ "ladder order: one `%` is SSL, two are KPSL, three are KDSL. The Count of the Denum is its rank `r`, and",
2797
2798
  "each geometry wants a definite number of slots for that rank: the simplex (SSL,",
2798
- "`%`) `r+1`, the cross-polytope (KPSL, `%%%`) `2r` and the Cayley–Dickson signed",
2799
- "basis (KDSL, `%%`) `2^r`. The stored loads are aligned to the wanted length:",
2799
+ "`%`) `r+1`, the cross-polytope (KPSL, `%%`) `2r` and the Cayley–Dickson signed",
2800
+ "basis (KDSL, `%%%`) `2^r`. The stored loads are aligned to the wanted length:",
2800
2801
  "missing slots are 0 and excess slots wrap by index modulo the wanted length,",
2801
2802
  "adding into the slot they wrap to. The observer is the geometry's ordinary",
2802
2803
  "formula on that virtual array, so every Count has a defined reading under every",
@@ -2819,33 +2820,42 @@ export const HC_SOURCES = new Map([
2819
2820
  "; [(Denum [1, [3, 1]]).##%, (Denum [3, [2, 4, 2, 4]]).##%, (Denum [2, [1]]).###%, (Denum [2, [4, 4, 4]]).##%, (Denum [0, [5, 3]]).###%]",
2820
2821
  "# [4, 16/3, [2/3, -1/3, -1/3], 0, [0]]",
2821
2822
  "```",
2822
- "The Cayley–Dickson signed-basis observers, `%%`, read `2^r` slots in the",
2823
- "reference order `+e0 … +e(n−1), −e0 … −e(n−1)` with `n = 2^(r−1)`. `.###%%` is",
2823
+ "The cross-polytope observers, `%%`, place `2r` slots on the vertices",
2824
+ "`+e0 … +e(r−1), −e0 … −e(r−1)`, so `bi` and `b(i+r)` are opposite. `.###%%` is",
2825
+ "the antipodal residual `ri = bi − b(i+r)` and `.##%%` is `Σ ri²`, zero exactly",
2826
+ "when every opposite pair matches. Rank 0 wants no slots and reads `[]` and 0",
2827
+ "```",
2828
+ "; [(Denum [2, [2, 4, 2, 4]]).###%%, (Denum [2, [2, 4, 2, 4]]).##%%, (Denum [3, [5, 2, 3, 5, 1, 3]]).###%%, (Denum [3, [5, 2, 3, 5, 1, 3]]).##%%, (Denum [1, [3, 1]]).###%%]",
2829
+ "# [[0, 0], 0, [0, 1, 0], 1, [2]]",
2830
+ "; [(Denum [0, [1]]).###%%, (Denum [1, [5]]).##%%, (Denum [2, [1, 2]]).###%%]",
2831
+ "# [[], 25, [1, 2]]",
2832
+ "```",
2833
+ "The Cayley–Dickson signed-basis observers, `%%%`, read `2^r` slots in the",
2834
+ "reference order `+e0 … +e(n−1), −e0 … −e(n−1)` with `n = 2^(r−1)`. `.###%%%` is",
2824
2835
  "`ri = vi − v(i+n)`, i = 0 … n−1, including the real coordinate; at rank 0 it is",
2825
- "the single value. `.##%%` is `Σ ri²`. Each antipodal pair cancels on its own, so",
2836
+ "the single value. `.##%%%` is `Σ ri²`. Each antipodal pair cancels on its own, so",
2826
2837
  "the load `[2, 4, 2, 4]` at rank 2 reads `[0, 0]` and `0`, and `[3, 2, 1, 4]`",
2827
2838
  "reads `[2, -2]` and `8`. Equal magnitudes would not make products agree, and no",
2828
- "Cayley–Dickson product is installed",
2839
+ "Cayley–Dickson product is installed: `.##%%%` is a squared norm of the",
2840
+ "residual, not the multiplication. The `2^r` loads are signature loads, and the",
2841
+ "residual is `2^(r−1)` signed coefficients, one Cayley–Dickson rung below",
2829
2842
  "```",
2830
- "; [(Denum [2, [2, 4, 2, 4]]).###%%, (Denum [2, [2, 4, 2, 4]]).##%%, (Denum [2, [3, 2, 1, 4]]).###%%, (Denum [2, [3, 2, 1, 4]]).##%%]",
2843
+ "; [(Denum [2, [2, 4, 2, 4]]).###%%%, (Denum [2, [2, 4, 2, 4]]).##%%%, (Denum [2, [3, 2, 1, 4]]).###%%%, (Denum [2, [3, 2, 1, 4]]).##%%%]",
2831
2844
  "# [[0, 0], 0, [2, -2], 8]",
2832
- "; [(Denum [0, [5, 3, 9]]).###%%, (Denum [1, [5, 3, 9]]).###%%, (Denum [3, [9, 1, 2, 3, 4, 5, 6, 7]]).###%%, (Denum [2, [3, 1]]).##%%]",
2845
+ "; [(Denum [0, [5, 3, 9]]).###%%%, (Denum [1, [5, 3, 9]]).###%%%, (Denum [3, [9, 1, 2, 3, 4, 5, 6, 7]]).###%%%, (Denum [2, [3, 1]]).##%%%]",
2833
2846
  "# [[17], [11], [5, -4, -4, -4], 10]",
2834
2847
  "```",
2835
- "The cross-polytope observers, `%%%`, place `2r` slots on the vertices",
2836
- "`+e0 … +e(r−1), −e0 … −e(r−1)`, so `bi` and `b(i+r)` are opposite. `.###%%%` is",
2837
- "the antipodal residual `ri = bi − b(i+r)` and `.##%%%` is `Σ ri²`, zero exactly",
2838
- "when every opposite pair matches. Rank 0 wants no slots and reads `[]` and 0",
2848
+ "The two differ wherever `2r` and `2^r` differ. At rank 3 the same six loads are",
2849
+ "three antipodal pairs to KPSL and eight padded slots to KDSL",
2839
2850
  "```",
2840
- "; [(Denum [2, [2, 4, 2, 4]]).###%%%, (Denum [2, [2, 4, 2, 4]]).##%%%, (Denum [3, [5, 2, 3, 5, 1, 3]]).###%%%, (Denum [3, [5, 2, 3, 5, 1, 3]]).##%%%, (Denum [1, [3, 1]]).###%%%]",
2841
- "# [[0, 0], 0, [0, 1, 0], 1, [2]]",
2842
- "; [(Denum [0, [1]]).###%%%, (Denum [1, [5]]).##%%%, (Denum [2, [1, 2]]).###%%%]",
2843
- "# [[], 25, [1, 2]]",
2851
+ "; .W (Denum [3, [5, 2, 3, 5, 1, 3]]);",
2852
+ "; [W.###%%, W.##%%, W.###%%%, W.##%%%]",
2853
+ "# [[0, 1, 0], 1, [4, -1, 3, 5], 51]",
2844
2854
  "```",
2845
2855
  "Only a Denum is observed, and no class can declare an observer of its own. A",
2846
2856
  "rank whose wanted slots pass the binding capacity of 65536 is refused",
2847
2857
  "```",
2848
- "; [[5, 3].##%, 3.###%%, (Denum [70000, [1]]).###%, (Denum [17, [1]]).##%%, [.##% {7}].##%]",
2858
+ "; [[5, 3].##%, 3.###%%, (Denum [70000, [1]]).###%, (Denum [17, [1]]).##%%%, [.##% {7}].##%]",
2849
2859
  "# [$!.denum-binding-receiver, $!.denum-binding-receiver, $!.denum-binding-capacity, $!.denum-binding-capacity, $!.denum-binding-receiver]",
2850
2860
  "```",
2851
2861
  "Each observer is one token. A longer run, such as `.##%%%%`, is one unbound",
@@ -14,14 +14,21 @@
14
14
  * | Geometry | Size-like | Residual-like | Wanted slots |
15
15
  * | --- | --- | --- | --- |
16
16
  * | centered simplex (SSL) `%` | `.##%` | `.###%` | r + 1 |
17
- * | cross-polytope (KPSL) `%%%` | `.##%%%` | `.###%%%` | 2r |
18
- * | Cayley–Dickson signed basis (KDSL) `%%` | `.##%%` | `.###%%` | 2ʳ |
17
+ * | cross-polytope (KPSL) `%%` | `.##%%` | `.###%%` | 2r |
18
+ * | Cayley–Dickson signed basis (KDSL) `%%%` | `.##%%%` | `.###%%%` | 2ʳ |
19
+ *
20
+ * The suffix order is a semantic contract (007.46): one `%` is SSL, two are
21
+ * KPSL, three are KDSL. v0.52.0 shipped the last two the other way round.
19
22
  *
20
23
  * KDSL (007.43h) reads signed basis pairs: at rank 0 the single value, at rank
21
24
  * r ≥ 1 the 2^(r−1) differences `vᵢ − v(i+2^(r−1))`. Its Size-like is the sum
22
25
  * of their squares. A wanted length past `DENUM_BINDING_CAPACITY` is refused as
23
26
  * `$!.denum-binding-capacity`.
24
27
  *
28
+ * KDSL's Size-like and Residual-like are observations of the coordinates, not
29
+ * its multiplication. The Cayley–Dickson product is the separate reference in
30
+ * `cayley-dickson.ts`; no observer spelling answers it.
31
+ *
25
32
  * Return types: a squared magnitude is exact and nonnegative, a FrameCount
26
33
  * when whole and a FrameRational otherwise. Coordinates are a fresh array of
27
34
  * signed exact numbers, never a Denum. No native observer, operator or Denum
@@ -95,16 +102,18 @@ export const GEOMETRIES = {
95
102
  residual: simplexResidual,
96
103
  },
97
104
  "%%": {
98
- // 2ʳ, saturated so a huge rank is refused rather than computed.
99
- wanted: (r) => r > 64n ? DENUM_BINDING_CAPACITY + 1n : 1n << r,
100
- size: (slots) => sumSquares(signedBasisResidual(slots)),
101
- residual: (slots) => integers(signedBasisResidual(slots)),
102
- },
103
- "%%%": {
105
+ // KPSL, the cross-polytope: 2r slots.
104
106
  wanted: (r) => 2n * r,
105
107
  size: (slots) => sumSquares(antipodalResidual(slots)),
106
108
  residual: (slots) => integers(antipodalResidual(slots)),
107
109
  },
110
+ "%%%": {
111
+ // KDSL, the Cayley–Dickson signed basis: 2ʳ slots, saturated so a huge
112
+ // rank is refused rather than computed.
113
+ wanted: (r) => r > 64n ? DENUM_BINDING_CAPACITY + 1n : 1n << r,
114
+ size: (slots) => sumSquares(signedBasisResidual(slots)),
115
+ residual: (slots) => integers(signedBasisResidual(slots)),
116
+ },
108
117
  };
109
118
  /**
110
119
  * Aligns stored loads to a wanted length: shorter is zero-filled, longer wraps
@@ -1157,9 +1157,9 @@ Object.defineProperty(Frame, "kBIND", {
1157
1157
  });
1158
1158
  /**
1159
1159
  * The `%` suffixes of the geometric observers of a Count-bound Denum
1160
- * (occurrence/figure 007.41b, 007.41c): the centered simplex `%`, the
1161
- * Cayley–Dickson imaginaries `%%` and the cross-polytope `%%%`. They key
1162
- * `GEOMETRIES` in `denum-observers.ts`.
1160
+ * (occurrence/figure 007.41b, 007.46): the centered simplex SSL `%`, the
1161
+ * cross-polytope KPSL `%%` and the Cayley–Dickson signed basis KDSL `%%%`.
1162
+ * The order is a contract. They key `GEOMETRIES` in `denum-observers.ts`.
1163
1163
  */
1164
1164
  Object.defineProperty(Frame, "GEOMETRY_SUFFIXES", {
1165
1165
  enumerable: true,
@@ -1 +1 @@
1
- export const VERSION = "0.52.0";
1
+ export const VERSION = "0.53.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hclang",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "description": "Homoiconic C command-line interpreter and REPL",
5
5
  "keywords": [
6
6
  "language",