Twitterversary

A day that will live in infamy: Twitter emailed me to make sure I knew I joined Twitter 11 years ago today (really?). And then put a banner in front of my notifications (which I still see even if I don't read my timeline), so I said fuck it and hit post, made the swamp a little shittier.

But. 11 years ago, Twitter was really fun. WWDC lunch & event planning, and other nerds finding our weird Objective-C hobby useful and profitable, and all the weird social events which even antisocial nerds would enjoy because it was software-mediated. The normals hadn't really found their way there yet.

At first there was just a little post form on a page, and you had to reload to get updates. Then nice clients came out, like Twitterrific (great for just reading the stream, invented "tweet" and the bird icon, his name is Ollie), Twittelator (great for lists and filtering), and Tweetie (neat UI design, invented pull-to-refresh). And favrd, which was like a leaderboard for funny Twitter.

Then everything started to go wrong. Normals and their predators got on, and humor took a nosedive as thieves stole jokes and reposted memes. Twitter started making their web app usable, and limiting their API, and telling the client devs to go away. Eventually they bought Tweetie and mangled it and then killed it, because everyone at Twitter is too stupid and tasteless to maintain good software.

I've told of the time around App.net and on in Mastodon. I'm still there, generally quite happy with it; there's a bunch of App.net refugees around. I'm kinda sad a bunch of people I like are still on Twitter, there's a hell of a good world out here away from all of that.

ArianeSpace and Rocket Report

  • ArianeSpace Flight VV14/PRISMA: A much better launch broadcast than last one I watched, with fewer self-congratulatory political speeches, none of the weird political ads, and a CGI render of the flight track that at least puts them on par with NASA TV; it would be nicer to have camera views of the stage separation and deployment. That's a high polar orbit they launched into, usually you see high geosynch or low latitudes; they're not good at explaining why, but PRISMA is an Earth mapping satellite, so it needs a continuous loop around the poles to see every inch eventually.

    English subtitling is only by translation software, though, and it's ludicrously wrong on technical terms where you most want it; I can puzzle out enough French to figure out where the nouns are and those are usually companies or English-y scientific terms, but the German and Italian and Euro-English is hard to follow. How do these people get anything done in a tower of Babel?

  • ArsTechnica's Rocket Report is always interesting. Note related to this launch:

    "A competitive market ... The Vega rocket competes with India's Polar Satellite Launch Vehicle, and the Vega C rocket will be slightly more powerful as it seeks customers for small satellites and rideshare missions."

What I'm Watching: Hap & Leonard S3

It is 1989. Hot (black) lawyer Florida goes down to a backwoods Texas shithole to deal with rights to a legendary blues man's lost recordings, goes missing, Hap & Leonard cowboy up to find her, and run into the KKK. They have a satchel of guns, it'll work out.

Great new and old rogue's gallery of weird characters, from Sneed the creep cop from last season, useless Sheriff who's doing Little Bill from Unforgiven with a busted nut, Deputy Hitlerella, Brown the KKK cult leader, creepy mechanic, Bacon the step&fetchit who's more than that. Andrew Dice Clay does a good turn as a DJ, I know he's vilified by the Kids Today™ but I loved The Adventures of Ford Fairlane, and clearly the producers did, too.

Not a lot actually happens until E5, but there's good banter and threats and some Twin Peaks-like weirdness.

So that's where I got up to by last weekend. Now, to finish…

Finally the shit hits the fan. Fights and shootouts and a Mexican standoff… and then it ends abruptly and wrongly, without resolution. Are they planning to do more of this season? What the hell?!

I was like ★★★★★ up to this point, but now I'm angry.

What I'm Watching: More of Love Death Robots

Apparently Netflix is doing 4 different ep orders, they say it's completely at random, though some people think it's based on gender, sexuality, age, etc. What horoscope does my robot show order reveal? Humans are idiots.

The Dump: Joe Lansdale story of a weird dump thing, videogamey CGI of of slime & trash, quick and obvious, but amusing. Not shown: Fuel-air bombing of the dump after missing persons are tracked there. ★★★½☆

Shape-Shifters: Military werewolves, realistic CGI, clearly the next Call of Duty game. Too much werewolf dick. The transformed state isn't as convincing as the Human. But not bad at the personalities and how shitty the military is. Author's Marko Kloos, a military fanfic writer. ★★★☆☆

Helping Hand: This is perfectly designed to piss me off (or any educated person). As anyone who's ever seen a spacewalk knows, astronauts don't work without a tether and a tight grip on their ship or station. It just does not happen. That was bullshit in Gravity, with idiots flying around on 5-minutes-of-fuel maneuvering packs that haven't been used since the '80s, and it's bullshit here, too. Dumb astronaut—again like Gravity a woman, which is so insulting to Peggy Whitson and other skilled woman astronauts—is knocked off station by space junk. I don't buy a cheap company sending out a lone astronaut, either: Launch cost for an extra body isn't much compared to a whole ship. And then her first solution is dumb, maybe 1kg of reaction mass thrown half-assed overhand won't move a 50kg body anywhere. Her second solution is even dumber—in reality, heat radiates away from a body very poorly in a vacuum. THAT'S HOW A THERMOS WORKS! YOU INCOMPETENT FUCK WRITER! Vacuum of space will chill you eventually, especially if you touch cold metal or regolith, but a floating body won't freeze solid for days. ☆☆☆☆☆ Claudine Griggs, hack "sexual politics" writer, I hate you and want you to get an education and then die of shame at your stupidity.

Fish Night: Interesting look, motion-captured CGI but so cel-shaded it looks hand-drawn. Probably took 10x as much time and money as simple rotoscoping and hand-drawing would've. Alas, I care nothing for the characters or the situation. Stop talking and start doing. Hunter & Dr Gonzo had "The drugs took hold around Barstow, on the edge of the desert", too, but then they did shit. Supposedly another Joe Lansdale story, but it's just nothing but a screensaver. ★★☆☆☆

Lucky 13: More Call of Duty, now in a space dropship but carrying Marines to terraforming stations on some planet. And the writer keeps calling the Marines "Soldiers" which at least modern ones don't like much. Love affair of a pilot and her dropship (AI? Maybe. It never speaks, but gets a camera POV.) is nice, and the dogfight videogame sequences are fine. It's not clear who the enemy are supposed to be, they're just as well-equipped, so are they a rival nation of Humans? Why would anyone bother shipping military to space to fight over an uninhabitable rock? Stupid premise, unexamined. Author's Marko Kloos again. ★★★☆☆

Zima Blue: Another Alastair Reynolds adaptation! Perfectly animated and told. The joke of Zima the beverage is a little weird against a serious story. The theme of transforming and abandoning unneeded complications is done several times in Reynolds (Diamond Dogs is another), but here is the best of those. ★★★★★

Blindspot: Mad Max/Jayce and the Wheeled Warriors/GI Joe do a train job with no planning, and get hosed down amusingly for it. All the nonsensical robot-on-robot violence we grew up with, but more swearing. Fuck yeah! Vitaly Shushko makes more of these ridiculous animations, too. ★★★★☆

Ice Age: A very light microscopic civilization take by Michael Swanwick (Vacuum Flowers!). Almost too silly to publish, the characters are utterly passive, but cute graphics for the micros. ★★★☆☆

Alternate Histories: Multiple ways for Hitler to die and consequences. Trivial, and I hate the stick-figure art, but amusing. Surprisingly by John Scalzi, who managed to make several actual jokes in a row! Maybe he wrote this before the brain injury that made him a humorless Internet troll. But it's about Nazis, so it gets no score according to Godwin's Law. He should have done the Lincoln one instead.

The Secret War: More Call of Duty with Soviets in fur coats in the snow during WWII, hunting monsters. And a story of making monsters, and the futility of being right in the Soviet Union. The monsters look like crap, almost literally, like the Xen in Half-Life. Written by David W. Amendola, another military fiction/horror writer. ★★★☆☆

Fin and Philosophy

And that's it for this season! More dumb combat and horror than robots in this half, and I do not appreciate that.

When I say "Call of Duty", that's not a compliment, I think the lowest form of Human slime make and play these mass murder simulators, and stories which are just "then I shoot everything wooo!" are by and for morons.

I have no objection to monster-killing if it illuminates something in a story, or in games if it's a drain on strategic resources (tactical RPGs with HP, MP, and gear to keep an eye on, and that's why my games are bright and happy AND bone-crushingly hard), but otherwise you leave those monsters alone, it's their world and you're just a morsel in it. Compare especially Beyond the Aquila Rift, where there are no "monsters" but these Call of Duty fuckheads would see one.

