hclang 0.32.0 → 0.32.1

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.
@@ -1314,12 +1314,16 @@ export const HC_SOURCES = new Map([
1314
1314
  "divides it (#445, FrameCount). Gap is `|signed|`; Spin is `signed / N`, so Spin",
1315
1315
  "at N and Gap read the same fold and never disagree, and neither constructs: a",
1316
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",
1317
+ "count, bound as `.n <~~1>`, the count type read off a literal, so a non-count N",
1318
+ "— a fraction, a float, a negative, a string — is refused with a native",
1319
+ "`$!.type-error` before any fold, and the observable never answers a sign-flipped",
1320
+ "ratio for a negative N. A count N must also be positive: `N=0` passes the count",
1321
+ "type and is then the native `$!.division-by-zero`, and an empty argument `()`",
1322
+ "binds nothing and falls through to the same division-by-zero. `_^` names the",
1323
+ "receiver so the fold can read the children in order, and N is bound as `n`",
1324
+ "before the fold reads it",
1321
1325
  "```;",
1322
- " .spin {.n _; .kids _^.children;",
1326
+ " .spin {.n <~~1> _; .kids _^.children;",
1323
1327
  " .count {(_.size()).children.#};",
1324
1328
  " .tail {(_ && {(((_ .0) = .0) ? {[()]} : {[[__ .1]]}) .0}) &| {_}};",
1325
1329
  " .alt {.cs _; (cs = []) ? {0} : {(count (cs .0)) - (alt (tail cs))}};",
@@ -1673,12 +1677,31 @@ export const HC_SOURCES = new Map([
1673
1677
  "; [((Figure [deep4, row2, row3]).spin 4) = ((Figure [row4, row2, row3]).spin 4), ((Figure [Z, U]).spin 4) = (0 - (1 / 4))]",
1674
1678
  "# [<>, <>]",
1675
1679
  "```",
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",
1680
+ "N must be a count. The argument is bound as `.n <~~1>`, the count type read off",
1681
+ "a literal, so a non-count N is refused with a native `$!.type-error` before any",
1682
+ "fold or division: a fraction `1/2`, a float `2.5`, a negative `-1` and a string",
1683
+ "`“3”` are all not counts and all refused. A nonzero whole N divides the signed",
1684
+ "sum exactly, so `(5,2)` at N=3 is `1`",
1685
+ "```",
1686
+ "; (Figure [row2, row5]).spin 2.5",
1687
+ "# $!.type-error .n <~~1> 2.5",
1688
+ "; (Figure [row2, row5]).spin (1 / 2)",
1689
+ "# $!.type-error .n <~~1> 1/2",
1690
+ "; (Figure [row2, row5]).spin (0 - 1)",
1691
+ "# $!.type-error .n <~~1> -1",
1692
+ "; (Figure [row2, row5]).spin “3”",
1693
+ "# $!.type-error .n <~~1> “3”",
1694
+ "; (Figure [row5, row2]).spin 3",
1695
+ "# 1",
1696
+ "```",
1697
+ "A positive resolution is still required of a count N: `N=0` passes the count",
1698
+ "type and is then the native division-by-zero, and the empty argument `()` is not",
1699
+ "a count either but binds nothing, so it falls through to the same",
1700
+ "division-by-zero rather than a type error",
1678
1701
  "```",
1679
1702
  "; (Figure [row2, row5]).spin 0",
1680
1703
  "# $!.division-by-zero /",
1681
- "; (Figure [row5, row2]).spin (0 - 4)",
1704
+ "; (Figure [row2, row5]).spin ()",
1682
1705
  "# $!.division-by-zero /",
1683
1706
  "```",
1684
1707
  "## The Fano plane",
@@ -1 +1 @@
1
- export const VERSION = "0.32.0";
1
+ export const VERSION = "0.32.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hclang",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "Homoiconic C command-line interpreter and REPL",
5
5
  "keywords": [
6
6
  "language",