Programming on Your Phone

Pythonista lets you use your pocket UNIX workstation as a workstation. I use Pythonista, if not every day, very heavily on the days I use it. As always it's crippling of Apple that there's no upgrade pricing, so I can't give him more money every year that I keep using it. The new keyboard module is an interesting script launcher, but I already wrap a bunch of utilities in a main menu program.

There should really be more of these mobile programming environments. In the early days, Apple severely restricted you from shipping one; you could kind of cheat with JavaScript, and a few games snuck in some bytecode interpreters, but scripting was right out. They loosened up eventually, but are still dicks about you saving code anywhere it could be shared, so for example I have to keep my Pythonista stuff in iCloud, not DropBox where it'd make more sense.

  • Panic's Coda and Coda for iOS (née "Code Editor" WTF) is the only other one that's really functional; I've built real web sites out of it, but I mostly use it for ssh. Sweet baby Cthulhu, I hate Panic's crooked-text "designer" sites, I hit Reader view on those instantly. Designers shouldn't be allowed access to CSS or JS.
  • Hotpaw BASIC still works (as does his Chipmunk BASIC on the Mac), but hasn't been updated in 2 years. Not that I want to program in BASIC, but it's better than no programming at all.
  • The iPad used to have a very nice "BASIC!" (with a structured BASIC and a bunch of system functionality), and a very limited "iSkeme" (scheme interpreter, R5RS-ish? with nothing but text I/O), but they were killed in the 64-bit-pocalypse. Update 2020-09: miSoft Basic! has been updated. Searching for this is utterly impossible!
  • Workflow (née Apple Shortcuts) is great for putting a few tasks in a row but you'd go insane trying to write anything complex from drag-and-drop clicky boxes.
  • Apple's Swift Playgrounds on iPad is a tutorial, not really usable for applications AIUI.
  • There's a bunch of "kids learn to code!" apps that are mostly ripoffs charging $60/year to play robot tanks. Do not buy anything like this.

I dunno if the 'droids have anything comparable, I'm sure they can root their phone and try to use vi in a busybox shell, but that's not a reasonable work environment for a thumb-sized on-screen keyboard.

Apple's Bug Bounty

Yo I'm'a be a bounty hunter like Boba Fett when he was still cool, yo!

"It sounds like you don’t get paid until (and unless) Apple fixes the bug."

HA HA HA HA HA HA HA HA!

Radar.

HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA!

Oh, you're never getting paid.

Apple Music Replay

I don't at all like that it's buried in the beta webapp. But it works, once you get thru Apple's aggressively defensive login system (which, sure, it protects all my stuff; be defensive).

So clearly it only tracks Apple Music playtime; I mostly use my local music library. Anything here is stuff I don't own, or on an Apple playlist. And the two extremes: '80s pop music, and '90s industrial/metal. I don't understand some of these, why are there 5 plays of Rammstein's DEUTSCHLAND but nothing else off that album? I much prefer Engel.

replay2019-songs

replay2019-artists

What I'm Playing: Mostly iOS Edition

Apple Arcade

  • Various Daylife: Previously described, an RPG life simulator. Slow, tedious, but mildly interesting. Worst title of any game I've heard of. Mediocre.
  • Chu-Chu Universe: Yes, this is another Chu-Chu Rocket, in 3D with shitty controls. I like the slow logic puzzles, but I've played the better version of this game hundreds of hours on the DS (yes, I hear you, two lonely Dreamcast users out there), don't really need a new one. Also, it makes my iPhone 8+ extremely hot along the top-right corner; GPU-heavy with no way to turn that off? Mediocre.
  • What The Golf: Sort of a ripoff of Desert Golfing with a mini-golf course and QWOP or RSSS style physics antics. I'm easily amused by bad physics games, they remind me of Waterful Ring Toss from my childhood. Nice.
  • Sayonara Wild Hearts: Very pretty neon style. Unplayably sluggish movement even at "high" sensitivity setting, forces you to sit through minutes of slow dialogue about hippie tarot bullshit before you can play anything. Deleted after one track. And I like endless runners, so if that's not your thing it'll be even less pleasant. Fail.
  • Inmost: Monochrome pixely, but pretentious starting text "is a moving story of loss and hope, with themes". Incredibly slow, "platformer" but with very little platforming. No dialogue, tap or X does everything so you just have to pixel-hump targets and wait for the action to appear. Fail.