Total ratings are not bad, Scalzi and that incompetent Hand ep are all that's really bringing it down, but that glut of mediocre military content is hard to wade thru.

☆☆☆☆☆ 2
★☆☆☆☆ 1
★★☆☆☆ 1
★★★☆☆ 7
★★★★☆ 5
★★★★★ 2

What I'm Watching: Love Death Robots

Anthology series of adult SF cartoons, produced by David Fincher and Tim Miller (Deadpool director). Which is like Netflix said "hey, Mark, we made a thing exactly for you!" I <3 you too, Netflix!

18 episodes, I watched 8 so far, will see the rest next binge.

Sonnie's Edge: I instantly recognized this, but couldn't place it—how could I have seen it already? Impossible! Turns out it's adapted from a short story in Peter F. Hamilton's A Second Chance at Eden. What's weird is I remember it visually, where most of my SF reading I remember as text/lore with a few mental illustrations. Nicely animated 3D, a little bit videogamey and exaggerated. I already knew the twist but I don't think it's hard to figure out. ★★★★★

Three Robots: Walker, tiny walker, and weird pyramid robot explore a ruined city and talk too much. Despite withering contempt for Humans (which is entirely deserved), they don't have enough intelligence to avoid a trap. Meh, I don't like cats much, but people infected with Toxoplasma gondii will find this hilarious. CGI is adequate. Ah, it's a short story by John Scalzi, "Three Robots Experience Objects Left Behind from the Era of Humans for the First Time", which is why it feels like obvious jokes driven into the ground by a humorless boot. ★★★☆☆

