From f052c87c9ceae8a25f565673ac028eb9c286bab7 Mon Sep 17 00:00:00 2001 From: sorrel Date: Mon, 26 Feb 2024 15:40:45 -0500 Subject: [PATCH] patch better support for composed articles and string resource id --- archive/latl-primitives.scm | 3 ++- oxaliq.net.rkt | 14 +++++++------- source/unsettled/latl-primitives.scm | 2 +- static/style/styles.css | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/archive/latl-primitives.scm b/archive/latl-primitives.scm index 5bec1e2..c131f48 100644 --- a/archive/latl-primitives.scm +++ b/archive/latl-primitives.scm @@ -1,5 +1,6 @@ '(article - ((id "latl-primitives")) + ((id "latl-primitives") + (class "composed-article")) ;; brief intro - restate the problem (section ((id "intro")) diff --git a/oxaliq.net.rkt b/oxaliq.net.rkt index 3ad3175..66c8efe 100644 --- a/oxaliq.net.rkt +++ b/oxaliq.net.rkt @@ -73,15 +73,15 @@ [(eq? api-type 'httpx) "static/fragment"] [(eq? api-type 'page) "static/page"] [else (error "api-type ~a not recognized" api-type)])]) - ((make-path-no-param root-folder #".html") t))) + ((make-path-no-param root-folder #".html") t))) (define (make-static-path-id-param api-type t id) - (let ([root-folder + (let ([root-folder (cond [(eq? api-type 'httpx) "static/fragment"] [(eq? api-type 'page) "static/page"] [else (error "api-type ~a not recognized" api-type)])]) - ((make-path-id-param root-folder #".html") t id))) + ((make-path-id-param root-folder #".html") t id))) @@ -163,9 +163,9 @@ (dispatch-rules [("hx" "home") (respond-resource-with-processor 'httpx "root" xexpr-file->res)] [("hx" "settled") (respond-resource-with-processor 'httpx "settled" xexpr-file->res)] - [("hx" "settled" (integer-arg)) (respond-resource-with-processor 'httpx "settled" xexpr-file->res)] + [("hx" "settled" (string-arg)) (respond-resource-with-processor 'httpx "settled" xexpr-file->res)] [("hx" "unsettled") (respond-resource-with-processor 'httpx "unsettled" xexpr-file->res)] - [("hx" "unsettled" (integer-arg)) (respond-resource-with-processor 'httpx "unsettled" xexpr-file->res)] + [("hx" "unsettled" (string-arg)) (respond-resource-with-processor 'httpx "unsettled" xexpr-file->res)] [("hx" "tagged") (respond-resource-with-processor 'httpx "tagged" xexpr-file->res)] [("hx" "tagged" (string-arg)) (respond-resource-with-processor 'httpx "tagged" xexpr-file->res)] [("hx" (string-arg)) (respond-resource-with-processor 'httpx "root" xexpr-file->res)] @@ -200,9 +200,9 @@ [("") (respond-resource-with-processor 'page "" make-page)] [("home") (respond-resource-with-processor 'page "" make-page)] [("settled") (respond-resource-with-processor 'page "settled" make-page)] - [("settled" (integer-arg)) (respond-resource-with-processor 'page "settled" make-page)] + [("settled" (string-arg)) (respond-resource-with-processor 'page "settled" make-page)] [("unsettled") (respond-resource-with-processor 'page "unsettled" make-page)] - [("unsettled" (integer-arg)) (respond-resource-with-processor 'page "unsettled" make-page)] + [("unsettled" (string-arg)) (respond-resource-with-processor 'page "unsettled" make-page)] [("tagged") (respond-resource-with-processor 'page "tagged" make-page)] [("tagged" (string-arg)) (respond-resource-with-processor 'page "tagged" make-page)] [((string-arg)) (respond-resource-with-processor 'page "root" make-page)] diff --git a/source/unsettled/latl-primitives.scm b/source/unsettled/latl-primitives.scm index c11e3f1..1893829 100644 --- a/source/unsettled/latl-primitives.scm +++ b/source/unsettled/latl-primitives.scm @@ -1 +1 @@ -'(body '(article ((id "latl-primitives")) (section ((id "intro")) (hgroup (h1 "what must be true of latl primitives") (p (em "what will latl need to " (u "do") " out of the box?"))) (p "i've talked a little about " (a ((href "/unsettled/1")) "conlanging and latl") " previously here. the short version is this: making languages (for theoretical conscious beings) is fun! it's been a consistent hobby and artistic pursuit for me for much of my life. i've had different approaches from making extremely regular languages, to simulating the evolution of a family of spoken languages, to a family of synthesizer languages for a fractured machine society. every language project requires keeping track of a dictionary and a grammar (even if they never become more than quick sketches) and any sufficiently involved project can benefit from tools for generating new words that fit a language's 'phonotactics', generating derived words based on grammatical rules, simulating language change over time. conlanging is a hobby with enough overlap with computation, that some conlangers have created tools for some of these tasks. my own projects have become too ambitious to have my work live in spreadsheets over here and latex files over there and text files with the defintions i provide to web-based tools somewhere else entirely. i want to build on the work of those came before and create a substrate upon which any tool a conlanger needs could be built and in which i can define the entirety of a language in one system.") (p "at it's base latl will be a tool for operating on languages, invented (or otherwise... maybe.) it helps then to think of the sorts of things that encompass language. spoken and signed languages will be the assumed base case, as those are the things real human beings usually use to communicate with each other. the modality of a language needn't be important to the primitives used, but it's always a good practice to state assumptions")) (section ((id "contents")) (ul (li (a ((href "#what-is-language")) "go to what-is-language")) (li (a ((href "#what-conlangers-do")) "go to what-conlangers-do")) (li (a ((href "#proposed-latl-primitives")) "go to proposed-latl-primitives")) (li (a ((href "#signoff")) "go to signoff")))) (section ((id "what-is-language")) (hgroup (h2 "thinking about what language is for a moment")) (a ((href "/unsettled/latl-primitives_what-is-language") (hx-get "/hx/unsettled/latl-primitives_what-is-language") (hx-target "#what-is-language") (hx-swap "outerHTML")) "what-is-language")) (section ((id "what-conlangers-do")) (hgroup (h2 "what conlangers do") (p (em "moving from a pile of language stuff to a pile of problems to solve"))) (p "coming soon")) (section ((id "proposed-latl-primitives")) (hgroup (h2 "introducing the primitives") (p (em "things that definitely need to be present in latl"))) (p "coming soon")) (section ((id "signoff")) (hgroup (h2 "signing off") (p (em "what's next for latl thinking?"))) "coming soon")) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/unsettledlatl-primitives.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/latl") (hx-get "/hx/tagged/latl") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "latl"))) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/conlang") (hx-get "/hx/tagged/conlang") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "conlang"))) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/programming-language") (hx-get "/hx/tagged/programming-language") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "programming-language"))))) (hr) (p ((class "doc-history")) (small "published: 2024-02-25T21:33:06")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) \ No newline at end of file +'(body '(article ((id "latl-primitives") (class "composed-article")) (section ((id "intro")) (hgroup (h1 "what must be true of latl primitives") (p (em "what will latl need to " (u "do") " out of the box?"))) (p "i've talked a little about " (a ((href "/unsettled/1")) "conlanging and latl") " previously here. the short version is this: making languages (for theoretical conscious beings) is fun! it's been a consistent hobby and artistic pursuit for me for much of my life. i've had different approaches from making extremely regular languages, to simulating the evolution of a family of spoken languages, to a family of synthesizer languages for a fractured machine society. every language project requires keeping track of a dictionary and a grammar (even if they never become more than quick sketches) and any sufficiently involved project can benefit from tools for generating new words that fit a language's 'phonotactics', generating derived words based on grammatical rules, simulating language change over time. conlanging is a hobby with enough overlap with computation, that some conlangers have created tools for some of these tasks. my own projects have become too ambitious to have my work live in spreadsheets over here and latex files over there and text files with the defintions i provide to web-based tools somewhere else entirely. i want to build on the work of those came before and create a substrate upon which any tool a conlanger needs could be built and in which i can define the entirety of a language in one system.") (p "at it's base latl will be a tool for operating on languages, invented (or otherwise... maybe.) it helps then to think of the sorts of things that encompass language. spoken and signed languages will be the assumed base case, as those are the things real human beings usually use to communicate with each other. the modality of a language needn't be important to the primitives used, but it's always a good practice to state assumptions")) (section ((id "contents")) (ul (li (a ((href "#what-is-language")) "go to what-is-language")) (li (a ((href "#what-conlangers-do")) "go to what-conlangers-do")) (li (a ((href "#proposed-latl-primitives")) "go to proposed-latl-primitives")) (li (a ((href "#signoff")) "go to signoff")))) (section ((id "what-is-language")) (hgroup (h2 "thinking about what language is for a moment")) (a ((href "/unsettled/latl-primitives_what-is-language") (hx-get "/hx/unsettled/latl-primitives_what-is-language") (hx-target "#what-is-language") (hx-swap "outerHTML")) "what-is-language")) (section ((id "what-conlangers-do")) (hgroup (h2 "what conlangers do") (p (em "moving from a pile of language stuff to a pile of problems to solve"))) (p "coming soon")) (section ((id "proposed-latl-primitives")) (hgroup (h2 "introducing the primitives") (p (em "things that definitely need to be present in latl"))) (p "coming soon")) (section ((id "signoff")) (hgroup (h2 "signing off") (p (em "what's next for latl thinking?"))) "coming soon")) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/unsettledlatl-primitives.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/latl") (hx-get "/hx/tagged/latl") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "latl"))) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/conlang") (hx-get "/hx/tagged/conlang") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "conlang"))) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/programming-language") (hx-get "/hx/tagged/programming-language") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "programming-language"))))) (hr) (p ((class "doc-history")) (small "published: 2024-02-25T21:33:06")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) \ No newline at end of file diff --git a/static/style/styles.css b/static/style/styles.css index 373b7f1..fb199cc 100644 --- a/static/style/styles.css +++ b/static/style/styles.css @@ -54,7 +54,7 @@ div.hx-target section { margin: 3px; } -div.hx-target footer { +div.hx-target footer, article.composed-article footer { display: none; }