So far this is not a service I'll be renewing. There's nothing here I couldn't get better for that money.

Not Apple Arcade

  • World of Warcraft Classic: I was happy at the start, but rapidly got less so: The sharding is really interfering with gameplay, so I took a break, and then Blizzard decided they'd rather support the totalitarian citizen-murdering dictatorship of the Chinese Communist Party than one streamer calling for the independence of democratic Hong Kong. Just to make my position clear: Free Hong Kong! Break up China! Do not punish people for expressing support for democracy, you evil corporate douchebags. Yeah, they gave him back his prize money, but still banned him. Screw that. Cancelled my sub.
  • Elder Scrolls Online: ZOS has a new combat team this year, and they've ruined my Sorcerer build, even worse nerfs are coming in the next patch, and I don't want to pursue total changes to his skills, gear, and gameplay in hopes of maybe ever clearing content again. I was thinking about ending my ESO+ sub for a while, but then WoW blew up so I'm playing my Khajiit Vampire Mag Necromancer "Mortissa Kamidjanni" as main, and having a fun time again; ZOS haven't nerfed the new class yet, ha ha! (I also have a Stam Warden, who was born nerfed, and a Mag Nightblade which is usually the unnerfed class but I don't like the gameplay for that combo). ESO has four kinds of content: Overworld content, which has quests but combat is trivial and boring; Bosses (world or dungeon), which have no interesting quests, combat can be fun but often needs a group and I hate PUGs; Trading, which is slightly interesting but I'm obscenely rich in-game already; and Housing decoration, which is sort of the endgame when you have millions of gold. So my Necro kitty does some overworld quests to get skill points, mats, and recipes, then switch to my Sorc Elf to do housing. It's something to do. Good but so disappointing compared to what it could be.
  • Mario Kart Tour: It's Mario Kart with gacha-like unlocks. Just as stupidly unfair as ever. Mildly fun if you have no attachment to skill determining who "wins" a race. Recommended age range: 1-7.
  • Mirage Memorial: Big-titty waifu versions of historical and mythical figures (many are men converted to women… King Arthur, Edward "Blackbeard" Teach, etc wtf, but also Lucifer, Athena, etc). Unskippable tutorial with no choices for the entire first chapter, and every time a new feature unlocks. Combat is an auto-idler thing; you CAN turn auto off and hit portraits to activate a random skill, but that's it. Somewhat interesting character level-up system, no character is "useless" but may need a lot of grinding to build up. I did a level grind up to 17 in a couple hours while watching Netflix, got bored out of my skull, turned it off. I'm not saying avoid or delete this, but be aware of what it is, which is nothing.
  • Another Eden: Has had a couple new chapter updates, I intend to get back into this.
  • Last Cloudia: Just launching today, looks very pretty. Here's a beginner's guide

OS Compatibility and the Web

OK, not EOL yet, but soon. Long before any rational person would switch to an untested, incompatible new OS version. Among other things, anyone using Adobe software can't go to Catalina.

The policy I like is to support the last two or three major OS releases. There are good techniques in Objective-C to support testing for new features and falling back if you don't have them; I don't think most of those work in Swift, because Swift's an amateur hour language.

Happily, I use Feedbin to sync my RSS feeds rather than keep them all local, so when NNW stops updating I can just go back to a working web interface. Sad that Brent keeps resurrecting and killing his app, but that's what he gets for chasing Apple's tail.

This is why the web beats native applications. You can indeed make a better interface in native code; you can't maintain it, and you can't port it. The native dev is constantly chasing a new API that breaks everything past, and fighting with garbage tools like Xcode. The web dev just needs ed or another text editor, and only has to target the browser, which is a moving target but has backfills and a compatibility policy, and native browsers generally work on the last two major OS releases. Firefox is a UI shitshow, but still supports OS X 10.9 Mavericks (2013); Safari obviously is part of the OS, and the last few changes are making me strongly consider moving off it, but this Mojave version will keep browsing the web just fine long after Catalina is released.

The ideal of cross-platform languages ever since UCSD Pascal is to get the best of both worlds, write code once and have it compile and run everywhere, and ignore underlying OS changes.

Wait to Visit Catalina

I'm sure there's a hundred other pitfalls waiting. Anyone "upgrading" to Catalina on their main work Mac before at least a year is a lunatic. Half the software you use hasn't been tested on that, lazy devs will only now even be putting it on a second machine. You're a long way from safe.

Safari 13

So I hit upgrade, and I regret everything.

Obviously, this is the release where they break Safari Extensions, they now have to be apps. uBlock Origin is dead. I've installed Ghostery Lite for the moment but I have no real solution for the future; "uBlock" is an ancient unrelated fork that allows advertising, fuck those criminal scum.

The other thing is tab management is broken: Cmd-T now makes a tab after the current, instead of at the end of the tab list, so now my tabs are all but unmanageable. I'm going to file a Radar, but throwing bits down the black hole isn't going to fix it I think.

Right now it's churning with CPU time being wasted on background tabs, and I'm hoping that's just because I rebooted and reloaded all my tabs, and not something it'll continue doing.

% cat safariCountTabs.applescript
#!/usr/bin/osascript
set output to ""
tell application "Safari"
    repeat with i from first window's index to last window's index
        set w to window i
        set output to output & "Window #" & w's id & " = " & (count w's tabs) & " tabs - "
    end repeat
