hclang 0.37.0 → 0.37.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.
@@ -1164,73 +1164,57 @@ export const HC_SOURCES = new Map([
1164
1164
  [
1165
1165
  "#!/usr/bin/env hc",
1166
1166
  "```",
1167
- "Figures are native frames (#454; issue occurrence/figure 010.02)",
1168
- "",
1169
- "A Figure is a finite nested array built from `[]`, read through its elements",
1170
- "only: properties and declared parents are ignored by observations. Star keeps",
1171
- "nonterminal metadata when rebuilding frames. Construction is brackets, form is the value itself, immediate size is `.#`, terminal count",
1172
- "is `.##`, form equality is `=`, and identity is `===`. The empty frame is one",
1173
- "terminal: `[].#` is 0 and `[].##` is 1. The signed residual `.###` is",
1167
+ "Figures as projections of native HC frames (#454; occurrence/figure 010.09)",
1168
+ "",
1169
+ "A figure is a projection of HC frames through which we observe invariants that",
1170
+ "embody mathematical relations. This is a working definition: each investigation",
1171
+ "specifies its projection, transformations and invariants.",
1172
+ "",
1173
+ "Finite nested arrays built from `[]` are the simplest construction family used",
1174
+ "below. They do not define the full domain of native observations. Size, residual",
1175
+ "and immediate identity membership exclude properties and declared parents;",
1176
+ "Star keeps nonterminal metadata when rebuilding frames. Construction is brackets,",
1177
+ "form is the value itself, immediate arity is `.#`, Size is `.##`, form equality",
1178
+ "is `=`, and identity is `===`. The empty frame is one terminal: `[].#` is 0 and",
1179
+ "`[].##` is 1. The signed residual `.###` is",
1174
1180
  "`x₁.## − x₂.## + x₃.## − …` over the immediate elements, a FrameInt that is 0",
1175
1181
  "for `[]` (issue occurrence/figure 010.04).",
1176
1182
  "",
1177
1183
  "There are no Figure constructors, marks, tally observers, count aliases or",
1178
- "comparison wrappers. Use native operations directly. Star `x * y` places y at each terminal of x, preserving nesting.",
1184
+ "comparison wrappers. Use native operations directly. Star `x * y` places y at",
1185
+ "each terminal of x, preserving nesting.",
1179
1186
  "Flat repetition is `x.## [y]`. A tally, when wanted, is an explicit",
1180
1187
  "construction, such as `x & {[[]]}` for one fresh mark per immediate element.",
1181
1188
  "Native `.##` uses each child's native Size, including numeric magnitude and",
1182
1189
  "text length. Native `.###` also accepts mixed arrays and evaluated groups.",
1183
1190
  "Star keeps its narrower array/Count composition domain.",
1184
1191
  "",
1185
- "Only observation operations remain: `withness`, `gap` and `spin`, with `pure` and `need` for domain validation.",
1186
- "The traversals validate at their public boundary; their recursive steps use",
1187
- "native operations directly. Withness returns a native boolean, `<>` or `()`.",
1188
- "```",
1189
- "```",
1190
- "`pure x` retains its name for compatibility but now accepts the native residual",
1191
- "domain: mixed arrays and evaluated groups with finite child Sizes. Properties",
1192
- "and declared parents are ignored. Standalone atoms, schemas and closures have",
1193
- "no residual. It is the native `.###` check: a FrameInt, even 0, is true,",
1194
- "and nil is false. Helper retirement is deferred to occurrence/figure 010.09.",
1195
- "```",
1196
- ".pure {.x _; (x.###) ? {<>} : {()}};",
1197
- "```",
1198
- "`need x` returns a supported frame itself, or a native refusal.",
1199
- "```",
1200
- ".need {.x _; (pure x) ? {x} : {unsupported-figure}};",
1201
- "```",
1202
- "Native Star `x * y` replaces empty-array terminals with y and composes",
1203
- "FrameCount leaves using the same rule as a root count, including zero.",
1204
- "Replacements are shared by identity; ancestors preserve native metadata.",
1205
- "Terminals carrying metadata or statements are refused to avoid losing them.",
1206
- "Use `*` directly; the Figures module provides no composition wrapper.",
1192
+ "Only two derived mathematical abbreviations remain: Gap = |signed residual|",
1193
+ "and Spin = signed residual / positive Count. They define no Figure domain.",
1194
+ "Incidence is native `point ~~~ line`; collective incidence uses ordinary",
1195
+ "iteration. Observer eligibility is `x.###` itself: a FrameInt, including zero,",
1196
+ "is true; an unsupported host answers nil. No `pure`, `need` or `withness`",
1197
+ "helper is exported (issue occurrence/figure 010.09).",
1207
1198
  "",
1208
- "`withness x [f, …]` asks whether every requested frame is an immediate element",
1209
- "of x by native identity. It returns a native boolean. No requested frames is true.",
1210
- "```",
1211
- ".withness {.x _; .host x;",
1212
- " {.fs _;",
1213
- " .absent (fs &| {.f _; (f ~~~ host) ? {[]} : {[f]}});",
1214
- " absent = []}};",
1199
+ "Gap keeps a FrameInt result. Using `(x.###).##` instead would change the type",
1200
+ "to Count and would even give Size 1 for an unsupported host's nil. Test residual",
1201
+ "availability directly, then bind its value and choose its sign with native HC.",
1215
1202
  "```",
1216
- "`gap x` is the absolute value of native `x.###`, the alternating sum of its",
1217
- "immediate elements' `.##` counts, always a nonnegative FrameInt (Owner decision",
1218
- "for #455). The empty frame has Gap 0 as a FrameInt too.",
1219
- "```",
1220
- ".gap {.x _; (pure x) ? {",
1203
+ ".gap {.x _; (x.###) ? {",
1221
1204
  " .signed (x.###);",
1222
- " (signed .< 0) ? {0 - signed} : {signed}} : {need x}};",
1205
+ " (signed .< 0) ? {0 - signed} : {signed}} : {unsupported-figure}};",
1223
1206
  "```",
1224
- "`spin x N` keeps the sign of `x.###` and divides by a positive count N.",
1225
- "Non-count N is a type error; zero is division-by-zero. The host is validated",
1226
- "before the resolution is checked.",
1207
+ "Spin retains a typed positive Count divisor. Bare `x.### / N` would accept",
1208
+ "negative or fractional divisors and silently answer nil for an unsupported",
1209
+ "host. This abbreviation keeps host refusal before divisor validation, Count",
1210
+ "type errors, and division-by-zero even for a zero residual. These two short",
1211
+ "definitions are mathematical conveniences, not constructors or type guards.",
1227
1212
  "```",
1228
1213
  ".spin {.x _; .host x;",
1229
- " (pure host) ? {",
1230
- " {.n <(1).<>> _;",
1231
- " .signed (host.###);",
1214
+ " (host.###) ? {",
1215
+ " {.n <(1).<>> _; .signed (host.###);",
1232
1216
  " (n .< 1) ? {signed / 0} : {signed / n}}} : {",
1233
- " {.n _; need host}}};",
1217
+ " {.n _; unsupported-figure}}};",
1234
1218
  "```",
1235
1219
  "Native construction, counting and comparisons need no module helpers.",
1236
1220
  "```",
@@ -1242,11 +1226,11 @@ export const HC_SOURCES = new Map([
1242
1226
  "; [e.## = [[], []].##, [].## = [[]].##]",
1243
1227
  "# [<>, <>]",
1244
1228
  "```",
1245
- "Native terminal counting needs no enumeration or tally construction.",
1229
+ "Native observations need no domain wrapper, enumeration or tally construction.",
1246
1230
  "```",
1247
- "; [(pure []), (pure [[], [[]]]), (pure [[], 5]), (pure [.k 1; []])]",
1231
+ "; [([].### ? {<>} : {()}), ([[], [[]]].### ? {<>} : {()}), ([[], 5].### ? {<>} : {()}), ([.k 1; []].### ? {<>} : {()})]",
1248
1232
  "# [<>, <>, <>, <>]",
1249
- "; [(need e) = e, (need e) === e]",
1233
+ "; [(e.### ? {e} : {unsupported-figure}) = e, (e.### ? {e} : {unsupported-figure}) === e]",
1250
1234
  "# [<>, <>]",
1251
1235
  "; [[], “a”] * [[]]",
1252
1236
  "# $!.star-domain *",
@@ -1284,15 +1268,26 @@ export const HC_SOURCES = new Map([
1284
1268
  "; [([[[], []]].## [[[]]]) = [[[]], [[]]], ([[[], []]] * [[]]) = [[[[]], [[]]]]]",
1285
1269
  "# [<>, <>]",
1286
1270
  "```",
1287
- "Withness uses identity, and its answer is the native boolean.",
1271
+ "Incidence uses immediate identity. These shared frame objects illustrate Fano",
1272
+ "incidence (see `hc/membership.hc`; occurrence/figure 010.06), without claiming",
1273
+ "that the complete Fano geometry has been derived. Equal form is not incidence.",
1274
+ "Collective incidence keeps the absent requested points and asks if none remain;",
1275
+ "empty requests are true, repeats need one match, and nested-only points fail.",
1288
1276
  "```",
1289
1277
  "; .shared [[]]; .p1 [shared, []]; .p2 [[], shared];",
1290
- "; [(withness p1 [shared]), (withness p2 [shared]), (withness p1 [[[]]])]",
1278
+ "; [shared ~~~ p1, shared ~~~ p2, [[]] ~~~ p1]",
1291
1279
  "# [<>, <>, ()]",
1292
- "; [(withness [] [[[]]]), (withness [shared] [])]",
1280
+ "; [[[]] ~~~ [], ([] &| {.f _; (f ~~~ p1) ? {[]} : {[f]}}) = []]",
1293
1281
  "# [(), <>]",
1282
+ "; ([shared, shared] &| {.f _; (f ~~~ p1) ? {[]} : {[f]}}) = []",
1283
+ "# <>",
1284
+ "; ([shared, [[]]] &| {.f _; (f ~~~ p1) ? {[]} : {[f]}}) = []",
1285
+ "# ()",
1286
+ "; .nested [p1];",
1287
+ "; ([shared] &| {.f _; (f ~~~ nested) ? {[]} : {[f]}}) = []",
1288
+ "# ()",
1294
1289
  "```",
1295
- "Native `.###` folds the immediate elements' terminal counts with alternating",
1290
+ "Native `.###` folds the immediate elements' Sizes with alternating",
1296
1291
  "signs, one sign per element, and answers a FrameInt even when it is 0 or",
1297
1292
  "positive. Mixed arrays and evaluated groups use the same rule.",
1298
1293
  "```",
@@ -1319,7 +1314,14 @@ export const HC_SOURCES = new Map([
1319
1314
  "# [1, 3, 3, 1, 1]",
1320
1315
  "; [[5, “hello”].##, [5, “hello”].###, (5, 3).###, [5, 3, 2, 7].###]",
1321
1316
  "# [10, 0, 2, -3]",
1317
+ "; [([5, “hello”].### ? {<>} : {()}), (5.### ? {<>} : {()})]",
1318
+ "# [<>, ()]",
1319
+ "; { .x <[].<>> _; x.### } [[], [“nested atom”]]",
1320
+ "# -10",
1322
1321
  "```",
1322
+ "Outer array binding accepts nested atoms, and rejects groups despite their valid",
1323
+ "residual. It is neither a recursive array-only constraint nor the residual domain.",
1324
+ "",
1323
1325
  "Gap is `|x.###|` and Spin is `x.### / N`, including shared branches at every",
1324
1326
  "occurrence. Reversing two unequal branches reverses Spin's sign.",
1325
1327
  "```",
@@ -1338,6 +1340,12 @@ export const HC_SOURCES = new Map([
1338
1340
  "# $!.type-error .n <(1).<>> 2.5",
1339
1341
  "; spin [[[], []]] 0",
1340
1342
  "# $!.division-by-zero /",
1343
+ "; [gap [5, “hello”], spin [5, “hello”] 4]",
1344
+ "# [0, 0]",
1345
+ "; spin [] (0 - 2)",
1346
+ "# $!.type-error .n <(1).<>> -2",
1347
+ "; spin [] 0",
1348
+ "# $!.division-by-zero /",
1341
1349
  "",
1342
1350
  "```",
1343
1351
  "Star uses native `*` dispatch; numeric pairs keep arithmetic.",
@@ -1 +1 @@
1
- export const VERSION = "0.37.0";
1
+ export const VERSION = "0.37.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hclang",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
4
4
  "description": "Homoiconic C command-line interpreter and REPL",
5
5
  "keywords": [
6
6
  "language",