It's tragicomic watching ULA, classic WWII to Cold War baby-killers turned NASA teat-suckers, desperately try to compete with SpaceX and Blue Origin at a tiny fraction of the cost to orbit or deep space.

Why doesn't Boeing brag that the USS Enterprise, NCC-1701, will appear from time travel, tractor-beam a crew compartment into orbit, warp to Mars, and land astronauts for a day-trip? It's just as real and plausible as the "SLS Block 2", and much cheaper.

Javascript NaN

I just spent 30 minutes reading log files to find an actual bug that would've been prevented by a strong type system: Multiplying a coordinate by an array instead of an element of that array; Javascript helpfully gave me the result NaN and carried on instead of throwing an exception, because Javascript. I may put a few defensive asserts of Number.isInteger(n), Number.isFinite(x) in functions that process numbers.

This is the first such bug I've had in so long I can't think of the last. Many years not spent fighting BDSM type systems and slow-ass compilers, so I'm still happy with this choice.

What I'm Watching: Santa Clarita Diet, Frankenstein Chronicles, Expanse

  • Santa Clarita Diet: S1 was a fun but messy set of episodes with no structure, but I like Drew Barrymore, still a very talented and pneumatic girl, and Timothy Olyphant, who gets to do more comedy here which he's better suited to. S2 finally found a plot and upped the brutality and farce of keeping friends, neighbors, coworkers, cops, classmates, other zombies, etc from catching them. But now I'm out of eps until they make more! ★★★★½
  • Frankenstein Chronicles: A London copper chasing a conspiracy of Mary Shelley making real monsters from dead children presumably to resurrect Percy, could be made fun. He visits William Blake, one of my favorite artists and poets, on his deathbed and gets a book of art! But instead he's always sad about his family who died of the syphilis he gave them, unbearably whiny and miserable. And it's the peak of English aristocrats driving the poor into literally shit-gathering ("pure", they called it) and workhouses and then using their corpses, and shot with endless sad-music flashbacks or fantasies of Heaven instead of moving the plot along. Loathesome show, loathesome people, with no gallows humor. I stopped after S1E4 and wish I hadn't started. ★☆☆☆☆
  • Expanse: Watched S1-S2, I like it but the books are better. S3 is still $$$, so I wait on that. Bobby Draper is a very cute Samoan, not as ripped as the books but pretty badass. ★★★★☆

My to-watch list is all but empty, I need suggestions. I have Netflix, Amazon Prime, Crunchyroll, and I'm ill-inclined to pay for another service.

I dunno what's good on Crunchyroll currently. I have a queue that'll never end, but it's all trash I watch while barely paying attention. Since Akashic Record of Bastard Magical Instructor ★★★★½ ended, I've been bored.

Westworld alone isn't worth HBO to me. Maybe when the season's over I'll binge it in one month. Is there anything else good on Hey Beastmaster's On? Last season I ran thru their back library pretty fast. No, I don't watch "Game of War of the Roses for C History Students", except sometimes by fast-forwarding thru all scenes not containing Tyrion or Jon Snow.

I'm desperately lacking a light-hearted murder show. I got in the habit with Dexter, and growing up with Rockford, Columbo, and Murder She Wrote. Death in Paradise has been good for that, ridiculous and formulaic but pretty, and decent puzzle murders. Too much of the English detective, but the French/island cast were great. But I'm out of eps!

Most everything else like that is very English, and I can't stand them. I tried watching Fallet, which would be PERFECT if it didn't have the whinging English cop; Swedes are funnier on their own. There's an Aussie show The Strange Calls, but the protagonist is so whiny and sad I didn't finish S1E1, maybe it gets better?

Xcode is Flawed

"So, yes, Xcode is flawed. But is it fundamentally flawed? Is there some core concept — its multi-paned single window UI, its scriptable build system, the nature of app bundles and code signing — that makes it impossible for Xcode to ever be good? I don’t believe anyone is making this argument. The closest you get to this is storyboard haters who build their UIs in code. I disagree with that camp, but even if I didn’t, that alone is not enough to relegate all of Xcode to junk status."
Chris Adamson about his new book, Xcode Treasures

I like @invalidname, but wow do we ever not agree about this. I diatribed a bit yesterday, but let's look at just these claims.

