it rewrote the thought viewing interface. it is now comically slow, but a 2.3 second page load time really isn't that bad. upon seeing the source code for the new interface ($[make-link "/html/view-thought.html"], replacing $[make-link "/html/random-thoughts.html"]), it is sure one will understand why it is so slow.
(defun html () (page "$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo '{thought}' || echo thoughts index]" `(section () "$[echo $][echo > /tmp/footnote_count]" (h1 (:style "display: $[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo block || echo none]") "$[echo $][cat ./html/thoughts/$(basename '{thought}') | grep '<!-- TITLE:' | sed 's/<!-- TITLE://; s/-->//']") (div (:style "height: 0; margin-top: 5px; justify-content: space-between; align-items: center; display: $[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo flex || echo none;]") (p () "$[echo $][cat ./html/thoughts/$(basename '{thought}') | grep '<!-- DATE:' | sed 's/<!-- DATE://; s/-->//']") (p () "categories: $[echo $][cat ./html/thoughts/$(basename '{thought}') | grep '<!-- CATEGORIES: ' | sed 's/<!-- CATEGORIES: //; s/-->//' | awk -F';' '{ for (i=1; i<=NF; i++) { sub(/^ +| +$/, \"\", $i); if ($i != \"\") printf \"<a href=\\\"?filter-category=%s\\\">%s</a>, \", $i, $i } }' | sed 's/, $//']")) "$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo '<br>' || true]" (div () "$[echo $][include \"./html/thoughts/$(basename '{thought}')\"]") "$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' || echo '<h1>posts:</h1>']" "$[echo $][test \"$(echo '{' 'filter-category' '}' | sed 's/ //g')\" != '{filter-category}' || test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' || (ls ./html/thoughts | while read -r file; do echo \"<div>$(cat ./html/thoughts/$file | grep '<!-- DATE:' | sed 's/<!-- DATE://; s/-->//') <a href=?thought=$file>$(cat ./html/thoughts/$file | grep '<!-- TITLE:' | sed 's/<!-- TITLE://; s/-->//')</a><br>categories: $(cat ./html/thoughts/$file | grep '<!-- CATEGORIES: ' | sed 's/<!-- CATEGORIES: //; s/-->//' | awk -F';' '{ for (i=1; i<=NF; i++) { sub(/^ +| +$/, \"\", $i); if ($i != \"\") printf \"<a href=\\\"?filter-category=%s\\\">%s</a>, \", $i, $i } }' | sed 's/, $//')</div>\"; done | sort --numeric --reverse)]" "$[echo $][test \"$(echo '{' 'filter-category' '}' | sed 's/ //g')\" != '{filter-category}' && test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' || (ls ./html/thoughts | while read -r file; do grep '<!-- CATEGORIES: ' ./html/thoughts/$file | grep '{filter-category}' && echo \"<div>$(cat ./html/thoughts/$file | grep '<!-- DATE:' | sed 's/<!-- DATE://; s/-->//') <a href=?thought=$file>$(cat ./html/thoughts/$file | grep '<!-- TITLE:' | sed 's/<!-- TITLE://; s/-->//')</a><br>categories: $(cat ./html/thoughts/$file | grep '<!-- CATEGORIES: ' | sed 's/<!-- CATEGORIES: //; s/-->//' | awk -F';' '{ for (i=1; i<=NF; i++) { sub(/^ +| +$/, \"\", $i); if ($i != \"\") printf \"<a href=\\\"?filter-category=%s\\\">%s</a>, \", $i, $i } }' | sed 's/, $//')</div>\"; done | sort --numeric --reverse)]")))bash is very slow. they should make bash, but with a JIT compiler. maybe natalie[ee] will invent a syntax for running lua code serverside instead of bash. it has been thinking of rewriting sludge in lua, anyways.
~ λ hyperfine -m30 -M30 'curl https://natalieee.net/html/view-thought.html' Benchmark 1: curl https://natalieee.net/html/view-thought.html Time (mean ± σ): 2.354 s ± 0.170 s [User: 0.011 s, System: 0.006 s] Range (min … max): 2.147 s … 2.964 s 30 runsamusing.