Marzipan and Electron

Chris is missing the point of both technologies. And I'm sure not a brat Millennial.

Marzipan (candy frosting) is a legacy porting technology: Existing iOS apps can cost more to port to AppKit than they're worth, but may be worth something as a cheap Marzipan port. Nobody ports their iOS apps to tvOS or watchOS because it's not profitable, and everyone (in the first world with money) has an iPhone already.

I loved my UNIX® workstation Macs after suffering with Linux for a decade+, but Timmy Cook's Apple abandoned the Mac after Steve's death and Scott Forstall's firing. Anyone making new native Mac apps is in an abusive relationship: Apple does not love you, and does not care about the Mac.

I'd rather eat broken glass than run Linux again, and I have never and will never be a Windows weenie, but I'm not relying on Apple to support desktop developers ever again.

Apple's Mac apps have generally been shit for years now, because they won't spend the resources to develop & support their own stuff. iTunes is a bloated pile of crap, half-broken because it has to run on Windows, too; you don't like hybrid web apps? Everything except your library is web or XML rendering. Pages and Numbers were fast, minimally useful apps that got rewritten based on the iOS versions, and are just about useful for a memo or a chart, but not real work. Mail's a clusterfuck and not half as useful as when it supported more scripting and addons.

The new Mac commercials, first in years, show the broken-keyboard laptops and models they no longer make, nobody coding Mac apps, no desktop Macs. Where's that shiny "new" iMac Pro from last winter? Isn't that what a real musician would use? A near-blind photographer squints at a tiny Mac laptop instead of a giant 27" retina display?

This is how technical, developer-oriented Apple ads were in 2002:
apple_unix_ad-s

Electron and Node are the future (along with Elixir, Go, Rust, maybe others?). It's 100x faster and more fun (attach the FunMeter™ somewhere fun) to code in than Swift, you can use any good editor instead of fucking Xcode, do layout with HTML/CSS instead of the rotting corpse of Interface Builder trapped inside Xcode. And it's cross-platform; 95% of the users (even in the first world with money) don't run Mac, because Apple never updates the Macs, they failed utterly to follow-through with Macs behind iPhones. There's 20x bigger market potential.

The future is certainly not banging your head against the Swift and Xcode walls, just to make a pure Mac app nobody will see. You can't make fun of Electron's runtime, which needs Node and Chromium, if you use Swift, which has a giant runtime turd because their amateur hour C++ compiler nerds can't make a stable ABI. The Mac's only future source of native apps is Marzipan ports.

There can be performance problems in Electron, but Slack's an outlier at 196MB binary and devouring 1.2GB RAM(!!!); it's the bloated WalMart-shopping fat-ass of Electron apps. Discord is also Electron, it has a 136MB binary and uses 360MB RAM, and does more, faster and better than Slack. Atom is the original Electron, has a 541MB binary, and uses 600MB RAM, for an entire editor/IDE.