The build system is basically a shell script but with a custom editor that's harder to use than typing. Did you know that most programmers are pretty good at typing? Most of my projects, in fact, just had a shell script "phase", and then I'd write everything in bash (I hadn't switched to zsh yet). It is no better than an old-fashioned Makefile or nmake, and for many projects a build shell script is enough. But, sure, this isn't the worst thing in Xcode.

Code signing is Hell, and Xcode's original version on iPhone SDK launch was appallingly hard, but it worked. Now they've automated it, which means you have 512 bogus auto-generated configurations on your ADC profile, and if the signing server is down (which happens… well, it's not even two 9s of uptime…), you can't do anything until some hours later when Apple plugs the server back in. Entitlements and services you turn on/off can permanently burden your app's configuration, until you go to the website and houseclean all the junk configurations and make a new one with just what you need. And that'll get replaced with an auto-generated configuration again.

Xcode does have a dozen or so color themes now, but you can't change the UI chrome from generic Mac gray, so it'll always be unpleasant to view dark-background themes, you can't choose different icons, can't script the goddamned thing. Meanwhile, here's Atom's 7556 packages including 2579 themes, and you can just hack on all of the editor in JS & CSS, live-updating your own tools.

I quit using storyboards except for nearly-blank launch screens, and XIBs (NIBs! We called them NIBs!) except as maximized view holders, because the corpse of Interface Builder trapped in Xcode's belly punishes you for using them; if you touch anything, your autolayout constraints go crazy. And you can't delete constraints in the view where you edit them, only in the tree view which isn't even visible normally, and is organized totally differently from the editor on the right. After a few versions, Xcode just can't edit an old project's XIBs anymore, and then you're FUCKED. Have fun recreating that entire UI, OR you can put it in code. And if you're writing code, why not just leave the walled garden and write HTML/CSS/JS like I do?

The one-window thing doesn't bother me, but the lack of functioning tabs is infuriating and stupid. Open three files. In BBEdit, all three appear in the sidebar, and you can switch with the top-left file selector or the bottom-left list of "Currently Open Documents", or other navigations; I prefer tabs, but it's entirely acceptable. In Atom or AppCode, all three appear as tabs at the top of the editor pane, and you can drag to reorder the tabs as you like; each tab is a unique single view into that file. In Xcode, you can open them in separate windows, or in separate "tabs", but the same file can be open in multiple places, but if you close it in one, it closes in all of them. WHY WOULD YOU DO THAT? If you click a file in the tree view, it replaces the contents of the current tab/window, it doesn't just open it in a new tab. So the process is click, double-click to get a window, then on the first view hit back and hope it goes to the right file. Flames on the side of my face!

Snippets. OH NO, I had a PTSD flashback to Xcode's Snippets. You write a piece of text you want to reuse. Select the text and drag it onto the Snippet area; you can't right-click or menu it there. No, you clicked on the background, now it's deselected. You have to reselect, click on the stroke of a letter in the text. Maybe zoom the screen in with ctrl-mousewheel, now you must grab a SINGLE MOTHERFUCKING PIXEL!!! Calm, deep breaths… and drag it to the Snippet area. ???? In Atom, you either copy-paste it into a config file, or install snippet-generator-plus, select text and hit a key.

Xcode isn't just accidentally hateful and awful. It must be the work of a malevolent intelligence to be this horrible. I've found a recording of the original design meeting for Xcode.

Spend a few days working in an IDE that doesn't hate you like AM hates Humans, and you'd kill anyone who tried taking you back.

Javascript Use Strict

Every Javascript file should be in Strict Mode, and if you run eslint — which you absolutely should — you should specify an eslint-env:

/* file header */
/* eslint-env node */

"use strict";

So just as a paranoid check, I wrote this script which I'll call from my build script (in the src folder, not project base where node_modules lives!):

jsStrictCheck.zsh

#!/bin/zsh
err=0
for f in **/*.js; do
    grep "\/\* eslint-env" "$f" >/dev/null
    if [[ $? != 0 ]]; then
        echo "$f: Missing /* eslint-env node */"
        err=1
    fi
    grep "use strict" "$f" >/dev/null
    if [[ $? != 0 ]]; then
        echo "$f: Missing \"use strict\";"
        err=1
    fi
done
exit $err

Already caught one file without strict, one without eslint-env, so my paranoia is justified.

New Electron Dance

No, wait, that's the Neutron Dance, I get those confused.

Electron

Since abandoning any hope of the iOS App Store paying my bills, I've had to look back at the web or desktop. My current available time-at-computer and energy these days isn't sufficient for a day job or even contracts, much to everyone's dismay. So time for another hard look at the situation.

I like working on my Mac, but Mac isn't that big a market. I also want to ship on Windows (and Linux, I suppose). Objective-C is one of my favorite languages ever, Cocoa & UIKit (on iOS) were great APIs, AppKit on the Mac much less so, but since Apple's killed Obj-C and it's not portable, my happy years of typing [ ] are over.

WHAT HAVE YOU DONE?!

Swift might be the worst mental disorder to strike programmers in decades. Swift is orders of magnitude slower than Objective-C, crashes constantly, the moving-target "spec" creates incompatible changes every year, and because they're too stupid to standardize a binary interface, every program has a 20MB+ blob of Swift runtime. For a single-platform joke language perpetrated by a C++ bozo who fucked off after a year to play with cars. So I'm all too happy to say good riddance to that bullshit. I mean exactly this: If you're using Swift, you either don't know better (it's OK to say you don't know!), or are defrauding your employer for hours, or have something wrong inside.

13 years ago, Project Builder/Interface Builder was a pretty good dev toolkit since I could use a real editor (BBEdit) with it, but Xcode locked that out, and then as Apple sucked in more tools over time, it sucked harder and harder; I can't stand the rickety deathtrap these days. I was getting by in JetBrains' AppCode, but still had to use Xcode for Interface Builder (RIP) and to get builds onto a device half the time. Xcode is a crashy, substandard pile of shit with maybe the worst editor in any IDE in history. Syntax highlighting stops working at random, for most of a decade it has code-completed "nss" as "NSStreamDelegate" rather than the slightly more useful "NSString" (before that it couldn't code-complete at all!), I could go on for hours or days about how Xcode kicks you in the input/output ports every time.

And the worst part is you can't fix the fucking thing, no user-serviceable parts inside, Radar is a black hole, no scripting or plugins. Just bend over and take what Apple Developer gives you good and hard. It's kind of a relief that current Xcode doesn't run on the last stable MacOS version (Sierra).

I'll stick with BBEdit for text and Atom for code, thanks. If I'm angry at Atom I can fix it myself or file a publicly-trackable ticket; I'm rarely angry at BBEdit but I can ask Rich to fix it.

So I'm writing web-type software in Javascript, with Node or Electron behind it. Javascript aka ECMAScript has become a good language in the last 5-10 years, and the V8 runtime in Node/Electron runs close enough to native now for most needs. I love that I can just write UI in HTML again. No fucking around with Apple's bullshit of deprecating APIs out from under me (I "get" to rewrite alert/menu code again?!), or promising to support SpriteKit/SceneKit across iOS & Mac and then doing fuck-all on either. WebGL (or Three.js, anyway) isn't fast enough for complex scene-graphs, but 2D work in Canvas is mostly fine (and it gets better every year, instead of bit-rotting like unused S*Kit APIs). localstorage in a web page isn't enough for any real program, thus Node is needed to reach the filesystem.

I slander Swift for leaving a giant runtime turd in every program, but Electron's the same way: It has to contain a browser, Node, and system APIs. But I'm not at the mercy of Apple's marketing-driven dev tools.

Certain Mac nerds obsess about Purity of Essence, insisting that everyone should love Xcode, Swift, and AppKit, and that use of any other technology is an abomination to the end-users, whom they clearly love more than me. Can you hear that slurping sound? That's someone fellating Apple marketing. Roughly 4 billion more people are familiar with web pages and will find a web-like UI more comfortable.

I intend to keep up my experiments in Scheme and Pascal when I have time, I'd far rather have small, fast, native binaries on every platform, but shipping beats purity.

Progress is being made:

tile-20180426-map

tile-20180426-view

(the + road texture there will get replaced soonish)

Star Wars

  • Auralnauts Star Wars
  • Ep 1: Rewriting the Jedi as belligerent drunks looking for a party and disrupting chain restaurants makes far better sense than whatever late-stage-dementia Lucas was doing.
  • Ep 2-3: (Didn't watch, never saw the Lucas versions. Maybe I should?) Later: Have watched, was unbearably awful even in parody and short form, and 1.5x speed. I can't imagine how bad the original is.
  • Ep 3: Later: Even more awful for a while, then the music video, dance-fight, and end are pretty great.
  • Ep 4: LASER MOON. Creepio's psychosis and Leia's dating profile are to blame for everything.
  • Ep 5: The parade is adorable and the Bespin after-party is the bleak morning after we all deserve, but surprisingly this is the weakest ep.
  • Ep 6: The Last Laser Master is Star Wars on Ice plus Laser Floyd, and finally makes sense of muppet planet.

Fantastic. ★★★★★