<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Asaf Shitrit</title><description>Writing about AI, Go, TypeScript, performance and algorithms.</description><link>https://asafshitrit.com/</link><item><title>Hello, and a stack smoke test</title><link>https://asafshitrit.com/posts/hello-and-a-stack-smoke-test/</link><guid isPermaLink="true">https://asafshitrit.com/posts/hello-and-a-stack-smoke-test/</guid><description>The first post on this blog, which exists mainly to prove that code blocks, math and diagrams all render the way they should.</description><pubDate>Wed, 23 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is a placeholder post. It exists so the build has something to chew on, and
so every part of the rendering pipeline gets exercised at least once. Delete it
once there&apos;s a real post to replace it.&lt;/p&gt;
&lt;h2&gt;Code blocks&lt;/h2&gt;
&lt;p&gt;Go, with a filename title and a highlighted line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;func worker(jobs &amp;lt;-chan Job, results chan&amp;lt;- Result) {
	for job := range jobs {
		results &amp;lt;- process(job)
	}
}

// The unbuffered send above is where the goroutine parks.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;TypeScript, with diff markers:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export function memoize&amp;lt;A, R&amp;gt;(fn: (arg: A) =&amp;gt; R) {
  const cache = new Map&amp;lt;A, R&amp;gt;();
  return (arg: A) =&amp;gt; cache.get(arg) ?? fn(arg);
  return (arg: A) =&amp;gt; (cache.has(arg) ? cache.get(arg)! : set(cache, arg, fn(arg)));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shell output, which should not be highlighted as code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ go test -bench=. -benchmem
BenchmarkProcess-10    	 1284517	       931.2 ns/op	     248 B/op	       3 allocs/op
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Math&lt;/h2&gt;
&lt;p&gt;Inline first: a balanced binary search tree gives $O(\log n)$ lookups, and the
usual argument for why a heap&apos;s &lt;code&gt;push&lt;/code&gt; is cheap amortized runs through the
recurrence below.&lt;/p&gt;
&lt;p&gt;$$
T(n) = 2T!\left(\frac{n}{2}\right) + O(n) \implies T(n) = O(n \log n)
$$&lt;/p&gt;
&lt;h2&gt;Diagrams&lt;/h2&gt;
&lt;p&gt;Mermaid source in the post, rendered to inline SVG at build time, so readers
download no JavaScript for it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
    P[Producer] --&amp;gt;|jobs| Q[(Buffered channel)]
    Q --&amp;gt; W1[Worker 1]
    Q --&amp;gt; W2[Worker 2]
    W1 --&amp;gt; R[(Results)]
    W2 --&amp;gt; R
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;What isn&apos;t here&lt;/h2&gt;
&lt;p&gt;Interactive islands. Those arrive per-post: rename the file to &lt;code&gt;.mdx&lt;/code&gt;, import a
Preact component, and give it a &lt;code&gt;client:visible&lt;/code&gt; directive.&lt;/p&gt;
</content:encoded><category>go</category><category>typescript</category><category>algorithms</category></item></channel></rss>