The Witness: Rear Window/Run Lola Run with a stripper. Characters look like painted dolls, unfocused "camera" like an Italian giallo flick. Striptease could be erotic if they weren't so toy-like. Neatly tied up plot, nonsense surrealism but I like it. Alberto Mielgo has a number of other good animations and paintings. ★★★★½

Suits: Farmers in mecha fighting bugs. Weird 3D with cel-shading to look like a cartoon or plastic toys. This is pretty much daily life in Rifts, they even call the bugs "DeeBees" (dimensional beings in Rifts, no definition given here but maybe Damn Bugs?). Decent combat story, a little personality for the farmers, but not deep. ★★★½☆

Sucker of Souls: Archaeology/adventurer team explore a tomb and are not alone. Hand-animated mostly, I think they had to have traced over 3D in several places. Very aesthetically similar to Castlevania. Not much plot, and no chance of further adventures, but I like the team. Written by Kirsten Cross, who writes hack military-horror shovelware books; short form clearly suits her "talents" better. ★★★★☆

When the Yogurt[sic] Took Over: John Scalzi's shitty parody knockoff of Greg Bear's superb Blood Music, adapted into weird stick-figure and frizzy-hair CGI blobs, narrated ("tell, don't show") by The Brain^W Maurice LaMarche. Sadly no relation to The Stuff, which had a better plot, actors, and special effects. Fucking awful, everyone involved should be drowned in yoghurt. ★☆☆☆☆

Beyond the Aquila Rift: Short story from Alastair Reynolds! Spaceship has a bad wormhole jump/technobabble, ends up somewhere wrong, greeted by a person who shouldn't be there. Music is excessively on-the-nose. CGI is detailed but videogamey, and the space scenes look right out of some space shooter. ★★★★☆

Good Hunting: An evil man and his stupid son hunt a beautiful Hulijing (Chinese Kitsune), tragedy ensues. Then becomes a weird steampunk thing in Hong Kong. Then a superhero origin story? Hand-animated, good fighting motion, but very flat, I don't like the style. Based on a short story by Ken Liu ★★★☆☆

Guardians of the Galaxy 3

Hell yeah. I grew up with some of my favorite comics being ROM Spaceknight, Nova, Rocket Raccoon, Adam Warlock (in Marvel Presents, I think?), and so on… the Marvel space series were so much better than their ground superheroes. While the films are a little trashy, they're fun trash, and the music was just awesome.

But then some Nazis doxxed Gunn and Disney was like "I'm shocked, shocked I say, to discover that the writer of Tromeo & Juliet makes dirty jokes!", but happily have seen sense since everyone involved wanted him back.

So here's the music again:

Wishin' it Weren't Wednesday Music

Return of the Objective-C Jedi

[[[ These ]]] are your father's square brackets, the weapons of a Jedi Knight.
Not as clumsy or random as C++.
Elegant weapons for a more civilized age.

What's Different in Mulle-ObjC

