"A failure in the hot air department"
Showing entries tagged "letsbuild". Full blog index.
assembly autorelease c cocoa(4) dwarf evil fridayqna(20) gcd(2) guest(2) iphone letsbuild(20) macho memory notifications(2) objectivec(10) swift(3) threading
Friday Q&A 2015-09-04: Let's Build dispatch_queue at 2015-09-04 13:22
Grand Central Dispatch is one of the truly great APIs to come out of Apple in the past few years. In the latest installment of the Let's Build series, I'm going to explore a reimplementation of the most basic features of
dispatch_queue, a topic suggested by Rob Rix.
Friday Q&A 2015-04-17: Let's Build Swift.Array at 2015-04-17 13:42
Swift 1.2 is now available as part of Xcode 6.3, and one of the new APIs it includes allows us to build efficient data structures with value semantics, such as Swift's built-in
Arraytype. Today, I'm going to reimplement the core functionality of
Friday Q&A 2015-02-20: Let's Build @synchronized at 2015-02-20 14:26
Continuing the theme of thread safety from the previous article, today I'm going to explore an implementation of Objective-C's
@synchronizedfacility in the latest edition of Let's Build. I'm going to build it in Swift, although an equivalent Objective-C version would be much the same.
Friday Q&A 2015-01-23: Let's Build Swift Notifications at 2015-01-23 14:52
NSNotificationCenteris a useful API that's pervasive in Apple's frameworks, and often sees a lot of use within our own code. I previously explored building
NSNotificationCenterin Objective-C. Today, I want to build it in Swift, but not just another reimplementation of the same idea. Instead, I'm going to take the API and make it faster, better, stronger, and take advantage of all the nice stuff Swift has to offer us.
Friday Q&A 2013-08-16: Let's Build Dispatch Groups at 2013-08-17 02:19
Dispatch groups are a handy facility for synchronizing multiple tasks, and an anonymous reader suggested them for the subject of today's Let's Build.
Friday Q&A 2013-05-17: Let's Build stringWithFormat: at 2013-05-17 14:40
Our long effort to rebuild Cocoa piece by piece continues. For today, reader Nate Heagy has suggested building
Friday Q&A 2013-03-22: Let's Build NSInvocation, Part II at 2013-03-22 14:57
Last time on Friday Q&A, I began the reimplementation of parts of
MAInvocation. In that article, I discussed the basic theory, the architecture calling conventions, and presented the assembly language glue code needed for the implementation. Today, I present the Objective-C part of
Friday Q&A 2013-03-08: Let's Build NSInvocation, Part I at 2013-03-08 14:33
It's time for another trip into the nether regions of the soul. Reader Robby Walker suggested an article about
NSInvocation, and I have obliged, implementing it from scratch for your amusement. Today I'll start on a guided tour down the hall of horrors that is
MAInvocation, my reimplementation of the
NSInvocationAPI. It's a big project, so today I'm going to focus on the basic principles and the assembly language glue code, with the rest of the implementation to follow.
Friday Q&A 2013-02-22: Let's Build UITableView at 2013-02-22 15:35
Friday Q&A is driven by the readers, and that's especially true today. Reader Matthew Elton thought that "Let's Build UITableView" would make a good topic for Friday Q&A, but he decided he'd rather implement it himself and write it up rather than wait for me to do it (good move, Matthew). Without further ado, here is Matthew's article an building
Friday Q&A 2013-02-08: Let's Build Key-Value Coding at 2013-02-08 14:17
Last time, I showed how to build the basic functionality of
NSObject. I left out key-value coding, because the implementation of
setValue:forKey:is complex enough to need its own article. This is that article.
Friday Q&A 2013-01-25: Let's Build NSObject at 2013-01-25 15:32
NSObjectclass lies at the root of (almost) all classes we build and use as part of Cocoa programming. What does it actually do, though, and how does it do it? Today, I'm going to rebuild
NSObjectfrom scratch, as suggested by friend of the blog and occasional guest author Gwynne Raskind.
Friday Q&A 2012-11-30: Let's Build A Mach-O Executable at 2012-11-30 17:59
This is something of a followup to my last article, dyld: Dynamic Linking On OS X, in which I explored how the dynamic linker
dylddoes its job. This week, I'm going to recreate the function of both the compiler and the static linker, building a Mach-O binary completely from scratch with only the help of the assembler.
Friday Q&A 2012-11-16: Let's Build objc_msgSend at 2012-11-16 14:27
objc_msgSendfunction underlies everything we do in Objective-C. Gwynne Raskind, reader and occasional Friday Q&A guest contributor, suggested that I talk about how
objc_msgSendworks on the inside. What better way to understand how something works than to build it from scratch? Let's build
Friday Q&A 2012-07-27: Let's Build Tagged Pointers at 2012-07-27 13:35
Last time on Friday Q&A, I discussed a hypothetical implementation of the
NSNumberclass. Starting on Mac OS X 10.7 and iOS 5,
NSNumberuses a new runtime facility called tagged pointers to increase speed and reduce memory usage, the inner workings of which I want to examine today.
Friday Q&A 2012-07-06: Let's Build NSNumber at 2012-07-06 15:08
NSNumberis a deceptively simple class with some interesting implementation details. In today's edition of Friday Q&A, I'll explore how to build a class that works like
NSNumber, a topic suggested by Jay Tamboli.
Friday Q&A 2012-03-16: Let's Build NSMutableDictionary at 2012-03-16 14:55
Last time on Friday Q&A, we discussed how to implement
NSMutableArray. Today, I'll repeat the same exercise with
NSMutableDictionaryand build an implementation of it from scratch.
Friday Q&A 2012-03-09: Let's Build NSMutableArray at 2012-03-09 13:44
Collection classes are ubiquitous in Cocoa apps, but also fairly opaque. Today, at the suggestion of Matthew Elton, I'm going to take a look at how
NSMutableArrayworks behind the scenes by building a replacement for it from scratch.
Friday Q&A 2011-09-16: Let's Build Reference Counting at 2011-09-16 14:00
Last time, I discussed how to build
NSAutoreleasePooland how it works internally. Today, I'm going to carry that theme forward by building an implementation of Cocoa reference counting with
release, a topic suggested by David Dunham.
Friday Q&A 2011-09-02: Let's Build NSAutoreleasePool at 2011-09-02 16:30
It's that time again: time for more programming craziness. Dallas Brown suggested that I talk about how
NSAutoreleasePoolworks behind the scenes. I decided that the best way to do that would be to simply reimplement it, and that is what I'll discuss today.
Friday Q&A 2011-07-08: Let's Build NSNotificationCenter at 2011-07-08 16:11
Notifications in Cocoa are extremely useful and are pervasive in Cocoa programming. Unfortunately, a lot of Cocoa programmers see the notification system as something of a black box: a notification is posted, Stuff Happens, and somehow the observer gets notified. Fortunately, the Stuff that Happens is actually pretty simple, and to explore it, I'm going to reimplement an
NSNotificationCenterworkalike from scratch to illustrate how it all works, a topic suggested by Dylan Copeland.