diff options
| -rw-r--r-- | article-dates.lua | 31 | ||||
| -rwxr-xr-x | index.md | 42 | ||||
| -rwxr-xr-x | make_html | 4 | ||||
| -rwxr-xr-x | template.html | 49 |
4 files changed, 73 insertions, 53 deletions
diff --git a/article-dates.lua b/article-dates.lua index 72bdba5..df4e2a0 100644 --- a/article-dates.lua +++ b/article-dates.lua @@ -1,19 +1,32 @@ +local function parse_inlines(text) + return pandoc.read(text, "markdown").blocks[1].content +end + function Pandoc(doc) - local heading + local articles = pandoc.List() + local blocks = pandoc.Blocks({}) for _, block in ipairs(doc.blocks) do if block.t == "Header" and block.level == 1 then - heading = block - elseif heading and block.t == "Para" then - local date = pandoc.utils.stringify(block.content) - table.insert(heading.content, pandoc.RawInline( - "html", '<span class="article-date">' .. date .. "</span>" - )) - heading = nil + local date = block.attributes["data-date"] + if not date or date == "" then + error("article is missing data-date: " .. pandoc.utils.stringify(block.content)) + end + + block.attributes["data-date"] = nil + + local label = pandoc.Inlines(block.content) + label:insert(pandoc.Span(parse_inlines(date), {class = "article-date"})) + articles:insert({pandoc.Plain({pandoc.Link(label, block.identifier .. ".html")})}) + + blocks:insert(block) + blocks:insert(pandoc.Para(parse_inlines(date))) else - heading = nil + blocks:insert(block) end end + doc.blocks = blocks + doc.meta["article-list"] = pandoc.MetaBlocks({pandoc.BulletList(articles)}) return doc end @@ -2,8 +2,7 @@ pagetitle: yummers lang: en --- -# how do you evenly tile a column? -12 Jul 2026 +# how do you evenly tile a column? {data-date="12 Jul 2026"} While walking through town the other day, I saw a pillar that looks a bit like this: @@ -189,8 +188,7 @@ $$ e = 2r \tan{\frac{\pi}{n}} $$ -# histogram-preserving tri-planar projection -31 March 2026 +# histogram-preserving tri-planar projection {data-date="31 March 2026"} I've been messing around with Burley's "On Histogram-Preserving Blending for Randomized Texture Tiling" ([link](https://jcgt.org/published/0008/04/02/)) for @@ -242,8 +240,7 @@ The astute reader might find that just increasing contrast after the blend would produce a similar result, and I'm inclined to agree. The only possible advantage that this method has is that it doesn't demand fine-tuning. -# using linux as a desktop os in 2026 -9 Feb 2026 +# using linux as a desktop os in 2026 {data-date="9 Feb 2026"} About a month ago, my PC's boot drive died. I had been running Windows 11 with moderate dissatisfaction for a few months, so I decided to switch over to @@ -479,8 +476,7 @@ on Vulkan,~~* is what's keeping me from just deleting Windows. The Linux desktop is really good. You should give it a try. -# hemi-octahedral impostors -14 Jan 2026 +# hemi-octahedral impostors {data-date="14 Jan 2026"} *Note: this blog post is only like half way complete. I may or may not circle back to it. The stuff on octahedral mappings is all finished, but the @@ -768,8 +764,7 @@ wrong. *Note: I stepped away from this project and don't plan to revisit it soon. If I do, I'll post updates in a followup and link to it from here.* -# 6 wave dispersion relations with derivatives -21 Sep 2025 +# 6 wave dispersion relations with derivatives {data-date="21 Sep 2025"} Tessendorf's 2005 paper "[Simulating Ocean Water](https://people.computing.clemson.edu/~jtessen/reports/papers_files/coursenotes2004.pdf)" @@ -989,8 +984,7 @@ derivations of each derivative: Divide numerator and denominator by $\rho$ (or p in wolfram) to make them match. -# meow meow meow meow -10 Sep 2025 +# meow meow meow meow {data-date="10 Sep 2025"} meow meow meow meow meow meow meow meow'meow meow meow meow meow. meow meow meow meow. @@ -1103,8 +1097,7 @@ meow * meow meow meow meow meow meow meow meow meow meow meow, meow 8.8% meow meow meow meow meow ~55% meow meow meow meow. -# rasterized ray marching at scale -11 Jun 2025 +# rasterized ray marching at scale {data-date="11 Jun 2025"} I've long had the dream of creating high resolution chains on characters with raymarching. The problem is that Unity's object transform is based on the @@ -1357,8 +1350,7 @@ can correct for that in your SDF.) {width=80%} -# how much CO2 do American cars produce? -23 May 2025 +# how much CO2 do American cars produce? {data-date="23 May 2025"} TLDR: About $1.520 \cdot 10^{12}$ kg/year. This increases the CO$_2$ in the atmosphere by about $0.048$% per year. @@ -1489,8 +1481,7 @@ we have arrived at the same conclusion as the "entrenched academics": that the change in CO$_2$ in the atmosphere over the last 200 years is due to human activity. -# "big llms are memory bound" -22 May 2025 +# "big llms are memory bound" {data-date="22 May 2025"} There is wisdom oft repeated that "big neural nets are limited by memory bandwidth." This is utter horseshit and I will show why. @@ -1571,8 +1562,7 @@ In conclusion: bandwidth and compute dictate throughput in inverse proportion to model size. 3. People on the internet (especially redditors) are fucking stupid. -# meow meow meow meow -14 Apr 2025 +# meow meow meow meow {data-date="14 Apr 2025"} meow meow meow meow meow meow meow meow. meow meow meow meow, meow meow meow meow meow meow meow. @@ -1583,8 +1573,7 @@ meow meow; meow, meow meow meow meow meow meow meow. meow meow meow meow meow. meow meow meow. meow meow. -# riding crop -7 Apr 2025 +# riding crop {data-date="7 Apr 2025"}  @@ -1595,8 +1584,7 @@ the gumroad page for setup instructions. Gumroad suspended my account over this product. Yes, over a fucking *riding crop*. That's why it's hosted here. Enjoy the 100% discount <3 -# a panoply of frameworks -3 Apr 2025 +# a panoply of frameworks {data-date="3 Apr 2025"} I want to use electron. I know that raw CSS sucks dick so let's use a framework. Bootstrap sucks so let's use tailwind. Oh wait tailwind has a @@ -1611,8 +1599,7 @@ Good thing I actually read the electron docs. I want to die. -# electron first impressions -1 Apr 2025 +# electron first impressions {data-date="1 Apr 2025"} Occasionally I want to build some throwaway app for use by other people. CLIs are nice and all, but they're hard to launch from VR, and most people @@ -1647,8 +1634,7 @@ was around 30 MB with my entire STT app built in. Worse but IMO within the realm of reasonability. Time to first draw is pretty good - under a second according to the eyeball test. -# hello world :3 -20 Mar 2025 +# hello world :3 {data-date="20 Mar 2025"} <video autoplay loop muted playsinline> <source src="https://yummers.dev/images/danser.webm" type="video/webm"> @@ -14,8 +14,6 @@ pandoc \ --mathml \ --lua-filter article-dates.lua \ --template template.html \ - --toc \ - --toc-depth 1 \ -t chunkedhtml \ --split-level 1 \ --chunk-template "%i.html" \ @@ -23,7 +21,5 @@ pandoc \ "$MARKDOWN_IN" unzip -o "$OUTPUT_DIR/site.zip" -d /var/www/html/ -# Remove in-page hash fragments from TOC links on the landing page so links open at page top -sed -E -i 's/(href="[^"#]+\.html)#[^"]+"/\1"/g' /var/www/html/index.html || true cp -r vr_assets /var/www/html/ cp -r images /var/www/html/ diff --git a/template.html b/template.html index 1bf6217..6e05cbc 100755 --- a/template.html +++ b/template.html @@ -139,7 +139,7 @@ $endif$ } } /* AI blurb */ - h1 + p::after { + .article h1 + p::after { content: "All prose on this website is written by a human."; display: block; margin-top: 1em; @@ -156,7 +156,7 @@ $if(math)$ $math$ $endif$ </head> -<body> +<body class="$if(top)$article$else$home$endif$"> $for(include-before)$ $include-before$ $endfor$ @@ -180,19 +180,44 @@ $if(title)$ $endif$ </header> $endif$ -$if(toc)$ +$if(top)$ +$body$ + <p><a href="/">back to main page</a></p> +$else$ <h1>articles</h1> <nav id="$idprefix$TOC" role="doc-toc"> - $if(toc-title)$ - <h2 id="$idprefix$toc-title">$toc-title$</h2> - $endif$ - $table-of-contents$ + $article-list$ </nav> -$endif$ -$body$ -$if(toc)$ -$else$ - <p><a href="/">back to main page</a></p> + <h1>about</h1> + <p> + hello, my name is yum. i am a virtual person interested in realtime + graphics and math. this website is a collection of my stray thoughts that i + feel ought to be written down. i think of it as something slightly more + public than a diary. + </p> + <p> + all prose on this website is written by a human (me). i do use ai when + developing software. i don't disclose it. unless you see something in the + README saying that i *didn't* use AI, assume i did. the skilled reader should + be able to quickly assess quality regardless of how the code is made. + </p> + <p> + my open source code is hosted at + <a href="https://git.yummers.dev">git.yummers.dev</a>. it may be slow to load + (10-20 seconds). i doubt much of it will be of use to others, besides + HLSL_OKLAB and maybe modular_slang. + </p> + <p> + core beliefs: + <ol> + <li>information should be free;</li> + <li>human-caused climate change is real, significant, and solvable;</li> + <li>passive acceptance of cruelty is complicity;</li> + <li>trans rights are human rights;</li> + <li>the web is a vast sea made of individuals with feelings;</li> + <li>your actions matter.</li> + </ol> + </p> $endif$ $for(include-after)$ $include-after$ |
