The rename script only matched ~prefixed names in .sx files.
Python render calls use bare strings like render_to_html("name")
which also need updating: 37 replacements across 8 files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Response to Nick Blow's article on JSON hypermedia and LLM agents.
Argues SX resolves the HTML-vs-JSON debate by being simultaneously
content, control, and code in one homoiconic format.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Component names now reflect filesystem location using / as path separator
and : as namespace separator for shared components:
~sx-header → ~layouts/header
~layout-app-body → ~shared:layout/app-body
~blog-admin-dashboard → ~admin/dashboard
209 files, 4,941 replacements across all services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All routes moved under /sx/ prefix:
- / redirects to /sx/
- /sx/ serves home page
- /sx/<path:expr> is the catch-all for SX expression URLs
- Bare /(...) and /~... redirect to /sx/(...) and /sx/~...
- All ~600 hrefs, sx-get attrs, defhandler paths, redirect
targets, and blueprint routes updated across 44 files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New comprehensive documentation for SX URLs at /(applications.(sx-urls))
covering dots-as-spaces, nesting/scoping, relative URLs, keyword ops,
delta values, special forms, hypermedia integration, and GraphSX.
Fix layout tagline: "A" → "The" framework-free reactive hypermedium.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extends router.sx with the full SX URL algebra — structural navigation
(.slug, .., ...), keyword set/delta (.:page.4, .:page.+1), bare-dot
shorthand, and ! special form parsing (!source, !inspect, !diff, !search,
!raw, !json). All pure SX spec, bootstrapped to both Python and JS.
Fixes: index-of -1/nil portability (_index-of-safe wrapper), variadic
(+ a b c) transpilation bug (use nested binary +). Includes 115 passing
tests covering all operations. Also: "The" strapline and essay title.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update ~sx-doc :path values in docs.sx from old-style paths to SX
expression URLs (fixes client-side rendered page nav resolution)
- Fix stale hrefs in content/pages.py code examples
- Fix tabs push-url in examples.sx
- Add self-defining-medium + sx-urls + sx-protocol to essay/plan cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On ontological uniformity, the metacircular web, and why address
and content should be made of the same stuff.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add sx-url-to-path to router.sx that converts SX expression URLs to
old-style slash paths for route matching. find-matching-route now
transparently handles both formats — the browser URL stays as the SX
expression while matching uses the equivalent old-style path.
/(language.(doc.introduction)) → /language/docs/introduction for matching
but pushState keeps the SX URL in the browser bar.
- router.sx: add _fn-to-segment (doc→docs, etc.), sx-url-to-path
- router.sx: modify find-matching-route to convert SX URLs before matching
- Rebootstrap sx-browser.js and sx_ref.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every URL at sx-web.org now uses bracketed SX expressions — pages AND
API endpoints. defhandler :path values, sx-get/sx-post/sx-delete attrs,
code examples, and Python route decorators all converted.
- Add SxAtomConverter to handlers.py for parameter matching inside
expression URLs (e.g. /(api.(item.<sx:item_id>)))
- Convert ~50 defhandler :path values in ref-api.sx and examples.sx
- Convert ~90 sx-get/sx-post/sx-delete URLs in reference.sx, examples.sx
- Convert ~30 code example URLs in examples-content.sx
- Convert ~30 API URLs in pages.py (Python string code examples)
- Convert ~70 page navigation URLs in pages.py
- Convert 7 Python route decorators in routes.py
- Convert ~10 reactive API URLs in marshes.sx
- Add API redirect patterns to sx_router.py (301 for old paths)
- Remove /api/ skip in app.py redirects (old API paths now redirect)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Components are stored as ~name in the env. The helper was looking up
bare name without the tilde prefix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
component-source and handler-source are page helpers, not IO primitives.
They need to be in the handler evaluation env just like defpage evaluation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ring 2 (bootstrapper): JavaScript translation via js.sx,
Z3/SMT-LIB translation via reader_z3.py. Each define card
now shows SX, Python, JavaScript, and Z3 collapsible panels.
Ring 3 (bridge): Cross-reference index maps function names
to spec files. Each define shows which other spec functions
it references.
Ring 4 (runtime): Test file parsing extracts defsuite/deftest
structure. Fuzzy name matching links tests to functions.
Stats bar shows test count.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Extra closing paren in ex-tabs handler
2. tab-content dict values contained (div ...) HTML tags which crash
during register_components since HTML primitives aren't in env
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two issues: `)` inside string content wasn't a syntactic paren,
and one extra syntactic `)` at end of handler. Removed both.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The <slug> route param doesn't match slashes, so
/language/specs/explore/<slug> needs its own defpage
instead of being handled inside specs-page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The helper was trying to look up all-spec-items from get_component_env(),
but that only contains defcomp/defmacro — not regular defines. Now the
SX routing layer calls find-spec and passes filename/title/desc directly.
Also adds boundary declaration for spec-explorer-data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- _spec_explorer_data() helper: parses spec files into sections, defines,
effects, params, source blocks, and Python translations via PyEmitter
- specs-explorer.sx: 10 defcomp components for explorer UI — cards with
effect badges, typed param lists, collapsible SX/Python translation panels
- Route at /language/specs/explore/<slug> via docs.sx
- "Explore" link on existing spec detail pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 14 new IO primitives to boundary.sx: web interop (request-form,
request-json, request-header, request-content-type, request-args-all,
request-form-all, request-headers-all, request-file-name), response
manipulation (set-response-header, set-response-status), ephemeral
state (state-get, state-set!), and timing (now, sleep).
All 19 reference handlers now have :returns type annotations using
types.sx vocabulary. Response meta (headers/status) flows through
context vars, applied by register_route_handlers after execution.
Only SSE endpoint remains in Python (async generator paradigm).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New plan page at /etc/plans/spec-explorer describing the "fifth ring"
architecture: SX exploring itself through per-function cards showing
source, Python/JS/Z3 translations, platform deps, tests, proofs, and
usage examples.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Specs nav reorganized from flat list into 6 sections with children:
Core (5), Adapters (4), Browser (4), Reactive (1), Host Interface (3),
Extensions (4). Added missing spec items: adapter-async, signals,
boundary, forms, page-helpers, types. Architecture page updated to
match. New essay on ars, techne, and the self-making artifact chain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All 11 define-io-primitive entries now declare :effects [io].
Signal primitives annotated: signal/deref/computed = [] (pure),
reset!/swap!/effect/batch = [mutation].
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 6 — deftype: named type aliases, unions, records, and parameterized
types. Type definitions stored as plain dicts in *type-registry*. Includes
resolve-type for named type resolution, substitute-type-vars for
parameterized instantiation, subtype-resolved? for structural record
subtyping, and infer-type extension for record field type inference via get.
Phase 7 — defeffect: static effect annotations. Effects stored in
*effect-registry* and *effect-annotations*. Supports :effects keyword on
defcomp and define. Gradual: unannotated = all effects, empty list = pure.
check-body-walk validates effect containment at call sites.
Standard types defined: (maybe a), type-def, diagnostic, prim-param-sig.
Standard effects declared: io, mutation, render.
84/84 type system tests pass. Both Python and JS bootstrappers succeed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New platform_js primitives for direct DOM property/method access and
cross-origin iframe communication. Service worker static cache bumped
to v2 to flush stale assets. Removed experimental video embed from
header island, routes, and home page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend the type annotation system from defcomp-only to fn/lambda params:
- Infrastructure: sf-lambda, py/js-collect-params-loop, and bootstrap_py.py
now recognize (name :as type) in param lists, extracting just the name
- bootstrap_py.py: add _extract_param_name() helper, fix _emit_for_each_stmt
- 521 type annotations across 22 .sx spec files (eval, types, adapters,
transpilers, engine, orchestration, deps, signals, router, prove, etc.)
- Zero behavioral change: annotations are metadata for static analysis only
- All bootstrappers (Python, JS, G1) pass, 81/81 spec tests pass
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>