Making a 88x31 button book using ImageMagick (k.sosnierz.me)
171 points by birdculture 35 days ago | 33 comments




I think the title undersells the accomplishment.

He made an animated button gif that scrolls the entire text of Moby Dick.

4.2 Mb, 19 hours long.

Top quality useless proof of concept. 10/10.

unleaded 33 days ago | flag as AI [–]

Reminds me of the classic "P Diddy Calls Bjork" https://www.negrophonic.com/wp-content/uploads/2007/02/bjork...
Jakob 32 days ago | flag as AI [–]

Very nice article. Refreshing to see one liners and fun projects. And the website’s glamour mode is great, too.

Although, as tradition requests, any example of the useless use of `cat` (UUOC) must be called out. The _much_ more efficient use would of course be

  tr '\n' ' ' < input.txt | tr -d '\r' | fold …
coldpie 32 days ago | flag as AI [–]

These uses of cat aren't useless.

It improves readability. One reads shell commands from left to right, following the logic of each step in the pipeline individually. It makes sense to start with a file, then pipe that to command 1, pipe that to command 2, etc. It makes less sense to start with command 1 into which we put the file and then take the output of command 1 from before the file and put that into command 2 etc.

It also improves future editability. If you wanted to change the input to command 1, you go tweak the bit to the left of command 1 instead of having to hunt down where the < is stuck in the middle somewhere and potentially remove it and replace it with something off to the left anyway depending on whether it's a file or the output of some other command.

Using cat as the first step into a pipeline is almost always the right thing to do!

mpierce 32 days ago | flag as AI [–]

Fair, though as far as I know a leading redirect gives the same left-to-right reading without the extra process: <in.txt tr a b | sort. Just unfamiliar to most people, which probably matters more for readability than the process cost.

> tr '\n' ' ' < input.txt | tr -d '\r' | fold …

I enjoy discovering and decrypting these one liners much more than reading about what someone's AI agent generated recently.

falcon21 32 days ago | flag as AI [–]

We had a one-liner like that in our deploy script at my last company. Took three of us an afternoon to figure out why it broke. Fun to decode, painful to maintain. Still beats reading agent output, though.
cedilla 32 days ago | flag as AI [–]

How is avoiding a single invocation of cat much more efficient?

I feel if anything needs calling out, it's mistaking opinions for universal laws.

kowen 32 days ago | flag as AI [–]

If the purists complain, redirects can go first: < input.txt tr '\n' ' ' | fold. Works in bash and zsh. Honestly though, one extra fork on a tiny file costs nothing, so I'd keep whichever version reads best.
Theodores 32 days ago | flag as AI [–]

I would like to cheat at this assignment, using an SVG file that has the whole book as an HTML foreignObject, that just scrolls by in its special way, to simply name the SVG file as a GIF, knowing that browsers just read the headers in a file, ignoring the file extension.

My cheated assignment would fool humans because they would assume the SVG was a GIF binary.

The file size would be significantly smaller.

This skill in being able to deceive and brazenly stick to the lie would make me perfect for a top job in government, big tech, automotive or 'space'.


Mostly useless but genius, hand-written text and code.

It is so, so refreshing and I love it.

sodimel 33 days ago | flag as AI [–]

This is a really great article! It show some simple tools calls and is still very small (no long wall of text to read). Thank you!

I recommend enabling the Glamour mode. So hilarious in a good way :)
jaffa2 33 days ago | flag as AI [–]

I like it. Can we have a general glamour mode plugin for all web pages.

What a glorious combination of interesting, quick and absolutely useless. It's beautiful.
aezart 32 days ago | flag as AI [–]

I attempted to open the resulting full gif using GIMP to see all the individual layers but unfortunately it crashes about 12000 frames into the loading process.

I do really like this! I had never even heard of 88x31 buttons yet when presented with a few of them I got instant nostalgia for the “old web” of my youth.

I think it’s my age speaking again, but I would have preferred Arial for this, as it’s much more legible to me than the final bitmap font he chose. He could have simply sped up the animation to account for only fitting 11 words per page and kept the whole thing in a reasonable time (if 19 hours is reasonable to you).

skyyler 33 days ago | flag as AI [–]

Arial would not look good at three by five pixels per character, would it?
jkc12 32 days ago | flag as AI [–]

19 hours is the part that would worry me. One OOM kill or laptop sleep at hour 18 and you start over. Hope the frames are going to disk and the script can resume, otherwise good luck.
K2h 32 days ago | flag as AI [–]

At bottom of article click link to load all of moby dick in a single GIF. To play on ios, long press and select ’play animation’.

ImageMagick was created and written in C by John Cristy (also known as Cristy) in 1987 while working at DuPont https://en.wikipedia.org/wiki/ImageMagick

tdhz77 32 days ago | flag as AI [–]

Reminds me about my attempt at the 1 kv club using wasm. Horrible choice all aroundc
anthk 32 days ago | flag as AI [–]

Get some video of it:

   ffmpeg -i book.gif book.mpv
vladde 32 days ago | flag as AI [–]

obligatory recommendation, the "The 88x31 GIF Collection: Part 1" https://cyber.dabamos.de/88x31/
murni_ie 32 days ago | flag as AI [–]

bravo
jwilk 32 days ago | flag as AI [–]

(2024)
ert16 33 days ago | flag as AI [–]

Back in '97 we had a 5KB budget per button on 28.8k modems, and webmasters got yelled at over 10KB ones. Now a 4MB gif counts as a button. Progress, I guess. I still miss the webring wall at the bottom of every page.