This is like Objective-C circa 2010(?), good but not fully baked. Far better than circa 1986-2009, when it was a very thin translation layer over C.

  • No ARC (Automatic Reference Counting). This is just invisible sugar to hide retain/release/autorelease, and while ARC's convenient, it's trivial if you actually know how reference counting works. Don't really miss it.
  • No dot property syntax. [[myObj name] length] instead of myObj.name.length, and [myObj setName:newName] instead of myObj.name = newName. I can live with it, but I really did like dot syntax, even if it does "overload" the . operator and hide the distinction between methods and variables.
    • When dot syntax came out, Objective-C nerds came close to fistfights over this. You would not believe the venom some people had for it. Most of those nerds died or quit or got old & tired before fucking Swift came around, I guess.
  • No array syntax. [myList objectAtIndex:i] instead of myList[i]. This is a pain in the ass, I'll have to write some shorthand macros (or rather, go dig them out of my very oldest code).
  • No blocks. This one hurts, but it's a reasonable pick-your-battles decision. Classic: Write a method, dispatch to it, and call back success somehow. Blocks: create a weakSelf reference, enclose it, search-replace self in your block, pick one of a half-dozen complex GCD methods, get a memory leak because you retained something across the block boundary. This is annoying but logically simpler:
    [self performSelectorInBackground:@selector(computeData) withObject:inputData];
    
    - (void)computeData:(id)inputData {
        // create outputData
        [self setOutputData:outputData];
        [[NSNotificationCenter defaultCenter] postNotification:NOTI_DataComputed];
    }
    
  • Has object literals: @42 and @(var) create an NSNumber, @[] creates an NSArray, @{} creates an NSDictionary; dicts use key:value order, not the reverse order used in -[NSDictionary dictionaryWithObjectsAndKeys:], and array and dicts don't need a trailing nil, which was a constant source of mystifying bugs back in the day. Big win!
    • Hmn, crashes if you do something janky like [@[] mutableCopy]: mulle_objc_universe 0x1006adef0 fatal: unknown method 5e1b0403 "-getObjects:range:" in class 7aa0d636 "_MulleObjCEmptyArray"
  • Has for (id x in container) loops, using NSFastEnumeration. The 1.0 process of looping enumerations was awful, so this is very nice.
  • Huh, does have @autoreleasepool, so maybe I should use that instead of NSAutoreleasePool like a caveman? It compiles and seems to work.
  • Properties have properties assign/retain nonatomic/atomic nonnullable readonly, default is assign nonatomic, no "nullable" or "readwrite" flags needed. As it should be.
  • Weird isa define instead of pointer: blog post

TODO

  • I haven't set up an NSRunLoop or the equivalent of NSApplication (which is in AppKit, not Foundation), need to do that and then I'll have a working app template.

Writing Objective-C with Mulle-Objc

mkdir CLICalc
cd CLICalc
mulle-sde init -m foundation/objc-developer executable

This takes more or less forever.

… Still going. OK, finally done. I hate to think it's gonna do that every new project? Or whenever it updates?

Anyway, bbedit . (fuck Xcode), and add at the bottom of import.h and import-private.h:

#import <Foundation/Foundation.h>

Make src/main.m useful:

// main.m
 "import-private.h"
 "CLICalc.h"

int main(int argc, char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    CLICalc *calc = [[CLICalc alloc] init];
    [calc push:42.0];
    [calc push:69.0];
    double a = [calc pop];
    double b = [calc pop];
    NSLog(@"a=%f, b=%f", a, b);

    [pool release];
    return 0;
}

Create an Objective-C class, src/CLICalc.h:

// CLICalc.h
 "import-private.h"

@interface CLICalc : NSObject

@property (retain) NSMutableArray *stack;

- (void)push:(double)n;
- (double)pop;

@end

and src/CLICalc.m:

// CLICalc.m
 "CLICalc.h"

@implementation CLICalc

@synthesize stack = _stack;

- (id)init {
    self = [super init];
    _stack = [[NSMutableArray alloc] init];
    return self;
}

- (void)dealloc {
    NSLog(@"CLICalc dealloc");
    [_stack release];
    [super dealloc];
}

- (void)push:(double)n {
    [_stack addObject:@(n)];
}

- (double)pop {
    if ( ! [_stack count]) {
        // ERROR: stack underflow
        return 0.0;
    }
    double n = [[_stack lastObject] doubleValue];
    [_stack removeLastObject];
    return n;
}

@end

Doing that without a template was a little hard on the old memory, and I had to use DDG to look up some method names without autocompletion. But I'm pretty sure that's fine.

In mulle-ide, type update to add the new class to cmake: If you look in cmake/_Sources.cmake you should now see CLICalc.m listed.

Now craft to compile. You'll get a spew of crap, but hopefully no errors.

I am getting this, which I can't resolve:

/Users/mdh/Code/CodeMac/CLICalc/src/main.m:21:55: warning: 'NSAutoreleasePool'
      may not respond to 'init'
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning generated.

But NSAutoreleasePool certainly has init, and it seems to not die?

% ./build/Debug/CLICalc
a=69.000000, b=42.000000

Hooray!

Yeah, this isn't amazing. Except: It's supposedly portable now. I can maybe rebuild this on Linux, or Windows? I dunno.

This is almost classic Objective-C, slightly enhanced from 1.0: We didn't have property/synthesize, or nice object wrappers like @() when I were a lad. I typed so many [NSNumber numberWithInteger:n]. So get used to the retain/release/autorelease dance. There's no dot-syntax for property access, type them [] like old-school. But hey, it's a proper compiled language with a nice object system and no GC pausing.

I tried importing Cocoa and got a ludicrous spew of errors, so Mac GUI is gonna be a challenge. But I could import SDL and use that for portable UI, since Objective-C is just C.

Sweet. I'll finish up the calculator's parser in a bit, but then see about doing something useful in it.