April 5, 2018

Mac Pro: x86… or ARM?

Of the several lingering rumors around Apple’s hardware strategy, there are two that tend to rise to the top:

  • Will there be ARM Macs, and
  • Where’s my new Mac Pro?

Often we think of these separately. ARM chips have been the backbone of phones and tablets for some time, but that’s obviously the slot they’ll stay in. If a Mac were to be ARM-based, it’d be the MacBook Air or something equally lightweight, both in pounds and in power — the Mac Pro wouldn’t enter into the equation at all.

November 13, 2017

Xcoders talk: Objective-C Bridging

As Swift enters its fourth year in public and continues to evolve, it becomes more and more attractive to add new features using the language — but for those of us who are blessed with large legacy codebases, crossing the divide between Objective-C and Swift can be a burden. What’s more, some of the language features in Objective-C that can help ease this transition aren’t necessarily well-documented or publicized.

This is an issue I’ve been grappling with in different projects for some time, and so when the opportunity arose to discuss the topic at our local Xcoders meetup, I took it. I think this talk had the fewest slides of any presentation I’ve ever given, so I won’t reproduce them here, but the example project is available on GitHub — both before and after the changes from the talk. (A video is forthcoming.)

August 31, 2017

Swift Tricks: Emoji Flags

Toying around with some code on the bus this morning, I came across an interesting fact about region flag emoji. Among the thousands of emoji that the Unicode standard defines, 270 of them represent region flags, each corresponding to a two-character region code: “us” means 🇺🇸, for example.

My curiosity was this: is there a way to programmatically generate the flag emoji 🇺🇸 from the string "us"? I was afraid that, like many other emoji, the flags would each have a unique name — something like REGIONAL FLAG UNITED STATES — and would require a lookup table to translate between the basic string "us" and the resulting emoji. Not so!