<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>shadow</title><link>https://tralfamadore.dev/</link><description>Recent content on shadow</description><generator>Hugo</generator><language>en-us</language><copyright>mark stein</copyright><lastBuildDate>Wed, 28 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tralfamadore.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>complex grids are simpler</title><link>https://tralfamadore.dev/posts/complex-grids/</link><pubDate>Wed, 28 Jan 2026 00:00:00 +0000</pubDate><guid>https://tralfamadore.dev/posts/complex-grids/</guid><description>&lt;p&gt;in my opinion, &lt;a href="https://adventofcode.com/"&gt;advent of code&lt;/a&gt; is definitely the most exciting part of december (i&amp;rsquo;d rather not think about what that says about me). every year i pick a theme to complete the puzzles (previous years have included uiua, k, polyglot, etc.) and last year&amp;rsquo;s theme was concise python. sounds pretty boring, i know, but i did learn some neat tricks along the way. i used to dread the &amp;ldquo;annoying grid days&amp;rdquo;, of which my main complaints were:&lt;/p&gt;</description></item><item><title>about</title><link>https://tralfamadore.dev/about/</link><pubDate>Tue, 27 Jan 2026 00:00:00 +0000</pubDate><guid>https://tralfamadore.dev/about/</guid><description>&lt;p&gt;my main areas of interest include array programming, functional programming, systems, and programming language theory. i have the most fun writing uiua, haskell, and k, while the majority of my mundane programming occurs in python and rust. i think you should play my game, &lt;a href="https://connectle.net"&gt;connectle&lt;/a&gt;, and check out my programming language, &lt;a href="https://github.com/shadowninja55/carbon"&gt;carbon&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;you can find me on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;email: &lt;a href="mailto:mark.stein.1050@gmail.com"&gt;mark.stein.1050@gmail.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;discord: @shad.ow&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shadowninja55"&gt;github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;feel free to reach out to me about anything!&lt;/p&gt;</description></item><item><title>donut.ua: rewriting donut.c in 2 lines of uiua</title><link>https://tralfamadore.dev/posts/donut-uiua/</link><pubDate>Tue, 27 Jan 2026 00:00:00 +0000</pubDate><guid>https://tralfamadore.dev/posts/donut-uiua/</guid><description>&lt;p&gt;i&amp;rsquo;m sure many of you are familiar with the famous &lt;a href="https://www.a1k0n.net/2011/07/20/donut-math.html"&gt;donut.c&lt;/a&gt;, but for those of you who aren&amp;rsquo;t, i highly recommend checking it out. following andy&amp;rsquo;s writeup, i wrote my own implementation in c a few years back. my implementation spanned ~70 lines of code&amp;mdash;i think we can do better this time around.&lt;/p&gt;
&lt;h2 id="torus-math"&gt;torus math&lt;/h2&gt;
&lt;p&gt;a &lt;a href="https://en.wikipedia.org/wiki/Torus"&gt;torus&lt;/a&gt; is defined by its major ($R$) and minor ($r$) radii. $R$ is the distance between the center of the torus and the center of the tube, and $r$ is the radius of the tube.
&lt;img src="https://tralfamadore.dev/images/donut-uiua/torus-radii.png" alt="torus radii labelled"&gt;
while &lt;em&gt;donut.c&lt;/em&gt; iterates in $\theta$ and $\phi$ steps to plot points lying on the surface of the torus, i&amp;rsquo;m going to leverage uiua&amp;rsquo;s &lt;a href="https://www.uiua.org/docs/voxels"&gt;voxels&lt;/a&gt; renderer by going in the opposite direction. for a given voxel in a 3d linspace, we can decide whether or not that voxel should be rendered by determining if its coordinates lie inside of the torus. to do this, we check if the point is within $r$ of the nearest point along the circle defined by $R$ (shown in black above).&lt;/p&gt;</description></item></channel></rss>