My game currently has a 139MB binary, and uses 200-300MB RAM when running. Comparing to a random casual game from my Steam library, Chainsaw Warrior (well, "casual"; I've only beaten it once on Easy). It's based on Unity (another VM!), has a 249MB binary, and uses 200MB RAM when running, plus Steam itself uses 130MB RAM (I may yet integrate Steam into mine, so that may even out). It doesn't seem excessive.

I can't compare my Swift game prototype from 3 years ago, because it was written in a version of Swift that doesn't compile in any Xcode that runs on current hardware & OS, and Xcode "helpfully" deleted the built binary; who needs working binaries, right? I might have an old Xcode on my old laptop? Maybe I could waste a couple days fixing the code by hand in current Xcode, if I hated myself or loved Timmy Cook's Apple that much?

New languages evolve fast, but I can run 20-year-old Javascript and it'll run thousands of times faster than it did in the '90s, because the language was improved with forwards-compatibility in mind, hardware caught up, and the newer VMs compile & run it faster. I can compile 30-year-old Objective-C, and it'll run.

We had something similar to web tech 20 years ago with desktop Java, but the convicted criminal organization Microsoft sabotaged it and made a shitty single-platform ripoff called C#. Viruses became a problem for applets, which had nothing to do with desktop Java, but killed Java deployment even before Oracle bought & ruined SUN. Android runs on another Java ripoff, but their dev tools and APIs are even shittier than Xcode or C#, and the users are poor, so why make anything for them? Server-side development in Java, Clojure, or Scala, running on the Java VM, is hidden away in a back room, and made as boring as possible.

So now we have to reinvent the runtime, this time with Node & Chromium. OK with me.

WWDC Prediction Gumbo

(I like gumbo more than claim chowdah, Ivar's on the Seattle waterfront is good but I prefer their fish & chips)

  • Predictions
  • iDeath: Dark Mode on the Mac. ✅
  • Item 0: Apple's best year ever: Shockingly silent. ❌
  • Item 1: Apple announces the end of mechanical keyboards: No hardware. Look for this later this year. ❌
  • Item 2: Apple announces the end of C, C++, Objective-C, AppleScript, Javascript, and Swift, in favor of a new cross-platform language: Workflow: Now called Shortcuts. ✅
  • Item 3: New Macs: No hardware. ❌
  • Item 4: Apple announces all-new game development tools: ARKit 2.0. ✅
  • streaming from a home server or iCloud Games server: No streaming. ❌
  • OpenGL is deprecated and then unsupported: Called it! Apple deprecates OpenGL and OpenCL. ✅
  • HomePod Hi-Fi: No hardware. ❌

Score: 4/9, which at least puts me in range of any pundit.

Fucking seriously, killing OpenGL is a pain in the ass. Unity and such will adapt easily enough, but MMOs and a lot of indie stuff uses OpenGL, and Metal may be too big a rewrite.

WWDC 2018 Predictions

Opening Video: Emotional music. Mortuary full of coffins. Crying mourners. THEN! Light shines from one casket after another: iDeath! The iPhone app that live-streams to and from inside your casket so your loved ones never have to let you go! SOMBER!

Item 0: Apple's best year ever, look at this literal mountain of cash and gold they can swim in like Scrooge McDuck, at the new Apple spaceship campus! KA-CHING!

Item 1: Apple announces the end of mechanical keyboards. If you filthy heathens in non-sterile, non-white-void rooms can't take care not to spill Coke (or coke), crumbs, hair, or microscopic dust particles into Jony IVE-1138's perfect butterfly switches, jamming them up, and then have the audacity to sue, then you just don't deserve them. All replacement and new-issue keyboards will be sealed-in, membrane keyboards like the Atari 400. COURAGE!

Item 2: Apple announces the end of C, C++, Objective-C, AppleScript, Javascript, and Swift, in favor of a new cross-platform language: Workflow, acquired last year. Kids and junior developers alike will love learning to code with easy visual blocks. Expert developers can eat shit and die use remote APIs to implement code on their own web server. SWEET!

Sub-Item: Apple is responding to Developer's Union by hiring the Pinkerton Agency. There will be no trials of any kind. BEATINGS FOR ALL!

Item 3: New Macs! Finally, the new Mac-itecture is here: ARM, iOS, with an Intel emulator that runs up to 20% as fast as a real Intel chip in this rigged demo. Available 2019 or 2020, they really want to get this right, so all existing Macs are EOL today. POWER!

Item 4: Apple announces all-new game development tools, streaming from a home server or iCloud Games server, just like Steam Link but, you know, for the children!, with Apple's 30% cut and no expensive $9.99 games, only "free" IAP games allowed. Obsolete native iOS games will be phased out over the next 6 weeks as OpenGL is deprecated and then unsupported, and Metal only supported on MacTruck platforms. BEEP BOOP (nobody at Apple has ever played a videogame, so this presentation's kind of awkward).

One More Thing: HomePod now supports stereo, a mere 87 years after radio, records, and movies went stereo. Surprise announcements of vinyl LP and 8-track addons for the HomePod Hi-Fi shipping this Fall, and another U2 album in your iTunes library today! ROCKIN'!

Quite a lineup you got there, Timmy Cook! Don't ask how Steve would run the company, you do it your way!

Engineering has determined that your bug report is a duplicate of another issue and will be closed

Filed a Radar (bug report) about Safari on Feb 28. They respond with the stock request for a sysdiagnose report. 10 weeks later, Apple sends the stock response that it's a dupe.

Apparently this mechanical conversation is under NDA, but I'll risk their wrath by saying I ended my bug report with:

Hi, Radar, it's been a long time since we talked, and it wasn't great last time, but I'm giving you another chance. Does anyone at Apple actually use Safari like real people use Safari, with multiple windows full of tabs? Maybe there's nobody left on the Mac/Safari teams, and I'm talking to the ether here.

The entirely automated responses don't disabuse me of this notion. Everyone in Apple may be WestWorld-style robot duplicates by now, for all I know.

Almost every other big company has a public bug-tracker; sometimes under NDA, sometimes "fuck it, we're doing it live!". I don't see how this wall of fear and ignorance Apple uses helps anyone; every Android sweatshop just copies the superficial elements of iPhones; Chrome is an awful, unusable pile of shit good only for playing Flash, but Google already copied and forked the open-source WebKit engine, there's no secrecy to be had!

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.

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)

