Indecent Proposal: Linux

Craig suggested a snarky Modest Proposal, start targeting Linux instead of Mac, if you recoil at Apple taking 30%.

It’s really 15% for most people in Small Business Program. In the Olden Times Before Ye Appe Store, distributors only would take 50% or more cut, publishers would take 70-90% cut; the App Store was a ridiculously good deal when it came out. Assholes like Tim Sweeney at “Epic Games” are of course appalled at paying out a dime, and so after an epic court battle where they lost 9/10 claims, have now reduced it to 27%, and owe Apple $73M for legal fees.

But let’s think about switching. I’ve been spending a few days arguing with Linux zealots on fediverse, and have come to some conclusions, aside from the obvious that Linux people are crazy.

THE GOALS

  1. Write software in tools and languages I don’t hate.
  2. Keep the kind of software quality, taste, accessibility, etc. that I like.
  3. Ship it and GET PAID.

Not Goals

  1. End-user use. I don’t have to inflict this on myself, just see what the dev environment’s like.
  2. Server software, I have FreeBSD for that.
  3. Joining a cult and singing the Free Software Song – do not click, it’s Stallman singing.

GUI APIs

This is the most visible, but shallowest problem. Craig suggests Gtk+ or QT.

  • Gtk:
    • Pro: It is easy to code against in C, and from there you can use anything you like with FFI; I could ship my Scheme programs with Gtk.
    • Con: Looks like ass everywhere, native to nothing.
    • Every version is incompatible and utterly different from the last.
    • Theming makes UI design very hard, or impossible.
  • QT:
    • Pro: Actually not terrible looking, sometimes almost passes for native.
    • Con: Have to work in C++, which is a HARD NO from me.
  • Gnome: Mostly this is just Gtk.
    • Con: Do everything in their awful IDE.
    • Sort of has design guidelines, but the child-like or Windows Vista-like icons, bubble aesthetic, is not appealing.
    • Requires Flatpak, which I’ll get to in a minute.
  • KDE: Mostly this is just QT.
    • Pro: Can be worked in from Kate, which is an OK editor. Here’s Mark, saying something almost positive about a Linux program! Kate is OK. It’s no Vim, though.
    • Human Interface Guidelines are pretty consistent, professional-looking.
    • Con: Can also be worked in from KDevelop, which makes Eclipse look fun (Eclipse is not fun).
    • UI is mostly written in QML, which is YAML like Microsoft’s XML layout stuff. Just horrible.
    • Mostly the loser in the Linux User Interface Wars.
    • Again, C++, no.
  • Android:
    • Pro: Is a platform with some aesthetics & user experience; not great, but it exists.
    • Has a paid store.
    • Con: Languages are Java or Kotlin, which are very silly.
    • IDEs for it are really spectacularly awful, either Eclipse or a bag-on-the-side mode of IntelliJ.
    • Security is F-tier, I don’t like contributing to a platform that’s all scams, piracy, and botnets.

I hate basically everything here, and more besides. Gtk has a bare winning edge that it’s easier to use from a language I like.

System APIs

The deeper problem of Linux is everything in between 1970s terminal programs and trivial GUI programs that don’t interact with anything. There’s no real system integrations.

If you want to use the user’s calendar, you have to research several calendaring systems, some of which may have an API and some don’t. Again when you want to do messaging, oh, wait, that doesn’t even exist on every system. Again when you want to do something with curated photo albums, not just shoving a png in some random directory.

Or dig deeper, and audio is the same fiasco that chased me off Linux desktop 20 years ago; you simply can’t get multiple audio streams to sync & play, and the latency is often in the seconds for audio processing, I can get far under 10ms on Mac. Video is nonexistent other than calling out to VLC or mplayer; you don’t want to try.

What you can get done on Linux is maybe a database and low-level networking. If that’s not enough, you’re in for a rough ride.

Taste

So I use this word a lot. “The only problem with Microsoft is, they just have no taste.” —Steve Jobs – watch that whole clip from Triumph of the Nerds.

Taste is about picking one aesthetic, one set of user experiences, and saying no to all the others. You have to choose. And most people can’t choose, or they just end up dumpster-diving a bunch of junk that doesn’t go together, and can’t understand why they’re unhappy (or maybe they’re Grouches who like garbage).

