(finally) add thought
This commit is contained in:
parent
42834bdfd1
commit
8e69079b74
1
files/homepage-statements/17
Normal file
1
files/homepage-statements/17
Normal file
@ -0,0 +1 @@
|
||||
queering the beep/boop binary
|
33
html/thoughts/{blog,random-thoughts}-deprecation
Normal file
33
html/thoughts/{blog,random-thoughts}-deprecation
Normal file
@ -0,0 +1,33 @@
|
||||
<!-- TITLE: {blog,random-thoughts} deprecation -->
|
||||
<!-- DATE: 2024-10-31 12:43:27 -->
|
||||
<!-- CATEGORIES: changes to site -->
|
||||
<!-- vim: ft=html -->
|
||||
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.
|
||||
<pre>
|
||||
<span class="-punctuation-bracket"><span class="MatchParen">(</span></span><span class="-function-macro">defun</span> <span class="-variable"><span class="-function">html</span></span> <span class="-punctuation-bracket">(</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">page</span> <span class="String">"$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo '{thought}' || echo thoughts index]"</span>
|
||||
<span class="-string-escape">`</span><span class="-punctuation-bracket">(</span><span class="-variable">section</span> <span class="-punctuation-bracket">(</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="String">"$[echo $][echo > /tmp/footnote_count]"</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">h1</span> <span class="-punctuation-bracket">(</span><span class="SpecialChar"><span class="-punctuation-special">:</span>style</span> <span class="String">"display: $[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo block || echo none]"</span><span class="-punctuation-bracket">)</span> <span class="String">"$[echo $][cat ./html/thoughts/$(basename '{thought}') | grep '<!-- TITLE:' | sed 's/<!-- TITLE://; s/-->//']"</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">div</span> <span class="-punctuation-bracket">(</span><span class="SpecialChar"><span class="-punctuation-special">:</span>style</span> <span class="String">"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;]"</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">p</span> <span class="-punctuation-bracket">(</span><span class="-punctuation-bracket">)</span> <span class="String">"$[echo $][cat ./html/thoughts/$(basename '{thought}') | grep '<!-- DATE:' | sed 's/<!-- DATE://; s/-->//']"</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">p</span> <span class="-punctuation-bracket">(</span><span class="-punctuation-bracket">)</span> <span class="String">"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/, $//']"</span><span class="-punctuation-bracket">)</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="String">"$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo '<br>' || true]"</span>
|
||||
<span class="-punctuation-bracket">(</span><span class="-variable">div</span> <span class="-punctuation-bracket">(</span><span class="-punctuation-bracket">)</span> <span class="String">"$[echo $][include \"./html/thoughts/$(basename '{thought}')\"]"</span><span class="-punctuation-bracket">)</span>
|
||||
<span class="String">"$[echo $][test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' || echo '<h1>posts:</h1>']"</span>
|
||||
<span class="String">"$[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)]"</span>
|
||||
<span class="String">"$[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)]"</span><span class="-punctuation-bracket">)</span><span class="-punctuation-bracket">)</span><span class="-punctuation-bracket"><span class="MatchParen">)</span></span>
|
||||
</pre>
|
||||
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.
|
||||
<hr>
|
||||
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.
|
||||
<hr>
|
||||
<pre>
|
||||
~ λ 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
|
||||
</pre>
|
||||
amusing.
|
Loading…
Reference in New Issue
Block a user