end tell
do shell script "echo " & quoted form of output
% safariCountTabs.applescript
Window #178 = 125 tabs - Window #170 = 2 tabs - Window #172 = 6 tabs - Window #173 = 18 tabs - Window #174 = 24 tabs - Window #175 = 16 tabs - Window #176 = 35 tabs -

(AppleScript problem: If I use & return or "\n" instead of " - ", they get converted to ^M on output. Is there a setting to make AppleScript not think it's on a '90s-era Mac OS?)

Yeah, obviously I could change to another browser. But I hate every other browser. Chrome's created and operated by a criminal, advertising-supported organization. Firefox is just awful to use, because everyone at Mozilla uses Linux and hates users. Opera's not terrible, but it's not good, and just a wrapper over Chromium so probably just as corrupted as Chrome itself.

NetNewsWire is Back!

I've been running it for the last day, and it's stable and fast.

Syncing to my Feedbin account works great; the Feedbin web UI is usable, but especially the last redesign leaves me somewhat annoyed, and it has very limited keybindings. NNW also has local OPML subscriptions, if you don't need to sync and don't mind waiting forever for it to fetch from every blog and deal with everyone's crazy broken RSS. I like Feedbin centralizing that nonsense, just replacing the UI has been a problem.

NNW has everything keyboard-driven, but I'm not enamored of some of its choices (Help, Keyboard Shortcuts). I'd prefer vi keys, and those are a dangerous habit with Brent's keybindings (l is mark all as read, next; k is mark all as read; I almost never want to do that, and want to hide those behind a warning). I'll either get used to them or see if I can rebind them from system settings. The code's on github, so worst case I can just fork it and hack my own keys in.

The reader's pretty nice. Stays in dark mode when I have that selected; I've seen a couple feeds insert their own background image/color which is obnoxious, but if that's what the feed contains, it should probably show it.