If the platform creator has an aesthetic, it has behavior guidelines, you follow it, so users will feel comfortable, they won’t feel surprised: Law of Least Astonishment.

This is impossible on Linux. Gnome users hate KDE, KDE users hate Gnome. Some of them like Electron shit, others think it’s as bad as Flash (it’s actually worse). Until one of them becomes a One True Catholic Linux and puts the rest to conversion or death at swordpoint, there won’t be any unified UI.

So now you have to do QA testing on design as well as functionality on multiple distros, many different configurations, and you’ll probably need testers familiar with those setups. It’s an impossible QA task.

Suppose I want a file open box with custom file previews. On Mac OS X, I can use NSOpenPanel, customize the accessory view, watch notifications and update the preview. Gnome & KDE will deal with even having icons differently, and you can’t override anything without bringing in their code and hacking on it.

Ship It

You have several choices here.

Gnome people say Flatpak, which bundles all the libraries and support for a program into a bundle, explicitly copied from NeXTstep/Mac OS X/iOS .app bundles (the word “app” is only valid for these platforms! This is where it comes from!)

Which is theoretically fine, but runs into the problem that Linux doesn’t have a consistent OS base, so Flatpaks are a LOT bigger than Mac app bundles. They run “cross-distro” by some kind of linking hackery and translation layers, so your Gnome program includes all of Gnome, and looks like ass on KDE, but runs. As noted under Taste, that’s not an acceptable way to ship, you’d have to test on everything.

npm, deb, & nix are distro-specific bundles, but at least they can check dependencies and install only what’s needed. They don’t help you at all with translation layers. While there’s a UI for these, you really only do them from command line.

“Free Software” is an incredible pain in the ass here, you have to carefully check what libraries you use, and if they’re LGPL or BSD/MIT, so you can use them with some qualifications, or GPL or AGPL, in which case you can’t (unless you like shipping all your source and having 100% piracy).

Get Paid

Releasing free software is useless. As Harlan Ellison said, cross my palm with silver.

Universally, every Linux I’ve spoken to hates paying for software, they would never do it, think I’m an immoral monster for suggesting it, I should be happy someone might put a penny in a tip jar.

This is a backwards, shit-covered, medieval religious dogma. It’s appalling in the 21st Century that Rape Apologist Richard Stallman is still Pope of the FSF, eater of toejam, owner of abortion jokes in fortune. And his devotees are carrying out The Faith, regardless of the sins of their leader.

There’s no good software stores. Elementary has one, which is defunct or close to it, from what I can tell. Ubuntu shut theirs down years ago.

Google Play for Android isn’t on every device, and it’s widely pirated. I also morally object to letting Google have money, but any port in a storm if it wasn’t for that?

itch.io works fine for games. I suspect the Linux paid users are the tiniest most shrivelled-up sliver of the demographics. 20-30 years ago, I actually had minor success with shareware on Linux, but that dropped off and never recovered.

Otherwise, I dunno, try to run my own e-commerce site and sell binaries which will instantly get pirated because nobody on Linux has any money?

So instead of paying Apple 15-30%, pay whatever hosting, bandwidth, & e-commerce costs you, and you get nothin’ in return. Let’s see, 30% of nothin’ is…

Conclusion

It appears that eating babies will not actually solve the overpopulation or hunger problems at this time, Mr Swift (no relation).

Gretchen, Stop Trying to Make ALAC Happen!

I have a bunch of FLAC files from an album I bought, it was that or low-quality MP3. iTunes (“Music.app”) doesn’t read FLAC, even tho it’s the industry standard for lossless audio.

So I fought with ffmpeg (each “f” stands for “fuck you”), and it converted about half of them into usable files.

Eventually I found XLD X Lossless Decoder: Lossless audio decoder for Mac OS X

Had to right-click, Open to get past Mac Gatekeeper, ugly little program, been in development forever, but it works perfectly. Converted a directory full of flac into m4a, then just dragged them into iTunes and now have music where I want it. If I’m real excited for it, I could downgrade them to AACs, but eh good enough for now.

