Microsoft Says They'll Support Atom

Re Microsoft Acquires Github,

reddit AMA with Nat Friedman:

Developers are really particular about their setup, and choosing an editor is one of the most personal decisions a developer makes. Languages change, jobs change, you often get a new computer or upgrade your OS, but you usually pick an editor and grow with it for years. The last thing I would want to do is take that decision away from Atom users.
Atom is a fantastic editor with a healthy community, adoring fans, excellent design, and a promising foray into real-time collaboration. At Microsoft, we already use every editor from Atom to VS Code to Sublime to Vim, and we want developers to use any editor they prefer with GitHub.
So we will continue to develop and support both Atom and VS Code going forward.

Obviously, trusting Microsoft is how you get left in the desert staked out over an anthill without your editor of choice, but it's a little better to at least hear the new puppet CEO of Github commit to it.

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)

Atom Scrollbar Not Visible

Since last update, Atom's been hiding my big custom scrollbar, and after much confusion, I found issue #17002: Scrollbar disappearing/flickering when styled to increase width/height.

So for now, my ~/.atom/styles.less is a few pixels smaller but still obvious and grabbable (rest of the style sheet same as last post):

/* scroll bars should be grabbable */
.scrollbars-visible-always {
    ::-webkit-scrollbar {
        // FIXME: https://github.com/atom/atom/issues/17002
        width: 14px !important;
        height: 14px !important;
    }
    ::-webkit-scrollbar-thumb {
        // based on http://www.girliemac.com/blog/2009/04/30/css3-gradients-no-image-aqua-button/
        // reversed light direction since we have no shine element
        background-color: rgba(60, 132, 198, 0.8);
        background-image: -webkit-gradient(linear, 0% 0%, 90% 90%, from(rgba(108, 191, 255, .9)), to(rgba(28, 91, 155, 0.8)) );
        border: 1px solid blue;
        border-radius: 8px;
        border-top-color: #8ba2c1;
        border-right-color: #5890bf;
        border-bottom-color: #4f93ca;
        border-left-color: #768fa5;
        padding: 1px;
    }
}

On one hand, I'm pissed off that I have to fuck with my editor's internals for basic functionality; but on the gripping hand, it's so nice to have an editor I can fuck with the internals of.

Using Atom

"Have you tried Atom?" #RuinADateInFourWords



Have gone to the dark side temporarily: Atom handles my ES6 better than BBEdit currently. 😭

But it's not quite right, so I fix. Atom configuration is a bit of a mess, but everything-is-a-plugin is a good philosophy.

  • One Dark UI & One Dark syntax themes are OK. But for crazy-go-nuts, install ubik-neon-syntax, and atom-material-ui. Goddamn this makes me want a bottle of Jolt Cola and an Information Society CD blasting on endless repeat.
  • install logo-file-icons, garish but the more popular file-icons is bland and ugly.
  • install symbols-list, because the default symbols tool doesn't find new-style classes.
  • install eslint, because nobody writes JavaScript good, even me after 20 years of it.
  • install atom-mac-terminal, gives you an "Open in Terminal" right-click.

  • packages, linter, settings, turn off "Lint On Change", because that slows down an already slow editor.

  • packages, autocomplete-plus, settings, turn off "Show Suggestions On Keystroke". Ctrl-Space is fine. I learned to touch-type on an IBM Selectric, so I type faster than JS can autocomplete anything but a very long constant.

  • % atom ~/.atom/styles.less and add:

    /* scroll bars should be grabbable */
    .scrollbars-visible-always {
        /deep/ ::-webkit-scrollbar {
            width: 20px;
            height: 20px;
        }
    }
    
    /* turn off all that folding folderol */
    atom-text-editor.editor .icon-right {
        width: 0 !important;
    }
    
    /* make the gutters different from text so I can see indentation */
    atom-text-editor.editor .gutter {
        border-right: #222222 1px solid;
        background-color: #111111;
    }
    
    /* ubik-hackerman-syntax has overly dark functions, was #133460 */
    .theme-ubik-hackerman-syntax .syntax--entity.syntax--name.syntax--function, .theme-ubik-hackerman-syntax .syntax--support.syntax--function {
        color: #4f6db4;
        font-weight: bold;
    }
    
    /* ubik-hackerman-syntax recolors the semantic class of arguments to functions; I want types to be colored the same in or out of a function call. */
    .theme-ubik-hackerman-syntax .syntax--arguments, .theme-ubik-hackerman-syntax .syntax--meta.syntax--function-call {
        color: unset;
    }
    
  • (new 2017-06-10) % atom ~/.atom/keymap.cson (why is there no UI for keymapping?!) and add:
    # I hate editors & other long-term applications closing by instinctive Cmd-Q
    'body':
        'cmd-alt-ctrl-shift-q': 'application:quit'
        'cmd-q': 'pane:close'
    
  • (new 2017-06-10) % atom ~/.atom/snippets.cson (why is there no UI for snippets?!) and add:
    '.source.js':
        'module.exports':
            'prefix': 'me'
            'body': '''module.exports = {
                $1
            };
            '''
    

Open issues:

  • I can't find a package to get rid of tabs and only badge/color open files in the tree view.
  • Regex field is unbearably small. I often copy over to BBEdit, do a big regex there, copy back.
  • To figure out any style element to customize, you have to open developer mode ⌘⌥I and pick the element and find the exact right style from a mess of styles. A lifetime writing HTML & CSS pays off in customizing a fucking editor; if you're not me, you're probably stuck with it. BBEdit lets you customize styles right there in Preferences. At least atom-material-ui has a couple choices for accent colors.
  • I wrote this post in BBEdit. Atom has a Markdown preview, but it's awkward and far slower.