- All example URLs are now clickable live links
- New section: "Routing Is Functional Application" — section functions,
page functions, data-dependent pages with real code from page-functions.sx
- New section: "Server-Side: URL → eval → Response" — the Python handler,
auto-quoting spec, defhandler endpoints with live API links
- New section: "Client-Side: eval in the Browser" — try-client-route,
prepare-url-expr bootstrapped to JS
- Expanded "Relative URLs as Function Application" — structural transforms
vs string manipulation, keyword arguments, delta values, resolve spec
- Expanded special forms with parse-sx-url spec code and sigil table
- Every page on the site listed as clickable link in hierarchy section
- Live defhandler endpoints (ref-time, swap-item, click) linked directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JSON can't define itself. HTML can carry its spec but not execute it.
SX's spec IS the language — eval.sx is the evaluator, not documentation
about the evaluator. Progressive discovery, components, evaluable URLs,
and AI legibility all flow as consequences of self-definition.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add url-to-expr, auto-quote-unknowns, prepare-url-expr to router.sx —
the canonical URL-to-expression pipeline. Dots→spaces, parse, then
auto-quote unknown symbols as strings (slugs). The same spec serves
both server (Python) and client (JS) route handling.
- router.sx: three new pure functions for URL evaluation
- bootstrap_py.py: auto-include router module with html adapter
- platform_js.py: export urlToExpr/autoQuoteUnknowns/prepareUrlExpr
- sx_router.py: replace hand-written auto_quote_slugs with bootstrapped
prepare_url_expr — delete ~50 lines of hardcoded function name sets
- Rebootstrap sx_ref.py (4331 lines) and sx-browser.js
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dep scanner regex only matched [a-zA-Z0-9_-] in component names,
missing the new path separators (/) and namespace delimiters (:).
Fixed in deps.sx spec + rebootstrapped sx_ref.py and sx-browser.js.
Also fixed the Python fallback in deps.py.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>