New Phone Who Dis?

Dealing with my aging iPhone 6 and iOS 10, and even older iPad 3, was getting on my nerves, so I got a new "space gray" iPhone 8+, 256GB.

I considered the iPhone X, but after doing some maintenance on my apps, I loathe coding around the notch, and I loathe the way it looks. Chris Pirillo had some thoughts and followup that echo mine. Chris has since gone to Android, which to me is like eating only Soylent Green because you once got an undercooked meatloaf; overreaction isn't always wrong, though.

I would prefer the SE form factor, but I don't like a years-old hardware platform. And if this is going to be my only iOS device, I should get the biggest one possible so I can use it as a phablet. It's not like I ever hold a phone up to my ear anyway, it's either on speaker or headphones (dual speakers in the iPhone 8+! But USB-C headphone dongles 😡).

The device arrives, and I go to set up, and immediately hit a roadblock: I can't access my iTunes backups. I've used them to recover before, but now I have no idea what the password is, and it's not any of my previous device passwords. Well, now I'm boned. Had to upgrade iCloud and backup to iCloud, which doesn't preserve on-device logins or the actual apps. Many hours later (slow asymmetric bandwidth), it's done.

Restoring the phone from that backup wasn't bad, but now I have a blank phone with placeholders for every single app, which I have to tap on, wait for it to spin and decide "keep/delete" if it's not 64-bit, or paradoxically tell me to buy the app if the app is no longer for sale. And then for every app, go in and restore purchases if it has any, login if necessary, etc. I didn't set Downcast to archive all podcasts, so it had to sit there for hours downloading the last 2 eps of dozens of podcasts.

At this point, let me say: Going 64-bit only is the most user-hostile, art-destroying thing Apple has ever done, and it SUCKS. All of Llamasoft's and CAVE's games are gone from the App Store, and were 32-bit. So I can still play them on old dying devices, but that's it. I miss Gridrunner and Deathsmiles. Atari Greatest Hits is still updated, and works perfectly; Activision Anthology is not, so no Pitfall! Midway Arcade is gone. Lost Treasures of Infocom is lost.

Apple's actually fucked up in 3 ways here, by not supporting 32-bit with an optional API download, by not providing legacy download of apps, and by making the App Store a toxic race for the bottom by EA and other literal motherfucking mega-studios, so no independent developer can make money except the 1 in a billion jackpots. I'm not advocating leaving for Google Play, because that's even less profitable, it's just open theft. I'm advocating burning down the entire system and starting over. But for now I'll take my Big Brother-issued gruel and pretend to enjoy it.

That was most of day 1 before I could do anything with the phone at all.

iBooks is a special level of Hell. It's the shittiest-written app Apple's ever released, syncing barely works at all, downloading is flaky and eats the main UI thread. So I'd go Purchased > Books > Not on this iPhone > All Books, which actually shows maybe 20 books and then stops listing them, then click the download arrow for the 5-6 items visible, then the UI would lock up and I'd have to wait for 5-15 minutes for it to finish. Then once I had all my books, they weren't organized correctly anymore, which is I guess my fault for having slightly different setups on iPhone, iPad, and Mac. So I went full-on librarian. Protip: Disable 3D touch in Settings, because the 3D touch in iBooks is useless and makes it impossible to move books. I spent a good 15 minutes struggling with this before I learned. So here goes most of day 2.

ibooks-hell-1 ibooks-hell-2
ibooks-hell-3 ibooks-hell-4

