Honestly it's a bit of a shame. I checked and they could've shortened their base64 payload by 304 chars by removing all comments except the top two congratulatory ones, or by 524 if they removed those too.
Would they still get the highlighted "PEACE FOR ALL" text throughout the shortened string? It looks like the length, and presence of those characters, was an explicit design choice.
Human could write that many comments to get enough base64 text for a design. Maybe to even get some of the highlighted characters in places they want (roughly equally spaced apart).
My code usually clocs at 50/50 (or thereabouts)[0]. Has, since my very first real engineering project (in 1987)[1]. I discuss in detail, here[2].
But one reason that I like LLMs, is that they help me to write even more documentation. I have found that I can instruct an LLM to revise my documentation, and make it even more effective.
[0] https://github.com/ChrisMarshallNY (My GH profile. Pretty much everything there, is like that -has, since long before LLMs were a broken rubber on the drug store shelf).
I didn't downvote. There's nothing wrong with your comment. It's just a bit silly, because humans definitely write that much. I learned from Apple and Adobe headerdocs.
I worked for a Japanese company that accreted comments.
Especially in a case like this, I would definitely write a lot of comments to aid in understanding, thus increasing trust so people would try it out and tinker with it.
I don't think it was written by an LLM, some things stand out:
The congratulations text is both in English and Japanese. Contains a single heart emoji.
There was an intention to have a cyan to orange gradient, but the range starts in an ANSI block, ends halfway through the 256 color block and 256 terminal colors are not arranged like a gradient at all.
There's no sleep at the end of the loop where I feel like an LLM would add that defensively.
Safari's copy-text-from-image feature manages the entire base64 part of the string, except for the first character (I instead of a T). Weirdly, it gets much worse performance if you try to copy the entire string, including the hashbang part.
I wonder what it's doing under the hood to get such good performance?
The last time Internet people were obsessed with OCRing some base64 was a few months ago when the DoJ released tons of emails from some guy who died, but they were released as rasterized PDFs.
Can't remember his name now, there's been so many distractions...
> I wonder if the script itself was written by an LLM before obfuscation?
From the prototype shown here [0], and the way they talk about their process, I sincerely doubt it. Especially as they mention trying to make it hard for AI to handle the output.
I watched that whole video link - thank you for that - and he doesn't really say. In fact, he spends much more time on the beige color harkening to computer case plastics of the 80s & 90s.
What made me wonder, personally, was that the output seems identical if you use "♥PEACE♥FOR♥ALL" instead of the version with internal repeats. IF there is any point to that "manual expansion of the cycles", IMO that deserves a comment much more so than "# Calculate length of text; text_length=".
Also, that `echo -n ...` followed by `echo ""` instead of just plain `echo` in the first place seems like the kind of garbage copy-pasta code LLMs generate. Then again, regular devs also write pretty bad copy-pasta code.
There is also this the weirdly "broken down" calculation with 3 `bc` invocations not 1 as if it was translated from a language with more arithmetic/special function power than bash.
There is also the color scale stuff done in the loop instead of outside (except the one color=$(..)) which seems very unnatural and also very like machine translation.
Also, at least for me, on my bash-5.3.15(1), `char="${text:t % text_length:1}"` does not work to slice out the multi-byte UTF8 heart symbols, but it sure does look like the kind of thing an LLM would do translating from a python3 script (such as something like https://news.ycombinator.com/item?id=48830669) into bash.
None of this is conclusive, but the video mentions 2023..2025 as when he did it and given that he was a designer and his concerns more visual than code-oriented, I'd have to say I disagree with your sincere doubt and I do strongly suspect the decoded script was probably LLM generated. The AI not handling the output relates to the final output other comments in this thread about manually keying in the base64.
> All the smells you pointed out, just look like a Python dev approaching bash without fully understanding it.
also, referring to Linux as "the language of the internet" when bash isn't particularly suited for internet tasks also smell like "excited windows Python dev"...
"Linux, the open-source language of the internet" comes from the linked akamai.com press release, not the blog post author. Their putting that as a section title to the quote may be their poking fun at it.
Yeah. The Flask web-page prototype was indeed in Python. (The prequel shirt was Go.)
{ Also, it was my own Py version which I mostly did in case anyone wanted to actually run the thing after such interest was expressed on this thread. :-) }
I already said regular devs and LLMs can both gen copy-pasta. That said, being "mostly" a Python dev, asking some LLM to translate to bash for him seems even more likely to me. Only he or those close to him know for sure, though. We cannot settle it here conclusively (as also said).
I also noted from the video that the ♥s (hearts) worked on whatever version of bash he tested with though it failed for me (which is why I wrote that Python). And his terminal title bar is switching between `tput` and `bc` and such meaning that what he was demoing was not some Python script. ¯\_(ツ)_/¯
I gave the photo to Opus 4.8 and it reconstructed the same script in one shot. Although it did say it had to correct some parts of it based on context where it suspected OCR mistakes.
>I wonder if the script itself was written by an LLM before obfuscation?
I seem to recall seeing an Akamai-branded base64'd shell script on a white shirt pre-2021(?), so unless they've changed the code since then, I doubt it...
> OCRing this is a nightmare and is a good benchmark to any self-proclaimed good OCR/vision model.
It's not that difficult, our industrial OCR model read it correctly on its first attempt with default parameters. The characters are easily separable, there is no structured background (think expiration dates on yogurt aluminum lids) that confuses the reader, there is no almost-text-like texture anywhere that would clutter the result. The font is also nice and standard.
Essentially part of a machine vision software package, which in turn is computer vision specialized for factory automation. It's "industrial" because it was trained on such data (more expiration dates and SEMI-font on wafers, less random pictures of streets with some text).
That, plus engineering and support: a robust implementation, deployment on almost any system, fast and good long-term support so your factory doesn't stop for too long if something goes wrong etc.
Makes sense. I wonder if there's anything in the technology that would benefit people scanning books or those scanning random things with their phones. Maybe better for low contrast or degraded print?
(Obviously those applications don't need the engineering and support, and probably would not be a good fit for your company.)
Those of us who grew up in the 8-bit era would have just typed it in, carefully, in silence, with no-one allowed to enter or leave the room until we were done ;-)
Is it a nightmare? I pasted the first, zoomed out, image of the shirt into ChatGPT, and it decoded it / let me know what the bash script does in one shot
Cool! I bought one a few months ago as soon as I spotted it at a Uniqlo store, and later ordered a larger size online—I really love wearing them. But it never occurred to me to look into the story behind them.
I thought it was funny that the author used a variety of OCR tools with mixed success before spending a lot of time manually fixing up the output from the best one, rather than just typing it in
Took me almost 2 minutes for 4 lines (and I missed a character in one of them!).
I would opt for OCR too, obviously so I'm prepared for the next bash t-shirt I'd come across...
I think this is a case where two people can successfully complete the task manually faster than one attempting to automate it. Get a ruler, read five centimetres of characters to your colleague, have them type it in as you go, then repeat that five centimetres back to you. Correct as you go. Format your string with the same line-breaks as the t-shirt, and remove them at the end, so you can be sure you've got the correct length on each row. Trial-and-error adjust the five-cm distance depending on your success rate as you go along
All in, you should have a non-corrupted string in 10-15 min.
That was also my thought… but I grew up mashing rubber keys for hours copying “games” out of magazines and books! Then hours after fixing all the typos!
I ran it through paddle paddle OCR and it flawlessly did it.
Google's OCR through my phone's Google lens had also worked at getting a very good extraction but not 100% correct. Definitely would spend less time fixing it than hand copying.
IDK what the author was using but I feel like he could have shared how his OCR attempt went, but I am thinking he tried some naive OCR tools.
Author here - that's a good idea actually, it shouldn't be too hard to compare the various attempts. The tools I used were whatever my Android built-in is (likely Google Gemini, but I can't tell whether this is something Samsung has replaced in OneUI); tesseract; tesseract with various tweaks and charsrt restrictions; Claude; and finally, manual fixes based on disagreements between all the previous.
Gemini3.5 Flash didn't have a problem OCR'ing and base64 decoding it, despite the OCR step having errors, it just fixed them in the base64 decoding step.
Feels like my experienced reality of task automation in corporate environments. We routinely have engineers spend 40+ hours automating tasks that an entry level person can do manually in 10 minutes and only need to be done weekly. Automation at all costs seems to be the future
It’s certainly not a new phenomenon. I appreciate this XKCD [1], with a chart of “How long can you work on making a routine task more efficient before you’re spending more time than you save”
It’s not the final word, since automation has other benefits: documenting the procedure’s steps, reducing human errors, increasing consistency, etc.
> I guess Uniqlo is run through Windows though: one thing that struck me was the font, which I’m almost certain is Consolas,
Surely this would use whatever font the virtual terminal profile was set to? I don’t know of any method to choose a virtual terminal font from bash and don’t see any code that addresses it?
I don't recall the exact command I used, but I had my console font set to Comic Sans for a while (though it wasn't quite recognizable due to low resolution and aliasing). There's tools out there to convert type 1 and other fonts to console font format (I couldn't quite manage to get the opentype converter tool working, but truetype worked fine at large sizes)
P
./cool.sh: line 31: bc: command not found
./cool.sh: line 34: bc: command not found
./cool.sh: line 37: bc: command not found
E
./cool.sh: line 31: bc: command not found
./cool.sh: line 34: bc: command not found
./cool.sh: line 37: bc: command not found
I love this shirt! Here's a nice video from the actual designer about the process of making this shirt (including intentionally making it hard to OCR): https://youtu.be/jocGLiecpjU?t=526
Author here. Thank you so much for the link which I hadn't seen! I'm very happy to see this and I'm gratified that it was deliberately difficult to OCR, not just me.
But it's not hard to OCR? And I don't know why the article dedicates an entire section to it.
On a Samsung S24U I held down the "circle to search" homescreen button which brings up the AI tools interface (I don't know what it's officially called), held down on the text and copied the whole thing in one shot.
Basically it just clusters same characters and asks the human to find the problems, which is easy when you're looking at a series of pictures like ssssss5sss.
The UI is kinda least-effort. Should ask a modern AI agent to make it look nice and intuitive, sometime maybe.
Saw this the other day on the train, and probably stared a bit too hard at the dude wearing it. Surprised to see this on HN so soon after. World feels like a simulation
210 comments
[ 2.5 ms ] story [ 101 ms ] threadI wonder if the script itself was written by an LLM before obfuscation? There seem to be a lot of comments in it, but in this case it's still ok :)
The comments can be more cute/awe inspiring for people who aren't as familiar with bash but like solving puzzles as well.
My code usually clocs at 50/50 (or thereabouts)[0]. Has, since my very first real engineering project (in 1987)[1]. I discuss in detail, here[2].
But one reason that I like LLMs, is that they help me to write even more documentation. I have found that I can instruct an LLM to revise my documentation, and make it even more effective.
[0] https://github.com/ChrisMarshallNY (My GH profile. Pretty much everything there, is like that -has, since long before LLMs were a broken rubber on the drug store shelf).
[1] https://littlegreenviper.com/wp-content/uploads/2022/07/TF30... (Downloads a PDF)
[2] https://littlegreenviper.com/leaving-a-legacy/
https://github.com/RiftValleySoftware/RVS_Spinner/blob/d44ee...
An LLM would have commented `// Create temporary UI view.`
Completely redundant comments like this are a classic hallmark of LLMs:
Dunno why I have been downvoted for stating the obvious.Also from my brief look at one file it looks like you have 50% comments because you have a gazillion comment separator lines.
I worked for a Japanese company that accreted comments.
Yeah, lots of whitespace.
Especially in a case like this, I would definitely write a lot of comments to aid in understanding, thus increasing trust so people would try it out and tinker with it.
The congratulations text is both in English and Japanese. Contains a single heart emoji.
There was an intention to have a cyan to orange gradient, but the range starts in an ANSI block, ends halfway through the 256 color block and 256 terminal colors are not arranged like a gradient at all.
There's no sleep at the end of the loop where I feel like an LLM would add that defensively.
In my mind an AI would do something the most popular way even when that's not appropriate.
A human might do things in an unpopular way even when that's not appropriate.
I wonder what it's doing under the hood to get such good performance?
Can't remember his name now, there's been so many distractions...
He even sent the now-deceased man a birthday card with some words that strongly suggest he knew what was going on..
(.../s)
It's spelled "reigns of power". That's how you idiomatically "reign in" something.
From the prototype shown here [0], and the way they talk about their process, I sincerely doubt it. Especially as they mention trying to make it hard for AI to handle the output.
[0] https://youtu.be/jocGLiecpjU?t=567
What made me wonder, personally, was that the output seems identical if you use "♥PEACE♥FOR♥ALL" instead of the version with internal repeats. IF there is any point to that "manual expansion of the cycles", IMO that deserves a comment much more so than "# Calculate length of text; text_length=".
Also, that `echo -n ...` followed by `echo ""` instead of just plain `echo` in the first place seems like the kind of garbage copy-pasta code LLMs generate. Then again, regular devs also write pretty bad copy-pasta code.
There is also this the weirdly "broken down" calculation with 3 `bc` invocations not 1 as if it was translated from a language with more arithmetic/special function power than bash.
There is also the color scale stuff done in the loop instead of outside (except the one color=$(..)) which seems very unnatural and also very like machine translation.
Also, at least for me, on my bash-5.3.15(1), `char="${text:t % text_length:1}"` does not work to slice out the multi-byte UTF8 heart symbols, but it sure does look like the kind of thing an LLM would do translating from a python3 script (such as something like https://news.ycombinator.com/item?id=48830669) into bash.
None of this is conclusive, but the video mentions 2023..2025 as when he did it and given that he was a designer and his concerns more visual than code-oriented, I'd have to say I disagree with your sincere doubt and I do strongly suspect the decoded script was probably LLM generated. The AI not handling the output relates to the final output other comments in this thread about manually keying in the base64.
All the smells you pointed out, just look like a Python dev approaching bash without fully understanding it.
also, referring to Linux as "the language of the internet" when bash isn't particularly suited for internet tasks also smell like "excited windows Python dev"...
{ Also, it was my own Py version which I mostly did in case anyone wanted to actually run the thing after such interest was expressed on this thread. :-) }
I already said regular devs and LLMs can both gen copy-pasta. That said, being "mostly" a Python dev, asking some LLM to translate to bash for him seems even more likely to me. Only he or those close to him know for sure, though. We cannot settle it here conclusively (as also said).
I also noted from the video that the ♥s (hearts) worked on whatever version of bash he tested with though it failed for me (which is why I wrote that Python). And his terminal title bar is switching between `tput` and `bc` and such meaning that what he was demoing was not some Python script. ¯\_(ツ)_/¯
I seem to recall seeing an Akamai-branded base64'd shell script on a white shirt pre-2021(?), so unless they've changed the code since then, I doubt it...
It's not that difficult, our industrial OCR model read it correctly on its first attempt with default parameters. The characters are easily separable, there is no structured background (think expiration dates on yogurt aluminum lids) that confuses the reader, there is no almost-text-like texture anywhere that would clutter the result. The font is also nice and standard.
That, plus engineering and support: a robust implementation, deployment on almost any system, fast and good long-term support so your factory doesn't stop for too long if something goes wrong etc.
(Obviously those applications don't need the engineering and support, and probably would not be a good fit for your company.)
All in, you should have a non-corrupted string in 10-15 min.
IDK what the author was using but I feel like he could have shared how his OCR attempt went, but I am thinking he tried some naive OCR tools.
It’s not the final word, since automation has other benefits: documenting the procedure’s steps, reducing human errors, increasing consistency, etc.
1: https://xkcd.com/1205/
Surely this would use whatever font the virtual terminal profile was set to? I don’t know of any method to choose a virtual terminal font from bash and don’t see any code that addresses it?
Very wow. Shame they assumed everyone has "bc"...
echo "Fgnaq+sbe+Qrzbpenpl!" | tr 'A-Za-z+' 'N-ZA-Mn-za-m '
https://archive.org/details/1983-01-compute-magazine/page/96...
OCR? oh my sweet summer child, you cannot know the days we spent typing in raw code from a magazine, and the joy when it finally ran.
On a Samsung S24U I held down the "circle to search" homescreen button which brings up the AI tools interface (I don't know what it's officially called), held down on the text and copied the whole thing in one shot.
It took like 2 seconds.
That's better than half the tech howtos out there.
Basically it just clusters same characters and asks the human to find the problems, which is easy when you're looking at a series of pictures like ssssss5sss.
The UI is kinda least-effort. Should ask a modern AI agent to make it look nice and intuitive, sometime maybe.
[0] https://github.com/GL-Kageyama/UNIQLO_Akamai_T-shirt_Code