Everyone be sure to tell Apple that ALAC is stupid and not going to happen.

(the ffmpeg I did was:

for f in *.flac; do
  echo "$f"
  ffmpeg -i "$f" -c:a alac -c:v copy -acodec alac "${f%.flac}.m4a"
done

but now I really don’t wanna hear about how to fix that.)

Flipping Back to 2010 With Flipboard

  • Flipboard embraces Mastodon: subhead “The news reading app is going all in on the Fediverse.” so I don’t have to say “don’t forget fediverse”!

Wow. Early days of the iPad, Flipboard was the best news-reading app for a while. My 2010-11-11 review:

Perhaps the best app isn’t a newspaper at all, though. Flipboard is an aggregator for items from Twitter accounts and lists, your own or various public ones. Since many blog writers now tweet about every new entry, they all show up in Flipboard. Navigation is trivially easy and obvious, and little space is wasted on anything but information.
I’m not entirely pleased by how it shows articles, though: You see the first few paragraphs, then a link to the original site, so they can collect their ad revenue. While I sympathize with the need for ads, I just want everything collected. However, it does have a “Read Later” action which sends an article to Instapaper, the ONLY one of these newspaper apps which does.
Still, I think this is pretty close to the ideal for a newspaper. If it had RSS support, and a clearer separation of old from new content, I’d be happy to junk all of the “newspapers” and RSS readers I use.

It did later get RSS, and for years it replaced newspapers. They kind of bit-rotted, and my use of social media changed, so I lost touch with them.

So today’s announcement’s a “OH YEAH, THOSE GUYS”. They still had my old login but my password’s gone, recovered & set a real password, and I’m back in. Looks just like it always did. Remove some junk sources, and it’s a pretty normal newspaper again.

… There’s an option to connect my Mastodon account, but right now it fails at Authorize! So far Mastodon doesn’t show up in hashtag searches and such. They have their own Masto server at flipboard.social but I don’t need that.

So this is interesting, but not quite useful yet.

Apple Security “blog”

“It’s a trick. It’s not dead. Get an axe.”

Apple yet again unleashes “a blog” to “address the community”, Apple Security this time. … I can’t recall what the title of the last one was, it lasted like 2 posts a few years back. Same pattern:

  • No author names
  • No RSS
  • No comments
  • No way to send feedback at all, even to their ghost town forums.

First post is a long, rambling dissection of a new kernel malloc, maybe reducing the memory access errors that keep giving h4xx0rz 0-days into Apple gear. No actionable content; it’s for them to say they’re doing something, not you to improve your code.

Second is an update claiming now they’re gonna actually pay out bug bounties, even tho it’s been a nightmare to extract a red cent from them in the past, honest kick the ball this time for sure, Charlie Brown.

Zero trust in this meaning anything. I bet Grubs fellates this like the second coming of WWDC.

Mac Protip: Open URL in Browser

Not all browsers have an “Open in” service. I tend to use Chromium for media so it’s a different crashy app than my main Safari. I’ve been manually copying URLs, pasting into it.

Open Automator, create a new Quick Action, pick Run Shell Script, paste in:

read -r url
open -a Chromium "$url"

Save it as “Open URL in Chromium”. Quit Automator.

You can now right-click on any URL, Services menu, and send it there.

Gone from Suck to Blow

Want to move a URL or other text between your local computers, and they’re not all Mac/iOS where universal pasteboard mostly works? There’s smart ways, and then there’s how I do it:

# note: needs Apache turned on. sudo apachectl start
mac% cd /Library/WebServer/Documents
mac% sudo ln -s $HOME/Sites
mac% cd
mac% cat bin/blow
#!/bin/zsh
pbpaste >$HOME/Sites/suckblow.txt

raspi% sudo apt-get xclip
…
raspi% cat bin/suck
#!/bin/zsh
curl -s "http://mac.local/Sites/suckblow.txt" |xclip -i -selection clipboard
xclip -o -selection clipboard

And in the reverse set, pbcopy is the Mac equivalent of xclip -i. In practice, I don’t run a server on my RasPi but I rarely need to paste the other way, just sometimes scp files.

