<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://vajradevam.in/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vajradevam.in/" rel="alternate" type="text/html" /><updated>2026-06-10T09:40:13+05:30</updated><id>https://vajradevam.in/feed.xml</id><title type="html">Aman Pathak</title><subtitle>PhD Scholar in computer architecture, hardware security, and low-level systems. RISC-V, side-channel attacks, formal verification.</subtitle><author><name>Aman Pathak</name></author><entry><title type="html">Writing math with LaTeX in Markdown</title><link href="https://vajradevam.in/blog/math-with-latex/" rel="alternate" type="text/html" title="Writing math with LaTeX in Markdown" /><published>2026-06-10T00:00:00+05:30</published><updated>2026-06-10T00:00:00+05:30</updated><id>https://vajradevam.in/blog/math-with-latex</id><content type="html" xml:base="https://vajradevam.in/blog/math-with-latex/"><![CDATA[<p>This blog renders LaTeX math with <a href="https://www.mathjax.org/">MathJax</a>. Posts opt in with
<code class="language-plaintext highlighter-rouge">math: true</code> in the front matter, and then you can write mathematics inline with the rest
of your prose. This post doubles as a reference: every rendered equation is shown next to
the Markdown that produced it.</p>

<p>Kramdown (the Markdown engine GitHub Pages uses) treats <code class="language-plaintext highlighter-rouge">$$...$$</code> as math. It’s smart about
context: <code class="language-plaintext highlighter-rouge">$$</code> in the middle of a sentence is rendered inline, while <code class="language-plaintext highlighter-rouge">$$</code> in its own
paragraph is rendered as a centered display block. Crucially, kramdown protects what’s
inside from Markdown processing, so subscripts like <code class="language-plaintext highlighter-rouge">x_i</code> won’t get mangled into emphasis.</p>

<h2 id="inline-math">Inline math</h2>

<p>You can drop symbols straight into a sentence. Euler’s identity, \(e^{i\pi} + 1 = 0\), is
hard to beat; merge sort runs in \(O(n \log n)\); and a masked share might be written as
\(x = x_1 \oplus x_2\).</p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Euler's identity, $$e^{i<span class="se">\p</span>i} + 1 = 0$$, is hard to beat; merge sort runs in
$$O(n <span class="se">\l</span>og n)$$; and a masked share might be written as $$x = x_1 <span class="se">\o</span>plus x_2$$.
</code></pre></div></div>

<h2 id="display-equations">Display equations</h2>

<p>Put the math in its own paragraph to center it. Average memory access time:</p>

\[\text{AMAT} = t_{\text{hit}} + r_{\text{miss}} \times t_{\text{penalty}}\]

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$$
<span class="se">\t</span>ext{AMAT} = t_{<span class="se">\t</span>ext{hit}} + r_{<span class="se">\t</span>ext{miss}} <span class="se">\t</span>imes t_{<span class="se">\t</span>ext{penalty}}
$$
</code></pre></div></div>

<h2 id="fractions-roots-sums-and-integrals">Fractions, roots, sums, and integrals</h2>

<p>The softmax used in a classifier’s output layer:</p>

\[\sigma(\mathbf{z})_i = \frac{e^{z_i}}{\sum_{j=1}^{K} e^{z_j}}\]

<p>The continuous Fourier transform:</p>

\[\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\, e^{-2\pi i x \xi}\, dx\]

<p>A classic limit and a root for good measure:</p>

\[\lim_{x \to 0} \frac{\sin x}{x} = 1
\qquad
\lVert \mathbf{v} \rVert_2 = \sqrt{\sum_{k=1}^{n} v_k^2}\]

<h2 id="aligned-multi-step-derivations">Aligned, multi-step derivations</h2>

<p>Use <code class="language-plaintext highlighter-rouge">\begin{aligned}</code> to line equations up on the <code class="language-plaintext highlighter-rouge">&amp;</code>. Closed form of a geometric series,
the kind that shows up in amortized analysis:</p>

