Insert the url of the feed you want to read here (e.g. http://news.google.com/?output=rss):

inessential.com

Brent Simmons’s weblog.

How Trump’s Support Erodes 5 Feb 2017, 12:25 am

Even Trump’s supporters know he’s not a good and competent man — nevertheless, they think they can get what they want from him. It’s a cynical deal, and bad, but you can understand it.

Trump’s vagueness and flip-flops, and the suggestion that he not be taken literally, all help him with this: his supporters, who don’t all want the same things, see what they want to see.

Many Republicans wanted a corporatist to replace Scalia on the Supreme Court, so that decisions like Roe v. Wade could be over-turned and, especially, so that more decisions like Citizens United would be made. It’s likely they’ll get that with a Gorsuch confirmation, no matter how Democrats fight (and they should fight).

But beyond that, every time Trump actually does something specific — as opposed to just saying hard-to-pin-down things — he erodes some support.

For example: many Republicans — Vice President Pence perhaps foremost, along with the Christian Sharia — want to see LGBTQ protections rolled back. But other Republicans don’t, and Ivanka Trump and Jared Kushner reportedly managed to prevent (at least for now) an Executive Order to that effect.

Many Republicans support multilateral free trade (as do I), and in particular agreements that strengthen our ties in Asia as a balance against emerging Chinese power. Well, TPP is not going to happen, and the future of NAFTA is in question.

Many Republicans do not support a Muslim ban which would make our country less safe and demonstrate to the world that we are not the beacon of liberty we’ve claimed.

Many Republicans support a strong NATO alliance and consider Russia one of our biggest threats — but Trump doesn’t. The jettisoning of the post-war American peace in favor of allying with Russia in a clash of civilizations with Islam is not what every Republican wants to see. (What is the winning condition — or final solution — for that kind of clash?)

Not every Republican is willing to spend taxpayer billions on a big, beautiful wall. They all know that Mexico is not paying for it.

Yes, there are some supporters who’ve been happy with everything.

But with each specific move, or lack of move, more supporters learn they’re not going to get what they want, and they learn they’ll get some things they don’t want.

Trump campaigned as almost a Rorschach test, where a large-enough coalition could believe he was on their side. As he makes specific moves, elements of that coalition learn that he’s not.

And that’s how his support erodes — because once you realize he’s not on your side, all you have left to support is his narcissism, mendacity, cruelty, corruption, and incompetence.

Web Developer Position Open at Omni 31 Jan 2017, 8:57 pm

Check out Omni’s jobs page:

The Omni Group is seeking a senior front-end web developer to develop and maintain a world-class website for our Mac and iOS products. The position is part of the Design Department and will focus on bringing mockups to life.

Omni makes great apps and it’s a wonderful place to work.

First Week Notes 30 Jan 2017, 8:03 pm

It’s not Russian Roulette when there’s a bullet in every chamber — it’s just Russian.

* * *

It should be clear by now that Democrats in Congress should resist every single thing Trump attempts. Every nominee. Every law. Every single thing. Do not collaborate.

* * *

The next thing might be a “Religious Freedom” executive order that permits anti-LGBTQ discrimination.

* * *

Things move fast. History:

Jan 30, 1933: Hitler becomes Chancellor of Germany.

Feb 27, 1933: Reichstag fire.

Mar 23, 1933: Enabling Act, which establishes the dictatorship.

Things move faster these days, seems like. The question is: what will be the equivalent of the Reichstag Fire?

It has to be an emergency where Trump can claim “temporary” expanded powers.

Would massive, continuous protests be enough? Quite possibly. (Which is not an argument against protests. I’m quite definitely in favor of protests.)

But don’t be surprised when those powers end protest, free speech, and the free press, in the name of national security and order.

You might think Trump isn’t historically aware enough to know the would-be dictator’s playbook. Maybe he is, maybe he isn’t. I don’t know.

But Bannon is.

Mighty Yosemite 25 Jan 2017, 5:01 am

A little birdie — okay, it was Sol-meister K. — tells me that CocoaConf Yosemite is close to selling out.

Don’t miss out! It’s so beautiful. This will be my third trip — because I miss it when I’m not there, and because the people are awesome.

Omni’s Roadmap and Scripting 24 Jan 2017, 8:22 pm

Omni: Looking Back, Looking Ahead—2017 Edition:

In 2016 we scratched the surface with URL automation on iOS, but in 2017 we plan to roll out user automation on iOS in a big way across all our apps with a much richer set of capabilities. This automation support won’t be limited to a simple set of URL primitives; instead, we’re adding support for running JavaScript code: code that has the same level of deep support for manipulating the data in our apps as we’ve previously exposed to AppleScript…

Right before the holidays I approached Sal [Soghoian] to review the automation work we’ve been doing, and over the past weeks he’s been enthusiastically exploring the boundaries of what’s already possible as well as helping us see what else we need to build before shipping this.

Today 20 Jan 2017, 6:10 pm

Today wasn’t so bad. Sure, the enemies of democracy, the Constitution, rationality, compassion, national and international institutions, decency, competence, ethics, art, science, and truth itself — and of anyone who isn’t a white man — now darken the offices of power. But they haven’t done much yet. The bad days are still to come.

My loathing and contempt for President Trump feels complete — but it isn’t. It will continue to deepen.

Tomorrow 19 Jan 2017, 9:10 pm

Remember today, since we may spend the rest of our lives getting back to this point.

I hope to remember tomorrow as the first of many days where the American people said “fuck you” to the new President.

The Difference in the Vote 6 Jan 2017, 10:24 pm

Had Hillary Clinton won Wisconsin, Michigan, and Pennsylvania — states that normally go blue — she would have won an Electoral College majority and she would be President-elect.

She didn’t — despite winning the popular vote by nearly 3 million votes — and Donald Trump is President-elect.

Russia worked to influence the election. Did they succeed? Did their efforts matter?

I don’t know how you’d gauge that. But it’s interesting to note just how close it was.

Wisconsin: 1,405,284 - 1,382,536 = 22,748

Michigan: 2,279,543 - 2,268,839 = 10,704

Pennsylvania: 2,970,733 - 2,926,441 = 44,292

That adds up to Trump winning those states by 77,744 votes.

That’s a small number of votes. That’s 0.06% of the total votes cast (128,824,833) — or 0.82% in Wisconsin, 0.24% in Michigan, and 0.75% in Pennsylvania. Not even 1% in any one of those states.

If you grant that Russia’s efforts had a small effect — well, there’s the difference.

You may think otherwise: you may think their efforts had an even greater effect, or none at all, and I suspect what you think depends on which candidate you backed.

For me: I believe that everything mattered. Russia’s attack on our democracy isn’t the only issue of consequence. But, still, take away just this one thing, and I strongly suspect Clinton would have won.

PS In contrast, Clinton won the popular vote by 2,865,075 votes, which is 2.2% of the popular vote.

The Declassified Report 6 Jan 2017, 9:53 pm

From the Office of the Director of National Intelligence:

We assess with high confidence that Russian President Vladimir Putin ordered an influence campaign in 2016 aimed at the US presidential election, the consistent goals of which were to undermine public faith in the US democratic process, denigrate Secretary Clinton, and harm her electability and potential presidency. We further assess Putin and the Russian Government developed a clear preference for President-elect Trump.

(Via Talking Points Memo.)

Manton’s Thing 6 Jan 2017, 9:22 pm

Manton’s doing important work, and you should back it.

Microblogging on the open web could be — should be — the next thing. Manton’s building it. With your help.

OPML File Type on Macs 5 Jan 2017, 9:20 pm

I was fixing a bug in OmniOutliner where it wouldn’t open a file with an uppercase .OPML suffix. I did some digging, and the fix was to register the app as handling the com.apple.news.opml file type.

Which upset me. I’ll explain.

OPML — Outline Processor Markup Language — was invented in 2000 by Dave Winer at UserLand Software. It’s not Apple’s format, and the correct file type is org.opml.opml.

I was working for Dave at the time. Some time after Dave wrote the first OPML reading and writing code, I ported it to C. Later, when I was working on NetNewsWire, in 2002, I wrote what may have been the first Objective-C code for reading and writing OPML. And today I work on OmniOutliner, which supports OPML, and I’ve published an open source OPML parser.

So I know OPML. After Dave, I may have worked with this format more than anyone else in the world.

This file type redefinition not only created a bug that I had to figure out and fix, it also demonstrated disrespect. I suspect it was entirely thoughtless — but, well, that’s still bad.

Radar forthcoming.

Update: Bug filed: rdar://29888756.

‘The Devastation Is Very Important to Me’ 3 Jan 2017, 8:26 pm

During the Cold War, I was a kid, and then a teenager, and I often thought about the end of human life. Maybe an all-out nuclear war followed by nuclear winter would not have killed everybody, but maybe it would have.

I imagined a billion people vaporized. Then I imagined just one person vaporized a billion times.

I imagined one person dying in flames a billion times. I imagined one person coughing and sick and dying of radiation poisoning a billion times. I imagined one child dying of hunger, in the dark, a billion times.

Every single good thing a human hand ever did is wiped away. Every argument made meaningless. Spoken and written words all vanish — the very idea of words is gone.

The legs of every single table break, and not a single table stands to hold a vase of flowers. No windows hang on anywhere. Buildings subside, dams allow the water through, and airplanes sink into the ground.

Dogs, if they live, reshape back into wolves, over generations, and cats forget our warmth. Animals know things, but they don’t know they know things. If they feel love, they can’t name it.

The wind rushes over the poisoned ground, touching no one forever, and the sun shines for billions more years but never again on human consciousness. The sun illuminates no human grace or tenderness or mercy, because we are gone, and, in this terrible end, it would have been better had we never lived.

Nobody knows the nothingness or calls it nothingness.

* * *

So fuck anybody who says that more countries should have nuclear weapons, or that we should have more bombs, or that an arms race would be just fine.

Fuck fucking off.

Lindy West on Leaving Twitter 3 Jan 2017, 7:03 pm

She writes:

On 29 December, Twitter CEO Jack Dorsey tweeted: “What’s the most important thing you want to see Twitter improve or create in 2017?” One user responded: “Comprehensive plan for getting rid of the Nazis.”

“We’ve been working on our policies and controls,” Dorsey replied. “What’s the next most critical thing?” Oh, what’s our second-highest priority after Nazis? I’d say No 2 is also Nazis. And No 3. In fact, you can just go ahead and slide “Nazis” into the top 100 spots. Get back to me when your website isn’t a roiling rat-king of Nazis. Nazis are bad, you see?

Style Guide Update: Agent of Russia 2 Jan 2017, 10:33 pm

As we were updating the inessential.com style guide for the new year, we came across an interesting question: do we refer to Donald Trump as:

  • President-elect Donald Trump, or
  • President-elect and Russian agent Donald Trump, or
  • President-elect and agent of Russia Donald Trump.

(Obviously, “President-elect” changes to “President” on January 20, unless God graces us with a stroke of luck.)

The first option was discarded as a disservice to our readers. So it really came down to this wording: “Russian agent” or “agent of Russia.”

The committee was divided, and arguments were intense and lengthy. But we finally decided that “Russian agent” could imply that he is on the books and takes direct orders from Russia, which we can’t prove right now.

However, “agent of Russia” simply says that he is working to effect change benefiting the interests of Russia before our own. Which is obvious, and objectionable only in the sense that we regret that it’s true.

So there you have it. Until something changes, we will refer to him as President-elect and agent of Russia Donald Trump.

Why I Prefer Protocol-Oriented-Programming in Objective-C to Swift 30 Dec 2016, 11:42 pm

I first learned protocol-oriented-programming with Objective-C, and I was very pleased to see the Swift team emphasize this style.

But, at least at this writing at the end of 2016, I still run into problems when I use this style of programming in Swift.

Here’s the problem I’m trying to solve:

Variant Value

I’m working on a schema-less hierarchical database. Tables can contain tables, and they can contain values such as strings, numbers, booleans, dates, arrays, and so on.

To represent these values, I’d rather use a Value protocol rather than a Value class. If it’s a protocol, then I can have completely separate implementations: BoolValue and DateValue and ArrayValue and so on would conform to Value, but otherwise would have different implementations.

But here’s the thing: ArrayValue needs to have an actual Swift array of type [Value].

So let’s say you want to add something to that Swift array, where arrayValue is of [Value] type. Let’s say you’ve created trueValue, which is a BoolValue, and BoolValue conforms to the Value protocol.

arrayValue += [trueValue]

You can’t. Because even though BoolValue conforms to the Value protocol, this isn’t handled automatically. The compiler knows all the types involved, but it still won’t let you do this unless you explicitly cast. The following works:

arrayValue += [trueValue as Value]

In Objective-C, no casting is required:

[arrayValue addObject:trueValue];

This may seem like nitpicking on my part, but that added bit of housekeeping makes protocol-oriented-programming in Swift feel a little bit unnatural.

A natural form of protocol-oriented-programming might start with this premise: any time the protocol type is called-for, you can use an object that conforms to that protocol.

More complexity, to push the point

Let’s say you have two arrays:

let array1 = [trueValue as Value]
let array2 = [trueValue]

You and I both know that those arrays contain just one object, and it’s an identical object. Those two arrays are absolutely equal.

But you can’t compare them:

array1 == array2 will not compile, because array1 is of type [Value] and array2 is of type [BoolValue]. Even though BoolValue conforms to Value, this won’t work.

In Objective-C, you’d just use isEqual:, and it would work as expected.

But it gets worse:

let array1 = [trueValue as Value]
let array2 = [trueValue as Value]

Okay: now you know those two arrays couldn’t possibly be more equal.

But array1 == array2 still won’t compile, and you’ll get the following error:

binary operator '==' cannot be applied to two '[Value]' operands

In Objective-C, you’d write:

NSArray *array1 = @[trueValue];
NSArray *array2 = @[trueValue];

And [array1 isEqual:array2] will return YES.

(You could type those arrays using lightweight generics, and the outcome is the same: it works.)

So: a second premise for natural protocol-oriented-programming might be: a protocol-conforming object should have the same features as other objects — for instance, you should be able to make it Equatable (the equivalent of, in Objective-C, responding to isEqual:).

Two TV Shows 29 Dec 2016, 7:26 pm

Orange leader. Dominance and narcissism and corruption and bullshit and lies. Families breaking up. The claim of making the world great masking a business empire.

See Leah Remini: Scientology and the Aftermath. It’s riveting.

And I can’t help but feel like, in a way, all of America just joined Scientology. (Not literally, of course.)

* * *

The Man in the High Castle has long been my favorite Philip K. Dick novel, and one of my favorite novels ever.

(My Mom pushed it on me when I was a teenager. I’ve been a Dickhead ever since.)

In it, the Germans and Japanese won the second World War (or did they?) and America is split up and occupied — by the Japanese empire on the west and the Reich to the east.

I’m five episodes into the TV show. It doesn’t faithfully track the novel — it’s much more of a thriller than I remember from the book. Which is fine: the novel is a novel, and the TV show is a TV show.

And I can hardly pull myself away, not least because it also speaks to the current moment.

Elites 24 Dec 2016, 12:15 am

Damn I’m slow.

It’s been a thing for years where Republicans talk about the “elites,” and I laugh — because the Republican party, the party for the super-rich and mega-rich (and the generals, it seems) is clearly the party of the elites.

I honestly didn’t know what they meant. I know who they meant — they meant people who make TV shows and movies, write books, sing songs, improve public schools, or who just lead nice lives in the cities and vote for Democrats. (That last one includes me.)

But here’s what they mean, specifically, I think: the “elites” are the people who will, directly or implicitly, tell you you’re a racist. Or sexist, or homophobe, or Islamophobe, or some form of bigot.

And since calling you a bigot has become, somehow, the very worst thing you can do in America, the “elites” are the very worst people.

The “elites,” just by making Modern Family and calling for health insurance even for people who aren’t white, are somehow telling these Republicans that they’re bad people. I get it now. (Maybe I’m the last person to understand this!)

Tough shit.

2016 and 2017 22 Dec 2016, 10:10 pm

If 2016 was a tough year for a number of reasons, it was tough especially because we agreed to hand a machine gun to a monkey.

So we can all agree that we’d like to put 2016 behind us. Good riddance to a bad year.

The problem is that 2017 is the year that the monkey pulls the trigger.

Vesper Open Source #3: the iOS App 21 Dec 2016, 8:30 pm

Vesper for iOS is up on GitHub.

It’s presented as a historical artifact rather than as a living project. It’s definitely not an example of how to write apps these days — and it’s not even an example of how to write apps in 2013.

There are good parts and bad parts, embarrassing parts, parts that clearly need refactoring, etc. etc.

The only changes from the code in our current repository were to remove the incomplete Mac app code, remove Hockey, remove Ideal Sans (the embedded font), make a few code changes related to switching to the system font, and get it to compile with Xcode 8.2.1.

Surprisingly Big

It’s been a while since I lived in this code and, coming back to it, I was struck by how very much code there is. It’s a little nuts. This is just a note-taking app, after all.

If you remember the context, though, it’s perhaps not that surprising.

It was written while iOS 6 was current, and it still looks like an iOS 6 app under the hood. But, at the same time, we were anticipating iOS 7, and so Vesper was an art project — we wanted Vesper to join Letterpress and Twitterrific and a few others as one of the first Modernist apps.

But we hadn’t actually seen iOS 7, and so we invented Vesper’s look and feel from scratch, though with some idea of where the puck was heading. That — combined with wanting to use Ideal Sans everywhere, even in standard things like alerts — meant we had to do a ton of custom UI and animations.

It’s interesting to me that 2013 was about the last time you could plausibly think that that’s the right thing to do. It’s clearly too expensive now — and was too expensive then, too, but we hadn’t realized it yet.

The irony is that we thought Vesper was one of the first apps of a new era — the era that officially kicked-off with iOS 7 — but, in the end, it was one of the last apps of the era where it was not uncommon for developers to spend massive amounts of time in UI invention.

It’s a different era now. I don’t mean that critically — iOS 7 and the follow-ups have brought iOS closer to where the Mac has been all these decades, where you have standard system UI that’s good and that doesn’t require much customization. That’s a good thing.

Were we to write Vesper now, based on that same initial idea (drag to reorder plus tags), we’d do it in far less code. (I’d guess it would take about a third of the code.) But would we still use Ideal Sans? I bet we would. What a lovely font. I regret that we couldn’t provide it in the open source version.

Forking

You’re welcome to do whatever you want with Vesper for iOS as long as you respect the license (MIT). Also: the name Vesper and the app icon remain the property of me, Dave, and John.

However: everything I said above is true. Under the hood it’s an iOS 6 app. You really should treat it as history. There may be lessons to learn — what not to do as well as what to do — but I don’t recommend using it as the basis for a new app.

More blog posts

There are specific things in Vesper worth writing about. There will be more posts. (Though probably not today. It’s sunny in Seattle! I’m going outside.)

Vesper Open Source #2: the API Server 19 Dec 2016, 10:14 pm

I just posted Vesper’s API server up on GitHub.

Again: this is provided as historical artifact, not as living software. It no longer runs anywhere. And I don’t make claims about quality — it’s just that it may be interesting. (And may not be.) It gives me something to write about, at least.

For possibly-helpful background, see the Vesper Sync Diary, which was written while I was working on this code.

Azure Mobile Services

It’s a Node.js server — but it ran on top of Mobile Services, which means you couldn’t just plop it down on a machine and run it unless you added the exact features that Mobile Services provides.

Nevertheless, I think the code is somewhat readable, even if it would be difficult to run it. (You’d also have to set up a database with the exact same schema, which you could figure out from the code. I don’t recommend actually trying to get this running.)

Where the code is

See the api and shared directories. You can ignore the extensions and table directories. The scheduler directory has just one simple script in it.

Things I Liked

The Azure folks provided a ton of help. They were great, and I enjoyed using the service.

Once the code was written and tested, I made almost no changes. It just worked. And keeping it running wasn’t a problem until near the end (I think I had to upgrade the database plan, and that fixed it).

Things I Didn’t Like

It’s JavaScript. Because I’ve spent the last 15 years writing Objective-C, I would have been far more comfortable writing in Ruby. It would have been more readable and better-organized. Hopefully I could have better avoided callback-hell (where callbacks are nested inside callbacks which are nested inside callbacks, etc.).

But, hey, JavaScript gets the job done.

The other thing I didn’t like was that there wasn’t a way to run a Mobile Services Node site locally, since the online version takes care of a bunch of things. In practice this wasn’t as bad as it sounds, but being able to run it locally would have been nice.

The Heart of Vesper Syncing

See api/notes.js. Syncing was done per-property: each property of a note had an associated modification date. When notes come into the server, and there are existing versions, those properties are merged. See the mergeOneNote and mergeOneProperty functions.

It should be no surprise that almost the exact same code — only in Objective-C — runs on the client side. It also merges property-by-property as notes come from the server, since there may be local changes that are newer.

Also see, in api/tags.js, mergeTags and mergeTag.

Encryption

The text of notes was stored in the database encrypted, with a key that was stored in the config for the site but not in the source code or in the repository. In shared/vespernotes.js, see encryptedTextForNote and decryptedNoteText.

One of the features of this was that I could change the encryption key without re-encrypting the entire database. The keys were stored with names of the form VESPER_TEXT_KEY_0, VESPER_TEXT_KEY_1, etc. And there was another config item that specified the current key. When the current key failed to decrypt note text, it would try the previous key, and so on back to the very first (zeroth) key. See the loop in decryptedNoteText.

This is different from providing end-to-end encryption, of course. These days that’s probably the way to go. But at the time we wrote this it was reasonable not to do that. Times change.

(Note that nobody ever asked for any data from our system, and we would have to create a mechanism for that, which we never did.)

Page processed in 0.766 seconds.

Powered by Super Surge in cooperation with Fresh Content.