Now on the Mac, I copy some text, type “blow” in iTerm2. On the RasPi, I grab terminal and type “suck”. It can take a few seconds, and then the text is in clipboard.

Without running Apache (or other web server, but I’m a caveman), you can use scp to grab the file, then cat it into xclip -i.

Happy blowing & sucking!

[Update 2022-12-03: Some update on raspi changed the default in xclip from clipboard to primary (X11). So I’ve added -selection clipboard to them all.]

Apple Destroys App Store History

Note, currently all my old apps like Perilar, DungeonDice, etc. are off the store. They all still work. Apple wants me to pay $100 extortion, recompile a bunch of old code that maybe takes minutes, maybe hours or days of catching up to “modern” APIs, before I can resubmit.

And once they start requiring Monterey instead of Big Sur, I have to buy new hardware to even do that, my iMac just misses the deadline for support (but they still give me a notification a couple times a month to “upgrade” to Monterey, so smart & classy).

And my reaction these days is basically “fuck you, App Store”. I could pay them nothing, and spend that effort on my Mystic Dungeon Club Javascript games, or my Scheme games (shipping real soon now!), and then I’m the only one who can disappoint me. Most of my JS stuff works on an iPad just fine; I’m not really inclined to try resizing for iPhone or Android, but in theory they’d work, too.

My little Glitch.app, full of mostly-not-allowed tools which I don’t distribute but sideload, doesn’t currently run, and I think I can get it to reload on the free account. If not, I guess I don’t glitch. I could probably rewrite a lot of it in Pythonista, assuming that survives the App Store-pocalypse.

I have no problem with Apple’s 30% cut, 15% would be better but hey, whatever. It was a nice storefront for a few years there, anything less than the 50% cut retail takes was warranted.

But every other part of the App Store policy is so noxious, all that’s left are shovelware predatory gacha games from China, “social” (masturbatory pictures of yourself) network garbage, and AAA studio teaser games, but not the real games. And now they’re just gonna make it impossible to get anything from the good era.

I literally use my iPhone now as a, uh, phone. It’s almost back to the 2007 release set of Apple apps, because nothing else is any better. The iPad has several more useful tools, and I worry that they’ll be removed by this policy.

Android fanatics, note that you are not helpful:

Earlier this month, the Google Play Store similarly announced it would begin limiting the visibility of apps that
“don’t target an API level within two years of the latest major Android release version.”

What I’m Watching: Severance

Well, it’s on TV+ which normally I treat like a sub-Disney® quality back-alley shithole gutter of the most boring shows ever conceived by AI to lull Humans into submission before mulching the species (that popular one? That’s the one I mean.), but Severance seems fun! Very Office Space, and The Office, and Better Off Ted, crossed with Paycheck (best Baffleck movie; mediocre PK Dick adaptation; worst John Woo), but even more brain fucking and crying. Also some of the Stargate SG-1 episode “Beneath the Surface”.

A woman (Britt Lower) wakes up in a windowless underground office, doesn’t know who she is. A man (Adam Scott, very punchable face but I’m not sure where I’ve seen him before) cries and then goes to work and is chipper and kind of pointless. The office job is pointless, maybe relentlessly stupid. Maybe it’ll make more sense later? Their outside lives are frankly not that good for the kind of pay you’d expect to get for taking this job.

The office maze is driving me a little crazy. I’m pretty sure it’s just a grid. They walk & talk right, right, right, left and are somehow in a different corridor. But they all look the same. The “break room” and “wellness room” are just like the “break pods” at one corp job I had, where it was almost literally a punishment to be sent there if you were having a rough time of it.

The office procedures are repetitive nonsense. The coffee is Rwandan. Literally blood coffee.

The biggest irony of this show is that it looks and acts like Apple already does. If Timmy Apple could do this to people, he absolutely would. Forcibly. With drill holes in the skull. He’s already threatening people with their jobs or coming into the UFO-shaped office to catch plague, what’s a little endless torture in a fluorescent-lit Hell? How did this get past their own self-awareness and PR?