\[\begin{aligned}
S &amp;= \sum_{k=0}^{n-1} a r^k \\
  &amp;= a \left( 1 + r + r^2 + \cdots + r^{n-1} \right) \\
  &amp;= a \, \frac{1 - r^n}{1 - r}, \qquad r \neq 1
\end{aligned}\]

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$$
<span class="se">\b</span>egin{aligned}
S &amp;= <span class="se">\s</span>um_{k=0}^{n-1} a r^k <span class="se">\\</span>
  &amp;= a <span class="se">\,</span> <span class="se">\f</span>rac{1 - r^n}{1 - r}, <span class="se">\q</span>quad r <span class="se">\n</span>eq 1
<span class="se">\e</span>nd{aligned}
$$
</code></pre></div></div>

<h2 id="matrices-and-vectors">Matrices and vectors</h2>

<p>A \(2 \times 2\) matrix and a matrix-vector product:</p>

\[A = \begin{bmatrix} a_{11} &amp; a_{12} \\ a_{21} &amp; a_{22} \end{bmatrix},
\qquad
A\mathbf{x} = \begin{bmatrix} a_{11} x_1 + a_{12} x_2 \\ a_{21} x_1 + a_{22} x_2 \end{bmatrix}\]

<h2 id="piecewise-definitions">Piecewise definitions</h2>

<p>The <code class="language-plaintext highlighter-rouge">cases</code> environment is perfect for recurrences. Factorial, written recursively:</p>

\[f(n) =
\begin{cases}
1 &amp; \text{if } n = 0 \\
n \cdot f(n - 1) &amp; \text{if } n &gt; 0
\end{cases}\]

<h2 id="symbols-greek-and-operators">Symbols, Greek, and operators</h2>

<p>A quick sampler of the things you’ll reach for most:</p>

\[\alpha, \beta, \gamma, \delta, \quad \Delta, \Sigma, \Omega, \quad
\nabla, \partial, \infty, \quad \forall x \in \mathbb{R}, \ \exists\, \varepsilon &gt; 0\]

\[\mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}, \qquad
a \equiv b \pmod{m}, \qquad
\binom{n}{k} = \frac{n!}{k!\,(n-k)!}\]

<p>That’s the whole toolkit. Anything LaTeX’s math mode can express, MathJax will render here.
To use it in your own post, add <code class="language-plaintext highlighter-rouge">math: true</code> to the front matter and write away.</p>]]></content><author><name>Aman Pathak</name></author><category term="meta" /><category term="math" /><summary type="html"><![CDATA[A demonstration of the blog's LaTeX support: inline math, display equations, aligned derivations, matrices, and the syntax behind them.]]></summary></entry><entry><title type="html">Welcome to the new site</title><link href="https://vajradevam.in/blog/welcome-to-the-blog/" rel="alternate" type="text/html" title="Welcome to the new site" /><published>2026-06-10T00:00:00+05:30</published><updated>2026-06-10T00:00:00+05:30</updated><id>https://vajradevam.in/blog/welcome-to-the-blog</id><content type="html" xml:base="https://vajradevam.in/blog/welcome-to-the-blog/"><![CDATA[<p>I rebuilt this site from the ground up. It’s lighter, faster, and reads better; the
focus is on words and code rather than animated backgrounds.</p>

<p>More importantly, it now has a proper blog. Posts live as plain Markdown files, get
tagged by topic, and are listed by year on the <a href="/blog/">blog page</a>. You can browse
everything by topic on the <a href="/tags/">tags page</a>.</p>

<h2 id="writing-a-new-post">Writing a new post</h2>

<p>Drop a Markdown file into the <code class="language-plaintext highlighter-rouge">_posts/</code> folder named <code class="language-plaintext highlighter-rouge">YYYY-MM-DD-some-title.md</code> with a
small block of front matter at the top:</p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
<span class="na">title</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Your</span><span class="nv"> </span><span class="s">title</span><span class="nv"> </span><span class="s">here"</span>
<span class="na">date</span><span class="pi">:</span> <span class="s">2026-06-10</span>
<span class="na">tags</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">technical</span><span class="pi">,</span> <span class="nv">c</span><span class="pi">]</span>
<span class="na">description</span><span class="pi">:</span> <span class="s2">"</span><span class="s">A</span><span class="nv"> </span><span class="s">one-line</span><span class="nv"> </span><span class="s">summary</span><span class="nv"> </span><span class="s">shown</span><span class="nv"> </span><span class="s">in</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">post</span><span class="nv"> </span><span class="s">list."</span>
<span class="nn">---</span>

Your post body goes here, in Markdown.
</code></pre></div></div>

<p>Push it to <code class="language-plaintext highlighter-rouge">master</code> and GitHub Pages builds and deploys it automatically, no toolchain
required on my end. Code blocks get syntax highlighting, and tags become clickable
filters across the whole blog.</p>

<p>That’s it. Expect posts on computer architecture, hardware security, compilers, and C.</p>]]></content><author><name>Aman Pathak</name></author><category term="meta" /><summary type="html"><![CDATA[A fresh, typography-first redesign and a real blog. Here's how it's built and how new posts get published.]]></summary></entry><entry><title type="html">Everything is just bytes in memory</title><link href="https://vajradevam.in/blog/bytes-in-memory/" rel="alternate" type="text/html" title="Everything is just bytes in memory" /><published>2026-05-20T00:00:00+05:30</published><updated>2026-05-20T00:00:00+05:30</updated><id>https://vajradevam.in/blog/bytes-in-memory</id><content type="html" xml:base="https://vajradevam.in/blog/bytes-in-memory/"><![CDATA[<p>One of the reasons I keep coming back to C is that it doesn’t lie to you. A C program is,
at the end of the day, nothing but bytes in memory. There is no abstraction beyond that
you have to take on faith.</p>

