objc_msgSend's New Prototype
Oct 11, 2019, 8:09 AM
Apple's new OSes are out. If you've looked through the documentation, you may have noticed that the prototype for objc_msgSend has changed. Previously, it was declared as a function that took id, SEL, and variadic arguments after that, and...
Friday Q&A 2018-06-29: Debugging with C-Reduce
Jun 29, 2018, 9:35 AM
Debugging a complex problem is tough, and it can be especially difficult when it's not obvious which chunk of code is responsible. It's common to attempt to produce a reduced test case in order to narrow it down. It's tedious to do this...
Friday Q&A 2018-04-27: Generating Text With Markov Chains in Swift
Apr 27, 2018, 9:27 PM
Markov chains make for a simple way to generate realistic looking but nonsensical text. Today, I'm going to use that technique to build a text generator based on this blog's contents, an idea suggested/inspired by reader Jordan...
Friday Q&A 2017-12-08: Type Erasure in Swift
Dec 15, 2017, 9:09 AM
You might have heard the term type erasure. You might have even used type-erased types in the standard library, such as AnySequence. But what exactly is type erasure and how do you do it yourself? In this article, I'll explore type...
Friday Q&A 2017-11-10: Observing the A11's Heterogenous Cores
Nov 10, 2017, 7:41 AM
Apple's newest mobile CPU, the A11, brings a new level of heterogeneous computing to iOS, with both high and low performance cores that are always on. With the release of the iPhone X, I set out to see if I could observe these...
Friday Q&A 2017-10-27: Locks, Thread Safety, and Swift: 2017 Edition
Oct 27, 2017, 7:28 AM
Back in the dark ages of Swift 1, I wrote an article about locks and thread safety in Swift. The march of time has made it fairly obsolete, and reader Seth Willits suggested I update it for the modern age, so here it is!(Read More)
The Complete Friday Q&A Volumes II and III Are Out!
Oct 10, 2017, 12:19 PM
It's finally here! I'm pleased to present The Complete Friday Q&A Volumes II and III.(Read More)
Friday Q&A 2017-10-06: Type-Safe User Defaults
Oct 6, 2017, 8:55 AM
It's fun to re-imagine traditional techniques with a Swift twist. I've implemented a type-safe layer on top of the venerable NSUserDefaults, and I'm going to discuss my little library today. Credit/blame for this idea goes to local reader...
Friday Q&A 2017-09-22: Swift 4 Weak References
Sep 22, 2017, 8:57 PM
Soon after Swift was initially open sourced, I wrote an article about how weak references are implemented. Time moves on and things change, and the implementation is different from what it once was. Today I'm going to talk about the...
The Best New Features in Swift 4
Sep 15, 2017, 10:43 AM
I'm afraid I once again don't have a Friday Q&A for you today, but I wrote up the best new features in Swift 4 for the Plausible Labs blog, which is almost as good. Check it out over there!(Read More)
Corporate Training, NYC Workshop, and Book Update
Sep 8, 2017, 3:07 PM
I'm afraid I ran out of time for Friday Q&A this week. Will shoot for next week instead. Instead, I present a little update about various other things in my world.(Read More)
Friday Q&A 2017-08-25: Swift Error Handling Implementation
Aug 25, 2017, 9:13 AM
Swift's error handling is a unique feature of the language. It looks a lot like exceptions in other languages, but the syntax is not quite the same, and it doesn't quite work the same either. Today I'm going to take a look at how Swift...
Friday Q&A 2017-08-11: Swift.Unmanaged
Aug 11, 2017, 9:14 AM
In order to work with C APIs, we sometimes need to convert Swift object references to and from raw pointers. Swift's Unmanaged struct is the standard API for handling this. Today, I'd like to talk about what it does and how to use it.(Read...
Friday Q&A 2017-07-28: A Binary Coder for Swift
Jul 28, 2017, 8:44 AM
In my last article I discussed the basics of Swift's new Codable protocol, briefly discussed how to implement your own encoder and decoder, and promised another article about a custom binary coder I've been working on. Today, I'm going to...
Friday Q&A 2017-07-14: Swift.Codable
Jul 14, 2017, 9:57 AM
One of the interesting additions to Swift 4 is the Codable protocol and the machinery around it. This is a subject near and dear to my heart, and I want to discuss what it is and how it works today.(Read More)
Friday Q&A 2017-06-30: Dissecting objc_msgSend on ARM64
Jul 1, 2017, 12:23 AM
We're back! During the week of WWDC, I spoke at CocoaConf Next Door, and one of my talks involved a dissection of objc_msgSend's ARM64 implementation. I thought that turning it into an article would make for a nice return to blogging for...
More Advanced Swift Workshop, and Blog and Book Updates
Jun 13, 2017, 12:11 PM
I'm hoping to resume a regular posting schedule soon, and I wanted to give everybody some updates.(Read More)
Advanced Swift Workshop in New York City
Mar 27, 2017, 11:29 AM
I will be holding another one-day workshop on advanced Swift programming in New York City on May 4th. This will be much the same as my previous one in Washington in December, in a new location and with various tweaks and improvements. If...
Advanced Swift Workshop in Washington, DC
Nov 12, 2016, 4:27 PM
I will be holding a one-day workshop on advanced Swift programming in the Washington, DC area on December 12th. If you enjoy my articles and want to sharpen your Swift skills, check it out.(Read More)
Good News, Bad News, and Ugly News
Jun 1, 2016, 7:48 AM
The good news is that I'm officially restarting work on The Complete Friday Q&A: Volume II. I got partway into it a while ago and ran out of steam. The restarted edition includes all posts made since then, making it pretty massive. I...