SX URL algebra: relative resolution, keyword ops, ! special forms

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>
This commit is contained in:
2026-03-12 18:31:21 +00:00
parent 7a1d1e9ea2
commit b23e81730c
8 changed files with 1554 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
(defcomp ~essay-self-defining-medium ()
(~doc-page :title "A True Hypermedium Must Define Itself With Itself"
(~doc-page :title "The True Hypermedium Must Define Itself With Itself"
(p :class "text-stone-500 text-sm italic mb-8"
"On ontological uniformity, the metacircular web, and why the address of a thing and the thing itself should be made of the same stuff.")
@@ -83,6 +83,6 @@
(p :class "text-stone-600"
"HTML cannot. CSS cannot. JavaScript cannot. HTTP cannot. The web, as a composite medium, cannot — because its layers are mutually opaque and none can express the others.")
(p :class "text-stone-600"
"SX can. The evaluator is SX. The parser is SX. The renderer is SX. The wire format is SX. The URLs are SX. The specification is SX. This essay, which argues that a true hypermedium must define itself with itself, is itself an s-expression — evaluated by an evaluator defined in the language it evaluates, served at a URL that is an expression in the language it describes, rendered by a renderer specified in the language it renders.")
"SX can. The evaluator is SX. The parser is SX. The renderer is SX. The wire format is SX. The URLs are SX. The specification is SX. This essay, which argues that the true hypermedium must define itself with itself, is itself an s-expression — evaluated by an evaluator defined in the language it evaluates, served at a URL that is an expression in the language it describes, rendered by a renderer specified in the language it renders.")
(p :class "text-stone-600"
"The serpent eats its tail. The medium defines itself with itself. That is the test, and that is the point."))))