<p>Consider a struct:</p>

<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">struct</span> <span class="n">point</span> <span class="p">{</span>
    <span class="kt">int</span>   <span class="n">x</span><span class="p">;</span>   <span class="c1">// 4 bytes</span>
    <span class="kt">int</span>   <span class="n">y</span><span class="p">;</span>   <span class="c1">// 4 bytes</span>
    <span class="kt">char</span>  <span class="n">tag</span><span class="p">;</span>  <span class="c1">// 1 byte</span>
<span class="p">};</span>              <span class="c1">// sizeof == 12, not 9</span>
</code></pre></div></div>

<p>The <code class="language-plaintext highlighter-rouge">sizeof</code> is 12, not 9: the compiler pads <code class="language-plaintext highlighter-rouge">tag</code> so the next <code class="language-plaintext highlighter-rouge">point</code> in an array stays
aligned. Nothing magical happened; the rules are knowable, and you can predict the layout
exactly. That predictability is the whole appeal.</p>

<p>You can walk the raw bytes yourself:</p>

<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">struct</span> <span class="n">point</span> <span class="n">p</span> <span class="o">=</span> <span class="p">{</span> <span class="p">.</span><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="p">.</span><span class="n">y</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span> <span class="p">.</span><span class="n">tag</span> <span class="o">=</span> <span class="sc">'a'</span> <span class="p">};</span>
<span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">raw</span> <span class="o">=</span> <span class="p">(</span><span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="p">)</span><span class="o">&amp;</span><span class="n">p</span><span class="p">;</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">size_t</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="k">sizeof</span> <span class="n">p</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
    <span class="n">printf</span><span class="p">(</span><span class="s">"%02x "</span><span class="p">,</span> <span class="n">raw</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span>
</code></pre></div></div>

<p>Higher-level languages give you objects, garbage collection, hidden allocations. Useful,
often. But C, and the assembly it compiles to, hands you the naked, sometimes bitter,
truth: you know exactly what the machine is going to do, and nothing is hidden.</p>

<p>That’s the stuff I find worth writing about.</p>]]></content><author><name>Aman Pathak</name></author><category term="technical" /><category term="c" /><summary type="html"><![CDATA[A short musing on why C feels honest: there's no abstraction hiding underneath the bytes.]]></summary></entry></feed>