Back to the blog
Meta · Field notes

Every knob we ship: a stress test of the writing stack

A deliberately over-built essay that puts every rendering feature the blog supports on one page — headings, math, a live diagram, an interactive 3D plot, code chrome, margin notes and figures — so nothing can hide.

This post exists to break things on purpose. Every paragraph below leans on a different part of the publishing pipeline, from the dropcap you are reading now to the interactive plot near the end. When it is all stacked in one place — a single feature-test page instead of hunting across the archive — a regression has nowhere to hide.

Along the way we touch inline code like torch.compile, a link back to the blog, and the kind of emphasis that separates a claim from a measurement.

Where the words go

A short list of what a reader should be able to lean on:

  • Headings that step down cleanly, from the title through h2 and h3.
  • Body type set for distance reading, not for skimming.
  • Code that reads like a printed listing, not a wall of colour.

And an ordered version, because ordered lists render differently:

  1. Parse the Markdown once.
  2. Hand the tree to the diagram and math plugins.
  3. Let the reader page style whatever falls out.

Recall tells you the answer is in the room. It never tells you whether anyone in the room was listening.

— a note taped to my monitor

Code, three ways

Python, with the editorial code chrome — three window dots and a language label:

python
def rerank(query, candidates, ce, *, keep=5, margin=0.15):
    # score every (query, passage) pair with a cross-encoder
    scores = ce.predict([(query, c.text) for c in candidates])
    ranked = sorted(zip(scores, candidates), reverse=True)
    top = [c for s, c in ranked[:keep] if s > ranked[0][0] - margin]
    return top

A little JavaScript, to prove the language label follows the fence:

js
const debounce = (fn, ms) => {
  let t;
  return (...args) => { clearTimeout(t); t = setTimeout(() => fn(...args), ms); };
};

And a shell one-liner:

bash
rg --files-with-matches "TODO" src | xargs -I{} echo "still open: {}"

A diagram that has to survive both themes

The retrieval loop, drawn with D2 and re-themed to the page — the connectors carry the accent and the text stays readable whether you are in light or dark:

QueryEmbedIndex · top 50Rerank · marginAnswer attribution, fed back

The maths should be typeset, not screenshotted

Inline, the per-sequence cache cost is 2bLTHd2 \cdot b \cdot L \cdot T \cdot H \cdot d bytes. Set as a display block, the same idea gets room to breathe and a rule above and below:

bytes=2bLTHdsizeof(dtype)\text{bytes} = 2 \, b \, L \, T \, H \, d \cdot \operatorname{sizeof}(\text{dtype})

A figure with a caption

Fig. 1Answer quality against the number of passages kept after reranking. Past the peak, added context is pure distraction.

The live plot

The interactive figure below is computed at publish time and hydrated on scroll — drag to rotate, scroll to zoom, and flip to the source with the Code toggle. It sits on the dark plot surface so it reads the same in either theme.

python
python
import numpy as np
import plotly.graph_objects as go

x = np.linspace(-6, 6, 40)
y = np.linspace(-6, 6, 40)
X, Y = np.meshgrid(x, y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R) / (R + 1e-6)

fig = go.Figure(go.Surface(z=Z, x=x, y=y, colorscale="Viridis"))
fig.update_layout(scene=dict(xaxis_title="x", yaxis_title="y", zaxis_title="amplitude"))
fig.show()
Drag to explore · scroll to zoom

One table, then we stop

StoreReads/sp99 (ms)Notes
in-process1.2M0.4no network, no durability
local SSD KV180k2.1survives a restart
replicated KV44k9.7survives a node

That is the whole kit on one page. If the diagram is a grey box, the plot is on a pale mat, or the maths is an image, something regressed — and now it is obvious at a glance.

One tap, no account

Did it hold?

Answer and you’ll see where other readers landed — and what your own read looked like. Measured while you were reading it.

Attention broke around¶1estimated from your reading pace — nudge it if I guessed wrong
You read for
Your pace
You held to
answers · Nothing is published under your name.

Comments

Sign in to join in

Loading comments…