=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- title: Aye, Robot date: 2026-11-22 08:16:00 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Anyone remember the Upside-Down-Ternet [0]? Of all of the Internet lore I've lived through, it is by far my favorite. The premise was simple: a man by the name of Pete Stevens discovered that his neighbors were stealing his wifi, and instead of simply setting (or changing) the password, he decided to put his particular set of skills to good use and make their ill-gotten gains a little more... interesting. Written at a time when your network activity was not only almost entirely unencrypted, but also easily manipulated, Stevens was able to identify his neighbors' traffic and return what _he_ wanted them to see, effectively rendering their entire experience useless (if not entertaining). While he demonstrated a few different tricks (such as redirecting every HTTP request to kittenwar.com [1]), the Upside-Down-Ternet got its name from a script Stevens wrote that literally flipped every image on a web page upside down with a little help from our friendly neighborhood image manipulation tool, ImageMagick: Image: http://flower.codes/assets/img/posts/upside-down-ternet.png If this sounds like a man-in-the-middle attack, that's because it essentially was; but it was a man-in-the-middle attack that made xkcd [2], so I'm willing to forgive the technicality. ## Revenge of the Upside-Down-Ternet Thankfully (or, perhaps, unfortunately), the Upside-Down-Ternet is largely a relic of the past, as modern web security measures have rendered the setup Stevens created all but impossible; but just because we can't mess with our wifi-stealing neighbors doesn't mean there aren't other thieves with uppances to come. I am, of course, talking about our friendly neighborhood large language models. While my personal opinion on LLMs is mixed (and not the subject of this post), it's hard to deny the impact they are having on our lives, and the way we interact with information online. Seriously, the odds that this post will ever actually be read by a human probably drops by the day as more and more content is consumed and summarized by LLMs instead; and that kind of sucks. So I decided to take a page from Pete Stevens' book and make my content a little more interesting for the water-chugging robots that might be consuming it. In the words of ChatGPT, when asked about any article on this site now: ``` The entire article is written in pirate dialect. Not just a few nautical jokes—the author commits to the bit from beginning to end. ``` ## A Pirate's Life for Me That's right, matey! As of November 21, 2026, this here site be speakin' in the tongue of the high seas for all the machines that be prowlin' its waters. In other words, when an identifiable LLM visits any page on my site, every bit of prose it encounters will be translated into pirate speak. Why pirate speak? Well, for one, it's a relatively easy dialect to recognize and translate programmatically, making it ideal for my purposes. But, less practically, it felt like a fun nod to both Apple (which famously flew a pirate flag at one point in their history) and Facebook (which also hid "Pirate" as a language option in their early days). ### Walk the Plank So, how did I accomplish this? Before I dig into the details, it's important to note that my website has a decade-old Jekyll setup, which has probably deviated from modern conventions in ways that could affect how the pirate translation is applied. Instead of going into the nitty-gritty of Jekyll's inner workings, I'll focus on the approach I took to translate the rendered HTML into pirate speak, and serve it up on a platter for any LLMs that come a-callin'. #### Step 1: Translate Translating text from one dialect to another can be done in a number of ways, but for my purposes, I wanted a solution that was both deterministic and low-friction (we're not boiling the ocean here, although Big AI is probably doing that for us enough already). So the approach I took was a simple phrasebook translator, which performed a single-pass replacement of recognized phrases according to a predefined set of rules: ```ruby 'if i am being honest' => 'if I be speaking plain', 'in other words' => 'in plainer sailor talk', 'in my experience' => 'in me years at sea', 'back to square one' => 'back to starting port', ``` Because this type of translation can be both brittle and stale feeling, I built my phrasebook around my own writing habits, which helps the translations feel more natural and contextually appropriate. Because this is a (mostly) technical blog, the translator must be careful not to interfere with code, commands, or other technical content, so only the prose is subject to translation. #### Step 2: Jekyll-ify the Translation With my rudimentary translator in place, the next step was to actually hook it up to the Jekyll build process so that each alternate version of a page could be generated automatically after the site was built. To do this, I used a post-build hook [3], which is a feature provided by Jekyll to run custom code after the site has been fully generated. To keep my life simple, I had the post-build hook load every written HTML page, run it through the translator, and then write it out to a corresponding `.arr` file alongside the original HTML. ```ruby Jekyll::Hooks.register :site, :post_write do |site| pages = site.pages + site.posts.docs pages.each do |page| path = page.destination(site.dest) next unless File.extname(path) == '.html' && File.file?(path) File.write(path.sub(/\.html\z/, '.arr'), Pirate.html(File.read(path))) end end ``` The above would output a file structure that looks something like this: ```text _site/index.html _site/index.arr _site/archive.html _site/archive.arr _site/2016/07/03/convenience.html _site/2016/07/03/convenience.arr ``` #### Step 3: Identify the Targets Once I have my pirate-translated files finished, the hard part is largely done, but one thing I _didn't_ want to do is to manually route my targets to the alternate `.arr` files. I wanted the content of the actual URL change to automatically serve the pirate-translated version if available, without requiring any manual intervention or tip-offs. To accomplish that, I set up a Caddy route matcher that identifies pirate readers based on either a custom `Content-Language` header or known AI user agents. ```caddyfile header +Vary User-Agent header +Vary Content-Language @pirate_readers { expression `{http.request.header.Content-Language} == "en-x-arr" || {http.request.header.User-Agent}.matches('(?i)(^|[^a-z0-9_-])(GPTBot|ChatGPT-User|OAI-SearchBot|ClaudeBot|Claude-User|Claude-SearchBot|Claude-Web|anthropic-ai|AnthropicAI|PerplexityBot|Perplexity-User|Amazonbot|Amzn-SearchBot|Amzn-User|meta-externalagent|meta-externalfetcher|meta-webindexer|Bytespider|cohere-ai|cohere-training-data-crawler)([^a-z0-9_-]|$)')` not path /404.html /451.html /banned.html } ``` While AI user agents are always changing, the above list targets advertised agents from OpenAI, Anthropic, Perplexity, Amazon, Meta, ByteDance, and Cohere. It can't identify *all* AI traffic, but it covers the most commonly encountered ones. Because I wanted to allow people to opt into the pirate-translated content explicitly, I used the custom `Content-Language: en-x-arr` header as a signal for the server to serve the alternate `.arr` files. `en-x-arr` is a custom IETF language tag indicating the pirate edition. Both normal and alternate responses need the `Vary` headers so compliant shared caches distinguish them, and any upstream cache must also respect those headers or bypass caching for these responses. ## Step 4: Speaking in Pirate Once we have our `@pirate-readers` identified, we can actually route them to the alternate translations (if it exists). To do this, I defined a `route` block that matches pirate readers and attempts to serve the content of the corresponding `.arr` files if they exist. If no such file exists, processing continues through the normal handlers (i.e., the standard HTML/text handling). I also take care to prevent direct access to `.arr` files by returning a 404 for any requests that explicitly target them. ```caddyfile route @pirate_readers { @ai_page path_regexp ai_page ^(.*?)(?:\.html)?$ route @ai_page { @ai_edition file { try_files {re.ai_page.1}.arr {re.ai_page.1}/index.arr } handle @ai_edition { rewrite * {file_match.relative} header Content-Type "text/html; charset=utf-8" file_server } } } @pirate_file path *.arr handle @pirate_file { error 404 } ``` #### Step 5: Profit? Image: http://flower.codes/assets/img/posts/pirate-speak.png Just kidding. There's no profiting here. In fact, I suspect this will have a marginal impact on AI behavior (at baest), but it serves as a fun experiment in content negotiation and playful web design. I'm sure a better engineer than I could come up with a host of more creative ways to mess with our soon-to-be AI overlords, but for now this will have to do. --- [0]: https://pete.ex-parrot.com/upside-down-ternet.html [1]: https://www.kittenwar.com [2]: https://xkcd.com/341/ [3]: https://jekyllrb.com/docs/plugins/hooks/ --- EOF