I miss in-app browser tabs. For webcomics (which rarely put full-size images in the feed) I often launch a bunch of them into their own tabs and then read them, which in Feedbin's web UI is (while more-comics? (middle-click title) (press 'space "next comic")) and in NNW is (while more-comics? (press 'b "open the current comic in browser") (press 'alt-tab "back") (press 'space "next comic")). Maybe it's possible to open a browser tab in the background?

A million times better than the years-late, rarely-updated Black Pixel release which had their own broken sync server.

Update: One feature I'm loving is drag-and-drop blogroll reorganization. Got a feed somewhere wrong? Drag. Drop. Synced. Fucking done. In Feedbin, you have to have the feed visible (unread or switched to "all" mode), the old way you'd hit Tags (folders) and just change the text in the dialog box, but they changed it to an Edit button which pops up a giant list of all your tags (folders) and you switch them on/off. Utterly awful if you use a lot of tags (folders) like I do. And yes, I'm annoyed perpetually by the "tags" concept, which doesn't exist in OPML, only folders.

Catalina Scripting

In particular:

Quartz Composer
Deprecations
Starting in macOS 10.15, the Quartz Composer framework is deprecated and remains present for compatibility purposes. Transition to frameworks such as Core Image, SceneKit, or Metal. (50911608)

Tragic but unsurprising. None of those are even remotely a replacement, being machine-level programming tools, not a graphical tool for assembling a graphics or sound workflow. But there's probably almost nobody using QC anymore, because Apple neglects it and won't promote any dev tools except horrible goddamned walking abomination Xcode.

Script Editor
Known Issues
Script Editor might quit unexpectedly when saving or executing scripts. (50470730)
Scripting Language Runtimes
Deprecations
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run python3 from within Terminal. (51097165)

More of the same, increasingly neglected non-Xcode tools.

Killing python2 is great. It's not clear if python3 will be included standard, or if you have to find that somewhere else.

On my old blog, I had a post "Macs Make Programmers", where I talked about all the great scripting languages and tools included in OS X, including Xcode back when it wasn't broken junk. Timmy Cook's Apple is making that very difficult.

So basically the first thing you need to do on a Mac is install MacPorts, sudo port install python3 and so on.


On the bright side:

This is a massive step up in security and usability. I was a long-time ksh user on HP-UX, Atari ST MiNT, and OS/2, switched to bash for Linux back in '95-ish, and went along with bash on OS X, even though the original default was tcsh. I switched to zsh in 2014, after the bash shellshock bug; and it was long overdue. Apple can't follow the current bash versions because they're under poisonous GPLv3, so even with shellshock patched it's still not safe. zsh is reasonably current and MIT-licensed so it can stay current.

You want one reason to switch right now?

F="foo bar"
rm $F

In bash, that removes two files, "foo" and "bar". In zsh, it removes one file, "foo bar" (you can get the Bash-like behavior of expanding args by rm $(echo $F), probably some other ways).

Terminal Condition

I spend half my time, easily, in a command-line terminal running zsh. So a new one, even one on an OS I don't run, is interesting:

There are some modern, nice conveniences in this. It's a little ways behind Mac Terminal.app (based on the NeXTstep Terminal from 1990), and vastly far behind iTerm2, but it's more advanced than the usual Linux terminals like rxvt, urxvt, or cross-platform Alacritty or Hyper.

Between this and WSL2 being a full Linux, it's plausible that the best Linux dev environment now (well, this summer when it's released) is Windows. The Year of the Linux Desktop is 2019, and it is owned by Microsoft®. Can you hear the tiny, distant screams of the FSF cultists?

Comparison based on code, reviews, and reddit thread with MS devs involved:

  • Scrollback: The single most important thing a terminal can do. MS does this, but doesn't have logging.

    Surprisingly, a lot of them only support a few pages. I keep mine at 10,000 lines or so, which is probably wasteful but so handy; I don't bother logging since my .zhistory keeps everything I typed, and I have Terminal.app and iTerm2 set to not close tabs automatically.

    Alacritty only just added scrollback last year.

  • Prompt Marking: Nope.

    This is a feature it's hard to live without once you've had it, no more paging up trying to see prompt lines (I have a red ANSI-colored prompt and it's still hard to see). In Terminal.app, Edit, Marks, Automatically Mark Prompt Lines, and then ⌘↑ and ⌘↓ move between them. iTerm2 has it enabled by default, and ⇑⌘↑ ⇑⌘↓ are the keys, which took me some re-learning.

    Nothing else has this, as far as I've seen.

  • Fonts: MS has programming ligatures and displays emoji, finally. Does not support RTL languages.

    I use Fira Code in all my editors and shells, and it's enormously helpful, more readable, and catches bugs: I look for === as a fat-equals symbol in JS, etc.

    Hyper, urxvt, Alacritty support Unicode fonts. rxvt stopped development almost 20 years ago so it barely shows 8-bit fonts correctly.

  • Tabs: MS has tabs! They're currently invisible until you add a second tab, same shit Terminal.app does, which annoys the hell out of me; I don't like UI that reshapes itself, reminds me of T-1000 Terminators (also makes it hard to tile my windows up correctly when they get resized).

    It's not clear if you can drag Windows Terminal tabs around to different windows.

    In iTerm2, I normally keep: First window with tabs for home shell, ssh into my server (running screen, so that has many open shells). Second window with 2 tabs for REPL, editor/running/compiling tasks, and sometimes a third tab for reading local docs. If I need more shells, I usually open them on the first window. I rarely open a third window for monitoring some long-running task; I just drag a tab out to its own window. All terminal windows are stacked on the left side of my screen, because there's no icons under that side of the Desktop.

    urxvt has tabs, but they're kind of a hack, not fully usable.

    Hyper has tabs, but they replace the title bar. Which is cool but also awful like a lot of things it does.

    rxvt and Alacritty don't do tabs, because they insist you use screen or tmux. Which sucks if you want to move a process from one window to another.

  • Profiles: MS supports multiple profiles, so you can use different ones for each task.

    So does Terminal.app, iTerm2, urxvt (but it's buried in a text file config).

    Alacritty, rxvt, and Hyper have a single profile and no UI for changing anything, hope you like editing text files and reloading.

    As far as I can tell, nothing else does automatic profile switching like iTerm2; when I cd to my ~/Code/CodeScheme folder, iTerm2 switches to my dark red transparent profile, including Scheme-specific triggers and copy/paste filtering.

    You can probably do that in urxvt's Perl(!) scripting, but it's not normal or easy.

  • Copy/Paste Filtering: Nope.

    iTerm2 and urxvt both let you set a bunch of regexp to run over lines to get selections correctly matching boundaries, not just space-delimited.

  • URL Highlighting: Nope.

    iTerm2, Hyper, and urxvt notice URLs and filenames, and let you click on them. In iTerm2, hold down ⌘ and click on any URL or path (like in an ls or find result!) and it does some useful action: Opens the URL in your browser or file path in your editor, by default, but you can configure that in the profile.

  • Custom Keybindings: Sorta? Doesn't seem complete, no idea if there's UI for it, but it does exist in their config.

    Most terminals can do this, but most can only remap a few actions. I like iTerm2's, as usual, which lets you bind any action, menu, or run a program on any keybinding. I mostly just use it to launch different profiles with starting paths & scripts.

    Terminal.app only lets you send specific text for a key.

  • Images: Sorta? Only if they're embedded in fonts.

    This is a neat trick in iTerm2: images. I use imgls all the time to see a thumbnail of every file with details (protip: I changed ls -ld in the script to ls -1Fskd for a more concise listing), and then ⌘-click to open what I want in Acorn; it's better than opening Finder and trying to read a long filename under a thumbnail.

    I'm unaware of anyone else being able to do this.