Taking those screenshots reveals a new screenshot UI, which PISSES ME OFF: iPhone demands that I triage or edit every screenshot immediately, sitting in the corner of the screen like a Jony Ive dog turd. I don't see any way to turn this bullshit feature off.

Additional stress comes from my entertainments: The ESO Jester's Festival was all weekend, which I grind for items worth a lot of gold, but had to spend most of a day tapping thru my phone and then looking back to the game.

And at the same time, Animal Crossing: Pocket Camp has two events running, a Mario anniversary crafting thing, and a gardening event. Happily I can still clear these in bed, in the bathroom, or while out, but having my phone be busy downloading books interferes with that.

I know, "do something useful, Mark", but really, games are supposed to be what recharge me, not extra stress.

I still haven't loaded my music onto the phone. I have enough space now for a good portion of my music library, instead of only the highest-rated curated lists. Yes, I still have a music library, so when I'm away from wifi, I can listen to music without burning thru my data cap. Ha ha suck it streaming-only kiddies. But I could also just take my iPod classic out, which has everything, but Apple doesn't want you to have nice things like that anymore.

As for the hardware:

The size is preposterous. 158.4mm x 78.1mm x 7.5mm, 202g. The old Palm III was 119mm x 81mm x 18mm, 160g, and the LifeDrive aka iPod touch 5 years before the iPod touch, was 121mm x 73mm x 19mm, 190g. I thought the Palm devices were almost too big for a pocket, but this is a big goddamned thing.

The screen's nice, bright, and rectangular. No fucking around with maybe-unusable areas at the bottom and top, just a big canvas for software to draw on. I can see the time, battery, AND phone signal at once. I can't really use it one-handed all the time. If I cradle it at the base of my fingers in my left hand, I can barely reach the other side of the screen with my thumb. I treat it more like the iPad already, set it down on a table or my leg and work on it.

The glossy case is irresponsible vanity. It should have a matte, grippable back, not be a perfectly-smooth, sliding-onto-concrete frictionless surface. FUCK Jony Ive and his obsession with things that look like nothing, and suck to actually use. I guess I need to find a new sticker-backing or very thin case for this. I don't want to add bulk.

Home button has a VERY satisfying haptic click, it really feels like the entire front of the device is pivoting down about 1mm, even tho it's solid glass. I do use TouchID when I'm somewhere safe, tho I'd disable that if I was travelling; I don't want the pigs to force me to unlock my device.

I haven't done any real photography with this phone yet, but the giant 2-camera hunchback is supposed to be quite nice.

Current setup, which will probably change again soon. Elric covers were just convenient, but the text under the icons doesn't look good, so I have to change that soon. You know what I want? Custom wallpaper per desktop, like we have on Mac OS X.

iphone-2018apr-1
iphone-2018apr-2
iphone-2018apr-3

Apple Education Event

Being out of the Apple & Twitter bubbles, I didn't see anything about the Apple education event until hours later. At a rich private school, and more pushing the iPad and "pencil" (still $99 for a stylus) in education.

The LA school district fiasco and cheaper Chromebooks make anything Apple currently does an uphill fight, if not impossible outside of isolated environments like private schools. How do you get a public school district to spend more for iPads with a thinner but maybe better set of apps, if their underpaid, part-time IT guy with a Windows XP machine can't figure it out? What happens after the next LA-style fuckup?

The new iPad at $329 ($567 for 128GB, with pencil & keyboard case) is good enough to replace an iPad pro, so at least something nice has come out of this—my ancient iPad 3 is crashing often, largely from battery and memory problems. Or maybe I'll just get a new cheapo Linux laptop which is massively more capable, with a built-in keyboard that doesn't suck to type on. That's the fight Apple's got with anything they sell to a price-conscious market.

(Finished posting from my iPhone because my iPad 3 crashed while writing this. Should I expect the next iPad to last longer?)

Electronic Idol Friday Night Music

Annoying, Apple Music has quit showing me a Favorites and Chill playlist. I don't know if they just quit doing it, or if my old iTunes version (I can still manage apps) isn't showing it. This is how all Apple stuff decays as they quit maintaining it under Timmy Cook. Will the last person to board the Apple Panopticon Spaceship for Comet Hale-Bopp please turn out the lights?