Also doesn’t help that they’re promoting in pre-roll fucking ads wecrashed, a documentary about WeWork’s cult, rise, and fall, which looks excessively like Severance. This isn’t really an SF show, it’s just how corporate workplaces already are. The cyberpunk dystopia of my yout’ is here.

I’m not a fan of the episode length, nearly an hour. Half inside, half outside; but at least so far the inside is fun, light, gets to the point and tells the story, while the outside is long meandering talks with people that drag on for an endless eternity with maybe a minute of plot. I’m going nuts sitting thru this junk. Half length, and it’d be twice as good, as I often say about these bloated streaming waste-of-hours. I don’t get it; there’s no advertising, so why make it take forever?

TV+ continues to be the absolute worst app in a long cycle of shitty apps from Apple. I select the show in the main TV+ window, but can’t see the title of each ep. Guess the next one’s the first unlabelled video blob? Then it opens a player window. Of course you can’t even screenshot, I have to use my iPhone camera if I want to take notes or something (like the weirdo keyboard, or the partial floor map). I’m surprised Apple hasn’t embedded a “don’t take pictures of this” signal in the show. Yet. Just wait until they issue Eyes with content filters.

★★★★☆ so far, aside from the pain in the ass of watching it on TV+.

Mac Icons for PDFs

I have a great many folders of PDFs, mostly grabbed from archive.org magazine_rack, ataribooks, etc. The trouble is when I open a folder of these, Finder makes preview icons for a few of them, then gives up and they all show a generic “PDF” icon. What I want is a persistent icon for the first page!

First, you need osxutils:

% sudo port install osxutils
% man seticon

And my icontool.

sips (Scriptable Image Processing System) is a built-in tool on the Mac, incredibly powerful image converter. I’m not gonna do anything fancy, just use it to get an image.

Now create pdficonset.zsh:

#!/bin/zsh
export CG_PDF_VERBOSE=1

iconify () {
    echo $1
    sips -s format png -z 1024 768 -p 1024 1024 $1 -o thumb.png && \
    icontool.zsh thumb.png thumb.icns && \
    seticon -d thumb.icns $1
    rm -f thumb.png thumb.icns
}

if [[ $# -eq 0 ]]; then
    ls -1 *.pdf |while read -r f; do
        iconify $f
    done
elif [[ "$1" == "-r" ]]; then
    find . -type f -d -iname "*.pdf" |while read -r f; do
        iconify $f
    done
else
    while [[ $# -gt 0 ]]; do
        iconify $1
        shift $1
    done
fi

Now run it:

% pdficonset.zsh
# iconifies pdfs in current dir
% pdficonset.zsh -r
# iconifies pdfs in all subdirs
% pdficonset.zsh foo.pdf
# iconifies named pdfs

Boom! All nice icons.

[update: added a little better error-safety. CG_PDF_VERBOSE just gives better but still not useful error messages.]

[update 2023-12-21: finally made it generate proper aspect ratio icons, and multiple file commands.]

I don’t have the problem as bad with CBZ/CBR comics; they’d be trivial to extract the first page from, since they’re just ZIP/BZIP files.

folder full of pdfs with nice icons instead of placeholders

Green and Blue Bubbles Again

Some disreputable right-wing rag is pushing the Google-paid-ad conspiracy theory that Apple promotes bullying to get kids to prefer blue bubbles and iMessage to green bubbles in Android trash. Whenever this comes up, the mainstream rags never mention the real difference: Security vs. insecurity, encryption vs. everyone in the world able to read your messages.

Preferring blue bubbles is good behavior, whether kids know it or not. It has end-to-end encryption, it never even touches Apple’s servers in plaintext. Anything you send, you know only the person you sent it to can ever read it. (note: You should not use iCloud backups, because those WILL store logs in plaintext)

A green bubble means it’s insecure SMS; it can be read by cops, the phone company, anyone with a “Stingray” radio packet decoder in the area, and anyone who’s SIM-cloned your device, which can be as simple as a single phone call to the carrier. Google is criminally negligent still shipping SMS as their “IM” in 2022.

Use iMessage if you can, Signal, Telegram, LINE if not.

Don’t use WhatsApp, it’s owned by Facebook and just as bad spyware as anything owned by Google.