{
  "version": "https://jsonfeed.org/version/1",
  "title": "George Mandis",
  "description": "This is my blog where I write about web development and travel.",
  "home_page_url": "https://george.mand.is",
  "feed_url": "https://george.mand.is/feed.markdown.json",
  "favicon": "https://s3-us-west-2.amazonaws.com/george.mand.is/me-sketch-avatar.jpg",  
  "author": {
    "name": "George Mandis"
  },  
  "items": [
    {
      "id": "https://george.mand.is/2026/11/lets-meet-in-the-middle/",
      "url": "https://george.mand.is/2026/11/lets-meet-in-the-middle.md",
      "title": "Let&#39;s Meet in the Middle",
      "content_html": "I like making little tools that do one thing well and thing finding clever ways to combine them. It&#39;s the ethos behind a lot of the little software projects I have over at [Less Software](https://less.software). One of the first ones I made was a tool called [whereami](https://less.software/whereami/). Tongue-in-cheekly, I wanted to pitch it as the natural compliment to `whoami`. For that tool, the thinking was nearly every modern OS provides some kind of native API for geolocation. It felt silly to me that I could run a quick command from the terminal for so many things, but I couldn&#39;t run one that taps into this capability.In the pursuit to make that tool cross-platform, one of the things I found myself navigating were the differences between them. Consistently, macOS tended to have a lot of extra niceties baked in, particuarly when it came to imagine recognition, natural language processing and accessibility tooling.With geolocation, one of the nice things macOS provides that other OS-native approaches don&#39;t is a built-in geocoder (and reverse geocoder). So you can type in something like this:```$ whereamiLocation: 40.6753, -73.9431Accuracy: 35mAddress: 865 St Marks Ave, New York, NY, 11213, US$ whereami --json{  &#92;&quot;latitude&#92;&quot;: 40.675265033592396,  &#92;&quot;longitude&#92;&quot;: -73.94310370569808,  &#92;&quot;accuracy&#92;&quot;: 35,  &#92;&quot;address&#92;&quot;: {    &#92;&quot;street&#92;&quot;: &#92;&quot;865 St Marks Ave&#92;&quot;,    &#92;&quot;city&#92;&quot;: &#92;&quot;New York&#92;&quot;,    &#92;&quot;state&#92;&quot;: &#92;&quot;NY&#92;&quot;,    &#92;&quot;postal_code&#92;&quot;: &#92;&quot;11213&#92;&quot;,    &#92;&quot;country&#92;&quot;: &#92;&quot;US&#92;&quot;  }}```And you get that handy little `address` block! It also makes it easy to do something like this:```$ whereami &#92;&quot;397 Bridge Street, Brooklyn NY&#92;&quot;Location: 40.6913, -73.9850Address: 397 Bridge St, New York, NY, 11201, US$ whereami &#92;&quot;397 Bridge Street, Brooklyn NY&#92;&quot; --json{  &#92;&quot;latitude&#92;&quot;: 40.6913424,  &#92;&quot;longitude&#92;&quot;: -73.9850328,  &#92;&quot;accuracy&#92;&quot;: 0,  &#92;&quot;address&#92;&quot;: {    &#92;&quot;street&#92;&quot;: &#92;&quot;397 Bridge St&#92;&quot;,    &#92;&quot;city&#92;&quot;: &#92;&quot;New York&#92;&quot;,    &#92;&quot;state&#92;&quot;: &#92;&quot;NY&#92;&quot;,    &#92;&quot;postal_code&#92;&quot;: &#92;&quot;11201&#92;&quot;,    &#92;&quot;country&#92;&quot;: &#92;&quot;US&#92;&quot;  }}```Now you can grab the `latitude` and `longitude` coordinates for an address. And you get all of this &#92;&quot;for free&#92;&quot; no your macOS system. No t bad!There&#39;s another handy framework macOS makes available to your system: MapKit. It&#39;s analgous to Google Maps and their API offerings, but native to the operating system.It turns out it&#39;s pretty straightforward to build a CLI wrapper around that framework as well, so I made [nearme](https://less.software/nearme/) (macOS only).They&#39;re designed to play well together:```$ whereami --json | nearme &#92;&quot;coffeeshop&#92;&quot; --count=51. Cafe Imael (cafe)   1090 St Johns Pl, New York, NY 11213   +1 (718) 758-5857 · https://www.imael.co · 485 m2. Zaim Coffee Shop (cafe)   1102 St Johns Pl, New York, NY 11213   +1 (347) 529-3444 · https://www.yelp.com/biz/zaim-coffee-shop-crown-heights · 500 m3. Cheeni (restaurant)   485 Tompkins Ave, New York, NY 11216   +1 (347) 365-4015 · https://www.yelp.com/biz/cheeni-brooklyn · 589 m4. Cotton Bean (cafe)   1077 Bergen St, Brooklyn, NY 11216   +1 (347) 276-8749 · https://www.cafecottonbean.com · 623 m5. MoCo 575 (restaurant)   531 Nostrand Ave, New York, NY 11216   +1 (347) 365-3680 · https://moco575.com · 673 m$ whereami --json | nearme &#92;&quot;coffeeshop&#92;&quot; --count=5 --json [  {    &#92;&quot;name&#92;&quot;: &#92;&quot;Cafe Imael&#92;&quot;,    &#92;&quot;address&#92;&quot;: &#92;&quot;1090 St Johns Pl, New York, NY 11213&#92;&quot;,    &#92;&quot;latitude&#92;&quot;: 40.67105,    &#92;&quot;longitude&#92;&quot;: -73.942339,    &#92;&quot;phone&#92;&quot;: &#92;&quot;+1 (718) 758-5857&#92;&quot;,    &#92;&quot;url&#92;&quot;: &#92;&quot;https://www.imael.co&#92;&quot;,    &#92;&quot;category&#92;&quot;: &#92;&quot;cafe&#92;&quot;  },  {    &#92;&quot;name&#92;&quot;: &#92;&quot;Zaim Coffee Shop&#92;&quot;,    &#92;&quot;address&#92;&quot;: &#92;&quot;1102 St Johns Pl, New York, NY 11213&#92;&quot;,    &#92;&quot;latitude&#92;&quot;: 40.6710142,    &#92;&quot;longitude&#92;&quot;: -73.9416723,    &#92;&quot;phone&#92;&quot;: &#92;&quot;+1 (347) 529-3444&#92;&quot;,    &#92;&quot;url&#92;&quot;: &#92;&quot;https://www.yelp.com/biz/zaim-coffee-shop-crown-heights&#92;&quot;,    &#92;&quot;category&#92;&quot;: &#92;&quot;cafe&#92;&quot;  },  {    &#92;&quot;name&#92;&quot;: &#92;&quot;Cheeni&#92;&quot;,    &#92;&quot;address&#92;&quot;: &#92;&quot;485 Tompkins Ave, New York, NY 11216&#92;&quot;,    &#92;&quot;latitude&#92;&quot;: 40.6806663,    &#92;&quot;longitude&#92;&quot;: -73.9431295,    &#92;&quot;phone&#92;&quot;: &#92;&quot;+1 (347) 365-4015&#92;&quot;,    &#92;&quot;url&#92;&quot;: &#92;&quot;https://www.yelp.com/biz/cheeni-brooklyn&#92;&quot;,    &#92;&quot;category&#92;&quot;: &#92;&quot;restaurant&#92;&quot;  },  {    &#92;&quot;name&#92;&quot;: &#92;&quot;Cotton Bean&#92;&quot;,    &#92;&quot;address&#92;&quot;: &#92;&quot;1077 Bergen St, Brooklyn, NY 11216&#92;&quot;,    &#92;&quot;latitude&#92;&quot;: 40.6762179,    &#92;&quot;longitude&#92;&quot;: -73.950436,    &#92;&quot;phone&#92;&quot;: &#92;&quot;+1 (347) 276-8749&#92;&quot;,    &#92;&quot;url&#92;&quot;: &#92;&quot;https://www.cafecottonbean.com&#92;&quot;,    &#92;&quot;category&#92;&quot;: &#92;&quot;cafe&#92;&quot;  },  {    &#92;&quot;name&#92;&quot;: &#92;&quot;MoCo 575&#92;&quot;,    &#92;&quot;address&#92;&quot;: &#92;&quot;531 Nostrand Ave, New York, NY 11216&#92;&quot;,    &#92;&quot;latitude&#92;&quot;: 40.6791358,    &#92;&quot;longitude&#92;&quot;: -73.9493723,    &#92;&quot;phone&#92;&quot;: &#92;&quot;+1 (347) 365-3680&#92;&quot;,    &#92;&quot;url&#92;&quot;: &#92;&quot;https://moco575.com&#92;&quot;,    &#92;&quot;category&#92;&quot;: &#92;&quot;restaurant&#92;&quot;  }]```I can vouch for at least three of these coffeeshops!When I was doing my pseudo-sabbatical at the Recurse Center this past spring, I spent a lot of time hammering away at these little tools and finding ways to combine them. Someone told me that the work I was doing and sharing reminded them of this idea you only need to control three points of focus to do a magic trick.That comment inspired me to make this list of &#92;&quot;recipes&#92;&quot; where I try to showcase different ways to combine these tools in surprising, useful and/or fun ways:- [https://less.software/recipes/](https://less.software/recipes/)But the one I want to write about specifically today is this &#92;&quot;meet in the middle&#92;&quot; idea.I just showed you how you can use `whereami` and `nearme` to find coffeeshops (or anything you can find via Apple Maps) on your Mac. With a little piping and a convenient alias, you can help figure out a place to &#92;&quot;meet in the middle&#92;&quot; between you and and another point:```bash{ whereami &#92;&quot;350 5th Ave, New York&#92;&quot; --json; &#92;&#92;  whereami &#92;&quot;200 Eastern Pkwy, Brooklyn&#92;&quot; --json; } | &#92;&#92;  jq -s &#39;{latitude: (map(.latitude) | add / 2),          longitude: (map(.longitude) | add / 2)}&#39; | &#92;&#92;  nearme &#92;&quot;bar&#92;&quot; --count=3``````1. Deux Chats (nightlife)   27 Broadway, New York, NY 11249   +1 (917) 909-0145 · https://www.deuxchatsbk.com · 575 m2. Bar Milagro (nightlife)   29 Dunham Pl, New York, NY 11249   +1 (929) 298-0032 · https://www.xolobk.com/barmilagro · 617 m3. Cafe Susanne (nightlife)   8 River St, Brooklyn, NY 10044   https://www.barsusanne.com · 651 m```There you go! No API keys or browser or accounts: just input a couple addresses and a few plausible bars come out on the other side.## How it worksIt&#39;s three small tools, each doing one thing.**[whereami](https://less.software/whereami/)** started life as a CLI that asksyour operating system where you are. As of 0.4 it can also act like a reverse geocoder (on macOS):```bash$ whereami &#92;&quot;350 5th Ave, New York&#92;&quot; --json{&#92;&quot;latitude&#92;&quot;:40.7482378,&#92;&quot;longitude&#92;&quot;:-73.9850579,&#92;&quot;accuracy&#92;&quot;:0,&#92;&quot;address&#92;&quot;:{&#92;&quot;street&#92;&quot;:&#92;&quot;350 5th Ave&#92;&quot;,&#92;&quot;city&#92;&quot;:&#92;&quot;New York&#92;&quot;,&#92;&quot;state&#92;&quot;:&#92;&quot;NY&#92;&quot;,&#92;&quot;postal_code&#92;&quot;:&#92;&quot;10118&#92;&quot;,&#92;&quot;country&#92;&quot;:&#92;&quot;US&#92;&quot;}}```Looking up an address doesn&#39;t need location permission, becausenothing is asking where you are. **jq** does the arithmetic. The `-s` flag slurps both JSON objects into an array, and the filter averages the coordinates:```json{&#92;&quot;latitude&#92;&quot;:40.7097896,&#92;&quot;longitude&#92;&quot;:-73.9743696}```**[nearme](https://less.software/nearme/)** searches for places around a set ofcoordinates using MapKit, the search engine behind Apple Maps. It readscoordinates from JSON on stdin, and it only cares about `latitude` and`longitude`. It has no idea those numbers came out of `jq` and not out of aGPS.Averaging two coordinates is not the &#92;&quot;real&#92;&quot; way to find the middle,  but over a few miles trying to find a place to meet for coffee it&#39;s close enough. What does matter is that the midpoint has no idea what&#39;s actually there.## Make it a commandTyping that pipeline more than once get annoying quickly. It&#39;s more convenient to set it up as a function:```bashmiddle() {  local second=()  # Two addresses only if a third argument is there to be the search term  if [[ $# -ge 3 &amp;&amp; $3 != -* ]]; then    second=(&#92;&quot;$2&#92;&quot;)    set -- &#92;&quot;$1&#92;&quot; &#92;&quot;${@:3}&#92;&quot;  fi  { whereami &#92;&quot;$1&#92;&quot; --json; whereami &#92;&quot;${second[@]}&#92;&quot; --json; } |    jq -s &#39;{latitude: (map(.latitude) | add / 2), longitude: (map(.longitude) | add / 2)}&#39; |    nearme &#92;&quot;${2:-coffeeshop}&#92;&quot; &#92;&quot;${@:3}&#92;&quot;}```Or if you&#39;re using fish, like me:```fishfunction middle --description &#39;Search for places halfway between two addresses, or between you and one&#39;    set -l second    # Two addresses only if a third argument is there to be the search term    if set -q argv[3]; and not string match -q -- &#39;-*&#39; $argv[3]        set second $argv[2]        set -e argv[2]    end    begin        whereami $argv[1] --json        whereami $second --json    end | jq -s &#39;{latitude: (map(.latitude) | add / 2), longitude: (map(.longitude) | add / 2)}&#39; | nearme (set -q argv[2]; and echo $argv[2]; or echo coffeeshop) $argv[3..]end```Give it two addresses and something to look for. Anything after that goesstraight through to nearme. Leave off the second address and it uses whereveryou are right now, so `middle &#92;&quot;123 Main Street&#92;&quot; coffee` finds coffee between youand 123 Main Street. With only an address, it looks for a coffeeshop.```bash$ middle &#92;&quot;350 5th Ave, New York&#92;&quot; &#92;&quot;200 Eastern Pkwy, Brooklyn&#92;&quot; coffee --count=21. Cafe Susanne (nightlife)   8 River St, Brooklyn, NY 10044   https://www.barsusanne.com · 651 m2. Social House Cafe (cafe)   60 Broadway, Brooklyn, NY 11249   +1 (929) 295-0397 · https://www.socialhousecafellc.com · 697 m```## Caveats- It&#39;s macOS only. `nearme` is built on MapKit, and `whereami`&#39;s address lookup  only exists on macOS.- It wants street addresses or city names, though landmarks will work soetimes. &#92;&quot;Golden Gate Bridge&#92;&quot; doesn&#39;t geocode but &#92;&quot;350 5th Ave, New York&#92;&quot; and &#92;&quot;Central Park&#92;&quot; and &#92;&quot;Brooklyn Briddge&#92;&quot; do (caveat emptor).- The math is a very literal and naive geographic middle, not taking travel-time middle or anything else into consideration.## Try it```bashbrew install georgemandis/tap/whereami georgemandis/tap/nearme jq```Both tools live under [Less Software](https://less.software):  - [whereami](https://less.software/whereami/) - [nearme](https://less.software/nearme/)Let me know if you find it useful or stumble across other good ideas for &#92;&quot;[recipes](https://less.software/recipes)&#92;&quot; to share!",
      "date_published": "2026-11-17T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/11/the-tokenizer-font/",
      "url": "https://george.mand.is/2026/11/the-tokenizer-font.md",
      "title": "Tokenizer Mono",
      "content_html": "![[tokenizer-cycle-labeled.gif]]There are many tools out there that help you visualize tokens and better understand how tokenization works with large language models. OpenAI has [a pretty nice one](https://platform.openai.com/tokenizer), and there are a half-dozen [other](https://tiktokenizer.vercel.app/?model=cl100k_base) [ones](https://github.com/openai/tiktoken) that are also great.They generally work by passing text through an actual tokenizer, retrieving the resulting token boundaries, and highlighting them in the browser. It&#39;s a fast, accurate and perfectly reasonable approach.So I did the slightly unreasonable thing and made a font that uses modern font witchcraft to visualize tokens as you type them, without actually tokenizing. The code is at:- [github.com/georgemandis/tokenizer-mono](https://github.com/georgemandis/tokenizer-mono).You can play with it below. Every highlight is drawn by the font. No scripting! The only JavaScript here is swapping which face is loaded.&lt;div class=&#92;&quot;tokenizer-demo&#92;&quot;&gt;&lt;div class=&#92;&quot;tokenizer-demo-bar&#92;&quot;&gt;&lt;label&gt;Tokenizer &lt;select id=&#92;&quot;tokenizer-face&#92;&quot; aria-label=&#92;&quot;Choose a tokenizer face&#92;&quot;&gt;&lt;option value=&#92;&quot;cl100k&#92;&quot; data-family=&#92;&quot;Tokenizer Mono cl100k&#92;&quot; data-models=&#92;&quot;OpenAI GPT-4, GPT-3.5, text-embedding-3; also Phi-4, OLMo 2, IBM Granite 4&#92;&quot; selected&gt;cl100k&lt;/option&gt;&lt;option value=&#92;&quot;o200k&#92;&quot; data-family=&#92;&quot;Tokenizer Mono o200k&#92;&quot; data-models=&#92;&quot;OpenAI GPT-4o, o1, o3, GPT-4.1, gpt-oss&#92;&quot;&gt;o200k&lt;/option&gt;&lt;option value=&#92;&quot;p50k&#92;&quot; data-family=&#92;&quot;Tokenizer Mono p50k&#92;&quot; data-models=&#92;&quot;OpenAI Codex, text-davinci-002/003&#92;&quot;&gt;p50k&lt;/option&gt;&lt;option value=&#92;&quot;r50k&#92;&quot; data-family=&#92;&quot;Tokenizer Mono r50k&#92;&quot; data-models=&#92;&quot;OpenAI GPT-2, GPT-3&#92;&quot;&gt;r50k&lt;/option&gt;&lt;option value=&#92;&quot;llama4&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Llama4&#92;&quot; data-models=&#92;&quot;Meta Llama 4&#92;&quot;&gt;llama4&lt;/option&gt;&lt;option value=&#92;&quot;llama3&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Llama3&#92;&quot; data-models=&#92;&quot;Meta Llama 3 / 3.1 / 3.2 / 3.3; also SmolLM 3&#92;&quot;&gt;llama3&lt;/option&gt;&lt;option value=&#92;&quot;llama2&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Llama2&#92;&quot; data-models=&#92;&quot;Meta Llama 2 (SentencePiece)&#92;&quot;&gt;llama2&lt;/option&gt;&lt;option value=&#92;&quot;gemma3&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Gemma3&#92;&quot; data-models=&#92;&quot;Google Gemma 3&#92;&quot;&gt;gemma3&lt;/option&gt;&lt;option value=&#92;&quot;gemma&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Gemma&#92;&quot; data-models=&#92;&quot;Google Gemma 1 / 2&#92;&quot;&gt;gemma&lt;/option&gt;&lt;option value=&#92;&quot;mistral&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Mistral&#92;&quot; data-models=&#92;&quot;Mistral 7B v0.3 (SentencePiece)&#92;&quot;&gt;mistral&lt;/option&gt;&lt;option value=&#92;&quot;tekken&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Tekken&#92;&quot; data-models=&#92;&quot;Mistral Nemo, Mistral Small 3 (Tekken); also NVIDIA Nemotron-H, Swiss AI Apertus&#92;&quot;&gt;tekken&lt;/option&gt;&lt;option value=&#92;&quot;qwen&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Qwen&#92;&quot; data-models=&#92;&quot;Alibaba Qwen 2 / 2.5 / 3&#92;&quot;&gt;qwen&lt;/option&gt;&lt;option value=&#92;&quot;deepseek&#92;&quot; data-family=&#92;&quot;Tokenizer Mono DeepSeek&#92;&quot; data-models=&#92;&quot;DeepSeek V3 / R1&#92;&quot;&gt;deepseek&lt;/option&gt;&lt;option value=&#92;&quot;glm&#92;&quot; data-family=&#92;&quot;Tokenizer Mono GLM&#92;&quot; data-models=&#92;&quot;Zhipu GLM-4.5&#92;&quot;&gt;glm&lt;/option&gt;&lt;option value=&#92;&quot;neox&#92;&quot; data-family=&#92;&quot;Tokenizer Mono NeoX&#92;&quot; data-models=&#92;&quot;EleutherAI GPT-NeoX, Pythia&#92;&quot;&gt;neox&lt;/option&gt;&lt;option value=&#92;&quot;falcon&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Falcon&#92;&quot; data-models=&#92;&quot;TII Falcon&#92;&quot;&gt;falcon&lt;/option&gt;&lt;option value=&#92;&quot;bloom&#92;&quot; data-family=&#92;&quot;Tokenizer Mono BLOOM&#92;&quot; data-models=&#92;&quot;BigScience BLOOM (multilingual)&#92;&quot;&gt;bloom&lt;/option&gt;&lt;option value=&#92;&quot;t5&#92;&quot; data-family=&#92;&quot;Tokenizer Mono T5&#92;&quot; data-models=&#92;&quot;Google T5 (SentencePiece Unigram, not BPE)&#92;&quot;&gt;t5&lt;/option&gt;&lt;option value=&#92;&quot;bert&#92;&quot; data-family=&#92;&quot;Tokenizer Mono BERT&#92;&quot; data-models=&#92;&quot;Google BERT (WordPiece; ## continuations approximated)&#92;&quot;&gt;bert&lt;/option&gt;&lt;option value=&#92;&quot;superbpe&#92;&quot; data-family=&#92;&quot;Tokenizer Mono SuperBPE&#92;&quot; data-models=&#92;&quot;UW SuperBPE for OLMo 2 (tokens cross word boundaries)&#92;&quot;&gt;superbpe&lt;/option&gt;&lt;option value=&#92;&quot;granite&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Granite&#92;&quot; data-models=&#92;&quot;IBM Granite 3 and Granite Code (StarCoder vocabulary); also StarCoder&#92;&quot;&gt;granite&lt;/option&gt;&lt;option value=&#92;&quot;falcon3&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Falcon3&#92;&quot; data-models=&#92;&quot;TII Falcon 3&#92;&quot;&gt;falcon3&lt;/option&gt;&lt;option value=&#92;&quot;hunyuan&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Hunyuan&#92;&quot; data-models=&#92;&quot;Tencent Hunyuan&#92;&quot;&gt;hunyuan&lt;/option&gt;&lt;option value=&#92;&quot;ernie&#92;&quot; data-family=&#92;&quot;Tokenizer Mono ERNIE&#92;&quot; data-models=&#92;&quot;Baidu ERNIE 4.5 (SentencePiece)&#92;&quot;&gt;ernie&lt;/option&gt;&lt;option value=&#92;&quot;seed&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Seed&#92;&quot; data-models=&#92;&quot;ByteDance Seed-OSS&#92;&quot;&gt;seed&lt;/option&gt;&lt;option value=&#92;&quot;yi&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Yi&#92;&quot; data-models=&#92;&quot;01.AI Yi (SentencePiece)&#92;&quot;&gt;yi&lt;/option&gt;&lt;option value=&#92;&quot;clip&#92;&quot; data-family=&#92;&quot;Tokenizer Mono CLIP&#92;&quot; data-models=&#92;&quot;OpenAI CLIP, Stable Diffusion prompts (lowercases; no whitespace tokens)&#92;&quot;&gt;clip&lt;/option&gt;&lt;option value=&#92;&quot;kimi&#92;&quot; data-family=&#92;&quot;Tokenizer Mono Kimi&#92;&quot; data-models=&#92;&quot;Moonshot Kimi K2 (tiktoken-format vocabulary)&#92;&quot;&gt;kimi&lt;/option&gt;&lt;/select&gt;&lt;/label&gt;&lt;span id=&#92;&quot;tokenizer-models&#92;&quot; class=&#92;&quot;tokenizer-demo-models&#92;&quot;&gt;OpenAI GPT-4, GPT-3.5, text-embedding-3; also Phi-4, OLMo 2, IBM Granite 4&lt;/span&gt;&lt;label&gt;Size &lt;input id=&#92;&quot;tokenizer-size&#92;&quot; type=&#92;&quot;range&#92;&quot; min=&#92;&quot;14&#92;&quot; max=&#92;&quot;40&#92;&quot; value=&#92;&quot;22&#92;&quot; aria-label=&#92;&quot;Font size&#92;&quot;&gt;&lt;/label&gt;&lt;/div&gt;&lt;textarea id=&#92;&quot;tokenizer-text&#92;&quot; spellcheck=&#92;&quot;false&#92;&quot; aria-label=&#92;&quot;Type here to see the font tokenize your text&#92;&quot;&gt;The quick brown fox jumps over the lazy dog, and nobody is surprised anymore.&amp;#10;&amp;#10;Tokenization is the process of splitting text into pieces a language model can count. Common words like &#92;&quot;the&#92;&quot; become single tokens, while rarer ones get split: antidisestablishmentarianism.&amp;#10;&amp;#10;def tokenize(text: str) -&gt; list[int]:&amp;#10;    return [ord(c) for c in text if c.isprintable()]&lt;/textarea&gt;&lt;/div&gt;&lt;style&gt;@font-face {  font-family: &#92;&quot;Tokenizer Mono cl100k&#92;&quot;;  src: url(&#92;&quot;/webfonts/tokenizer-mono/TokenizerMono-cl100k.woff2&#92;&quot;) format(&#92;&quot;woff2&#92;&quot;);  font-weight: 400;  font-style: normal;  font-display: swap;}@font-palette-values --tokenizer-dark {  font-family: &#92;&quot;Tokenizer Mono cl100k&#92;&quot;, &#92;&quot;Tokenizer Mono o200k&#92;&quot;, &#92;&quot;Tokenizer Mono p50k&#92;&quot;, &#92;&quot;Tokenizer Mono r50k&#92;&quot;, &#92;&quot;Tokenizer Mono Llama4&#92;&quot;, &#92;&quot;Tokenizer Mono Llama3&#92;&quot;, &#92;&quot;Tokenizer Mono Llama2&#92;&quot;, &#92;&quot;Tokenizer Mono Gemma3&#92;&quot;, &#92;&quot;Tokenizer Mono Gemma&#92;&quot;, &#92;&quot;Tokenizer Mono Mistral&#92;&quot;, &#92;&quot;Tokenizer Mono Tekken&#92;&quot;, &#92;&quot;Tokenizer Mono Qwen&#92;&quot;, &#92;&quot;Tokenizer Mono DeepSeek&#92;&quot;, &#92;&quot;Tokenizer Mono GLM&#92;&quot;, &#92;&quot;Tokenizer Mono NeoX&#92;&quot;, &#92;&quot;Tokenizer Mono Falcon&#92;&quot;, &#92;&quot;Tokenizer Mono BLOOM&#92;&quot;, &#92;&quot;Tokenizer Mono T5&#92;&quot;, &#92;&quot;Tokenizer Mono BERT&#92;&quot;, &#92;&quot;Tokenizer Mono SuperBPE&#92;&quot;, &#92;&quot;Tokenizer Mono Granite&#92;&quot;, &#92;&quot;Tokenizer Mono Falcon3&#92;&quot;, &#92;&quot;Tokenizer Mono Hunyuan&#92;&quot;, &#92;&quot;Tokenizer Mono ERNIE&#92;&quot;, &#92;&quot;Tokenizer Mono Seed&#92;&quot;, &#92;&quot;Tokenizer Mono Yi&#92;&quot;, &#92;&quot;Tokenizer Mono CLIP&#92;&quot;, &#92;&quot;Tokenizer Mono Kimi&#92;&quot;;  base-palette: 1;}.tokenizer-demo {  margin: 1.5rem 0 2rem;}.tokenizer-demo-bar {  display: flex;  flex-wrap: wrap;  gap: 0.5rem 1rem;  align-items: center;  margin-bottom: 0.5rem;  font-size: 0.85rem;  color: var(--flexoki-600);}.tokenizer-demo-bar label {  display: inline-flex;  align-items: center;  gap: 0.4rem;}.tokenizer-demo-bar select,.tokenizer-demo-bar input[type=&#92;&quot;range&#92;&quot;] {  font: inherit;  color: inherit;  background: transparent;  border: 1px solid var(--flexoki-200);  border-radius: 4px;  padding: 0.15rem 0.3rem;}.tokenizer-demo-bar input[type=&#92;&quot;range&#92;&quot;] {  border: 0;  padding: 0;  width: 7rem;}.tokenizer-demo-models {  flex: 1 1 100%;  order: 3;}.tokenizer-demo-models.is-loading::after {  content: &#92;&quot; (loading…)&#92;&quot;;}.tokenizer-demo textarea {  display: block;  width: 100%;  min-height: 16rem;  box-sizing: border-box;  padding: 0.75rem;  border: 1px solid var(--flexoki-200);  border-radius: 6px;  background: var(--flexoki-paper);  color: var(--flexoki-black);  font-family: &#92;&quot;Tokenizer Mono cl100k&#92;&quot;, SFMono-Regular, Consolas, Menlo, monospace;  font-size: 22px;  line-height: 1.6;  resize: vertical;}.tokenizer-demo-note {  font-size: 0.85rem;  color: var(--flexoki-600);  margin-top: 0.5rem;}@media (prefers-color-scheme: dark) {  .tokenizer-demo-bar,  .tokenizer-demo-note {    color: var(--flexoki-500);  }  .tokenizer-demo-bar select {    border-color: var(--flexoki-700);  }  .tokenizer-demo textarea {    border-color: var(--flexoki-700);    background: var(--flexoki-950);    color: var(--flexoki-100);    font-palette: --tokenizer-dark;  }}&lt;/style&gt;&lt;script&gt;(() =&gt; {  const sel = document.getElementById(&#92;&quot;tokenizer-face&#92;&quot;);  const ta = document.getElementById(&#92;&quot;tokenizer-text&#92;&quot;);  const models = document.getElementById(&#92;&quot;tokenizer-models&#92;&quot;);  const size = document.getElementById(&#92;&quot;tokenizer-size&#92;&quot;);  if (!sel || !ta || !(&#92;&quot;fonts&#92;&quot; in document)) return;  const loaded = new Set([&#92;&quot;cl100k&#92;&quot;]);  let current = 0;  const apply = async () =&gt; {    const opt = sel.selectedOptions[0];    const family = opt.dataset.family;    const token = ++current;    models.textContent = opt.dataset.models;    if (!loaded.has(opt.value)) {      models.classList.add(&#92;&quot;is-loading&#92;&quot;);      try {        const face = new FontFace(family, `url(/webfonts/tokenizer-mono/TokenizerMono-${opt.value}.woff2) format(&#92;&quot;woff2&#92;&quot;)`, { display: &#92;&quot;swap&#92;&quot; });        document.fonts.add(await face.load());        loaded.add(opt.value);      } catch (e) {        if (token === current) models.textContent = opt.dataset.models + &#92;&quot; (could not load)&#92;&quot;;        return;      } finally {        if (token === current) models.classList.remove(&#92;&quot;is-loading&#92;&quot;);      }    }    if (token !== current) return;    ta.style.fontFamily = `&#92;&quot;${family}&#92;&quot;, SFMono-Regular, Consolas, Menlo, monospace`;  };  sel.addEventListener(&#92;&quot;change&#92;&quot;, apply);  size.addEventListener(&#92;&quot;input&#92;&quot;, () =&gt; { ta.style.fontSize = size.value + &#92;&quot;px&#92;&quot;; });})();&lt;/script&gt;![[Pasted image 20261101225003.png]]## What is a token?A token is the basic unit of currency for a language model. It’s what the model actually reads and produces.A token is generally a chunk of text: a character, word, word-part, or occasionally a longer sequence. Many modern LLM tokenizers have a fixed vocabulary of these chunks, typically somewhere between 50,000 and 250,000 entries.And that vocabulary isn’t necessarily exclusively made up of conventional words. Common combinations of characters, punctuation, whitespace, and even sequences spanning multiple words can all earn their own entries.Where does a vocabulary come from? Nobody writes it by hand. Almost every tokenizer in this post uses some form of **byte-pair encoding** (BPE), which builds the vocabulary by counting. In a simplified version of BPE, start with every character (or byte, in byte-level tokenizers) as its own token. Look through a big pile of training text for the pair of adjacent tokens that appears most often, say &#92;&quot;t&#92;&quot; followed by &#92;&quot;h&#92;&quot;, and merge it into a new token &#92;&quot;th&#92;&quot;. Now look again: maybe &#92;&quot;th&#92;&quot; followed by &#92;&quot;e&#92;&quot; is the most common pair, so &#92;&quot;the&#92;&quot; becomes a token.Rinse and repeat this many thousands of times over. Every merge adds one entry to the vocabulary, and the list of merges, in the order they were learned, is saved along with it. To tokenize new text, the tokenizer breaks it into characters and replays those merges in the same order, so common words collapse into a single token and rare words stay in pieces. The exact split of a word depends on which merges rank higher, which matters later.Over a long enough timeline, does the entirety of Alice in Wonderland become a single token? Every published version of something like the Bible? Interesting thought exercise.While they aren&#39;t incorporating entire novels or religious texts as tokens yet (and I suspect there&#39;s a better technique that enters the room well before we push things to that scale), these vocabularies *have* been getting bigger! GPT-2 had 50,257 tokens; GPT-4&#39;s tokenizer has 100,277; GPT-4o&#39;s has 200,019.Part of that growth reflects increasingly ambitious multilingual support: OpenAI&#39;s [GPT-4o announcement](https://openai.com/index/hello-gpt-4o/) shows the same Gujarati sentence dropping from 145 tokens to 33 under the new tokenizer, while English barely moved.***Sidenote**: Rest of World has a nice article on [the cost of AI for non-english languages]( https://restofworld.org/2026/ai-tokenizer-tax-non-english-languages-cost-inequity/) which touches on this idea of multilingual support, tokens and how this manifests visually. I think not discussing Chinese at all—which can be more token efficient than latin script languages sometimes!—was kind of a miss.*So when something like Meta’s [Muse](https://muse.ai/) product boasts giving you 1 *billion* tokens for free, that’s what we’re talking about: a billion units of text processed, not a billion words (The rule of thumb seems to have settled around 0.75 words per token, so if it helps you can multiply any token count by that and read it as words.). And depending on which tokenizer is doing the counting, that same text might consume a surprisingly different number of tokens!Writing this makes me want to start charging in tokens (i.e. words) in my day-to-day life. Hm.**Further reading on tokens**: the BPE paper, [Sennrich et al. 2016](https://arxiv.org/abs/1508.07909); [SentencePiece](https://github.com/google/sentencepiece), Google&#39;s take, used by Llama 2, Gemma and T5; and Hugging Face&#39;s [`tokenizers`](https://github.com/huggingface/tokenizers) library, which reads most of the open ones.![[Screen Recording 2026-11-01 at 10.47.20 PM.mov]]## What is Tokenizer Mono and how does it work?**Tokenizer Mono** is a font family with different faces mapped to different tokenizers. This lets you visualize the tokens as you type without an additional computation and reassembly step.It&#39;s one big typographic family—&#92;&quot;Tokenizer Mono&#92;&quot; based on [IBM Plex](https://github.com/IBM/plex)— with a style per tokenizer model. Font Book on macOS should register them as one family with twenty-eight styles.| Vendor     | Face       | Used by                                                                          || ---------- | ---------- | -------------------------------------------------------------------------------- || OpenAI     | `cl100k`   | OpenAI GPT-4, GPT-3.5, text-embedding-3; also Phi-4, OLMo 2, IBM Granite 4                      ||            | `o200k`    | OpenAI GPT-4o, o1, o3, GPT-4.1, gpt-oss                                          ||            | `p50k`     | OpenAI Codex, text-davinci-002/003                                               ||            | `r50k`     | OpenAI GPT-2, GPT-3                                                              ||            | `clip`     | OpenAI CLIP, Stable Diffusion prompts (lowercases; no whitespace tokens)         || Meta       | `llama4`   | Meta Llama 4                                                                     ||            | `llama3`   | Meta Llama 3 / 3.1 / 3.2 / 3.3; also SmolLM 3                     ||            | `llama2`   | Meta Llama 2 (SentencePiece)                                                     || Google     | `gemma3`   | Google Gemma 3                                                                   ||            | `gemma`    | Google Gemma 1 / 2                                                               ||            | `t5`       | Google T5 (SentencePiece Unigram, not BPE)                                       ||            | `bert`     | Google BERT (WordPiece; ## continuations approximated)                           || Mistral    | `mistral`  | Mistral 7B v0.3 (SentencePiece)                                                  ||            | `tekken`   | Mistral Nemo, Mistral Small 3 (Tekken); also NVIDIA Nemotron-H, Swiss AI Apertus || Alibaba    | `qwen`     | Alibaba Qwen 2 / 2.5 / 3                                                         || DeepSeek   | `deepseek` | DeepSeek V3 / R1                                                                 || Zhipu      | `glm`      | Zhipu GLM-4.5                                                                    || Tencent    | `hunyuan`  | Tencent Hunyuan                                                                  || Baidu      | `ernie`    | Baidu ERNIE 4.5 (SentencePiece)                                                  || ByteDance  | `seed`     | ByteDance Seed-OSS                                                               || 01.AI      | `yi`       | 01.AI Yi (SentencePiece)                                                         || IBM        | `granite`  | IBM Granite 3 and Granite Code (StarCoder vocabulary); also StarCoder                || TII        | `falcon3`  | TII Falcon 3                                                                     ||            | `falcon`   | TII Falcon                                                                       || EleutherAI | `neox`     | EleutherAI GPT-NeoX, Pythia                                                      || BigScience | `bloom`    | BigScience BLOOM (multilingual)                                                  || UW         | `superbpe` | UW SuperBPE for OLMo 2 (tokens cross word boundaries)                            || Moonshot   | `kimi`     | Moonshot Kimi K2 (tiktoken-format vocabulary)                                    |Here&#39;s the same sentence visualized in all of these different tokenizers. ![[tokenizer-mono-gallery.png]]It&#39;s subtle, but you can spot some fun differences. Llama 2 splits &#92;&quot;fox&#92;&quot; and &#92;&quot;tokenize&#92;&quot; where OpenAI (among others) doesn&#39;t. BERT doesn&#39;t tokenize whitespace at all (it will never be good at Python, alas). And while we&#39;re on whitespace and Python: `cl100k` takes the four-space indent before `return` and makes one token of the first three spaces, then folds the fourth into `&#92;&quot; return&#92;&quot;`, while Gemma keeps all four spaces as a single token.**Note on vendors and models**: Anthropic&#39;s tokenizer isn&#39;t public, as far as I can tell, so there&#39;s no Claude face. Neither is Gemini&#39;s, though I wouldn&#39;t be shocked if it&#39;s some evolution of Gemma? OpenAI publishes its encodings through [tiktoken](https://github.com/openai/tiktoken), and its [model table](https://github.com/openai/tiktoken/blob/main/tiktoken/model.py) maps everything up to GPT-5 onto `o200k_base`, so the `o200k` face covers those. I&#39;m not sure about the newest models like Astra (GPT-6).## The weird thing fonts can do: substitutionThis entire project was an exercise in seeing how far I could push OpenType glyph substitutions—something I knew existed and understood conceptually, but had never played with.Microsoft&#39;s [OpenType spec pages](https://learn.microsoft.com/en-us/typography/opentype/spec/gsub) explain this elegantly, in my opinion.In a nutshell, the Glyph Substitution table (GSUB) is the part of an OpenType font that holds rules for replacing one or more glyphs (the drawn shapes, as opposed to the characters underneath them) with other glyphs. The spec numbers eight lookup types; seven of them substitute something, and the eighth is a wrapper you&#39;ll meet in the list. The examples below are in Adobe&#39;s `.fea` syntax, which is how most type designers write them.- **Single substitution** (type 1): a straight one-for-one swap. The slashed zero in coding fonts is this: `sub zero by zero.slash;`. Small caps are the same trick, just 26 times over.- **Multiple substitution** (type 2): one glyph becomes several. The usual job is taking a ligature or precomposed glyph apart so other rules can see its pieces: `sub f_i by f i;`.- **Alternate substitution** (type 3): one glyph has several interchangeable forms, and the app or the user picks. The canonical example is a font with a drawer full of ampersands: `sub ampersand from [ampersand.1 ampersand.2 ampersand.3];`.- **Ligature substitution** (type 4): several glyphs become one, while the underlying characters stay put, so you can still select and search them: `sub f i by f_i;`. [Fira Code&#39;s](https://github.com/tonsky/FiraCode) `!==` arrows are this. This is the thing I half-remembered about fonts and went to look up before any of this started, i.e. &#92;&quot;how do ligatures actually work?&#92;&quot;, and here we are, one weird font and a blog post later.- **Contextual substitution** (type 5): match a sequence of glyphs and run a lookup on any of them: `sub [a e o]&#39; r&#39; lookup connect;`. Every glyph in the match is fair game, but there&#39;s nothing to look at outside the match.- **Chained contextual substitution** (type 6): the one powering Tokenizer Mono. Like type 5, but now the rule can also require glyphs before and after the match without touching them, the regular-expression equivalent of lookbehind and lookahead: `sub @letter f&#39; i&#39; r&#39; e&#39; lookup toRed;` only fires when a letter precedes &#92;&quot;fire&#92;&quot;. That&#39;s how the font tells &#92;&quot; hello&#92;&quot; from &#92;&quot; hellos&#92;&quot;.- **Extension** (type 7): not a substitution at all. It&#39;s a wrapper that lets a lookup point past the 16-bit offset limit, so a font with huge tables can keep using one of the other types inside it. Tokenizer Mono is that font: the cl100k face wraps 194 of its chained-contextual subtables this way.- **Reverse chaining substitution** (type 8): a chained single substitution that runs backwards, from the last glyph in the run to the first, so a glyph can depend on what comes after it has already been decided. It exists for Arabic Nastaliq, where a letter&#39;s shape depends on the letters to its left: `rsub e&#39; space by e.final;`.  Rules are written in Adobe&#39;s feature-file language, [`.fea`](https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html). The warm-up font in the repo turns the word &#92;&quot;fire&#92;&quot; red, and only the whole word, in eight lines:```fea@letter = [a-z A-Z];lookup toRed {  sub f by f.red;  sub i by i.red;  sub r by r.red;  sub e by e.red;} toRed;feature calt {  ignore sub @letter f&#39; i&#39; r&#39; e&#39;;        # not &#92;&quot;misfire&#92;&quot;  ignore sub f&#39; i&#39; r&#39; e&#39; @letter;        # not &#92;&quot;fired&#92;&quot;  sub f&#39; lookup toRed  i&#39; lookup toRed  r&#39; lookup toRed  e&#39; lookup toRed;} calt;```The tokenizer font is that idea pushed to a silly extreme. One rule per vocabulary token, longest first, keyed on the first glyph. When the shaper matches one it rewrites the letters to start / middle / end variants and skips past the match. That skip is what makes it greedy longest-match. In `.fea` terms, the rule for &#92;&quot; hello&#92;&quot; would be:```feasub space&#39; lookup toStart  h&#39; lookup toMid  e&#39; lookup toMid  l&#39; lookup toMid  l&#39; lookup toMid  o&#39; lookup toEnd;```(At this scale the `.fea` compiler can&#39;t cope, so the rules are built directly as table data with [fontTools](https://fonttools.readthedocs.io/). Same thing, no text form.)A 22-rule state machine then paints the colors (yes, fonts can have colors; that&#39;s the next section!), looking one glyph to the left:```fea# continuation inherits its neighbor&#39;s color (k = 0..4)sub [@S0 @M0] @M&#39; lookup toM0;sub [@S0 @M0] @E&#39; lookup toE0;# a new token takes the next color after a token endsub [@E0 @X0] @S&#39; lookup toS1;sub [@E0 @X0] @X&#39; lookup toX1;# ...same four lines for colors 1 to 4, wrapping 4 -&gt; 0...# first token in the runsub @S&#39; lookup toS0;sub @X&#39; lookup toX0;```## Colors in fontsA few years ago I discovered [Google&#39;s Noto Color](https://github.com/googlefonts/noto-emoji) Emoji font and learned you can put colors in fonts. What a neat trick! For this endeavor, while I figured substitution rules might be able to mark where the tokens start and stop, color would make it even snazzier and start to look and feel like the tools I shared toward the top. Color in OpenType involves two tables working together. [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) says &#92;&quot;this glyph is these layers, drawn in this order,&#92;&quot; and [CPAL](https://learn.microsoft.com/en-us/typography/opentype/spec/cpal) holds the palettes those layers pick their colors from.COLR comes in two versions. Version 0 is flat fills, one palette color per layer, and is all I needed for Tokenizer Mono. Version 1 adds gradients, transforms and compositing, which is what Noto Color Emoji&#39;s web build uses. Chrome&#39;s [COLRv1 announcement](https://developer.chrome.com/blog/colrv1-fonts/) is a good explainer if you want to go further. Twemoji and Microsoft&#39;s Segoe UI Emoji ship COLR builds too.In Tokenizer Mono every colored letter is two layers: a rounded box filled from palette slot *k*, and then the original letter on top in &#92;&quot;whatever the text color is&#92;&quot; (palette index `0xFFFF`, a special value meaning &#92;&quot;use the current foreground&#92;&quot;). With [fontTools](https://github.com/fonttools/fonttools) the whole thing looks like this:```pythonfrom fontTools.colorLib.builder import buildCOLR, buildCPALfont[&#92;&quot;CPAL&#92;&quot;] = buildCPAL([    [(0.83, 0.77, 0.98, 1), (0.73, 0.93, 0.86, 1), ...],   # palette 0, light backgrounds    [(0.30, 0.23, 0.54, 1), (0.12, 0.42, 0.31, 1), ...],   # palette 1, dark backgrounds])font[&#92;&quot;COLR&#92;&quot;] = buildCOLR({    &#92;&quot;a.s0&#92;&quot;: [(&#92;&quot;box.start&#92;&quot;, 0), (&#92;&quot;a&#92;&quot;, 0xFFFF)],   # box in color 0, then the letter    &#92;&quot;a.m0&#92;&quot;: [(&#92;&quot;box.mid&#92;&quot;,   0), (&#92;&quot;a&#92;&quot;, 0xFFFF)],    # ... 1,001 characters x 4 shapes x 5 colors})```A CPAL table can hold more than one palette. Each index in the list in the example above maps to a layer you can refer to by slot number (i.e. index). So the same box glyph that fills from slot 0 can be pale lavender in one palette and deep purple in another, with nothing else in the font changing. Tokenizer Mono ships two: pastels for light backgrounds and darker, more saturated versions for dark backgrounds. The page on this demo picks between them with the CSS [`font-palette`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-palette) property depending on if you have dark mode enabled:```css@font-palette-values --tok-dark {  font-family: &#92;&quot;Tokenizer Mono cl100k&#92;&quot;;  base-palette: 1;}@media (prefers-color-scheme: dark) {  textarea { font-palette: --tok-dark; }}```It fails pretty elegantly too. Anywhere COLR isn&#39;t supported (which isn&#39;t that many places these days; it&#39;s widely supported), like most terminals and a lot of native text fields, the boxes simply don&#39;t draw and you&#39;re left with plain, colorless IBM Plex Mono.## The fiddly bits**Greedy longest-match is not BPE.** Remember that a BPE tokenizer splits text by replaying its merges in the order they were learned. The font can&#39;t do that. A substitution rule matches a fixed run of glyphs, so the best it can do is take the longest token that fits and move on. *Usually* that lands in the same place, which is why this font felt fun-enough to share. Sometimes it doesn&#39;t.Take &#92;&quot;antidisestablishmentarianism&#92;&quot; in `cl100k`. In the middle of a sentence the word arrives with a leading space, and the font grabs &#92;&quot; antid&#92;&quot; because it&#39;s the longest token that fits there. BPE&#39;s merges for &#92;&quot; ant&#92;&quot; and &#92;&quot;idis&#92;&quot; rank higher, so the real split is ant|idis|establish|ment|arian|ism and the font&#39;s is antid|ises|tabl|ishment|arian|ism. At the start of a line there&#39;s no leading space, &#92;&quot; antid&#92;&quot; can&#39;t match, and the font gives a third answer: anti|dis|establish|ment|arian|ism, which looks the most sensible of the lot. (You&#39;ll see that one in the demo whenever the word is long enough to wrap onto its own line; see Known gaps.) BPE isn&#39;t trying to match how a person would break the word. It only reflects which character pairs were common in its training data, and &#92;&quot;ant&#92;&quot; was more common than &#92;&quot;anti&#92;&quot;.The fix was to hard-code answers. The build script uses the 60,000 most common English words from [wordfreq](https://github.com/rspeer/wordfreq) and runs them through the real tokenizer and adds a whole-word rule wherever greedy would have gotten it wrong. It&#39;s goofy, but a whole-word rule is longer than any token inside it, so it works. Nothing is emitted where greedy was already right, so common words cost nothing. A second pass adds rules for any longer word a shorter rule would otherwise shadow, so &#92;&quot; byte&#92;&quot; can&#39;t fire inside &#92;&quot; bytes&#92;&quot;. In other words, the word rules are a hard-coded answer keyCouldn&#39;t you keep going and add every word the greedy matcher gets wrong until it&#39;s perfect? In theory, yes! A big enough list would make the font exact on every word in it and it would work. A few things make this impractical:The first is cost. The cl100k face went from 4.4 MB to 10.9 MB as a TTF when the 60,000-word list added about 92,000 rules (I started with 10,000 words), so roughly 70 bytes per rule, or about 7 bytes in WOFF2. Each word gets up to four forms (leading space, capitalized, line-initial, all caps), and about half of those turn into rules. A million-word list would mean something like a million and a half rules, so on the order of 100 MB as TTF and 10 MB as WOFF2 per face. I am *slightly* tempted, and I won&#39;t rule out turning this into a 100 MB+ font someday, but a demo is better for now.A more interesting challenge is performance. I bet nobody thinks about performance variance between fonts! Rules are grouped by their first glyph and tried longest-first, so the work the shaper does at each character grows with the number of rules that start with that letter. Today that&#39;s about 50 microseconds per character. Fifteen times the rules wouldn&#39;t be 15x times slower, since HarfBuzz indexes the rules rather than scanning them, but typing would start to feel it. The third is that the words run out before the misses do. wordfreq&#39;s English list goes a few hundred thousand entries deep before it turns into noise, and the long tail is names, misspellings and concatenations, which the tokenizer treats like code anyway. Past a certain point you&#39;re spending megabytes on rules that fire almost never, and the remainder, identifiers, URLs and other languages, is the same size no matter how long the list is. Greedy plus a frequency-ranked cheat-sheet gets you to 98% coverage on this 60,000-word list, the last 2% is rare words (antidisestablishmentarianism didn&#39;t even make the list) and code, and no amount of hard-coding reaches 100% because the input isn&#39;t a closed set.The real fix would be a font that replays merges instead of matching longest-first, which is what the SuperBPE pass does in miniature. A full replay needs one lookup per merge rank, applied in order, and OpenType caps a font at 65,535 lookups. cl100k has about 100,000 merges.**Every tokenizer treats a run of spaces differently.** tiktoken keeps the last space for the next word. Gemma keeps the whole run and gives the next word no space. T5 collapses the run to one token. BERT doesn&#39;t tokenize whitespace at all! Rather than hard-code this, the build script probes each tokenizer with a real sample and picks the rule shape from the answer.**The vocabulary files lie a little.** Gemma stores its whitespace tokens as &#92;&quot;added tokens&#92;&quot; in a separate list from the main vocabulary. Byte-level tokenizers report empty offsets for whitespace-only tokens. Both bit me, and both showed up the same way: a face scoring 40% or 70% for no visible reason.**SuperBPE broke greedy matching outright.** Its tokens cross word boundaries, so the vocabulary has entries like &#92;&quot;, h&#92;&quot;, and &#92;&quot;one, half&#92;&quot; became &#92;&quot;, h&#92;&quot; + &#92;&quot;alf&#92;&quot;. &#92;&quot; fan of&#92;&quot; won over &#92;&quot; of the&#92;&quot; where real BPE does the opposite. The fix was to do what BPE does: shape the single words first, then re-shape the superwords in rank order as merges of tokens that already exist, matching the exact shape pattern of their parts. One rule per way of building a superword from smaller ones, so &#92;&quot;By the way&#92;&quot; can form on top of &#92;&quot; the way&#92;&quot;. That took it from 86% to 93% boundary agreement, and the hand-picked sentences from the SuperBPE playground in my testing now match.**Testing by eye against a playground is slow.** `tools/compare.py superbpe &#92;&quot;any sentence&#92;&quot;` prints both splits side by side, and the corpus check lists the font tokens that most often disagree with the real tokenizer.## How is accuracy measured?When I claim &#92;&quot;98% accuracy&#92;&quot; for some of these, what does that even mean?The corpus is about 200 lines of mixed text that live in the repo as `fonts/tokenizer/corpus-large.txt`: a few paragraphs of prose, the text of the SIL Open Font License, 120 lines of Python from the standard library, some JavaScript and SQL, and a few lines with curly quotes, accented words and currency symbols. Nothing in it was used to build the font. Our word rules come from a frequency list, not from this corpus.The method is to shape each line with HarfBuzz, the same engine Chrome and Firefox use, and read back which glyphs came out as &#92;&quot;start of token&#92;&quot; variants. That gives the font&#39;s set of token boundaries as character positions. Then run the real tokenizer (tiktoken or the Hugging Face `tokenizers` library) on the same line and take its boundaries and compare the two sets.**Precision** is the share of boundaries the font drew that the real tokenizer agrees with; a face that over-splits has low precision. **Recall** is the share of the real boundaries the font drew; a face that under-splits has low recall. Most faces are within a point of each other on the two, which means the errors are &#92;&quot;different split&#92;&quot; rather than &#92;&quot;too many&#92;&quot; or &#92;&quot;too few&#92;&quot;.Why boundaries and not token IDs? The font doesn&#39;t know IDs. It only draws where tokens start and stop, so that&#39;s the only thing it can be right or wrong about. I&#39;m also completely new to all of this and am curious if there are other/better techniques with OpenType for this weird problem I&#39;ve created (though I kind of like what a brute-force solution this ended up being).A few caveats: Line breaks are hard boundaries for both sides, since each line is tokenized alone. The corpus is English and code, so a multilingual tokenizer like BLOOM is being judged on the part of its vocabulary it uses least. A different corpus would move the numbers by a point or two. The measurement script is `tools/tokcheck.py`, and CI prints the table for every face on every push.So the reader can see what the missing 2% looks like, here are two misses. cl100k splits &#92;&quot; antidisestablishmentarianism&#92;&quot; as ant|idis|establish|ment|arian|ism; the font draws antid|ises|tabl|ishment|arian|ism. Same word, same letters, different seams. In code it&#39;s identifiers: `xMinYMax` is x|Min|Y|Max to cl100k and x|Min|YM|ax to the font.## Known gapsA few things the font can&#39;t do, and one thing browsers do to it.- **Browsers re-tokenize at soft wraps.** The font&#39;s rules can only see the glyphs on the line as the browser laid it out, and in Chrome, Firefox and Safari alike the line is broken before the font gets its say. (I&#39;d assumed Chrome shaped the whole paragraph and then wrapped it. It doesn&#39;t, at least not in a way the font can see: a narrow paragraph and a textarea both re-shape at the break.) So a word pushed to the start of a line loses its leading space, which makes it a different token, which is why &#92;&quot;antidisestablishmentarianism&#92;&quot; splits one way mid-sentence and another way after a wrap. A SuperBPE token that spans several words, like &#92;&quot; By the way&#92;&quot;, is cut into its single-word pieces if the line breaks inside it. Resize the window and the colors shift as words move across the wrap. Nothing in the font can fix this; it&#39;s a layout decision made before shaping. If it bothers you, give the text a wide container, use `white-space: nowrap` and scroll sideways, or insert hard line breaks where you want them.- **Trailing spaces** at the end of a line come out as single tokens. OpenType has no &#92;&quot;end of text&#92;&quot; lookahead, so the font can&#39;t tell a trailing space from one that&#39;s about to start a word.- **T5 is Unigram**, which picks splits by likelihood rather than length. No longest-match scheme reproduces that, so T5 is the least accurate face by design.- **Only characters the font knows get highlighted**: everything Plex Mono has a glyph for, which is 1,001 characters.- **Terminals and most native editors won&#39;t show the colors.** It degrades to plain monospace, which is the graceful failure described earlier.## By the numbersBoundary agreement with the real tokenizer on the corpus above, from the CI run that built the fonts in the demo (November 3, 2026), sorted by precision.| face | precision | recall | tokens font / real | shaping | TTF ||---|---|---|---|---|---|| bert | 99.5% | 99.3% | 3341 / 3348 | 4 µs/char | 5.0 MB || r50k | 98.9% | 98.9% | 3758 / 3755 | 60 µs/char | 8.6 MB || gemma | 98.7% | 98.6% | 2963 / 2965 | 46 µs/char | 14.5 MB || yi | 98.6% | 98.7% | 3209 / 3208 | 44 µs/char | 8.6 MB || p50k | 98.5% | 98.6% | 3073 / 3070 | 42 µs/char | 8.6 MB || gemma3 | 98.5% | 98.5% | 2975 / 2976 | 45 µs/char | 13.8 MB || neox | 98.4% | 98.2% | 3004 / 3011 | 43 µs/char | 8.8 MB || granite | 98.3% | 98.2% | 3108 / 3109 | 54 µs/char | 9.7 MB || ernie | 98.0% | 98.1% | 3050 / 3047 | 48 µs/char | 9.8 MB || qwen | 98.0% | 97.9% | 2861 / 2864 | 46 µs/char | 11.1 MB || cl100k | 98.0% | 97.9% | 2823 / 2826 | 45 µs/char | 10.9 MB || hunyuan | 98.0% | 96.6% | 2824 / 2865 | 45 µs/char | 10.8 MB || llama3 | 97.9% | 97.8% | 2825 / 2826 | 48 µs/char | 11.3 MB || mistral | 97.8% | 98.4% | 3218 / 3199 | 50 µs/char | 8.6 MB || o200k | 97.8% | 97.9% | 2802 / 2800 | 52 µs/char | 13.1 MB || glm | 97.8% | 96.9% | 2802 / 2829 | 48 µs/char | 11.7 MB || llama2 | 97.7% | 97.8% | 3266 / 3265 | 51 µs/char | 8.8 MB || kimi | 97.7% | 97.6% | 2810 / 2811 | 45 µs/char | 10.3 MB || falcon3 | 97.5% | 98.6% | 3112 / 3075 | 41 µs/char | 11.4 MB || deepseek | 97.5% | 97.6% | 2924 / 2921 | 46 µs/char | 9.9 MB || falcon | 97.3% | 98.3% | 3225 / 3192 | 43 µs/char | 9.1 MB || llama4 | 97.3% | 97.4% | 2815 / 2813 | 55 µs/char | 13.6 MB || seed | 97.2% | 97.5% | 2925 / 2916 | 47 µs/char | 10.5 MB || tekken | 97.1% | 97.2% | 2977 / 2975 | 51 µs/char | 11.2 MB || clip | 96.7% | 96.9% | 2984 / 2978 | 5 µs/char | 9.0 MB || bloom | 94.5% | 95.0% | 2893 / 2877 | 58 µs/char | 12.9 MB || superbpe | 93.0% | 94.5% | 2384 / 2346 | 53 µs/char | 15.4 MB || t5 | 85.7% | 94.1% | 3605 / 3280 | 35 µs/char | 7.1 MB |Most faces land between 97% and 99%. BERT tops the table because WordPiece really is greedy longest-match under the hood, so it needs no word rules at all! r50k (GPT-2) is next; its small vocabulary leaves fewer ways to be wrong. The three at the bottom are explained by their algorithms: BLOOM is multilingual and its English vocabulary collides with tokens from other languages, SuperBPE&#39;s tokens cross word boundaries, and T5 is Unigram.The fonts run from 5 to 15 MB as TTF and roughly a tenth of that as WOFF2. SuperBPE is the biggest at 15.4 MB, with its superword rules stacked on a 200k vocabulary, then Gemma 2 at 14.5 MB. BERT is the smallest at 5.0 MB; its 29k-token vocabulary is a fraction of the others.Shaping costs 40 to 60 microseconds per character for the BPE faces on the CI runner, and a few microseconds for BERT and CLIP, which have far fewer rules. A 10,000-character document re-shapes in well under a second, and browsers only re-shape the paragraph being edited.Hilariously, at 40 to 60 microseconds per character, I started wondering whether this is actually any faster than sending the text to a service that tokenizes it, returns the pieces, and having the client reassemble and highlight them. All that work only to arrive at something that might be less accurate **and** slower.As that thought landed I ran a quick check, on my laptop, same 12,265-character corpus for both, line by line:| | per character | 500-char paragraph | 10,000-char document ||---|---|---|---|| the font, shaped by HarfBuzz | 34 µs | 17 ms | 343 ms || tiktoken, running locally | 0.11 µs | 0.06 ms | 1.1 ms |So: about 300 times slower than doing it properly. I&#39;m so proud.Painting a span per token on the client adds a few milliseconds to the tokenizer&#39;s side, which still leaves the font two orders of magnitude behind. Against a network round trip of 30 to 100 ms it&#39;s closer to a tie: the font wins for a paragraph and loses for a document.The one thing in the font&#39;s favor is that browsers only re-shape the paragraph you&#39;re typing in, so what you actually pay per keystroke is the 17 ms row, and nobody can probably feel that.No regrets.## A half-baked idea to end onEverything in Tokenizer Mono swaps glyphs for other glyphs of the same text. But a substitution rule doesn&#39;t *have* to. We can match a whole phrase, collapse it into one glyph, and expand that glyph into something else entirely. Good becomes evil. Up becomes down. Yes is no.My half-baked idea after landing this was &#92;&quot;To what degree could we be replacing glyphs with the would-be response tokens to these tokens from an LLM?&#92;&quot; A model in a font (kinda).So, in principle: a font where typing &#92;&quot;What is the capital of Oregon?&#92;&quot; could render as &#92;&quot;Salem is the capital of Oregon.&#92;&quot; It would be deterministic, but the rule fires when the question mark lands, the answer appears in place of the question, and the document underneath still says what you typed. Select it, copy/paste it and you get the question back.It would basically be a lookup table though, not a model. The font could only answer questions someone enumerated at build time, exactly as spelled. [ELIZA](https://en.wikipedia.org/wiki/ELIZA) packed into a font maybe. I&#39;m putting a pin in it as the next silly font project.If you want the real thing though, it exists! And it&#39;s wonderful. Pure OpenType substitution is a finite-state machine, which is enough for [Fontemon](https://www.coderelay.io/fontemon.html) (a playable Pokémon-style game that lives entirely inside a font). For an actual language model you need more than a state machine, and HarfBuzz has a Wasm shaper that lets a font carry arbitrary code (which is kind of insane to me): [llama.ttf](https://fuglede.github.io/llama.ttf/) uses it to bundle a small Llama model and its inference engine inside a font file, so typing a prompt generates text. No browser enables that Wasm shaper, thank goodness, but the ceiling for &#92;&quot;a font that does things&#92;&quot; is a lot higher than you&#39;d think.**Credits**: [IBM Plex](https://github.com/IBM/plex) (OFL), [fontTools](https://fonttools.readthedocs.io/), [HarfBuzz](https://harfbuzz.github.io/), [tiktoken](https://github.com/openai/tiktoken), Hugging Face [tokenizers](https://github.com/huggingface/tokenizers), [wordfreq](https://github.com/rspeer/wordfreq).## SourcesEvery &#92;&quot;used by&#92;&quot; claim in the table above was checked against the vendors&#39; own tokenizer files, not model cards or press. For public repos the `tokenizer.json` vocabulary and merge list were downloaded and compared directly. For gated repos (Meta, Google, Mistral, BigCode) the comparison uses the file hashes Hugging Face publishes in the repo metadata, or a public repo that ships the byte-identical file.&lt;details&gt;&lt;summary&gt;Where each face&#39;s vocabulary comes from&lt;/summary&gt;- **OpenAI faces.** `cl100k`, `o200k`, `p50k` and `r50k` are built from the encodings of those names in [tiktoken](https://github.com/openai/tiktoken). Which OpenAI model uses which encoding comes from tiktoken&#39;s own [model.py](https://github.com/openai/tiktoken/blob/main/tiktoken/model.py). `clip` is [openai/clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-base-patch32).- **Meta.** `llama4`: [meta-llama/Llama-4-Scout-17B-16E-Instruct](https://huggingface.co/meta-llama/Llama-4-Scout-17B-16E-Instruct). `llama3`: [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B). `llama2`: [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf). These repos are gated, so the build reads the ungated mirrors [unsloth/Llama-4-Scout-17B-16E-Instruct](https://huggingface.co/unsloth/Llama-4-Scout-17B-16E-Instruct), [NousResearch/Meta-Llama-3-8B](https://huggingface.co/NousResearch/Meta-Llama-3-8B) and [NousResearch/Llama-2-7b-hf](https://huggingface.co/NousResearch/Llama-2-7b-hf). The mirrors&#39; `tokenizer.json` (Llama 4 and 3) and `tokenizer.model` (Llama 4 and 2) carry the same hashes as Meta&#39;s. Meta also publishes the Llama 3 and Llama 4 tokenizer files in [meta-llama/llama-models](https://github.com/meta-llama/llama-models) on GitHub; both match the Hugging Face vocabularies token for token.- **Google.** `gemma3`: [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it). `gemma`: [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b). Both gated; built from [unsloth/gemma-3-4b-it](https://huggingface.co/unsloth/gemma-3-4b-it) and [unsloth/gemma-2-2b](https://huggingface.co/unsloth/gemma-2-2b), whose `tokenizer.json` and `tokenizer.model` hashes match Google&#39;s. `t5`: [google-t5/t5-base](https://huggingface.co/google-t5/t5-base). `bert`: [google-bert/bert-base-cased](https://huggingface.co/google-bert/bert-base-cased).- **Mistral.** `mistral`: [mistralai/Mistral-7B-v0.3](https://huggingface.co/mistralai/Mistral-7B-v0.3), built from [unsloth/mistral-7b-v0.3](https://huggingface.co/unsloth/mistral-7b-v0.3) (same `tokenizer.model` hash, same 32,768-token vocabulary). `tekken`: [mistralai/Mistral-Nemo-Base-2407](https://huggingface.co/mistralai/Mistral-Nemo-Base-2407), built from [unsloth/Mistral-Nemo-Base-2407](https://huggingface.co/unsloth/Mistral-Nemo-Base-2407) (same `tekken.json` hash, same 131,072-token vocabulary and merges).- **Everyone else, read directly from the vendor&#39;s repo.** `qwen`: [Qwen/Qwen2.5-7B](https://huggingface.co/Qwen/Qwen2.5-7B). `deepseek`: [deepseek-ai/DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3). `glm`: [zai-org/GLM-4.5](https://huggingface.co/zai-org/GLM-4.5). `hunyuan`: [tencent/Hunyuan-7B-Instruct](https://huggingface.co/tencent/Hunyuan-7B-Instruct). `ernie`: [baidu/ERNIE-4.5-21B-A3B-PT](https://huggingface.co/baidu/ERNIE-4.5-21B-A3B-PT). `seed`: [ByteDance-Seed/Seed-OSS-36B-Instruct](https://huggingface.co/ByteDance-Seed/Seed-OSS-36B-Instruct). `yi`: [01-ai/Yi-1.5-9B](https://huggingface.co/01-ai/Yi-1.5-9B). `granite`: [ibm-granite/granite-3.3-8b-instruct](https://huggingface.co/ibm-granite/granite-3.3-8b-instruct). `falcon3`: [tiiuae/Falcon3-7B-Base](https://huggingface.co/tiiuae/Falcon3-7B-Base). `falcon`: [tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b). `neox`: [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b). `bloom`: [bigscience/bloom](https://huggingface.co/bigscience/bloom). `superbpe`: [UW/OLMo2-8B-SuperBPE-t180k](https://huggingface.co/UW/OLMo2-8B-SuperBPE-t180k). `kimi`: [moonshotai/Kimi-K2-Instruct](https://huggingface.co/moonshotai/Kimi-K2-Instruct), which publishes its vocabulary as a tiktoken-format file rather than a `tokenizer.json`.&lt;/details&gt;&lt;details&gt;&lt;summary&gt;Vocabulary sizes&lt;/summary&gt;- **GPT-2, 50,257 tokens.** Section 2.3 of the GPT-2 paper, [Radford et al. 2019](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf): &#92;&quot;The vocabulary is expanded to 50,257.&#92;&quot; The same figure is `n_vocab` for the `gpt2` and `r50k_base` encodings in tiktoken.- **GPT-4, 100,277 tokens, and GPT-4o, 200,019 tokens.** `n_vocab` for `cl100k_base` and `o200k_base` in tiktoken, whose [openai_public.py](https://github.com/openai/tiktoken/blob/main/tiktoken_ext/openai_public.py) defines each encoding from OpenAI&#39;s published rank files. The counts include the handful of special tokens each encoding reserves (one, five and two respectively).- **Multilingual growth.** The &#92;&quot;Language tokenization&#92;&quot; section of OpenAI&#39;s [Hello GPT-4o](https://openai.com/index/hello-gpt-4o/) announcement lists per-language token counts for the same sentence under the new tokenizer: Gujarati 4.4 times fewer (145 to 33), Telugu 3.5 times fewer, English 1.1 times fewer.&lt;/details&gt;&lt;details&gt;&lt;summary&gt;Models that share a face&#39;s vocabulary&lt;/summary&gt;- **GPT-4, GPT-3.5, text-embedding-3 on `cl100k`; GPT-4o, o1, o3, GPT-4.1 on `o200k`; Codex and text-davinci-002/003 on `p50k`; GPT-2 and GPT-3 on `r50k`.** All from tiktoken&#39;s [model.py](https://github.com/openai/tiktoken/blob/main/tiktoken/model.py), which maps model names to encodings (`gpt-4` to `cl100k_base`, `gpt-4o` to `o200k_base`, `code-davinci-002` to `p50k_base`, `davinci` to `r50k_base`). GPT-2&#39;s own `gpt2` encoding has the same 50,256 tokens and ranks as `r50k_base`.- **gpt-oss on `o200k`.** tiktoken maps `gpt-oss-*` to `o200k_harmony`, whose 199,998 ranked tokens are identical to `o200k_base`; it differs only in special tokens. The `tokenizer.json` in [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b) has the same vocabulary as `o200k_base`.- **Phi-4 on `cl100k`.** [microsoft/phi-4](https://huggingface.co/microsoft/phi-4) ships the 100,256 `cl100k_base` tokens with the same ids, plus 96 special tokens.- **OLMo 2 on `cl100k`.** [allenai/OLMo-2-1124-7B](https://huggingface.co/allenai/OLMo-2-1124-7B): the `cl100k_base` tokens plus 22 special tokens.- **Granite 4 on `cl100k`.** [ibm-granite/granite-4.0-h-small](https://huggingface.co/ibm-granite/granite-4.0-h-small): the `cl100k_base` tokens with the same ids, plus 96 special tokens. An earlier draft of this table put Granite 4 under Llama 3; Llama 3&#39;s vocabulary is a 128,000-token superset of cl100k, and Granite 4 has none of the extra 27,744.- **Llama 3.1, 3.2 and 3.3 on `llama3`.** Meta&#39;s [llama-models](https://github.com/meta-llama/llama-models) repo lists every 3.x release as tiktoken-based and ships a single [models/llama3/tokenizer.model](https://github.com/meta-llama/llama-models/blob/main/models/llama3/tokenizer.model) for them; its 128,000 tokens match the Llama 3 vocabulary id for id. The Hugging Face repos for [3.1](https://huggingface.co/meta-llama/Llama-3.1-8B), [3.2](https://huggingface.co/meta-llama/Llama-3.2-1B) and [3.3](https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct) are gated and were not compared directly.- **SmolLM 3 on `llama3`.** [HuggingFaceTB/SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B): vocabulary and merges identical to Llama 3&#39;s.- **Gemma 1 and 2 on `gemma`.** [google/gemma-7b](https://huggingface.co/google/gemma-7b) and [google/gemma-2-2b](https://huggingface.co/google/gemma-2-2b) ship the same `tokenizer.model` (identical hash). Gemma 3&#39;s is different: 262,144 tokens against 256,000, with only 180,870 in common.- **Mistral Small 3, Nemotron-H and Apertus on `tekken`.** [mistralai/Mistral-Small-24B-Base-2501](https://huggingface.co/mistralai/Mistral-Small-24B-Base-2501), [nvidia/Nemotron-H-8B-Base-8K](https://huggingface.co/nvidia/Nemotron-H-8B-Base-8K) and [swiss-ai/Apertus-8B-2509](https://huggingface.co/swiss-ai/Apertus-8B-2509) each have merges identical to Mistral Nemo&#39;s and the same 131,072-token size; they differ only in renamed special tokens (6, 4 and 60 respectively).- **Qwen 2, 2.5 and 3 on `qwen`.** [Qwen/Qwen2-7B](https://huggingface.co/Qwen/Qwen2-7B), [Qwen/Qwen2.5-7B](https://huggingface.co/Qwen/Qwen2.5-7B) and [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B): identical vocabulary and merges.- **DeepSeek R1 on `deepseek`.** [deepseek-ai/DeepSeek-R1](https://huggingface.co/deepseek-ai/DeepSeek-R1) and [deepseek-ai/DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3): identical.- **Granite 3, Granite Code and StarCoder on `granite`.** [ibm-granite/granite-3.0-8b-base](https://huggingface.co/ibm-granite/granite-3.0-8b-base) and [ibm-granite/granite-8b-code-base-4k](https://huggingface.co/ibm-granite/granite-8b-code-base-4k) have vocabulary and merges identical to StarCoder&#39;s. [bigcode/starcoder](https://huggingface.co/bigcode/starcoder) is gated, but [bigcode/tiny_starcoder_py](https://huggingface.co/bigcode/tiny_starcoder_py) ships the byte-identical `tokenizer.json`. Granite 3.3 renames one special token. StarCoder2 ([bigcode/starcoder2-7b](https://huggingface.co/bigcode/starcoder2-7b)) is a different tokenizer, with 93 tokens and the merge order changed, so it is not listed.- **Pythia on `neox`.** [EleutherAI/pythia-6.9b](https://huggingface.co/EleutherAI/pythia-6.9b) and [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b): identical.- **Falcon 7B and 40B on `falcon`.** [tiiuae/falcon-40b](https://huggingface.co/tiiuae/falcon-40b): identical to [tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b).- **Stable Diffusion prompts on `clip`.** The text tokenizers in [CompVis/stable-diffusion-v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4) and [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) have the same 49,408-token vocabulary and ids as [openai/clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-base-patch32).- **Algorithm labels.** From each repo&#39;s `tokenizer.json`: a `ByteLevel` pre-tokenizer marks byte-level BPE (GPT-2 lineage, Llama 3 and 4, Qwen, DeepSeek, Tekken, GLM, Hunyuan, Seed, Falcon, NeoX, BLOOM, SuperBPE, Granite, CLIP); `byte_fallback` with a Metaspace or no pre-tokenizer marks SentencePiece BPE (Llama 2, Mistral 7B, Gemma, ERNIE, Yi); T5&#39;s model is Unigram, with scored pieces instead of merges; BERT&#39;s decoder is WordPiece.&lt;/details&gt;",
      "date_published": "2026-11-04T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/10/you-already-dont-understand-your-code/",
      "url": "https://george.mand.is/2026/10/you-already-dont-understand-your-code.md",
      "title": "You Already Don&#39;t Understand Your Code",
      "content_html": "![A cross-section of geological strata. On the surface a person sits on the grass with a laptop, next to a cat, under a hovering UFO. Each layer below holds an older era of computing: laptops, phones and cloud icons, then punch cards and JavaScript, then operating-system logos, then mainframes and chips, then vacuum tubes and circuit boards, and at the bottom an abacus, binary digits and a dinosaur fossil.](/media/you-already-dont-understand-your-code.jpg)The title is intentionally provocative :)You probably do understand your code. Or at least, I&#39;m sure you think you do. I like to think I do too!But before we go any deeper into the premise behind the title, let&#39;s play a fun little game.Do you think you understand the code below?**Python**```pythonnums = [5, 3, 10, 1, 9]words = [&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;]print(sorted(nums))        # [1, 3, 5, 9, 10]print(sorted(words))       # [&#39;Apple&#39;, &#39;banana&#39;, &#39;fig&#39;, &#39;pear&#39;]```**Java**```javaint[] nums = {5, 3, 10, 1, 9};String[] words = {&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;};Arrays.sort(nums);   // [1, 3, 5, 9, 10]Arrays.sort(words);  // [Apple, banana, fig, pear]```**C**```cint cmp(const void *a, const void *b) { return *(int*)a - *(int*)b; }int nums[] = {5, 3, 10, 1, 9};qsort(nums, 5, sizeof(int), cmp);   // 1 3 5 9 10```**C++**```cppstd::vector&lt;int&gt; nums = {5, 3, 10, 1, 9};std::vector&lt;std::string&gt; words = {&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;};std::sort(nums.begin(), nums.end());    // 1 3 5 9 10std::sort(words.begin(), words.end());  // Apple banana fig pear```**Go**```gonums := []int{5, 3, 10, 1, 9}words := []string{&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;}slices.Sort(nums)   // [1 3 5 9 10]slices.Sort(words)  // [Apple banana fig pear]```**Rust**```rustlet mut nums = vec![5, 3, 10, 1, 9];let mut words = vec![&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;];nums.sort();   // [1, 3, 5, 9, 10]words.sort();  // [&#92;&quot;Apple&#92;&quot;, &#92;&quot;banana&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;pear&#92;&quot;]```**Ruby**```ruby[5, 3, 10, 1, 9].sort                    # =&gt; [1, 3, 5, 9, 10][&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;].sort  # =&gt; [&#92;&quot;Apple&#92;&quot;, &#92;&quot;banana&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;pear&#92;&quot;]```**Swift**```swiftlet nums = [5, 3, 10, 1, 9].sorted()                       // [1, 3, 5, 9, 10]let words = [&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;].sorted()   // [&#92;&quot;Apple&#92;&quot;, &#92;&quot;banana&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;pear&#92;&quot;]```**PHP**```php$nums = [5, 3, 10, 1, 9];$words = [&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;];sort($nums);   // [1, 3, 5, 9, 10]sort($words);  // [&#92;&quot;Apple&#92;&quot;, &#92;&quot;banana&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;pear&#92;&quot;]```**C#**```csharpint[] nums = {5, 3, 10, 1, 9};string[] words = {&#92;&quot;pear&#92;&quot;, &#92;&quot;Apple&#92;&quot;, &#92;&quot;fig&#92;&quot;, &#92;&quot;banana&#92;&quot;};Array.Sort(nums);   // 1 3 5 9 10Array.Sort(words);  // Apple banana fig pear```Okay, you might not know all of these languages fluently, but you could probably follow that these are all different ways of sorting lists (or arrays, or vectors, or slices, or whatever the language calls the concept of a collection of data). You&#39;re smart like that. That&#39;s why I like you.I&#39;d say, given just the programs we&#39;ve shared so far, you might even feel like you could say you &#92;&quot;understand&#92;&quot; the code, even if it&#39;s not in a language you&#39;re particularly comfortable in.Now a more interesting question—could you tell me which implementation is faster, and why?The answer is always some flavor of &#92;&quot;it depends.&#92;&quot;But I could tell you pretty definitively that Python is going to be faster than C++ here, in a [Big-O](https://en.wikipedia.org/wiki/Big_O_notation) sense, when the list you hand it is already sorted or nearly sorted. Think of appending a few rows to an already-ordered log and sorting the whole thing again. (Reality tends to wash a lot of this out and make it not matter. A million already-sorted integers in C++ still finishes before you can blink.)Why is that? Because Python&#39;s `sorted()` uses [Timsort](https://en.wikipedia.org/wiki/Timsort), which notices runs that are already in order and finishes in O(n) on sorted input, while C++&#39;s `std::sort` uses [introsort](https://en.wikipedia.org/wiki/Introsort), a [quicksort](https://en.wikipedia.org/wiki/Quicksort) hybrid that does its full O(n log n) of work whether the input needed it or not. I was curious and measured it: on a sorted array of a million integers, Python&#39;s sort makes 999,999 comparisons. [GCC&#39;s](https://gcc.gnu.org/onlinedocs/libstdc++/) `std::sort` makes 25.6 million.Except... I wrote that paragraph, went to check it on my Mac, and it was wrong! Apple&#39;s clang ships a different C++ standard library, [LLVM&#39;s libc++](https://libcxx.llvm.org/), whose [introsort](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__algorithm/sort.h) notices when a partition comes out already ordered and finishes with a bounded insertion pass. Two million comparisons. Linear. Same `std::sort`, same source file, different answer, depending on which compiler happened to be on the machine. Here&#39;s the thing to takeaway though: of those ten snippets—all running some flavor of a stock sorting function or method on two different sets of data—no two run the same algorithm.Hold that thought. We&#39;ll come back to it.Let&#39;s try a harder one:```javascript// Example 1var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 2var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 3var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 4var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 5var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 6var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 7var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 8var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 9var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });``````javascript// Example 10var scores = new Array(40, 100, 1, 5, 25, 10);scores.sort(function (a, b) { return a - b; });```Okay, you probably feel even more confident you understand this code. (Sincerely though—why is that?). Or you might think [copy/paste](https://clipboard.cat) is broken on my machine and I published this without proofreading. It looks like the same code snippet copied ten-times over.To many of you, you probably clocked that as a classic JavaScript sort. It&#39;s looked the same since 1997.You even remembered the comparator, so you&#39;ve clearly been bitten before! Omit it and every engine since 1997 will hand you back `1, 10, 100, 25, 40, 5`, which is how nobody has ever sorted anything ever, because the default compares everything as strings. That one line has been true for thirty (!!) years and still catches people every week.But you knew that. You understand this code.Now can you tell me... which one is faster?...Oh wait, I cheated a little bit. I forgot to mention some things:- **Example 1** is running in Internet Explorer 4, in 1997, on JScript. Nobody outside Microsoft knows what algorithm it used, but it was [stable](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability). Mozilla&#39;s engineers later cited IE&#39;s stable sort as [a reason to fix their own](https://bugzilla.mozilla.org/show_bug.cgi?id=224128#c4).- **Example 2** is running in Netscape 4, in 1999, on SpiderMonkey. Quicksort. Not stable.- **Example 3** is running in Mozilla, in 2002, on SpiderMonkey. [Heapsort](https://en.wikipedia.org/wiki/Heapsort). A [bug filed in September 2001](https://bugzilla.mozilla.org/show_bug.cgi?id=99120) complained that quicksort choked on already-sorted input, and in March 2002 Brendan Eich landed a patch to &#92;&quot;switch from QuickSort to heap-sort.&#92;&quot; Still not stable.- **Example 4** is running in Firefox 3, from 2008 through today, on SpiderMonkey. [Merge sort](https://en.wikipedia.org/wiki/Merge_sort): [insertion sort](https://en.wikipedia.org/wiki/Insertion_sort) on small blocks, then a [non-recursive merge](https://searchfox.org/firefox-main/source/js/src/ds/Sort.h). The patch was [first posted in November 2003](https://bugzilla.mozilla.org/show_bug.cgi?id=224128), sat for three years over memory concerns, landed on trunk in October 2006 and shipped in Firefox 3. Stable.- **Example 5** is running in Safari, from 2015 through today, and in Bun since 2022, on JavaScriptCore. Merge sort, implemented in JavaScript inside the engine. A [2022 WebKit ticket](https://bugs.webkit.org/show_bug.cgi?id=239267) filed by one of its own engineers describes it as &#92;&quot;a fairly naive merge sort.&#92;&quot; Stable. The road there is my favorite in this list. In May 2008, people.com crashed Safari by shuffling an array with `sort(function() { return 0.5 - Math.random(); })`, which the C++ standard library&#39;s sort could not survive, so WebKit [started sorting](https://commits.webkit.org/26483@main) custom-comparator arrays by inserting them into an [AVL tree](https://en.wikipedia.org/wiki/AVL_tree). Over the next seven years the C++ grew into a sort that [picked](https://github.com/WebKit/WebKit/commit/d9d3a5d8f416551b9b238bca1cf1e445ab05ec3a) merge sort for strings, `qsort` for numbers, the AVL tree for custom comparators, and a [selection sort](https://en.wikipedia.org/wiki/Selection_sort) for anything that wasn&#39;t a plain array. In 2015 a WebKit engineer threw the whole thing out with a commit titled [&#92;&quot;It shouldn&#39;t take 1846 lines of code and 5 FIXMEs to sort an array&#92;&quot;](https://commits.webkit.org/162412@main) and rewrote it as the merge sort you get today.- **Example 6** is running in Chrome 1 through 69, and Node 0.x through 10, on V8. Insertion sort for arrays of 10 or fewer elements, quicksort above that. Not stable. Which means this exact six-element array ran insertion sort, and the day your scores list grew to eleven items it silently became quicksort. Stable in your tests, unstable in production.- **Example 7** is running in Internet Explorer 9 through legacy Edge, on Chakra. Insertion sort up to 512 elements, then quicksort. Not stable until a merge sort landed in November 2018.- **Example 8** is running in Chrome 70+, Node 11+, Deno, Electron and Cloudflare Workers, on V8. Timsort, written in Torque. Stable.- **Example 9** is running in a React Native app, on Hermes. Quicksort. In 2020 the Hermes team made it stable by keeping a side array of each element&#39;s original index and using it as the tiebreaker. If your comparator *grew* the array mid-sort, the index array didn&#39;t grow with it, and the sort read past the end of the heap. A bug-bounty researcher found it within six days of the change, before it reached a public release, and Meta&#39;s security team later [wrote it up](https://engineering.fb.com/2022/07/20/security/hermes-quicksort-to-run-doom/) by building a full exploit chain out of the out-of-bounds swaps and using it to run Doom inside the JavaScript engine. Stable, after the fix.- **Example 10** is running in QuickJS, the embedded engine. Its own introsort-style quicksort, `rqsort`, with an index tiebreak to fake stability.(And I left one out. Rhino, JavaScript on the JVM, started with quicksort in 1999, [switched to heapsort in January 2002](https://github.com/mozilla/rhino/commit/aeaf4c095c4f8cebcc43a13242102e5d78da05e9) &#92;&quot;to follow JS,&#92;&quot; and since [2007](https://bugzilla.mozilla.org/show_bug.cgi?id=399348) just hands the array to Java&#39;s `Arrays.sort`. Which is Timsort. Which is Java&#39;s port of Python&#39;s algorithm. JavaScript, sorted by Java, using Python&#39;s idea.)So the answer to which JavaScript sort is faster comes down to some combination of where it executed and when in history. The code you wrote in 1999, left untouched and executing god knows what today on some cute little esoteric corner of the web, is almost certainly fundamentally different under the hood. If it lived in the Netscape lineage, it started as quicksort in 1999, took a detour through heapsort in 2002 and has been running merge sort since Firefox 3 in 2008. If it lived in Chrome, it was insertion sort or quicksort (depending on the size of your array!) for a decade and has been Timsort since September 2018.My favorite version of this is Node 10 and Node 11: same program, same company, one release apart, different algorithm. Provided, of course, that nobody has since opened it on a phone, inside a React Native app, or on a Cloudflare Worker.June 2019 was an interesting time in sort history. ES2019 made `Array.prototype.sort` stable at the spec level. Before that the spec said outright that the sort didn&#39;t need to be. V8 got there in September 2018, closing what its own team calls one of the oldest tickets in its tracker, and Chakra was the last major holdout. For about twenty years before that, your code didn&#39;t change.Your understanding of it probably didn&#39;t change either. The thing underneath did, repeatedly.But you still &#92;&quot;understood the code&#92;&quot; along the way there... right?And it&#39;s not entirely settled even now. The spec says what order the results come out in. It says nothing about the order the comparisons happen in. Hand any of those ten modern engines a comparator with a side effect, a counter or a log line or a mutation, and you can watch them disagree with one another today.I really could not get enough of this and kept digging. Here are some other languages have had similar journeys:- **Swift** used introsort through Swift 4 and switched to a modified Timsort in Swift 5, in 2019. The sort is stable in practice. The documentation refuses to promise it. This one is particularly funny to me: the algorithm is stable, the engineers know it&#39;s stable, and the docs say don&#39;t count on it.- **C**&#39;s `qsort` in glibc is a merge sort, and has been for decades. In October 2023 its maintainers ripped the merge sort out in favor of introsort. Programs that had quietly come to depend on stability broke (the reinstatement commit calls it &#92;&quot;an instance of Hyrum&#39;s law&#92;&quot;), the introsort turned out to be no faster, and in January 2024, sixteen days before glibc 2.39 shipped, the merge sort went back in. The introsort never reached a release. Meanwhile Qualys found a memory-corruption bug in the quicksort fallback that had been there since 1992. The C standard requires no particular algorithm at all. The name is a lie.- **Rust** swapped both of its sorts in September 2024. `sort` went from a Timsort derivative to driftsort, and `sort_unstable` went from [pdqsort](https://en.wikipedia.org/wiki/Introsort#pdqsort) to ipnsort (Kudos to Rust here for putting `unstable` in the name).- **Go**&#39;s `sort.Ints` was an introsort-style quicksort until Go 1.19 in 2022, when it became pattern-defeating quicksort.- **Python** has run Timsort since 2002, but 3.11 quietly replaced its merge policy with [Powersort](https://en.wikipedia.org/wiki/Powersort).- **PHP 7**&#39;s `sort()` was accidentally stable for arrays of 16 or fewer elements and unstable for larger ones. (Sound familiar?) PHP 8.0 added an index tiebreak to make it honest.- **Java** sorts an `int[]` with [Dual-Pivot Quicksort](https://en.wikipedia.org/wiki/Quicksort#Multi-pivot_quicksort) and an `Integer[]` with Timsort. Same JDK, same method name, different algorithm. The honest answer to &#92;&quot;what does `sort` do in Java?&#92;&quot; is &#92;&quot;which `sort`?&#92;&quot;- **C#** used a plain quicksort until .NET Framework 4.5 and introsort since.- **Ruby**&#39;s `Array#sort` is whatever your C library&#39;s `qsort_r` is. On Linux that&#39;s glibc&#39;s merge sort. On macOS it&#39;s a Bentley-McIlroy quicksort with a heapsort fallback, inherited from FreeBSD. Ruby&#39;s own hand-rolled quicksort only runs where neither exists. The docs hedge with &#92;&quot;may be unstable,&#92;&quot; which on Linux it mostly isn&#39;t.Here&#39;s the whole table for the ten snippets up top:| Language, call | Algorithm under the hood | Stable? | Since || --- | --- | --- | --- || Python `sorted()` | Timsort, with Powersort merge policy | Yes | 2002; Powersort in 3.11 (2022) || Java `Arrays.sort(int[])` | Dual-Pivot Quicksort | No | Java 7 (2011) || Java `Arrays.sort(Object[])` | Timsort | Yes | Java 7 (2011) || C `qsort()` (glibc) | Merge sort, heapsort fallback if the buffer allocation fails | In practice | Reinstated Jan 2024, before 2.39 shipped || C++ `std::sort` | Introsort | No | The standard names no algorithm, only an O(n log n) bound, which libc++ didn&#39;t meet until LLVM 14 in 2022 || Go `slices.Sort` | Pattern-defeating quicksort | No | Go 1.19 (2022) || Rust `slice::sort` | driftsort | Yes | Rust 1.81 (2024) || Ruby `Array#sort` | Your libc&#39;s `qsort_r`: glibc merge sort on Linux, FreeBSD-style introsort on macOS, own quicksort elsewhere | Depends on your OS. Docs say &#92;&quot;may be unstable&#92;&quot; | Depends on your OS || Swift `sorted()` | Modified Timsort | In practice, not promised | Swift 5 (2019) || PHP `sort()` | Hybrid quicksort with an index tiebreak | Yes | PHP 8.0 (2020) || C# `Array.Sort` | Introsort | No | .NET 4.5 (2012) |## What is the point of all this?To the extent that the history of computing and programming is a history of abstractions piled on-top of abstractions, each one a deliberate trade of direct understanding for leverage, the LLM/AI transition we are living through today is just the latest chapter. One that&#39;s an order of magnitude leap in abstraction, but the same bargain nonetheless.In many circles there are conversations happening and concerns being raised about whether or not we are writing code we still understand. These are good conversations for  to have! We should be having them. But I think it&#39;s also worth revisiting and recalibrating our sense of what *understanding* even means or ever meant.If you insist that every line of code must be understood, I am going to insist your own software has always depended on layers you almost certainly never personally examined. That, on some level—and in the least accusatory way possible—you never fully understood it.And that is okay! What we are circling here is where to draw the line. There are still real differences between understanding an interface, understanding a system&#39;s behavior, being able to reason about how it fails, and merely having watched it succeed on the happy path.So let me say the uncomfortable half plainly: it is fine that we don&#39;t fully understand the code we&#39;re writing with AI today, because we *never* understood it as well as we thought we did. We have always built things we couldn&#39;t explain all the way down. There are many layers of understanding between throwing out code like incantations until you get results and being able to perform brain surgery on the rocks we have tricked into thinking.Understanding is not obsolete, but *complete* understanding was never the baseline. AI doesn&#39;t introduce the gap between what we can build and what we can comprehend. It moves the boundary. The line has almost certainly moved, and we are (collectively as an industry, as teams, as individuals) trying to figure out where the line should be. Like the history of every other decision in tech, where that line sits &#92;&quot;depends&#92;&quot; on many things.One thing I am feeling with confidence lately, though: we overestimate how well we understand the code we have already written (without AI). We always have. Nothing in the examples above involved an LLM. That was us, typing `sort()` by hand and shipping an algorithm we couldn&#39;t name for twenty years, while feeling like we understood it the whole time. We understood it at a particular level of abstraction. The layers beneath were always somebody else&#39;s problem, something we chose not to think about or simple never considered.You don&#39;t understand every instruction your compiler emits. You don&#39;t understand every operation your database performs. You don&#39;t understand every line of your runtime. You probably don&#39;t understand every line of your own code six months after you wrote it. And yet you build things, often very successfully.(To that one person reading the last paragraph and  saying &#92;&quot;I do!&#92;&quot; as each turn—congrats. Sit down and have a cookie.)To be clear, I&#39;m *not* suggesting we need to understand every implementation detail of the software we use, or that relying on abstractions is some kind of failure. Quite the opposite! Abstraction is how *any* of this works at all (gestures around at society, technology and progress generally). Nobody should have paused building a 1999 web page to audit SpiderMonkey&#39;s pivot selection.What I *am* suggesting is that we&#39;re not very good at telling the difference between understanding a system well enough to use it and understanding it as thoroughly as we think we do. We never have been. Those two kinds of &#92;&quot;understanding&#92;&quot; feel identical from the inside, which makes the edges of what we actually know very hard to see. The hubris isn&#39;t in the leaning. It&#39;s in mistaking the first kind of understanding for the second, and in drawing the boundary of &#92;&quot;understanding&#92;&quot; wherever happened to be comfortable.It&#39;s a benign hubris, mostly, though one software engineering feels particularly afflicted by. History seems to begin at whatever level of abstraction we happened to arrive at. Everything below it is settled infrastructure we feel entitled to ignore, and everything that arrives after is an affront to the natural order. (I kid, but also, as I age, I feel this.)I want to end this softly, with a call for all of us to find our own way in this new world, to find the level of abstraction we are comfortable engaging with, and to be a little more honest about where our understanding of it ends. That &#92;&quot;it depends.&#92;&quot;But I do also want to plant a strong opinion in the archives: the history of computing is a continued, rapid accumulation of these abstractions. Giants on the shoulders of giants on skyscrapers housing more giants. I think the future of making things with computers—notice I didn&#39;t just say programming?—professionally, at scale, meaningfully and at &#92;&quot;the edge&#92;&quot; of... whatever it is tech seems to think it is perpetually on the precipice of, besides a cresting wave of money... without leaning into these abstractions is going to be very, very difficult.The abstraction tides are rising, the layers are getting stranger, and the gap between what we can build and what we can fully comprehend is about to get a lot more interesting.## SourcesEverything above was checked against a primary source where I could find one. Dates are the dates the changes landed, best I could suss out, not when it was first discussed.This was kind of fun to research because reality is kooky! :)If you see any overtly embarassing mistakes, please don&#39;t hesitate to write (I appreciate it). I&#39;ll try my best to update.&lt;details&gt;&lt;summary&gt;The ten languages&lt;/summary&gt;- Python: Timsort was [written by Tim Peters in 2002 for Python 2.3](https://en.wikipedia.org/wiki/Timsort). The switch to the Powersort merge strategy is [bpo-34561](https://github.com/python/cpython/issues/78742), opened by Peters in 2018 and landed in September 2021, in time for 3.11. The current strategy is described in CPython&#39;s [listsort.txt](https://github.com/python/cpython/blob/main/Objects/listsort.txt).- Java: the [Java 7 `Arrays` javadoc](https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html) carries both implementation notes: Dual-Pivot Quicksort &#92;&quot;by Vladimir Yaroslavskiy, Jon Bentley, and Joshua Bloch&#92;&quot; for `int[]`, and for `Object[]` a stable mergesort &#92;&quot;adapted from Tim Peters&#39;s list sort for Python.&#92;&quot;- C: glibc [removed the merge sort](https://sourceware.org/git/?p=glibc.git;a=commit;h=03bf8357e8291857a435afcc3048e0b697b6cc04) on October 3, 2023 and [reinstated it](https://sourceware.org/git/?p=glibc.git;a=commit;h=709fbd3ec3595f2d1076b4fec09a739327459288) on January 15, 2024, citing Hyrum&#39;s law and no speed gain. glibc 2.39 [shipped January 31, 2024](https://sourceware.org/pipermail/libc-announce/2024/000038.html). The [Qualys advisory](https://www.qualys.com/2024/01/30/qsort.txt) of January 30, 2024 says all versions &#92;&quot;from at least September 1992 (glibc 1.04) to the current release (glibc 2.38) are affected.&#92;&quot; The Fedora mass rebuild was blocked on the regression on January 23, 2024: [Red Hat bug 2259845](https://bugzilla.redhat.com/show_bug.cgi?id=2259845), in which Ruby&#39;s test suite began corrupting the heap because `sort_by` mutates the array while glibc&#39;s `qsort_r` is still sorting it. Florian Weimer&#39;s note to the Fedora devel list calling it a blocker survives on [mail-archive.com](https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196885.html) (a mirror).- C++, which library: LLVM&#39;s [libc++ project page](https://libcxx.llvm.org/) states it &#92;&quot;has become the default C++ Standard Library implementation for many major platforms, including Apple&#39;s macOS, iOS, watchOS, and tvOS, Google Search, the Android operating system, and FreeBSD.&#92;&quot; GCC ships [libstdc++](https://gcc.gnu.org/onlinedocs/libstdc++/), the default on most Linux distributions.- C++: [LWG issue 713](https://cplusplus.github.io/LWG/issue713), &#92;&quot;sort() complexity is too lax,&#92;&quot; is the defect report that made the O(n log n) bound a worst-case requirement rather than an average one. libstdc++&#39;s implementation is `__introsort_loop` in [stl_algo.h](https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/include/bits/stl_algo.h). libc++ only met the worst-case bound with [D113413](https://reviews.llvm.org/D113413), &#92;&quot;Add introsort to avoid O(n^2) behavior,&#92;&quot; which shipped in LLVM 14.- The measurement: a million integers, `0..999999`, sorted and shuffled, comparisons counted through the comparator. Python 3.11.9 `sorted()` with `cmp_to_key`: 999,999 comparisons sorted, 18.6M random. GNU libstdc++ (GCC 16.1): 25.6M sorted, 24.4M random. LLVM libc++ (Apple clang 21, macOS): 2.0M sorted, 22.6M random. Wall clock without the counting wrapper, sorted input: Python 3.9 ms, libstdc++ 9.8 ms, libc++ 0.8 ms. The libc++ shortcut is the `__insertion_sort_incomplete` check after a &#92;&quot;perfect partition&#92;&quot; in [`__algorithm/sort.h`](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__algorithm/sort.h).- Go: [Go 1.19 release notes](https://go.dev/doc/go1.19#sort): &#92;&quot;The sorting algorithm has been rewritten to use pattern-defeating quicksort.&#92;&quot; The previous implementation is in [Go 1.18&#39;s sort.go](https://github.com/golang/go/blob/go1.18/src/sort/sort.go): quicksort &#92;&quot;loosely following Bentley and McIlroy,&#92;&quot; with a heapsort fallback at a depth limit and insertion sort below 12 elements.- Rust: [Rust 1.81.0 announcement](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0/), September 5, 2024. The algorithms are named in [PR #124032](https://github.com/rust-lang/rust/pull/124032): `slice::sort` to driftsort, `slice::sort_unstable` to ipnsort.- Ruby: [include/ruby/util.h](https://github.com/ruby/ruby/blob/master/include/ruby/util.h) defines `ruby_qsort` as `qsort_r` when the GNU version is available; [util.c](https://github.com/ruby/ruby/blob/master/util.c) wraps the BSD `qsort_r` or `qsort_s` otherwise, and only falls through to the bundled `mm.c` quicksort when none exists. [configure.ac](https://github.com/ruby/ruby/blob/master/configure.ac) does the detection. macOS&#39;s `qsort_r` is [Apple&#39;s copy of FreeBSD&#39;s qsort.c](https://github.com/apple-oss-distributions/Libc/blob/main/stdlib/FreeBSD/qsort.c), &#92;&quot;from Bentley &amp; McIlroy&#39;s &#39;Engineering a Sort Function&#39;,&#92;&quot; with a heapsort fallback at a depth limit. The [Array#sort docs](https://docs.ruby-lang.org/en/master/Array.html#method-i-sort): &#92;&quot;the order for a and b is indeterminate, and may be unstable.&#92;&quot;- Swift: [PR #19717](https://github.com/apple/swift/pull/19717), &#92;&quot;Switch to a stable sort algorithm,&#92;&quot; merged November 7, 2018 and shipped in Swift 5. The review thread is where &#92;&quot;not guaranteed stable&#92;&quot; was chosen over a promise, since committing to stability would need a Swift Evolution proposal.- PHP: [RFC: Make sorting stable](https://wiki.php.net/rfc/stable_sorting), Nikita Popov, May 2020, accepted 45 to 0 for PHP 8.0. Stability comes from using original position as a fallback criterion; small arrays (up to 16 elements) were already unaffected.- C#: [Array.Sort documentation](https://learn.microsoft.com/en-us/dotnet/api/system.array.sort): introsort, insertion sort at 16 or fewer elements, heapsort past a depth limit, &#92;&quot;performs an unstable sort.&#92;&quot; Notes to Callers: &#92;&quot;.NET Framework 4 and earlier versions used only the Quicksort algorithm.&#92;&quot;&lt;/details&gt;&lt;details&gt;&lt;summary&gt;JavaScript engines&lt;/summary&gt;- Internet Explorer&#39;s stable sort: [Mozilla bug 224128, comment 4](https://bugzilla.mozilla.org/show_bug.cgi?id=224128#c4), Mike Shaver, October 2003: &#92;&quot;More compelling even than that quote is the fact that IE&#39;s sort is stable.&#92;&quot;- SpiderMonkey quicksort to heapsort: [Mozilla bug 99120](https://bugzilla.mozilla.org/show_bug.cgi?id=99120), filed September 10, 2001. The patch landed as jsarray.c revision 3.33 on March 13, 2002, logged in comment 61 as &#92;&quot;switch from QuickSort to heap-sort.&#92;&quot; Brendan Eich&#39;s later summary is [bug 224128, comment 8](https://bugzilla.mozilla.org/show_bug.cgi?id=224128#c8): &#92;&quot;we switched to heap sort from (also unstable) QuickSort because of &#39;benchmark-itis&#39;.&#92;&quot;- SpiderMonkey heapsort to merge sort: [Mozilla bug 224128](https://bugzilla.mozilla.org/show_bug.cgi?id=224128), filed October 29, 2003; Nicholas Allen&#39;s patch posted November 2003; landed on trunk October 5, 2006 as jsarray.c revision 3.98; shipped in Firefox 3 per comment 63. Today&#39;s implementation is [js/src/ds/Sort.h](https://searchfox.org/firefox-main/source/js/src/ds/Sort.h).- JavaScriptCore: the AVL tree arrived in [WebKit r33967](https://commits.webkit.org/26483@main), May 21, 2008, Alexey Proskuryakov, fixing a people.com crash caused by `sort(function() { return 0.5 - Math.random(); })`. The sort modes the 2015 rewrite deleted are all visible in [the removed code](https://github.com/WebKit/WebKit/commit/d9d3a5d8f416551b9b238bca1cf1e445ab05ec3a): `mergesort` for string comparisons, `qsort` for numeric ones, `AVLTree&lt;AVLTreeAbstractorForArrayCompare&gt;` for custom comparators, and a &#92;&quot;Min&#92;&quot; sort in `performSlowSort` for non-array objects. The JavaScript rewrite is [WebKit r183570](https://commits.webkit.org/162412@main), April 29, 2015, Geoffrey Garen, &#92;&quot;It shouldn&#39;t take 1846 lines of code and 5 FIXMEs to sort an array.&#92;&quot; The &#92;&quot;fairly naive&#92;&quot; line is [WebKit bug 239267](https://bugs.webkit.org/show_bug.cgi?id=239267), April 12, 2022, Robin Morisset. Bun [runs on JavaScriptCore](https://bun.sh/docs).- V8: [&#92;&quot;Getting things sorted in V8&#92;&quot;](https://v8.dev/blog/array-sort), Simon Zünd, September 28, 2018: &#92;&quot;a Quicksort with an Insertion Sort fall-back for shorter arrays,&#92;&quot; Timsort &#92;&quot;available starting with V8 v7.0 and Chrome 70,&#92;&quot; written in Torque, and the stable-sort request &#92;&quot;among the oldest tickets in V8&#39;s bug tracker.&#92;&quot; The 10-element threshold is in [V8 6.9&#39;s array.js](https://chromium.googlesource.com/v8/v8/+/6.9.427/src/js/array.js#647): &#92;&quot;For short (length &lt;= 10) arrays, insertion sort is used for efficiency.&#92;&quot; Chakra&#39;s 512-element threshold is in [ChakraCore 1.11&#39;s JavascriptArray.cpp](https://github.com/chakra-core/ChakraCore/blob/v1.11.0/lib/Runtime/Library/JavascriptArray.cpp#L6640-L6647): &#92;&quot;for arrays of more than 512 elements.&#92;&quot; [Node 11.0.0](https://nodejs.org/en/blog/release/v11.0.0) shipped V8 7.0 on October 23, 2018.- Chakra: [ChakraCore PR #5724](https://github.com/chakra-core/ChakraCore/pull/5724), &#92;&quot;Implement stable MergeSort for Array.prototype.sort,&#92;&quot; merged November 1, 2018.- Hermes: [&#92;&quot;Using Hermes&#39;s Quicksort to run Doom&#92;&quot;](https://engineering.fb.com/2022/07/20/security/hermes-quicksort-to-run-doom/), Luigi Coniglio, Meta, July 20, 2022. Reported through the bug bounty in August 2020, within six days of the change, before any public release.- QuickJS: `rqsort` lives in [cutils.c](https://github.com/bellard/quickjs/blob/master/cutils.c): median-of-three pivot, three-way partition, insertion sort threshold, heapsort fallback. The stability shim is in [quickjs.c](https://github.com/bellard/quickjs/blob/master/quickjs.c), under the comment &#92;&quot;make sort stable: compare array offsets.&#92;&quot;- Rhino: [commit aeaf4c0](https://github.com/mozilla/rhino/commit/aeaf4c095c4f8cebcc43a13242102e5d78da05e9), January 31, 2002, Igor Bukanov, &#92;&quot;Use heapsort instead of qsort for Array.sort to follow JS.&#92;&quot; The switch to Java&#39;s `Arrays.sort` is [Mozilla bug 399348](https://bugzilla.mozilla.org/show_bug.cgi?id=399348), 2007.- The spec: [ECMAScript 5.1, section 15.4.4.11](https://262.ecma-international.org/5.1/#sec-15.4.4.11): &#92;&quot;The sort is not necessarily stable.&#92;&quot; The change is [tc39/ecma262 PR #1340](https://github.com/tc39/ecma262/pull/1340), &#92;&quot;Normative: Make Array.prototype.sort stable,&#92;&quot; Mathias Bynens, merged January 29, 2019, in time for ES2019. The current spec&#39;s [SortIndexedProperties](https://tc39.es/ecma262/multipage/indexed-collections.html#sec-sortindexedproperties) sorts &#92;&quot;using an implementation-defined sequence of calls to SortCompare,&#92;&quot; which is why comparator side effects still differ by engine. The default string comparison is [documented on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).&lt;/details&gt;&lt;details&gt;&lt;summary&gt;Engines and runtimes&lt;/summary&gt;- [JScript](https://en.wikipedia.org/wiki/JScript), Microsoft&#39;s engine in [Internet Explorer 4](https://en.wikipedia.org/wiki/Internet_Explorer_4) through 8.- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey), Brendan Eich&#39;s original engine, shipped in [Netscape Communicator](https://en.wikipedia.org/wiki/Netscape_Communicator) (Netscape 4) and every Firefox since, including [Firefox 3](https://en.wikipedia.org/wiki/Firefox_3).- [Rhino](https://en.wikipedia.org/wiki/Rhino_(JavaScript_engine)), Mozilla&#39;s JavaScript on the JVM, from 1999.- [JavaScriptCore](https://en.wikipedia.org/wiki/JavaScriptCore), Apple&#39;s engine in [Safari](https://en.wikipedia.org/wiki/Safari_(web_browser)) and in [Bun](https://en.wikipedia.org/wiki/Bun_(software)).- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)), Google&#39;s engine in [Chrome](https://en.wikipedia.org/wiki/Google_Chrome), [Node.js](https://en.wikipedia.org/wiki/Node.js), [Deno](https://en.wikipedia.org/wiki/Deno_(software)), [Electron](https://en.wikipedia.org/wiki/Electron_(software_framework)) and [Cloudflare Workers](https://developers.cloudflare.com/workers/). [Torque](https://v8.dev/docs/torque) is V8&#39;s internal language for writing builtins.- [Chakra](https://en.wikipedia.org/wiki/Chakra_(JavaScript_engine)), Microsoft&#39;s engine in [Internet Explorer 9](https://en.wikipedia.org/wiki/Internet_Explorer_9) through the original, pre-Chromium [Microsoft Edge](https://en.wikipedia.org/wiki/Microsoft_Edge).- [Hermes](https://hermesengine.dev/), Meta&#39;s engine for [React Native](https://en.wikipedia.org/wiki/React_Native).- [QuickJS](https://bellard.org/quickjs/), Fabrice Bellard&#39;s embeddable engine. [Duktape](https://duktape.org/), the other common embedded engine, is left off the list because I couldn&#39;t confirm which algorithm it uses.- [ECMAScript version history](https://en.wikipedia.org/wiki/ECMAScript_version_history), for ES3 (1999), ES5.1 (2011) and ES2019.&lt;/details&gt;",
      "date_published": "2026-10-28T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/09/processing-community-day-nyc-2026-midi-workshop-preview/",
      "url": "https://george.mand.is/2026/09/processing-community-day-nyc-2026-midi-workshop-preview.md",
      "title": "Processing Community Day NYC 2026 • MIDI Workshop Preview",
      "content_html": "I&#39;ll be leading a workshop at [Processing Community Day 2026](https://www.pcd2026.nyc/) here in New York! [Tickets are free](https://www.eventbrite.com/e/processing-community-day-2026-nyc-tickets-1995608029336) and the event will be happening on October 3rd at [NYU ITP](https://tisch.nyu.edu/itp) in downtown Brooklyn. The workshop adapts some previous workshops, ideas and experiments I&#39;ve accrued over the years giving my talks largely on creating interactive experiences with JavaScript and WebMIDI. Adapting and elaborating on them for Processing was an exciting opportunity. It was also a lot of fun to spend a couple evenings playing with more ideas that have been percolating in my head for a few years now.If you&#39;re in the New York area, I highly encourage you to attend! It will be a fun event and there will be lots of great speakers and exhibitors at PCD as well.To whet your appetite, I recorded a few videos showcasing some of the ideas I plan of bringing to the workshop to talk about and inspire with.## MIDI ChessLong ago, I adapted Go for the Novationa Launchapd. At 8x8 it was just a cute demo and always felt a little too small to play real Go, but it&#39;s the *perfect* size for chess!Lo and behold, a game of chess played with on a MIDI controller. The overlay in the video is on a web page and the board is drawn with Processing. You can even click and drag to move the pieces on the screen if you prefer and see them reflected on the device!  &lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/GffBEyGPJsY?si=4r1EiE5OGb1kSwe-&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;The color-coded pieces were the funniest part to me. You can customize them to your hearts content in the web interface, though I settled on a default of each side getting a primary color plus its compliment and each differently valued piece on the board is a slightly different shade or tint of one of those two colors. It&#39;s still very hard to discern what piece you&#39;re actually selecting when it&#39;s your turn, but the green preview that shows &#92;&quot;legal&#92;&quot; moves for that pieces helps tremendously. ## MIDI Fighter Interactive VisualsThe MIDI Fighter is a delightfully straight-forward controller that has all the right ingredients to make for fun interface for this workshop.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/SDlynVony4o?si=oMQvp2WnWC7lBX6R&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;A short-but-sweet collection of interactive visuals controlled by a MIDI Fighter controller. I&#39;ve procured a small handful of these for the demo, with the intent to lend them out to folks on the day of the event. Each bank select a different visualization type and buttons interact with it accordingly.## MIDI Painting with PipSqueakI partnered with a local MIDI maker at [useMIDI](https://usemidi) to procure some of these [PipSqueak](https://usemidi.com/product/pipsqueak-black) devices for the workshop as well. It&#39;s a very expressive controller with 360 degrees of motion and a push button.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/ParuxoWwlGo?si=wUzQ57sCX8nWjw8-&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;Here&#39;s a fun demo simply using them to &#92;&quot;paint&#92;&quot; on the screen in a visually interesting way, where the brush always snaps back to the center.Pressing the button splits the drawing pane in half (i.e. doubling every click, up to a point until it resets) with each brush in the center of that pane, but *mirroring* the directionality of of the pane it&#39;s copied from.I feel like I explained that poorly, but the effect is a sort of interactive kaleidoscope painting thingamajig. ## MIDI FireworksI touched on this idea in the previous MIDI Fighter demo, but it was so cute and fun and I thought it would be fun to make a slightly more elaborate version that just focused on fireworks.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/fxTsf9bTHZs?si=L9HEzlmrIFTW2ikb&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;Each bank choose different firework styles and the remaining 3x4 button grid below maps to spots on the screen the fireworks will target.Cute, fun, lots of opportunities to expand.## MIDI MarqueeLet&#39;s make `&lt;maruqee&gt;` elements like it&#39;s 1999.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/5UeDpypKiG8?si=IT58vVMzeWFrDcfJ&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;Pretty simple, but still fun demo built on the Novation Launchpad. The device actually facilitates this really easily out of the box with SysEx message, but only in one color. This demo lets you choose different colors and direction and even has a goofy &#92;&quot;export as HTML&#92;&quot; feature if you want a matching `&lt;marquee&gt;` to embed somewhere.## The Game of Life (MIDI Ediiton)Sometimes life is exciting. Sometimes is boring. And now, sometimes, it is controlled via MIDI.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/PjAxz26k0Bs?si=QZpc0pK5gqQ-vnxP&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;An interactive version of Conway&#39;s Game of Life where you can seed the grid in real time. Kind of fun if you skip toward the end where I press different buttons simultaneously to &#92;&quot;lock-in&#92;&quot; particular shapes.## The Great MIDI Treasure HuntI have saved the most elaborate and perhaps high-concept for last.&lt;iframe width=&#92;&quot;560&#92;&quot; height=&#92;&quot;315&#92;&quot; src=&#92;&quot;https://www.youtube.com/embed/oF8ueJmrer0?si=iB3CYMBwwF9YZqeG&#92;&quot; title=&#92;&quot;YouTube video player&#92;&quot; frameborder=&#92;&quot;0&#92;&quot; allow=&#92;&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#92;&quot; referrerpolicy=&#92;&quot;strict-origin-when-cross-origin&#92;&quot; allowfullscreen&gt;&lt;/iframe&gt;Inspired by Zelda, our noble adventure traverses a maze of rooms each displayed on an 8x8 grid—both in the web interface and visually on the board.Our adventurer cannot solve the puzzles alone however! They will need the assistance of a benevolent, unseen force to help them move forward. The adventurer is controlled via keyboard and intended to be played looking a the screen. The part of the &#92;&quot;unseen force&#92;&quot;  is played on the physical device where the game state is relayed (sometimes with extra hints and information not visible to the adventurer).The unseen force gets to do things like knock down loose walls, providing planks to traverse water, light torches in dark rooms and press or hold switches in sequence to help the adventurer progress.***If you made it this far and live in New York, [go grab a ticket](https://www.eventbrite.com/e/processing-community-day-2026-nyc-tickets-1995608029336) and come join us at [Processing Community Day 2026](https://www.pcd2026.nyc/) on October 3rd!Also for those chasing the source code for any of these—it&#39;s in progress! I&#39;m polishing things up for the workshop and plan to release it in time for that.",
      "date_published": "2026-09-19T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/09/ai-enablement-theatertm/",
      "url": "https://george.mand.is/2026/09/ai-enablement-theatertm.md",
      "title": "AI Enablement Theater™",
      "content_html": "In a recent sidebar with a former coworker, I learned about the hoops they were jumping through as part of their company&#39;s AI enablement initiatives. Like a lot of other companies, their AI ambitions seem to have landed as more of a mandate than actual enablement—minimum token usage and PR output requirements coupled with budget management falling on the individual contributor. The part that really stuck out to me was how they were trying to figure out the cheapest/smallest model they could rely on to complete the work adequately (while staying under their monthly AI token budget) or if they could rely on the harness to auto-switch as needed.This is not AI enablement, it&#39;s AI Enablement Theater™.The promise of AI—which I &#39;m a pretty genuine believer in at this point—is not going to be realized if your engineers are worried about using it *too* much, or being incentivized to game a leaderboard.Rolling out AI with these constraints also encourages relatively surface-level AI interactions and thinking. We&#39;re building bad AI habits by not giving people the freedom to push, explore and see what really can be done with these tools. Don&#39;t hand them a Swiss Army Knife and tell them they can only use the toothpick.Most teams need to actually *feel* the capability of these things before cost optimization means anything. If your team&#39;s first and only exposure is a small model being rationed, the takeaway they&#39;ll walk away with is &#92;&quot;this stuff isn&#39;t very good&#92;&quot; and the enablement effort defeats itself.If you are responsible for getting your team or organization to adopt AI as a tool, please do not put your folks in this position. Give your team the tools or don&#39;t.",
      "date_published": "2026-09-03T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/05/tezcatl-a-2mb-alternative-to-puppeteer-for-scraping-on-macos/",
      "url": "https://george.mand.is/2026/05/tezcatl-a-2mb-alternative-to-puppeteer-for-scraping-on-macos.md",
      "title": "tezcatl: a 2MB alternative to Puppeteer for scraping on macOS",
      "content_html": "I&#39;ve been working on a small project that uses[whereami](https://less.software/whereami) and[nearme](https://less.software/nearme) to do some local scraping andexperimentation with LLMs to build enriched datasets. The details of thatproject are for a future post, but the short version is I needed to fetch webpages, extract some data and move on.&gt; [!tip] A quick cut to the chase:&gt;&gt; If you&#39;re on a Mac and find yourself needing to do light scraping work on&gt; websites as they are rendered—not as they are sent over the wire—please&gt; consider trying `tezcatl`:&gt;&gt; - [https://github.com/georgemandis/tezcatl](https://github.com/georgemandis/tezcatl)&gt;&gt; Some selling points:&gt;&gt; - A little like Puppeteer but only ~2MB instead of nearly 300MB.&gt; - Built around WebKit, which is already on your Mac, and only cares about&gt;   returning an accurate snapshot of the DOM.&gt; - About as lightweight as a tool like this can be; has no dependencies or&gt;   build steps you&#39;ll ever have to think about.&gt; - Can become a tool in your scraping + parsing toolkit right alongside `jq`,&gt;   `curl` and other CLI affordances you reach for daily.&gt;&gt; For those that want more context and story, read on!## The problem`curl` handles about 70% of what I need. Most pages serve a usable version oftheir content in the initial HTML response and you can pipe `curl` into whateveryou want—namely Simon Willison&#39;s [llm](https://github.com/simonw/llm) tool inthis case, which I adore.But some sites render everything client-side with JavaScript and come back assoulless husks. A `&lt;div id=&#92;&quot;root&#92;&quot;&gt;&lt;/div&gt;` and a pile of `&lt;script&gt;` tags—anillegible affront to a medium inherently centered around reading and the writtenword. Oh, the horror. The horror.The standard answer to this reality is [Puppeteer](https://pptr.dev) or[Playwright](https://playwright.dev/). Spin up a headless Chromium, wait for thepage to render, grab the DOM. It works, but it&#39;s a lot of overhead for what Iactually needed, which was just to load a URL, wait until the page loaded andgrab the HTML.I didn&#39;t need cross-platform, cross-browser QA automations, screenshots or HARdumps. I just needed the rendered DOM so I could strip the tags and ask anLLM to do some things with the actual words.Every Mac ships with WebKit. It&#39;s the same engine Safari uses. Apple exposes itthrough `WKWebView`, which is how native apps embed web content. You can use itfrom a CLI tool.So I made [tezcatl](https://github.com/georgemandis/tezcatl). It&#39;s not forautomating browsers or running tests. It&#39;s just for scraping web pages thatdon&#39;t render without JavaScript.```bash$ tezcatl https://example.com&lt;html lang=&#92;&quot;en&#92;&quot;&gt;&lt;head&gt;&lt;title&gt;Example Domain&lt;/title&gt;...$ tezcatl https://spa-site.com --wait=2000# waits 2s after load for JS to render```It creates an offscreen `WKWebView`, loads the URL, waits for the navigationdelegate to fire, optionally pauses for additional JS settling time, thenevaluates JavaScript against the page (if specified) and writes the result tostdout. By default it returns the full rendered DOM. With `--eval` you can runarbitrary JS instead:```bash$ tezcatl https://example.com --eval=&#92;&quot;document.title&#92;&quot;Example Domain$ tezcatl https://example.com --eval=&#92;&quot;document.querySelectorAll(&#39;a&#39;).length&#92;&quot;1```## A real exampleApple&#39;s own[developer documentation](https://developer.apple.com/documentation/) (at thetime of this writing) renders in the client and seems to be a Vue app. `curl`gives you this:```This page requires JavaScript.```With `tezcatl` you can render the page and pull structured data out of it:```bash$ tezcatl https://developer.apple.com/documentation/ --wait=3000 &#92;&#92;    --eval=&#92;&quot;JSON.stringify([...document.querySelectorAll(&#39;a.card&#39;)].slice(0,5).map(c =&gt; ({      title: c.querySelector(&#39;.title&#39;)?.textContent?.trim(),      description: c.querySelector(&#39;.card-content .content&#39;)?.textContent?.trim(),      url: c.href    })), null, 2)&#92;&quot;```You&#39;ll get something like this:```json[    {        &#92;&quot;title&#92;&quot;: &#92;&quot;Explore the new design principles&#92;&quot;,        &#92;&quot;description&#92;&quot;: &#92;&quot;Learn how to design and develop beautiful interfaces that leverage Liquid Glass.&#92;&quot;,        &#92;&quot;url&#92;&quot;: &#92;&quot;https://developer.apple.com/documentation/TechnologyOverviews/liquid-glass&#92;&quot;    },    {        &#92;&quot;title&#92;&quot;: &#92;&quot;Adopting Liquid Glass&#92;&quot;,        &#92;&quot;description&#92;&quot;: &#92;&quot;Find out how to bring the new material to your app.&#92;&quot;,        &#92;&quot;url&#92;&quot;: &#92;&quot;https://developer.apple.com/documentation/TechnologyOverviews/adopting-liquid-glass&#92;&quot;    }]```It pipes with other tools, which was another reason I rolled my own solution. Iwanted something that fit into the CLI workflows I was already buildingwith [whereami](https://less.software/whereami),[nearme](https://less.software/nearme), [lingua](https://less.software/lingua)and [loupe](https://less.software/loupe).```bash# Get the rendered DOM and extract text with linguatezcatl https://example.com | lingua detect# Scrape a title for use in a scriptTITLE=$(tezcatl https://example.com --eval=&#92;&quot;document.title&#92;&quot;)# Find the nearest pizza place, grab its website, render itwhereami --json | nearme &#92;&quot;pizza&#92;&quot; --json | jq -r &#39;.[0].url&#39; | xargs tezcatl```## How it&#39;s builtLike the rest of[my Zig tools](https://github.com/georgemandis?tab=repositories&amp;q=&amp;type=&amp;language=zig&amp;sort=),`tezcatl` talks to the Objective-C runtime directly. No Swift or Objective-Csource files. Zig calls `objc_msgSend` and friends to create a `WKWebView`,register a navigation delegate class at runtime with `objc_allocateClassPair`,and wire up the completion handler using the ObjC block ABI.WebKit&#39;s `evaluateJavaScript:completionHandler:` expects the completion handlerto be an Objective-C block—not a function pointer. Blocks have a[documented C ABI](https://clang.llvm.org/docs/Block-ABI-Apple.html), so you canbuild a struct that pretends to be one and WebKit will call your function. InZig:```zigconst JSBlockLiteral = extern struct {    isa: *anyopaque,    flags: c_int,    reserved: c_int,    invoke: *const fn (*JSBlockLiteral, ?objc.id, ?objc.id) callconv(.c) void,    descriptor: *const BlockDescriptor,};````isa` tells the ObjC runtime &#92;&quot;I am a block&#92;&quot; (you point it at`_NSConcreteStackBlock`). `flags` and `reserved` are bookkeeping the runtimeexpects; you set them to 0. `invoke` is the actual function pointer — whenWebKit finishes evaluating JS, it calls this with the result and error.`descriptor` points to a tiny struct that just says how big the block is. Thelayout has to match what the ObjC compiler would emit for a`^void(id result, id error)` block, but as long as the fields are in the rightorder with the right sizes, the runtime doesn&#39;t care what language built it.Zig is honestly kind of a weird choice for a tool that&#39;s designed to be sodeeply macOS native. The reason it&#39;s written this way is that I&#39;ve been buildinga bunch of cross-platform CLI tools in Zig and I have an `objc.zig` module thatI copy between projects — it handles `objc_msgSend`, class creation, blockconstruction, all the runtime bridging. For tools like[whereami](https://less.software/whereami) and[loupe](https://less.software/loupe) that also build as C-compatible sharedlibraries, having the bridge in pure Zig means the library is self-containedwith no ObjC compilation step. For `tezcatl` that doesn&#39;t matter much, but I&#39;min the habit and the pattern works.WebKit is a GUI framework underneath and assumes it&#39;s running inside anapplication with an event loop. In a normal macOS app, `NSApplicationMain` spinsthat up and everything works. In a CLI there&#39;s no app, no window, no event loop.WebKit will accept your `loadRequest:` call and then do nothing, because nobodyis pumping the events that drive the network and rendering work.The fix is straightforward: pump it yourself. After telling the `WKWebView` toload a URL, I call `CFRunLoopRunInMode(kCFRunLoopDefaultMode, timeout, false)`,which hands control to the system run loop until either my navigation delegatecallback fires (and calls `CFRunLoopStop`) or the timeout expires. Same thingafter `evaluateJavaScript:completionHandler:`; pump the loop, wait for the blockcallback. The Dock icon is suppressed with`NSApplicationActivationPolicyAccessory` so the whole thing stays invisible.## When it&#39;s the wrong toolIf you need to crawl thousands of pages or run on Linux, use Puppeteer orPlaywright. They exist for good reason. _This is not a replacement!_`tezcatl` is for when you&#39;re on a Mac, you need a handful of pages to rendertheir JS and you want to stay in the terminal. The kind of thing where spinningup a headless Chromium feels like driving a semi truck to the corner store.## On namingI wanted a name that suggested &#92;&quot;seeing the true form of something,&#92;&quot; since that&#39;swhat the tool does; strips away the loading spinners and empty `&lt;div&gt;`s and showsyou the page left standing after all the little JavaScript cycles have finished.It also wouldn&#39;t hurt if it was a little bit metal.`tezcatl` is the [Nahuatl](https://en.wikipedia.org/wiki/Nahuatl) word formirror—specifically an obsidian mirror. It&#39;s hard to look it up without runninginto [Tezcatlipoca](https://en.wikipedia.org/wiki/Tezcatlipoca), the Aztec deityassociated with an obsidian mirror that could see through illusions. The Gettyhas a[great writeup](https://www.getty.edu/research/exhibitions_events/exhibitions/obsidian_mirror/through_the_mirror.html)on the mirror and its history, and, man,[if ever there were to be an icon](https://en.wikipedia.org/wiki/Tezcatlipoca#/media/File:TurquoiseAztecMask2.jpg)for a CLI tool... Apologies for mild appropriation, but the word is great andchecked all the boxes for me.It&#39;s on [GitHub](https://github.com/georgemandis/tezcatl) and in my Homebrewtap:```bashbrew install georgemandis/tap/tezcatl```",
      "date_published": "2026-05-29T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/05/tracking-homebrew-downloads-with-githubs-api/",
      "url": "https://george.mand.is/2026/05/tracking-homebrew-downloads-with-githubs-api.md",
      "title": "Tracking Homebrew downloads with GitHub&#39;s API",
      "content_html": "If you distribute software through [Homebrew](https://brew.sh/) or[Scoop](https://scoop.sh/), you&#39;ve probably wondered if anyone is actuallyinstaslling your tools. Neither package manager gives you install analytics outof the box. But if your release pipeline flows through GitHub and producesplatform-specific artifacts—tarballs, zips, binaries per operating-system andarchitecture combo—their API quietly tracks download counts on each releaseasset. This turns out to be a decent-ish heuristic depending on how you&#39;ve setupyour taps and buckets.![Screenshot of the release page for Less Software which uses this technique](https://georgemandis.s3-us-west-1.amazonaws.com/media/less-software-release-page-preview.png)When you set up a Homebrew tap or Scoop bucket, the formula/manifest typicallypoints to a specific release asset. These could be hosted anywhere, technically.If you&#39;re hosting them yoursef on an S3 or R2 bucket for example you canprobably build better tools for tracking installs from package manangers—maybeeven get [[who-reads-my-rss-feed|interesting user-agent data]] to tell you more about how people are consuming them. On GitHub they track requests to your release assets for you! They don&#39;t publishthem anywhere on the dedicated Releases page for your repo, but when someoneruns `brew install georgemandis/tap/copycat` (for example), Homebrew downloadsthe tarball from the GitHub release for that project and GitHub increments thedownload count on that asset. This also happens if you click on an asset on theReleases page for your repo and download it from the browser.The GitHub API exposes this per-asset:```GET /repos/{owner}/{repo}/releases```Give it a look here for my CLI clipboard introspection tool[copycat](https://github.com/georgemandis/copycat):- [https://api.github.com/repos/georgemandis/copycat/releases](https://api.github.com/repos/georgemandis/copycat/releases)Each release object includes an `assets` array, and each asset has a`download_count` field. Sum those up across releases and you have a rough total.![A screenshow showing the raw output of the API URL which you can pull up in the browser. 6 downloads. Voila](https://georgemandis.s3-us-west-1.amazonaws.com/media/github-releases-download-count.png)We can&#39;t distinguish between someone installing via Homebrew, downloadingdirectly from the releases page, or `curl`-ing the URL from a script, but if themajority of your distribution is through package managers—and your releases haveper-platform artifacts that only make sense to download through a tap orbucket—it&#39;s probably close enough to be useful.I&#39;m using this right now over at [less.software](https://less.software), where Imaintain brief pages for the tools I&#39;ve been building. I wanted a[releases page](https://less.software/releases) that automatically pullsdownload stats, clone traffic, and version history for every project in myHomebrew tap and Scoop bucket.The setup is a bash script called `releases.sh` that runs during the site&#39;sGitHub Actions build. It lists the contents of my[`homebrew-tap`](https://github.com/georgemandis/homebrew-tap) and[`scoop-bucket`](https://github.com/georgemandis/scoop-bucket) repos via theAPI, takes the union of formula/manifest names, fetches release data for eachproject (versions, dates, per-asset download counts), pulls clone traffic fromthe [traffic API](https://docs.github.com/en/rest/metrics/traffic) (14-dayrolling window, merged into a persistent `clone-history.json` so all-timenumbers accumulate), and generates a Markdown page with the results.The workflow is simple:```yaml- name: Fetch release data  run: bash releases.sh  env:    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: Build site  run: bash less.sh```The discovery step is convenient. When I add a new project to the tap or bucketit appears on the releases page automatically. If I&#39;m on top of providing a nicedescription for my projects it even looks kind-of nice!Here&#39;s what the project discovery looks like in the script:```bash# Discover projects from homebrew-taphomebrew_projects=$(cached_fetch &#92;&#92;  &#92;&quot;$API_BASE/repos/$GITHUB_OWNER/homebrew-tap/contents/Formula&#92;&quot; &#92;&#92;  | jq -r &#39;.[].name | select(endswith(&#92;&quot;.rb&#92;&quot;)) | rtrimstr(&#92;&quot;.rb&#92;&quot;)&#39;)# Discover projects from scoop-bucketscoop_projects=$(cached_fetch &#92;&#92;  &#92;&quot;$API_BASE/repos/$GITHUB_OWNER/scoop-bucket/contents/&#92;&quot; &#92;&#92;  | jq -r &#39;.[].name | select(endswith(&#92;&quot;.json&#92;&quot;)) | rtrimstr(&#92;&quot;.json&#92;&quot;)&#39;)# Union and deduplicateprojects=$(printf &#39;%s&#92;&#92;n%s&#39; &#92;&quot;$homebrew_projects&#92;&quot; &#92;&quot;$scoop_projects&#92;&quot; | sort -u)```And the per-release download counting:```bashwhile IFS=$&#39;&#92;&#92;t&#39; read -r tag_name published_at downloads; do  total_downloads=$((total_downloads + downloads))done &lt; &lt;(echo &#92;&quot;$releases_json&#92;&quot; | jq -r &#39;  .[] | [    .tag_name,    .published_at,    ([.assets[].download_count] | add // 0)  ] | @tsv&#39;)```The result is a page like this, rebuilt daily:| Project   | Versions | Downloads | Clones  || --------- | -------- | --------- | ------- || copycat   | 5        | 61        | 147     || loupe     | 5        | 35        | 81      || whereami  | 6        | 103       | 40      || **Total** | ...      | **232**   | **442** |You can see the live version at[less.software/releases](https://less.software/releases).I extracted the core of this into a standalone script called[package-release-tracker.sh](https://github.com/georgemandis/package-release-tracker.sh).It takes a GitHub username, auto-discovers all `homebrew-*` and `scoop-*` reposfor that user or org, and spits out a self-contained HTML page. No dependenciesbeyond `bash`, `curl`, and `jq`. Some fun ones to try it against:- [aws](https://github.com/aws) — SAM CLI, copilot, eksctl, and ~20 other tools  in a centralized tap- [charmbracelet](https://github.com/charmbracelet) — gum (3.1M downloads),  glow, vhs, soft-serve, and more- [goreleaser](https://github.com/goreleaser) — the tool many people use to  build these release pipelines in the first place- [derailed](https://github.com/derailed) — k9s and popeye, distributed through  separate per-project tapsOne important caveat: this only works for projects distributed through your owntaps and buckets. Popular projects that graduate to[homebrew-core](https://github.com/Homebrew/homebrew-core) or Scoop&#39;s[main bucket](https://github.com/ScoopInstaller/Main) get installed from thosecentral repos instead — their downloads no longer hit your GitHub releaseassets. If you look at a tap and find nothing but a `tap_migrations.json`,that&#39;s a sign the project has moved on. Something like `gcloud-cli`, forexample, lives in `homebrew/cask` and downloads from Google&#39;s own CDN —completely invisible to this approach.The download count is cumulative and never resets. There&#39;s no time-series datafor release assets. You know how many but not when. The clone traffic API givesyou daily granularity, but only a 14-day rolling window, which is why I&#39;mpersisting and merging the data across builds on less.software.Like I mentioned earlier, there&#39;s no way to attribute downloads to a source. A`brew install` and a browser click on the `.tar.gz` link look identical. This isprobably fine for 99% of projects. If you really care about a more accuratemeasurement you could explore hosting the assets yourself.Separate trick while I&#39;m on the subject of GitHub Actions: my[GitHub profile](https://github.com/georgemandis) has a README thatautomatically updates daily with my latest blog posts and recent projects.I &lt;s&gt;stole&lt;/s&gt; borrowed the idea from[Frank Chiarulli Jr.](https://github.com/fcjr), whose profile does the samething with a Go script. Mine uses a short TypeScript file that runs with[Bun](https://bun.sh/):```yamlname: Update READMEon:  schedule:    - cron: &#92;&quot;0 0 * * *&#92;&quot;  push:    branches: [main]  workflow_dispatch:jobs:  update-readme:    runs-on: ubuntu-latest    if: github.ref == &#39;refs/heads/main&#39;    steps:      - uses: actions/checkout@v4      - uses: oven-sh/setup-bun@v2      - run: bun run generate.ts      - name: Commit and push        run: |          git diff --quiet README.md &amp;&amp; exit 0          git config user.name &#92;&quot;github-actions[bot]&#92;&quot;          git config user.email &#92;&quot;github-actions[bot]@users.noreply.github.com&#92;&quot;          git add README.md          git commit -m &#92;&quot;Update README with latest blog posts and projects&#92;&quot;          git push```The `generate.ts` script does two things:1. Fetches my blog&#39;s [JSON feed](https://george.mand.is/feed.json) and extracts   the five most recent posts2. Hits the GitHub API for my most recently pushed repos, filters out forks and   infrastructure repos (taps, buckets, the profile repo itself), and takes the   top tenThen it writes a Markdown file with tables for each section. The workflow shouldcommit and push only if the README actually changed.You need an RSS or JSON feed for the blog post part. If your blog alreadypublishes one, you&#39;re most of the way there. The profile README repo is just arepo named after your GitHub username, and GitHub renders its `README.md` onyour profile page.You can see the [workflow](https://github.com/georgemandis/georgemandis/blob/main/.github/workflows/update-readme.yml) and [generator script](https://github.com/georgemandis/georgemandis/blob/main/generate.ts) directly.The download tracking gives me a rough sense of whether anyone is using mytools. The README keeps my GitHub profile current without me thinking about it.Both run on free GitHub Actions minutes, which I&#39;m keeping an eye on and mayreduce to weekly if I start breaking out of the free threshold.",
      "date_published": "2026-05-26T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/05/who-reads-my-rss-feed/",
      "url": "https://george.mand.is/2026/05/who-reads-my-rss-feed.md",
      "title": "Who Reads My RSS Feed?",
      "content_html": "![](https://georgemandis.s3-us-west-1.amazonaws.com/rss-feeds/visidata-rss-feed-analysis-1.png)I recently[moved my site from Netlify to Cloudflare Pages](/2026/05/migrating-from-netlify-to-cloudflare-pages/),partly to consolidate the services I&#39;m using and partly to finally have properserver logs. [Plausible](https://plausible.io/sites) is great for getting thegist of who&#39;s visiting and where they&#39;re coming from, but sometimes I&#39;m curiousabout things like:- Who is actually using my RSS feeds?- What weird bots are sniffing around?- Which home-rolled projects are people running against my site?I have an [RSS feed](/feed.xml), a [JSON feed](/feed.json), and an experimental[plain-text feed](/feed.plain.xml). I wanted to see who or what was actuallypinging them.I&#39;ve been able to collect these logs for about a week now—a week that happenedto include one of my posts [[2025-06-24-a-stupid-trick-for-summarizing-long-audio|hitting the front page of Hacker News]]. This was great timing! Hacker News is good for bursts of interesting traffic toexplore.Across all feeds and the broader site logs I found over 700 unique user agentstrings representing tens of thousands of requests. Some were familiar names tome, many were not. A few were genuinely bizarre. Here&#39;s a tour of the ones thatcaught my attention from the feed logs, plus a few highlights from the widersite traffic.**Note**: this turned out to be a **long** write-up with a ton of links. There&#39;sa CSV at the bottom if all you want is to joylelssly ingest a list ofuser-agents with references. To each their own!## Readers![](https://georgemandis.s3-us-west-1.amazonaws.com/rss-feeds/visidata-rss-feed-analysis-2.png)The core of the traffic is what you&#39;d hope to see: people reading RSS withdedicated feed readers. But the _variety_ is striking. There is a lot ofhomogeneity in the web browsing world, but the diversity in the feed readerspace seems surprisingly strong. I have a hunch this is because the reader spaceis already quite niche, but it&#39;s also pretty easy to roll your own readercompared to your own browser.I counted over 20 distinct reader products, and a significant self-hostedcontingent.**Big hosted services** I&#39;ve heard of were all present:[Feedly](https://feedly.com), [Feedbin](https://feedbin.com),[Inoreader](https://www.inoreader.com), and [Feeder](https://feeder.co). Severalof them helpfully report subscriber counts right in their user agent strings.Feedbin told me I have 16 subscribers! Feedly reported 14 on my RSS feed and 3on my JSON feed. Inoreader said 5. That&#39;s a nice touch I didn&#39;t know about orexpect. A small bit of transparency in an exchange that otherwise givespublishers almost no feedback.**The self-hosted readers** were the really fun ones.[Miniflux](https://miniflux.app) appeared in _nine_ different version strings,which I think means at least nine separate installations are polling my feed.That&#39;s nine people running their own Go-based feed reader on their own servers.[FreshRSS](https://freshrss.org) showed up with four versions.[CommaFeed](https://github.com/Athou/commafeed), the Java-based Google Readerreplacement, was there. So was [Bubo Reader](https://buboreader.com), an&#92;&quot;irrationally minimal&#92;&quot; reader that generates a static HTML page from your feedlist—no account, no descriptions, no server-side state—just a webpage full oflinks. Full disclosure: Bubo Reader is[my project](https://github.com/georgemandis/bubo-rss). It&#39;s open-source and myblog is in the default feed list, so I suspect some of these hits are people whoforked the repo, deployed their own instance, and never removed my blog from thedefaults. I thank you all for your patronage 🫡.**Native apps** are still out there too. [NetNewsWire](https://netnewswire.com),the long-running open-source Mac/iOS reader originally by Brent Simmons, had astrong showing. [Unread](https://www.goldenhillsoftware.com/unread/) was a newone to me and completely dominated my JSON feed, accounting for over 40% of allJSON feed traffic (the JSON feed generally is much lower traffic than mytraditional RSS feed). It barely appeared in the RSS logs at all.[feeeed](https://feeeed.nateparrott.com), an iOS app by Nate Parrott that mixesRSS with Reddit, YouTube, weather, and step counts into a single scroll, showedup too. And [AntennaPod](https://antennapod.org), an open-source Android podcastapp, was polling my blog feed. Someone has apparently subscribed to my blog asif it were a podcast? Please leave 5 stars.On Android, [ReadYou](https://github.com/Ashinch/ReadYou) (an open-sourceMaterial Design reader) appeared in the wider site logs alongside the charminglynamed[SpaceCowboys Android RSS Reader](https://play.google.com/store/apps/details?id=com.spacecowboys.feeder).[BazQux](https://bazqux.com) checked in with exactly 1 subscriber.[GoodLinks](https://goodlinks.app), a reading-list app for Apple platforms,showed up too. And [ReaderDesktop](https://readerdotone.app), a native macOSreader, made a single appearance.**The terminal readers** represent a particular type of person—people after myown heart (I&#39;m actually considering taking Bubo this direction).[Newsboat](https://newsboat.org) was there, a terminal-based reader popular withthe CLI crowd, but the one that really got me was[Elfeed](https://github.com/skeeto/elfeed)—`Emacs Elfeed 3.4.2`. Someone isreading my blog inside Emacs. Christopher Wellons&#39; tag-based feed reader withOrg-mode integration.And then there&#39;s [Syndicator](https://app.syndicator.one), a personalizedreading app that learns from your behavior and aggregates blogs, news, YouTube,and Substacks. It accounted for 37% of my JSON feed traffic. Between Unread andSyndicator, two apps I&#39;d never heard of make up nearly 80% of all JSON feedrequests.## The FediverseMultiple Fediverse platforms showed up in the logs. At least five differentMisskey instances and six different Friendica instances were fetching mycontent—I won&#39;t link to any of them individually, but the pattern is clear: whensomeone shares a link on a Fediverse instance, the server fetches it for linkpreview generation. Tools like [rsskey](https://github.com/pjeby/rsskey) canalso mirror an RSS feed directly into the Fediverse as posts, which mightexplain some of the traffic.[Micro.blog](https://micro.blog), Manton Reece&#39;s indie microblogging platform,was crawling too. As was [Flipboard](https://about.flipboard.com), fetchingcontent for its magazine-style card previews.## Indie search enginesThis category might&#39;ve been the most interesting to me.[Marginalia Search](https://www.marginalia.nu/) (`search.marginalia.nu`) is aone-person search engine built by Viktor Lofgren that deliberately indexes thesmall, personal, non-commercial web. It deprioritizes SEO-optimized content andelevates human-scale sites. The whole thing is[open source](https://github.com/MarginaliaSearch/MarginaliaSearch) and designedto run on affordable hardware. Being crawled by Marginalia feels like acompliment.[Kagi](https://kagi.com) (`kagibot`) was there too! It&#39;s a paid, ad-free,privacy-focused search engine that I&#39;ve[written about before](/2024/12/kagi-orion-and-gopher/). Kagi has a cleverpolicy: if your `robots.txt` doesn&#39;t mention `kagibot` specifically but doeshave rules for `Googlebot`, it[follows the Googlebot rules as a fallback](https://kagi.com/bot). Unclear iftheir [Orion browser](https://orionbrowser.com) was part of the traffic since ittries to obfuscate by design.[rssanyway](https://rssanyway.com/) (v0.1—very early) is a new service by RyanX. Charles that generates RSS feeds for sites that don&#39;t have them and rankstrending content across all feeds in its index. It&#39;s bootstrapped from HackerNews and any URL that reaches some threshold of popularity gets added.And [GeistHaus](https://geist.haus) is building an RSS meta-layer that ranksarticles by how many feeds link to them—a kind of Techmeme built entirely on RSSdata, with echoes of [PageRank](https://en.wikipedia.org/wiki/PageRank) to myears.In the wider site logs, [Smallwebindexbot](https://smallwebindex.com/bot.html)appeared—yet another indie search engine specifically for the small web.[rawweb-bot](https://github.com/0x2E/RawWeb.org) is a search engine forindependent personal websites and blogs, built by someone who misses &#92;&quot;the goldenage of the internet when people thought, wrote, and shared on their personalwebsites and blogs.&#92;&quot; And[YandoriRSSBot](https://social.emucafe.org/naferrell/what-is-the-yandorirssbot-02-25-26/),built by a developer called antiochIst, monitors around 200,000 RSS feeds innear real-time and clusters related articles to track how stories spread acrossthe web.`HN-serendipity-research/1.0` identifies itself as being from`news.ycombinator.com`—a research bot exploring serendipitous content discoveryacross Hacker News links. Whatever &#92;&quot;serendipitous content&#92;&quot; means, exactly.## The AI Crawlers![Claude very cutely recognizing itself in the data.](https://georgemandis.s3-us-west-1.amazonaws.com/rss-feeds/visidata-rss-feed-analysis-3.png)Unsurprisingly, the AI companies have arrived, and they are &lt;s&gt;harvesting yourtokens&lt;/s&gt; reading your feeds. The feed logs alone only showed a handful, butthe full site logs revealed the true scale: AI crawlers are now one of thedominant traffic categories.**OpenAI** alone sent three different bots which I learned more about in thecourse of researching and writing this:- [GPTBot](https://platform.openai.com/docs/bots) is their training data  crawler. It&#39;s also  [one of the most-blocked bots on the web](https://darkvisitors.com/).- [OAI-SearchBot](https://platform.openai.com/docs/bots) powers SearchGPT  results. I&#39;m not sure, but I wonder if this is the agent you&#39;ll see when a  model with  [web search capabilities](https://developers.openai.com/api/docs/guides/tools-web-search)  checks out your site.- And [ChatGPT-User](https://platform.openai.com/docs/bots) is the one that  fires when a ChatGPT user asks it to browse a specific URL. That last one  showed over 200 hits in the full site logs—though that number is probably  misleading. A single &#92;&quot;go read my blog&#92;&quot; prompt can send ChatGPT on a crawling  spree across multiple pages, so this doesn&#39;t mean 200 people pasted my  URL—some of those hits are definitely me, when I asked it to go read my site  and find themes.[Applebot](https://support.apple.com/en-us/119829) was there, powering Siri,Spotlight, and Apple Intelligence.[Amazonbot](https://developer.amazon.com/amazonbot) too, feeding Alexa&#39;s answersand the Rufus AI shopping assistant.[ClaudeBot](https://docs.anthropic.com/en/docs/about-claude/models) (Anthropic)showed up.[PerplexityBot and Perplexity-User](https://perplexity.ai/perplexitybot) (thesame training/real-time split as OpenAI).[Bytespider](https://knownagents.com/agents/bytespider) (ByteDance/TikTok) wasone of the noisier ones, with a separate[TikTokSpider](https://knownagents.com/agents/tiktokspider) for good measure.[Bravebot](https://search.brave.com/help/brave-search-crawler) for Brave Search.[DuckDuckBot](http://duckduckgo.com/duckduckbot.html) for traditional search and[DuckAssistBot](http://duckduckgo.com/duckassistbot.html) for DuckDuckGo&#39;s AIassistant features.Beyond the big names, there&#39;s a newer class of AI-native crawlers. AIWebIndex(from a company called Lyrenth) implements an open standard for AI-readable webcrawling, converting URLs to structured JSON optimized for AI consumption. Theirbot info page says &#92;&quot;You probably landed here from a server log.&#92;&quot; Accurate!LinkupBot (from linkup.so) is building a search API for RAG applications, thekind of thing you&#39;d plug into an AI agent that needs to search the web. And`sauce.ai-news/1.0 (+discovery)` appeared once with no documentation, nowebsite, nothing. Just a name and the word &#92;&quot;discovery.&#92;&quot;## Prediction markets (!!)![Polymarket-Bot showing up in my logs](https://georgemandis.s3-us-west-1.amazonaws.com/rss-feeds/visidata-rss-feed-analysis-4.png)Okay, this one got me thinking.[Polymarket-Bot/1.0](https://polymarket.com)—as in Polymarket, thecryptocurrency prediction market—made 24 requests to my RSS feed. Not otherpages, curiously—just the feed. I know prediction market bots scrape newssources to detect events that could move markets. My blog, apparently, is intheir index of potential signal sources.God, I hope[writing about PaTUI](https://george.mand.is/2026/05/meet-patui-ms-paint-for-the-terminal-with-vim-controls/)shook markets.This sent me down a brief daydream about a world where a bunch of us coordinateto publish increasingly unhinged content in our RSS feeds specifically toconfuse Polymarket&#39;s bots. A sort-of distributed attack on prediction marketsvia RSS feed poisoning?Maybe skim the latest markets and use a little LLM magic to conjure believablyridiculous stories that might drive things in a direction where they lose themost money? &#92;&quot;Elon considers buying the moon.&#92;&quot; Maybe that&#39;s not unhinged enough.**Note**: if you are noticing Polymarket sniffing around your blog and havesimilar aspirations, get in touch! I love a good scheme.## Preservation Layer[archive.org_bot](https://archive.org/details/archive.org_bot)—the InternetArchive&#39;s Wayback Machine crawler—appeared in the logs. My posts are beingarchived for posterity. I can still find websites I made in high school (!!) onthere. Like an old friend you are always happy to see.[Shiori](https://github.com/go-shiori/shiori) showed up twice, in two differentversions. It&#39;s a self-hosted bookmark manager written in Go, an open-sourcealternative to Pocket. Someone bookmarked something from my site and Shiorifetched it to create an offline archive.And someone is monitoring whether my site stays up.[Uptime-Kuma](https://github.com/louislam/uptime-kuma), an open-sourceself-hosted monitoring tool, was the fourth most active agent in the entire sitelogs. Okay, one of those is me—but the other might not be! Someone out therecares enough about my uptime to run a health check against it.## Pipelines to email, Slack and newslettersRSS isn&#39;t just about reading. It&#39;s also about syndication. It&#39;s _piped_. Asignificant chunk of traffic came from services that take feed content and pushit somewhere else.[Slackbot](https://api.slack.com/robots) was the second most active agentoverall. This is just Slack&#39;s link unfurling, not a subscriber. Every timesomeone pastes a post URL in a Slack workspace, Slackbot fetches it to generatea preview card. Hundreds of hits in a week means people are actively sharing myposts in Slack conversations. That&#39;s arguably more interesting signal thansubscription counts and pings, since a human may very well have had to activelyshare it![Blogtrottr](https://blogtrottr.com) delivers RSS to email inboxes. Someone isgetting my posts as emails. [FeedBurner](https://feedburner.google.com) issomehow still alive, the Google-acquired feed proxy from 2007 that Google hasbeen threatening to kill for a decade. If it&#39;s hitting my feed, someone stillhas a FeedBurner URL pointed at me from the old days.[WordPress.com&#39;s Feedbot](https://wordpress.com) powers the WordPress.comReader. [Kingfisher](https://github.com/tldrmedia/kingfisher) is the ingestionbot for the [TLDR Newsletter](https://tldr.tech). Cool!## Runtime fingerprintsSome of the most interesting user agent strings are the ones that (presumably)reveal what someone&#39;s homebrewed script is written in.[Hackney](https://github.com/benoitc/hackney), an Elixir/Erlang HTTP client, wasone of the most active agents overall. Some Elixir application is veryinterested in my feed and I have no idea what it is.[Apache HttpClient](https://hc.apache.org) reveals a Java application. The barestring `node`—just &#92;&quot;node,&#92;&quot; nothing else—means someone&#39;s Node.js script didn&#39;tbother setting a custom user agent. [`undici`](https://github.com/nodejs/undici)is what you get when you use `fetch()` in Node.js 18+ without customizingheaders—it&#39;s the name of the HTTP client library that powers Node&#39;s native fetchimplementation. [Deno/2.7.5](https://deno.com) means someone wrote a Denoscript—created by Ryan Dahl, the same person who created Node.js.[Bun/1.3.14](https://bun.sh) rounds out the JavaScript runtime trifecta on theJSON feed side.[SimplePie](https://simplepie.org/) is the PHP feed parsing library that powersWordPress&#39;s RSS widget—so a WordPress site somewhere has my feed in a sidebarwidget. [feedparser](https://github.com/kurtmckee/feedparser) and[newspaper](https://github.com/codelucas/newspaper) are Python libraries forparsing feeds and extracting article content respectively.[feed2exec](https://feed2exec.readthedocs.io) is a Python CLI tool that runsarbitrary commands when new feed items appear—someone has a little pipeline thattriggers _something_ every time I post.The wider site logs add more to the collection.[python-requests](https://docs.python-requests.org/) appeared in at least fourdifferent versions—the most common Python HTTP library, each version probably adifferent script or project.[trafilatura](https://github.com/adbar/trafilatura), a Python libraryspecifically designed for web text extraction and corpus building, showed upwith notable volume. [colly](https://github.com/gocolly/colly), a popular Goscraping framework. [axios](https://axios-http.com/), the ubiquitous, and nowinfamously supply-chain-attacked, JavaScript HTTP client. And one of myfavorites: `gen_candidates.py (tech-news-daily)`—someone left their literalPython filename as the user agent. A tech news aggregation pipeline, running ascript called `gen_candidates.py`, apparently evaluating my blog for inclusion.Hey, it is an honor to be nominated.And then there&#39;s `Embarcadero URI Client/1.0`. This is the default HTTP useragent from[Embarcadero RAD Studio](https://www.embarcadero.com/products/rad-studio)—theDelphi IDE. Someone built a _Delphi_ application that fetches my feed. In 2026.Or at least, something out there is pretending to do that. It appeared in bothmy RSS and JSON feed logs. Respect.## Lies, damn lies and browser stringsA good chunk of the logs are standard browser user agent strings. A few might bereal humans who opened the feed URL in a browser tab, but most are certainlynot.Chrome 84 from 2020. Chrome 30 from 2013. Internet Explorer 9 from 2011. IE 6 onWindows 2000. And my personal favorite from the JSON feed: someone claiming tobe **Firefox 35 on Windows 98**. I&#39;m not sure Windows 98 could run Firefox 35even when Firefox 35 was current in 2015, let alone in 2026.The wider site logs turn this into a full museum. Highlights from thecollection:- **Opera on a Nintendo Wii**—`Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)`. The  Wii&#39;s Opera-based Internet Channel, vintage 2007.- **SeaMonkey on BeOS**—`Mozilla/5.0 (BeOS; U; BeOS BePC)... SeaMonkey/1.5a`.  BeOS hasn&#39;t been a going concern since 2001.- **Nokia N97 on Symbian**—`SymbianOS/9.4; Series60/5.0 NokiaN97-1`. The last  gasp of Nokia&#39;s pre-Windows Phone era.- **Nokia N9 on MeeGo**—`NokiaBrowser/8.5.0`. Nokia&#39;s beautiful, doomed Linux  phone from 2011.- **Sony Ericsson K800i**—A feature phone from 2006, identifying via WAP  headers.- **Konqueror on Linux**—KDE&#39;s browser. Technically still maintained, but not  commonly seen in the wild.- **Links on FreeBSD**—`Links (2.1pre15; FreeBSD 5.3-RELEASE i386; 196x84)`. A  text-mode browser at 196x84 character resolution.- **Namoroka on NetBSD**—`Namoroka/3.6.15`. This was Firefox&#39;s internal codename  before it was released as Firefox 3.6.- **AOL Browser**—`AOLBUILD/11.0.1839`. Yes, really.- **Opera on PPC Mac**—`Opera/9.0 (Macintosh; PPC Mac OS X; U; en)`. PowerPC  Macs haven&#39;t been manufactured since 2006.These are bots or scrapers doing browser cosplay from years they weren&#39;t evenplausible. This really underscores how user agent strings are a loose socialcontract and always have been—but these aren&#39;t even trying.I look forward to updating my user agent string to let sites know I&#39;m runningLynx on my Atari 2600.## SEO crawlers and international search enginesThe SEO usual suspects were all present: [AhrefsBot](https://ahrefs.com/robot)(one of the most active crawlers on the web), [MJ12bot](https://mj12bot.com/)(Majestic SEO, doing backlink analysis since 2004),[DataForSeoBot](https://dataforseo.com/dataforseo-bot), and[SemrushBot](http://www.semrush.com/bot.html) in multiple flavors.More interesting was the international search engine contingent.[PetalBot](https://knownagents.com/agents/petalbot) (Huawei&#39;s search crawler forPetal Search) was among the more active crawlers overall.[Sogou](https://knownagents.com/agents/sogou) (Chinese searchengine—[more info](http://www.sogou.com/docs/help/webmasters.htm#07)?),[Baiduspider](http://www.baidu.com/search/spider.html) (Baidu),[CocCocBot](https://knownagents.com/agents/coccocbot) (Vietnamese search enginefor Coc Coc—[more info](http://help.coccoc.com/searchengine)?),[YandexBot](http://yandex.com/bots) (Russian search),[SeznamBot](https://o-seznam.cz/napoveda/vyhledavani/en/seznambot-crawler/)(Czech search engine Seznam.cz),[Yeti/Naver](https://knownagents.com/agents/yeti-by-naver) (Korean search for[Naver](https://naver.me/spd)), and [Qwantbot](https://help.qwant.com/bot/)(French privacy-focused search). My little personal blog, being indexed forsearch engines in at least eight countries. The web really is worldwide, even ifthat&#39;s easy to forget.[Xobaque](https://alexschroeder.ch/view/Xobaque) also showed up. It seems like adelightfully personal project from Alex Schroeder trying to create an opt-insearch engine.**As a fun aside**: I used AI to give a first pass at the logs and help meresearch the different user agents and provide links so I could learn more aboutthem. Then I went through all of the links to see what they were about. Withthis one it said &#92;&quot;No web presence, no documentation, no results for the nameanywhere. A ghost.&#92;&quot; I did a search in GitHub and found one reference on[this AntennaApp issue](https://github.com/rsdoiel/antennaApp/issues/19) whichled me to Alex&#39;s blog, where I promptly asked to confirm my humanity. I guessit&#39;s working, since AI couldn&#39;t find it?Also lurking in the wider logs: something called `go_revenue_model`, presumablya Go tool by Florin Badita that apparently analyzes website revenue models, made33 requests. The GitHub repo seems to be private, so I can&#39;t tell you much moreabout it.Maybe someone is studying how I make money from this blog? Spoiler: I don&#39;t.Unless you&#39;d like to [sponsor me](https://github.com/sponsors/georgemandis).## The Mysteries![The award for the politest bot goes to Thinkbot/0.5.8](https://georgemandis.s3-us-west-1.amazonaws.com/rss-feeds/visidata-rss-feed-analysis-5.png)We are hitting the long-tail of user agents and trodding firmly in the[Low Information Zone](https://www.metabunk.org/threads/ufo-acronyms-what-is-the-liz.11742/)(Yes, I&#39;m outing my hobby of reading about debunking conspiracy theories onsites like Metabunk and Skeptoid). Here are some weird ones:- **bushbaby/2026.5.1**—This one looked weird. Turns out it&#39;s a  [Cloudflare internal bot](https://radar.cloudflare.com/bots/directory/bushbaby)  used for SSL certificate renewal checks.- **ED309134-1C93-41BB-A10D-3278DF6BCF72/310**—An iOS app that forgot to set its  display name in the app bundle! It shows up as a raw UUID. The  `CFNetwork/Darwin` suffix confirms it&#39;s a native iOS app. Someone&#39;s homebrew  feed reader, still in development, already subscribed to my blog? Charmed. I  hope they ship it.- **br-crawler/0.5**—Listed in  [bot directories](https://knownagents.com/agents/br-crawler) but categorized  as &#92;&quot;uncategorized.&#92;&quot; I couldn&#39;t find anything.- **Thinkbot/0.5.8**—Gets honorable mention for the most polite user agent  string I&#39;ve ever seen:  `&#92;&quot;In_the_test_phase,_if_the_Thinkbot_brings_you_trouble,_please_block_its_IP_address._Thank_you.&#92;&quot;`## The JSON readersMy [JSON Feed](https://www.jsonfeed.org/) had far fewer unique agents but acompletely different audience.[Unread](https://www.goldenhillsoftware.com/unread/) and[Syndicator](https://app.syndicator.one) together account for nearly 80% of allJSON feed traffic—yet they barely appear in the RSS logs. If you publish bothformats, you might be reaching different tools and potentially different people.Maybe I should check-in on my Gopher site.The JSON feed also attracted [GPTBot](https://platform.openai.com/docs/bots),[Shiori](https://github.com/go-shiori/shiori), and the Embarcadero Delphiclient. But two apps seem to generally own the JSON feed, while the RSS feed isa cornucopia of crawlers and clients.## What did we learn?**RSS is inspiringly diverse!** Way more diverse than browsers feel to me atleast. Syndicating content on the web is and _isn&#39;t_ as solved as you&#39;d think.That there is this much variety gives me hope for something. In one week I sawover 50 distinct, identifiable products touching my feeds: commercial readers,self-hosted installations, newsletter bots, a podcast app, Fediverse instancesfrom two different platforms, search engines from eight countries, AI crawlersfrom every major AI company, a prediction market, preservation services, emailrelays, bookmark managers, SEO crawlers, terminal readers, an Emacs package, andsomeone&#39;s Delphi app.**The self-hosted contingent is bigger than I thought.** Miniflux, FreshRSS,CommaFeed, Bubo Reader, Newsboat, Elfeed—people running their own infrastructureto read feeds. Says something about the audience of a personal tech blog, maybe,but I think it also says something about the health of the self-hosted RSSecosystem.**Everyone wants to read your feed, and not all of them are readers.**Prediction markets. AI training pipelines. SEO crawlers. Newsletter ingestionbots. Link preview services. Bookmark archivers. The Internet Archive. RSS isn&#39;tjust a reading protocol—it&#39;s infrastructure. A structured, machine-readable datafeed with no authentication required that anything can consume. The humanreaders are almost certainly the minority, though I hope they exist somewhere atthe end of these aggregation chains.**User agents are a beautiful mess.** Between Elixir libraries, bare runtimestrings, a UUID that should be an app name, fake browsers from 2011, a NintendoWii, a Sony Ericsson feature phone, a BeOS installation, someone&#39;s literalPython filename, and at least five agents I simply cannot identify, the useragent string remains the web&#39;s most charmingly unreliable metadata field. It&#39;s[Knights and Knaves](https://en.wikipedia.org/wiki/Knights_and_Knaves), butreally mostly knaves.**Publishing both RSS and JSON feeds feels worth!** They reach differentaudiences and are consumed by different tools. This was the most concretetakeaway—if I only had RSS, I wonder if I&#39;d be invisible to Unread andSyndicator&#39;s users at all?---## Full Reference TableMost of the identifiable user agents I observed, linked to their source as bestI could find it (some omitted at my discretion).[Download as CSV](/media/rss-feed-readers-reference.csv).| Name                       | Type               | Description                                                    | Link                                                                                                || -------------------------- | ------------------ | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- || **Feedly**                 | RSS Reader         | Cloud-based reader. Reports subscriber count in UA             | [feedly.com](https://feedly.com)                                                                    || **Feedbin**                | RSS Reader         | Hosted reader with sync. Reports subscribers and feed ID       | [feedbin.com](https://feedbin.com)                                                                  || **Feeder**                 | RSS Reader         | Browser-extension reader (Chrome, Firefox, Edge)               | [feeder.co](https://feeder.co)                                                                      || **Inoreader**              | RSS Reader         | Web-based reader with filtering and automation                 | [inoreader.com](https://www.inoreader.com)                                                          || **NetNewsWire**            | RSS Reader         | Free, open-source Mac/iOS reader by Brent Simmons              | [netnewswire.com](https://netnewswire.com)                                                          || **Unread**                 | RSS Reader         | Beautiful iOS/Mac reader. Dominates JSON feed traffic          | [goldenhillsoftware.com/unread](https://www.goldenhillsoftware.com/unread/)                         || **feeeed**                 | RSS Reader         | iOS app mixing RSS with Reddit, YouTube, weather, and more     | [feeeed.nateparrott.com](https://feeeed.nateparrott.com)                                            || **AntennaPod**             | Podcast App        | Open-source Android podcast manager                            | [antennapod.org](https://antennapod.org)                                                            || **Miniflux**               | Self-Hosted Reader | Minimalist self-hosted reader in Go                            | [miniflux.app](https://miniflux.app)                                                                || **FreshRSS**               | Self-Hosted Reader | PHP-based self-hosted RSS aggregator                           | [freshrss.org](https://freshrss.org)                                                                || **CommaFeed**              | Self-Hosted Reader | Java/React Google Reader replacement                           | [github.com/Athou/commafeed](https://github.com/Athou/commafeed)                                    || **Bubo Reader**            | Self-Hosted Reader | Generates a static HTML page from your feed list               | [buboreader.com](https://buboreader.com)                                                            || **Newsboat**               | Terminal Reader    | Terminal-based reader for Linux/macOS                          | [newsboat.org](https://newsboat.org)                                                                || **Elfeed**                 | Emacs Reader       | Tag-based feed reader for Emacs                                | [github.com/skeeto/elfeed](https://github.com/skeeto/elfeed)                                        || **Syndicator**             | Reader/Aggregator  | Personalized reading app that learns from behavior             | [app.syndicator.one](https://app.syndicator.one)                                                    || **Feedstand**              | Reader             | RSS reader service with feed IDs                               | [feedstand.com](https://feedstand.com)                                                              || **ReadYou**                | RSS Reader         | Open-source Material Design reader for Android                 | [github.com/Ashinch/ReadYou](https://github.com/Ashinch/ReadYou)                                    || **SpaceCowboys**           | RSS Reader         | Android RSS reader                                             | [play.google.com](https://play.google.com/store/apps/details?id=com.spacecowboys.feeder)            || **BazQux**                 | RSS Reader         | Web-based reader. Reports subscriber count                     | [bazqux.com](https://bazqux.com)                                                                    || **GoodLinks**              | Reading List       | Bookmarking/reading-list app for Apple platforms               | [goodlinks.app](https://goodlinks.app)                                                              || **ReaderDesktop**          | RSS Reader         | Native macOS RSS reader                                        | [readerdotone.app](https://readerdotone.app)                                                        || **Misskey**                | Fediverse          | Decentralized Fediverse social platform                        | [misskey-hub.net](https://misskey-hub.net/en/)                                                      || **Friendica**              | Fediverse          | Facebook-like Fediverse platform                               | [friendi.ca](https://friendi.ca/)                                                                   || **Micro.blog**             | Fediverse/Platform | Indie microblogging platform&#39;s feed crawler                    | [micro.blog](https://micro.blog)                                                                    || **Flipboard**              | Content Platform   | Digital magazine app&#39;s content proxy                           | [flipboard.com](https://about.flipboard.com)                                                        || **Slackbot**               | Link Unfurling     | Slack&#39;s preview bot. Fires when URLs are shared                | [api.slack.com/robots](https://api.slack.com/robots)                                                || **Marginalia**             | Indie Search       | One-person search engine for the small/personal web            | [marginalia.nu](https://www.marginalia.nu/)                                                         || **Kagi**                   | Indie Search       | Paid, ad-free, privacy-focused search engine                   | [kagi.com](https://kagi.com)                                                                        || **rssanyway**              | Content Discovery  | Generates feeds for sites without them. Ranks trending content | [rssanyway.com](https://rssanyway.com/)                                                             || **GeistHaus**              | Content Discovery  | RSS meta-layer ranking articles by cross-feed links            | [geist.haus](https://geist.haus)                                                                    || **GPTBot**                 | AI Crawler         | OpenAI&#39;s training data crawler                                 | [platform.openai.com/docs/bots](https://platform.openai.com/docs/bots)                              || **ChatGPT-User**           | AI Crawler         | OpenAI&#39;s real-time browsing crawler                            | [platform.openai.com/docs/bots](https://platform.openai.com/docs/bots)                              || **OAI-SearchBot**          | AI Crawler         | OpenAI&#39;s SearchGPT crawler                                     | [platform.openai.com/docs/bots](https://platform.openai.com/docs/bots)                              || **ClaudeBot**              | AI Crawler         | Anthropic&#39;s web crawler                                        | [docs.anthropic.com](https://docs.anthropic.com)                                                    || **PerplexityBot**          | AI Crawler         | Perplexity&#39;s indexing crawler                                  | [perplexity.ai](https://perplexity.ai/perplexitybot)                                                || **Bytespider**             | AI Crawler         | ByteDance/TikTok&#39;s web crawler                                 | [zhanzhang.toutiao.com](https://zhanzhang.toutiao.com/)                                             || **Applebot**               | AI/Search Crawler  | Powers Siri, Spotlight, and Apple Intelligence                 | [support.apple.com](https://support.apple.com/en-us/119829)                                         || **Amazonbot**              | AI/Search Crawler  | Feeds Alexa and the Rufus AI assistant                         | [developer.amazon.com/amazonbot](https://developer.amazon.com/amazonbot)                            || **Bravebot**               | Search Crawler     | Brave Search&#39;s web crawler                                     | [search.brave.com](https://search.brave.com/help/brave-search-crawler)                              || **DuckDuckBot**            | Search Crawler     | DuckDuckGo&#39;s search crawler                                    | [duckduckgo.com](http://duckduckgo.com/duckduckbot.html)                                            || **DuckAssistBot**          | AI Crawler         | DuckDuckGo&#39;s AI assistant crawler                              | [duckduckgo.com](http://duckduckgo.com/duckassistbot.html)                                          || **Polymarket-Bot**         | Prediction Market  | Crypto prediction market&#39;s news scraper                        | [polymarket.com](https://polymarket.com)                                                            || **archive.org_bot**        | Preservation       | Internet Archive&#39;s Wayback Machine crawler                     | [archive.org](https://archive.org/details/archive.org_bot)                                          || **Shiori**                 | Bookmarking        | Self-hosted bookmark manager in Go (Pocket alternative)        | [github.com/go-shiori/shiori](https://github.com/go-shiori/shiori)                                  || **Blogtrottr**             | Feed-to-Email      | Delivers RSS to email inboxes                                  | [blogtrottr.com](https://blogtrottr.com)                                                            || **FeedBurner**             | Feed Relay         | Google&#39;s deprecated (but undead) feed proxy from 2007          | [feedburner.google.com](https://feedburner.google.com)                                              || **WordPress.com Feedbot**  | Feed Relay         | Automattic&#39;s crawler for WP.com Reader                         | [wordpress.com](https://wordpress.com)                                                              || **Kingfisher (TLDR)**      | Newsletter Bot     | Feed ingestion for the TLDR Newsletter                         | [github.com/tldrmedia/kingfisher](https://github.com/tldrmedia/kingfisher)                          || **RSS.Social**             | Social Platform    | Social platform built around RSS feeds                         | [rss.social](https://rss.social)                                                                    || **Lighthouse**             | Curation App       | RSS curation with AI summaries (not Google Lighthouse)         | [lighthouseapp.io](https://lighthouseapp.io)                                                        || **Hackney**                | Library (Elixir)   | Elixir/Erlang HTTP client. Product unknown                     | [github.com/benoitc/hackney](https://github.com/benoitc/hackney)                                    || **Apache HttpClient**      | Library (Java)     | Java HTTP library. Product unknown                             | [hc.apache.org](https://hc.apache.org)                                                              || **feedparser**             | Library (Python)   | Canonical Python RSS parsing library                           | [github.com/kurtmckee/feedparser](https://github.com/kurtmckee/feedparser)                          || **newspaper**              | Library (Python)   | Python article extraction library                              | [github.com/codelucas/newspaper](https://github.com/codelucas/newspaper)                            || **SimplePie**              | Library (PHP)      | PHP feed parser. Powers WordPress&#39;s RSS widget                 | [simplepie.org](https://simplepie.org/)                                                             || **rss-parser**             | Library (Node.js)  | Popular npm package for parsing feeds                          | [github.com/rbren/rss-parser](https://github.com/rbren/rss-parser)                                  || **PicoFeed**               | Library (PHP)      | PHP library originally built for Miniflux                      | [github.com/miniflux/picoFeed](https://github.com/miniflux/picoFeed)                                || **feed2exec**              | CLI Tool           | Python CLI that runs commands on new feed items                | [feed2exec.readthedocs.io](https://feed2exec.readthedocs.io)                                        || **Embarcadero URI Client** | Runtime (Delphi)   | Default UA from Delphi/RAD Studio apps                         | [embarcadero.com](https://www.embarcadero.com/products/rad-studio)                                  || **Deno**                   | Runtime            | Default UA from Deno&#39;s fetch()                                 | [deno.com](https://deno.com)                                                                        || **Bun**                    | Runtime            | Default UA from Bun JavaScript runtime                         | [bun.sh](https://bun.sh)                                                                            || **undici**                 | Runtime (Node.js)  | Default UA from Node.js 18+ native fetch()                     | [github.com/nodejs/undici](https://github.com/nodejs/undici)                                        || **node**                   | Runtime (Node.js)  | Bare Node.js string. No custom UA set                          | [nodejs.org](https://nodejs.org)                                                                    || **AhrefsBot**              | SEO Crawler        | One of the most active backlink crawlers                       | [ahrefs.com/robot](https://ahrefs.com/robot)                                                        || **MJ12bot**                | SEO Crawler        | Majestic SEO&#39;s backlink crawler. Active since 2004             | [mj12bot.com](https://mj12bot.com/)                                                                 || **DataForSeoBot**          | SEO Crawler        | SEO data API for other companies&#39; tools                        | [dataforseo.com](https://dataforseo.com/dataforseo-bot)                                             || **SemrushBot**             | SEO Crawler        | SEO analytics and competitive research                         | [semrush.com](http://www.semrush.com/bot.html)                                                      || **PetalBot**               | Search Crawler     | Huawei&#39;s Petal Search engine crawler                           | [webmaster.petalsearch.com](https://webmaster.petalsearch.com/site/petalbot)                        || **Qwantbot**               | Search Crawler     | French privacy-focused search engine                           | [help.qwant.com](https://help.qwant.com/bot/)                                                       || **SeznamBot**              | Search Crawler     | Czech search engine Seznam.cz                                  | [o-seznam.cz](https://o-seznam.cz/napoveda/vyhledavani/en/seznambot-crawler/)                       || **Smallwebindexbot**       | Indie Search       | Search engine for the small web                                | [smallwebindex.com](https://smallwebindex.com/bot.html)                                             || **rawweb-bot**             | Indie Search       | Search engine for independent personal websites and blogs      | [github.com/0x2E/RawWeb.org](https://github.com/0x2E/RawWeb.org)                                    || **YandoriRSSBot**          | News Monitoring    | Monitors ~200K RSS feeds, clusters related articles            | [writeup by N.A. Ferrell](https://social.emucafe.org/naferrell/what-is-the-yandorirssbot-02-25-26/) || **Uptime-Kuma**            | Monitoring         | Open-source self-hosted uptime monitor                         | [github.com/louislam/uptime-kuma](https://github.com/louislam/uptime-kuma)                          || **trafilatura**            | Library (Python)   | Web text extraction for NLP/corpus building                    | [github.com/adbar/trafilatura](https://github.com/adbar/trafilatura)                                || **colly**                  | Library (Go)       | Popular Go web scraping framework                              | [github.com/gocolly/colly](https://github.com/gocolly/colly)                                        || **Meta External Agent**    | Platform Crawler   | Facebook/Instagram Open Graph preview crawler                  | [developers.facebook.com](https://developers.facebook.com/docs/sharing/webmasters/crawler)          |",
      "date_published": "2026-05-18T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/05/my-favorite-bugs-invalid-surrogate-pairs/",
      "url": "https://george.mand.is/2026/05/my-favorite-bugs-invalid-surrogate-pairs.md",
      "title": "My Favorite Bugs: Invalid Surrogate Pairs",
      "content_html": "If you&#39;re in the business of building things that run on computers long enough,I think you will eventually acquire a favorite bug story. This is a short storyabout mine. I&#39;ve also built an [interactive tool](invalid-surrogate-pairs/)where you can explore the concepts underpinning the heart of this bug.## The bug: two emoji enter, none leaveI was working on migrating a legacy editor to a more collaborative experiencewith my team. [TipTap](https://tiptap.dev/) on top (itself a wrapper around[ProseMirror](https://prosemirror.net)), [Yjs](https://yjs.dev/) underneathhandling the CRDT magic for real-time syncing. It worked well! Mostly.In our alpha/early release days, when it was still mostly internal and/or earlyrollout users, sometimes the editor would just stop saving your content.Silently. You&#39;d keep typing and everything looked fine, but your edits stoppedsyncing to the Yjs document. The next time you opened the page, everything you&#39;dwritten after the failure point was gone.It was utterly terrifying, very rare and almost impossible to diagnose becausewe could never recreate it. We really tried! My early suspicions generallyrevolved around shaky wifi connections and wonky websocket behaviors, but noamount of throttling or turning my wifi on and off seemed to recreate the issue.The experience was surprisingly resilient in those scenarios, in my memory. Itfelt like it happened randomly, never when anyone was looking. No obvious errorspicked up in the console, no stack trace, no crash. Just... &#92;&quot;Hey, I think mychanges didn&#39;t save.&#92;&quot;Then one day our product manager cracked it. This was not a trivial thing tofind. He&#39;d been experiencing it more than anyone else (probably because he wasthe best at dogfooding our product) and had been methodically narrowing it down._&#92;&quot;I feel like I&#39;m going crazy, but I think it&#39;s when I type specific characterstogether, go back and insert a character between them...&#92;&quot;_He&#39;d been using 🟢 and 🔴 in his weekly project status emails to communicategeneral health. Green for on-track, red for at-risk. Every week the template hewas using had both characters already present and he would simply remove the onehe didn&#39;t need (Generally the red one, I am happy to say!).On this occasion he&#39;d copied the green circle and pasted it in front of the redone at some point, or maybe vice versa. That specific operation— inserting onemulti-byte emoji adjacent to another— was triggering a splice in the underlyingCRDT library, which split a surrogate pair down the middle.I remember being on the call when he showed this to me and one of my directreports who&#39;d been toiling away at the collaborative editing transition. Imust&#39;ve gotten a little too excited—I live for esoteric bugs—&#92;&quot;I feel like yougot _energized_ by this,&#92;&quot; he said. He wasn&#39;t wrong.Adding to the fun, not every emoji triggered it. Only the ones above `U+FFFF`that required surrogate pairs. And not all edits resulted in the problemeither—only the ones that caused a **splice** at exactly the wrong byte offset.It was a wild one to debug before we knew what was going on.## Code units, code points, and grapheme clustersSo what was going on? What does &#92;&quot;ones above `U+FFFF`&#92;&quot; in that last paragrapheven mean? What byte offsets?To understand this bug we need to introduce three pieces of vocabulary:```cssCode Units → Code Points → Grapheme Clusters```**Code units** are the raw 16-bit values that JavaScript uses to store stringsinternally (UTF-16). This is what `.length` counts. This is what `.slice()` and`.charCodeAt()` operate on as well. JavaScript operates at the code unit levelby default**Code points** are what Unicode actually defines as a single character. A codepoint like U+1F920 (🤠) is one character in Unicode&#39;s view, but it&#39;s too big tofit in a single 16-bit code unit. So UTF-16 splits it into two code units calleda **surrogate pair**: a high surrogate and a low surrogate. Simple ASCIIcharacters and a lot of common symbols fit in one code unit, so the distinctiondoesn&#39;t matter for them. Emoji, though? Almost always two.**Grapheme clusters** are what a human perceives as &#92;&quot;one character.&#92;&quot; The femaleastronaut 👩‍🚀 looks like one character but is actually three code points gluedtogether: 👩 (woman) + a zero-width joiner + 🚀 (rocket). Five code units, threecode points, one grapheme. The deceptively simple 👨‍👨‍👧‍👧 (Family: Man, Man, Girl,Girl) emoji is an impressive eleven! The enigmatic ☃ is 1.Here&#39;s how those numbers diverge:|          | Code units | Code points | Graphemes || -------- | ---------- | ----------- | --------- || A        | 1          | 1           | 1         || 🤠       | 2          | 1           | 1         || 👩‍🚀     | 5          | 3           | 1         || 👨‍👨‍👧‍👧 | 11         | 7           | 1         |I will pause to once again plugin the[interactive surrogate explorer](/invalid-surrogate-pairs/) I alluded to at thetop. You can type any emoji and see this breakdown yourself![![Screenshot from my surrogate pair explorer](https://georgemandis.s3-us-west-1.amazonaws.com/surrogate-pair-explorer-1-2.png)](/invalid-surrogate-pairs)## How `.slice()` breaks thingsThe cowboy 🤠 is one code point stored as two code units (a surrogate pair). Ifyou slice between them:```js&#92;&quot;🤠&#92;&quot;.slice(0, 1); // → &#39;&#92;&#92;uD83E&#39;  (lone high surrogate)&#92;&quot;🤠&#92;&quot;.slice(1, 2); // → &#39;&#92;&#92;uDD20&#39;  (lone low surrogate)```Those fragments aren&#39;t valid characters. They&#39;re half a pair with no partner. Ontheir own they render as replacement characters (�) or get silently swallowed.But the real problem comes when you try to encode one:```jsencodeURIComponent(&#92;&quot;🤠&#92;&quot;.slice(0, 1));// URIError: URI malformed```That&#39;s what was crashing our tool.## What was actually happeningYjs depends on a utility library called lib0. The lib0 `splice` method usedJavaScript&#39;s `.slice()` internally. When a CRDT operation happened to landbetween the two halves of an emoji&#39;s surrogate pair, lib0 would produce a stringwith an orphaned surrogate. That string would eventually get passed to`encodeURIComponent` during sync, which threw an uncaught `URIError`.The error was uncaught. Nothing in the Yjs or TipTap error handling caught it.So sync just... stopped. The editor kept working locally, giving you everyindication that things were fine, while your changes silently went nowhere.It only showed up on pathological edits: replacing one emoji with another, orinserting a character right between two emoji.## The hack we shippedWe couldn&#39;t fix lib0—though I&#39;m happy to report it did[eventually get fixed](https://github.com/dmonad/lib0/commit/51ab65b46da8110d85384ccec631647de3248c96)!We couldn&#39;t patch Yjs. We needed to ship something.So we did two things:- Although we didn&#39;t initially care about  [offline support](https://tiptap.dev/docs/guides/offline-support) for our  product, adding it was pretty trivial. Our thinking was it could save us in a  future situation should the user get disconnected and keep typing. We would  continue to update the CRDT locally, and the _next_ time they came back to the  document their changes would be updated and merged with the current state of  things. This was a hedge and leaned into what CRDTs are actually good at and  designed for.- An embarrassingly nuclear option (my call, with my fingerprints all over): we  attached a global `window.addEventListener(&#92;&quot;error&#92;&quot;, ...)` listener that  regex-matched for `URIError: URI malformed`. When it caught one, it logged the  event for tracking and set a piece of state that our editor would check. If we  saw the error, we&#39;d throw up a modal telling the user something went wrong and  asked them to reload the page. I watched this metric like a hawk and was  relieved with how rare it ended up being.We weren&#39;t the only ones. The upstream issues([yjs#303](https://github.com/yjs/yjs/issues/303),[tiptap#3020](https://github.com/ueberdosis/tiptap/issues/3020)) had othereditors reporting the same problem with similar workarounds.## The real fixTwo things eventually fixed it for real:**lib0 got patched.** The upstream fix was to detect if the first character of asliced string was a high surrogate without a matching low surrogate, and replaceit with U+FFFD (the Unicode replacement character, �). Not perfect, but itstopped the `URIError` from happening and prevented sync from dying.**We made emoji an atomic node type.** In ProseMirror (and by extension TipTap),you can define custom node types. We setup an extension that made emoji theirown node, which meant the editor treated each one as an indivisible unit. Cursormovements and editing operations couldn&#39;t split an emoji in half. This didn&#39;tfix the lib0 bug, and there were some other side-effects here that werechallenging, but it eliminated most of the editing patterns that triggered it.I&#39;m happy to report that the bug popped up _very_ rarely during this hackyinterim phase... but I was pretty happy when the patched version of lib0 finallylanded.## The modern answerIf you&#39;re doing string manipulation in JavaScript and you care about notcorrupting characters, use `Intl.Segmenter`:```jsconst seg = new Intl.Segmenter(undefined, { granularity: &#92;&quot;grapheme&#92;&quot; });const segments = [...seg.segment(&#92;&quot;👩‍🚀A👍&#92;&quot;)].map((s) =&gt; s.segment);// → [&#39;👩‍🚀&#39;, &#39;A&#39;, &#39;👍&#39;]```This splits by grapheme clusters rather than code units. No orphaned surrogates,no split emoji. It&#39;s what `.slice()` should have been doing all along, but ofcourse UTF-16 predates emoji by decades.## InfamyAfter we shipped the fix I wrote about it in my internal newsletter.![Newsletter screenshot from a later update in which I recant the story](https://georgemandis.s3-us-west-1.amazonaws.com/my-newsletter1-2.png)The bug became a bit of an inside joke. Coworkers would ping me with 🟢🔴—theemoji combo that broke everything.Years later, I still get memes and messages from former coworkers out of theblue about this. Some bugs you fix and some bugs fix... you?![Slack message: &#92;&quot;I no longer see words, only graphemes and invalid surrogate pairs waiting to be split&#92;&quot;](https://georgemandis.s3-us-west-1.amazonaws.com/my-emoji-response.png)## Hard to unsee unicode problemsOnce you know about it, you start seeing it in the wild. Any code that does`str.slice(0, 1)` or `str[0]` to get &#92;&quot;the first character&#92;&quot; is potentiallybroken. The most common offender: tools that generate initials from a user&#39;sname. Try putting an emoji as the first character of your first or last name inany app that displays your avatar as initials. Most of them will do somethinglike `firstName[0] + lastName[0]` and end up with half a surrogate pair. Somerender garbage. Some crash.It&#39;s the same class of bug every time. JavaScript gives you code units when youwanted characters, and nobody notices until someone types something outside the[Basic Multilingual Plane](https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane).I repeat the truth I hold dearest: it is remarkable anything works at all.## Parting linksMonica Dinculescu has[a great post on how emoji work under the hood](https://meowni.ca/posts/emoji-emoji-emoji/)if you want to go deeper. I highly recommend it!And I&#39;ll end with one more plug for my[interactive surrogate pair explorer](/invalid-surrogate-pairs/) where you cantype any emoji and see this breakdown yourself, in case you missed the link upabove! I think it&#39;s a nice way to visually see and interactive with the conceptsdiscussed here.[![Screenshot from my surrogate pair explorer](https://georgemandis.s3-us-west-1.amazonaws.com/surrogate-pair-explorer-1-2.png)](/invalid-surrogate-pairs/)[![Screenshot from my surrogate pair explorer](https://georgemandis.s3-us-west-1.amazonaws.com/surrogate-pair-explorer-2-2.png)](/invalid-surrogate-pairs/)[![Screenshot from my surrogate pair explorer](https://georgemandis.s3-us-west-1.amazonaws.com/surrogate-pair-explorer-3-2.png)](/invalid-surrogate-pairs/)[![Screenshot from my surrogate pair explorer](https://georgemandis.s3-us-west-1.amazonaws.com/surrogate-pair-explorer-4-2.png)](/invalid-surrogate-pairs/)",
      "date_published": "2026-05-14T00:00:00.000Z"
    },
    {
      "id": "https://george.mand.is/2026/05/migrating-from-netlify-to-cloudflare-pages/",
      "url": "https://george.mand.is/2026/05/migrating-from-netlify-to-cloudflare-pages.md",
      "title": "Migrating from Netlify to Cloudflare Pages",
      "content_html": "I&#39;ve hosted this site on Netlify for years. It&#39;s been fine. Netlify is good atwhat it does, and for a static [Eleventy](https://www.11ty.dev/) blog with 400+posts, &#92;&quot;fine&#92;&quot; is really all you need.But I kept wanting one thing Netlify doesn&#39;t give you: server logs.Not analytics. I have [Plausible](https://plausible.io/) for that. I mean rawaccess logs. Who&#39;s pulling my RSS feed? Which bots are crawling the plain-textversions of posts I make available? Is anyone actually using the JSON feed? Whatcurious search engines are visiting me in the ead of night? When a post hits thefront page of Hacker News, what does that traffic actually look like at therequest level? These kinds of questions and mysteries can only be surfaced whenyou start to dig into the raw access logs and start poking around.Netlify doesn&#39;t offer this. Well, they _sort of_ do, but not without giving themmore money. I was already giving Cloudflare money, and I&#39;m generally fond oftheir offerings, so I was more interested in finding a solution there.## Why CloudflareI already use Cloudflare heavily for other projects. Workers, R2, Pages, the AIstuff. My DNS was already proxied through them. So the question wasn&#39;t really&#92;&quot;where should I move?&#92;&quot; but &#92;&quot;why haven&#39;t I moved yet?&#92;&quot;The answer was inertia. Netlify&#39;s deploy-on-push workflow is genuinely nice, andI didn&#39;t want to break something that&#39;s worked for me for nearly a solid decade.But once I actually sat down to do it, the migration was straightforward. TheEleventy build is identical. The `_redirects` file format is nearly the same(with some caveats I&#39;ll get to). And Cloudflare Pages gives you the samegit-push-to-deploy experience. The truth is I had to change almost nothing inthe repo itself.## The actual migrationThe short version:1. **Create a Cloudflare Pages project** connected to the GitHub repo. Set the   build command (`npm run build`), output directory (`_site`), done. This part   is genuinely easy once you find the right UI flow. Cloudflare&#39;s dashboard   is... confusing. Workers and Pages are merged under one section, and the   &#92;&quot;Create&#92;&quot; flow defaults to creating a Worker, not a Pages project. There&#39;s a   small &#92;&quot;Looking to deploy Pages?&#92;&quot; link at the bottom of the page. I missed it   twice.![The page Cloudflare shows you when making a new worker. I am embarrassed so say I missed this link about Page Workers a couple times.](https://georgemandis.s3-us-west-1.amazonaws.com/logexplorer/cloudlflare-page-worker.png)2. **Move the `/random` endpoint.** I had a Netlify Function that fetches a   special JSON array of all post URLs that Eleventy generates, picks one at   random, and 302 redirects. Super hacky and one of my favorite things about my   own site. This became a   [Cloudflare Pages Function](https://developers.cloudflare.com/pages/functions/)   at `functions/random.js`. Same logic, different export format (`onRequest`   instead of `exports.handler`).3. **Clean up `_redirects`.** Cloudflare Pages supports the same `_redirects`   format as Netlify for simple path-to-path redirects. But it does _not_   support two things I was using: cross-domain redirects (for   `georgemandis.com` → `george.mand.is`, etc.) and `200` status proxying to   external URLs. The cross-domain redirects moved to Cloudflare Redirect Rules   in the dashboard. I had to look up the syntax for dynamic redirects and found   [Simon Willison&#39;s write-up on this](https://til.simonwillison.net/cloudflare/redirect-rules)   more helpful than Cloudflare&#39;s own docs. Cloudflare has some amazing tools,   but I wish they were more clearly and consistently documented sometimes. The   proxy rules were for Plausible, which needed a different solution.4. **Drop the dead weight.** I had two other Netlify Functions that I wasn&#39;t   using anymore: a Micropub endpoint for publishing from iA Writer and a   home-rolled Stripe payment handler for sponsorships (I&#39;m just leaning in to   [Github sponsors](https://github.com/sponsors/georgemandis) now for that).## The Plausible proxy problemHere&#39;s where it got a little more interesting. I proxy Plausible Analyticsthrough my own domain so it works even when ad-blockers block `plausible.io`. OnNetlify, this was three lines in `_redirects`:```/js/script.js https://plausible.io/js/script.js 200/js/script.tagged-events.js https://plausible.io/js/script.tagged-events.js 200/api/event https://plausible.io/api/event 200```The `200` status tells Netlify to reverse-proxy the request rather thanredirect. Cloudflare Pages doesn&#39;t support this. It didn&#39;t fit cleanly intoPages Functions either, because file-based routing means `/js/script.js` wouldneed a file at `functions/js/script.js.js`. It technically _could_ have worked,but would have been very strange.The solution: a standalone Cloudflare Worker with route matching. The Workerintercepts requests to `/js/script*` and `/api/event` on my domain, proxies themto Plausible, and lets everything else pass through to Pages.In the Cloudflare ecosystem, when in doubt, just throw another worker on thepile...But I actually kind of liked this pattern. I ended up making this its ownproject and set it up as a GitHub template:- [plausible-cf-worker](https://github.com/georgemandis/plausible-cf-worker).![Screenshot of the plausible-cf-worker GitHub repo page](https://georgemandis.s3-us-west-1.amazonaws.com/logexplorer/plausible-cf-worker-screenshot.png)The code is about 70 lines, and it does a few things beyond a naive proxy:- **Edge caches the script** so repeated page loads don&#39;t hit plausible.io at  all- **Strips cookies** from event POST requests for privacy- **Forwards the client IP** via `X-Forwarded-For` so Plausible counts unique  visitors correctly instead of seeing the Worker&#39;s IP- **Returns 404 for anything else** so it&#39;s not an open proxy to plausible.ioThe nice thing about a standalone Worker with route-based matching is that itworks independently of your hosting. It sits at the Cloudflare edge andintercepts matching requests before they reach your origin, whether that originis Pages, Netlify, or anything else. It started working on my live siteimmediately, even before I finished the Pages migration, because the DNS wasalready proxied through Cloudflare.This also means I can reuse it for any other site I proxy through Cloudflare.All I have to do is just add more routes to `wrangler.toml`:```tomlroutes = [  { pattern = &#92;&quot;george.mand.is/js/script*&#92;&quot;, zone_name = &#92;&quot;mand.is&#92;&quot; },  { pattern = &#92;&quot;george.mand.is/api/event&#92;&quot;, zone_name = &#92;&quot;mand.is&#92;&quot; },  { pattern = &#92;&quot;some-other-site.com/js/script*&#92;&quot;, zone_name = &#92;&quot;some-other-site.com&#92;&quot; },  { pattern = &#92;&quot;some-other-site.com/api/event&#92;&quot;, zone_name = &#92;&quot;some-other-site.com&#92;&quot; },]```One `npx wrangler deploy` and it&#39;s live.If you use Plausible and Cloudflare, feel free to copy the `plausible-cf-worker`template and tell me if it was useful.## The logging questionRight, the whole reason I initially did this.My first attempt was a Pages middleware that logged every request to an R2bucket. Structured JSON, organized by date and hour, the whole thing. It worked!I thought I was so clever avoiding the extra money Cloudflare wanted to chargerfor their Log Explorer offering (still less than Netlify, but why pay when youcan be clever?).And then I looked at my R2 dashboard an hour later and saw 6,900 Class Aoperations. At$4.50 per million operations, this was going to cost more per month than just buying Cloudflare&#39;s Log Explorer add-on ($1per GB ingested), which at my traffic levels would cost approximately nothing.So I deleted the middleware and bought Log Explorer. Sometimes the boring answeris the right one.And truthfully, Log Explorer offers much more intersting logs than what I washome-rolling myself with this approach and a great interface for exploring themwith. I can use their query builder to build filters along 125 differentparameters. I have a nice little saved query specifically for trackign pings onmy RSS feeds (the original question) as well as checking-in on who mightactually be looking at the plain-text versions of my blog posts.![Screenshot of Log Explorer with a custom filter for seeing who has viewed plain-text versions of my blog posts](https://georgemandis.s3-us-west-1.amazonaws.com/logexplorer/cloudflare-log-explorer.png)## Was it worth it?The site works the same as before—same build, same deploy flow, same content—buthere are the things I gained:- Access logs (finally!)- The Plausible proxy as a reusable standalone thing (fun)- Everything under one roof (DNS, CDN, hosting, workers, storage)- The option to do more interesting things later (D1 for search? Workers for  dynamic features? Durable Objects for real-time shenanigans? GUess we&#39;ll see!)The things I learned:- Cloudflare&#39;s dashboard UX for distinguishing Workers from Pages is kind of  confusing- `_redirects` compatibility between Netlify and Cloudflare Pages is close but  not identical- Per-request R2 writes are expensive; think about  [Class A operations](https://developers.cloudflare.com/r2/pricing/#class-a-operations)  before you build a logging pipeline- A standalone Worker with route matching is a pretty clean pattern for proxying  third-party services through your domain (i.e.  [plausible-cf-worker](https://github.com/georgemandis/plausible-cf-worker))If you&#39;re on Netlify and considering a move, the migration is less scary than itseems. The Eleventy build doesn&#39;t change at all. Most of the work is shufflingNetlify-specific things (functions, proxy redirects) into their Cloudflareequivalents.",
      "date_published": "2026-05-13T00:00:00.000Z"
    }
  ]
}