giles
f77d7350dd
Refactor SX primitives: modular, isomorphic, general-purpose
Spec modularization:
- Add (define-module :name) markers to primitives.sx creating 11 modules
(7 core, 4 stdlib). Bootstrappers can now selectively include modules.
- Add parse_primitives_by_module() to boundary_parser.py.
- Remove split-ids primitive; inline at 4 call sites in blog/market queries.
Python file split:
- primitives.py: slimmed to registry + core primitives only (~350 lines)
- primitives_stdlib.py: NEW — stdlib primitives (format, text, style, debug)
- primitives_ctx.py: NEW — extracted 12 page context builders from IO
- primitives_io.py: add register_io_handler decorator, auto-derive
IO_PRIMITIVES from registry, move sync IO bridges here
JS parity fixes:
- = uses === (strict equality), != uses !==
- round supports optional ndigits parameter
- concat uses nil-check not falsy-check (preserves 0, "", false)
- escape adds single quote entity (') matching Python/markupsafe
- assert added (was missing from JS entirely)
Bootstrapper modularization:
- PRIMITIVES_JS_MODULES / PRIMITIVES_PY_MODULES dicts keyed by module
- --modules CLI flag for selective inclusion (core.* always included)
- Regenerated sx-ref.js and sx_ref.py with all fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:45:29 +00:00
..
2026-03-06 01:45:29 +00:00
2026-03-05 16:12:38 +00:00
2026-03-05 22:45:01 +00:00
2026-03-06 01:45:29 +00:00
2026-03-05 11:03:50 +00:00
2026-03-05 23:50:02 +00:00
2026-03-01 11:06:57 +00:00
2026-03-04 12:47:51 +00:00
2026-03-01 11:06:57 +00:00
2026-03-04 12:47:51 +00:00
2026-03-05 22:17:26 +00:00
2026-03-05 23:50:02 +00:00
2026-03-02 19:57:27 +00:00
2026-03-05 09:25:28 +00:00
2026-03-05 22:17:26 +00:00
2026-03-04 19:30:45 +00:00
2026-03-05 09:25:28 +00:00
2026-03-05 23:50:02 +00:00
2026-03-05 23:50:02 +00:00
2026-03-02 00:50:57 +00:00
2026-03-06 01:45:29 +00:00
2026-03-06 01:45:29 +00:00
2026-03-06 01:45:29 +00:00
2026-03-06 01:45:29 +00:00
2026-03-05 22:17:26 +00:00
2026-03-04 10:31:31 +00:00
2026-03-01 11:06:57 +00:00
2026-03-04 10:31:31 +00:00
2026-03-05 23:50:02 +00:00
2026-03-04 12:47:51 +00:00
2026-03-04 12:47:51 +00:00