diff --git a/files/homepage-statements/17 b/files/homepage-statements/17 new file mode 100644 index 0000000..79ffa2c --- /dev/null +++ b/files/homepage-statements/17 @@ -0,0 +1 @@ +queering the beep/boop binary diff --git a/html/thoughts/{blog,random-thoughts}-deprecation b/html/thoughts/{blog,random-thoughts}-deprecation new file mode 100644 index 0000000..c7b0aab --- /dev/null +++ b/html/thoughts/{blog,random-thoughts}-deprecation @@ -0,0 +1,33 @@ + + + + +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. +
+ignoring the prior tangent, it has decided it will never fix the blog. this will function as the new blog (which it is basically doing already). the old thought viewing interface will no longer be maintained, but will probably still mostly function. +
+
+~ λ 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 runs
+
+amusing.