Blog - David Helkowski
index

Brew is a steaming shitpile

I've long hated brew / homebrew, as you could likely guess from the title of this post.

First the basic reasons:

I hate it. I hate it supremely. I hate it so fucking much that I wrote my own fucking entire replacement for its scripts called minibrew that uses its same remote data but does not using any of the horrible code it actually ships. And that works better, because of course it does.

All of this isn't even what triggered me to write this. Oh no. I've hated this pile of garbage for over a decade and I was still continue to only shit on brew ocasionally. I need to take an extra large dump on it now.

Why?

Because I feel the need.

Why?

Well you see, I saw a YouTube video I wanted to shit on. The video is long. The YouTube interface doesn't provide any reasonable way I see to grab the subtitles to a video so I can critique a bad video line by line.

Enter me wanting to use yt-dlp. The machine I want to use to write up my critique? An older machine running an older version of MacOS, which I cannot actually update. Brew has phased it out, because brew only works halfway okay on the latest 3 major versions of MacOS at most.

My MacOS on this particular machine? Older than that.

What happens when you want to install something from brew from an older machine like this?

This:

Or at least I let it run for over an hour last time I tried. Eventually I said "fuck this" and installed yt-dlp on a different modern Mac just to get the subtitles and then copy them over to this machine.

I'm letting it run again. Who knows how many hours and how much crap it will install to my machine just to get yt-dlp to install.

You may be thinking "lol fucking loser just get a modern Mac then". No? I already fucking have a current modern m4 mac. I also have 3 others macs I use for various things. I don't see why I shouldn't be able to use all of them reasonably well. Being only able to use the newest one because brew is a pile of garbage is not acceptable.

Fuck you brew. Fuck you very much.

Brew is right up there with:

The only thing worse than brew on MacOS is learning that anyone on planet uses it on Linux.

It's like discovering that some people prefer eating cow dung to a perfectly cooked burger. Actually, that might make more sense. At least if by "eating" they mean having it shoved up their rear ends to diversify their ecosystem.

But of course, I only have warm fuzzy thoughts towards the dear and amazing author of brew. Incidentally, I'm also selling bridges. This is my way of showing my love and appreciation.

By the way, it's still busily doing something. Destroying my SSD most likely.


Let's step back a moment and I'll grudgingly drag you through the hell of what in the fuck brew is currently still doing on my machine at this moment.

You see:


So while brew is still doing stupid shit, I asked AI how to get the subtitles from Firefox as I have the video in question open there.

The answer? Watch requests. Turn on subtitles. Grab context of "timedtext" response.

It is JSON. Save it to a file.

Then run this script which AI has created for me:

import json

with open("timedtext.json", "r", encoding="utf-8") as f: data = json.load(f)

with open("transcript.txt", "w", encoding="utf-8") as out: for event in data.get("events",

): segs = event.get("segs") if not segs: continue

text = "".join( seg.get("utf8", "") for seg in segs )

text = text.strip()

if text: out.write(text) out.write("\n")

This all took me... 4 minutes. Meanwhile writing this post and watching brew shit on itself? A lot longer.


Well a broken form worked in 4 minutes. Then I spent 20 minutes fucking with Firefox Developer Tools to learn how to fucking get it to give me the full response of a request instead of a truncated form, which will require a whole additional rant in a different post.

In the end I use the 'Turn this request into a fetch' option within the Developer Panel, and then tacked on the following code to spit it out as a file download. All still before brew finished.

.then(r => r.text())
.then(t => {
    const a = document.createElement("a");

a.href = URL.createObjectURL( new Blob(

t

, {type: "application/json"}) );

a.download = "timedtext.json";

a.click(); });;