Top all-time · #1013
Matt Gallagher
Personal blog · cocoawithlove.comprogramminghardware
Matt Gallagher writes Cocoa with Love, a personal blog at cocoawithlove.com about programming and hardware. Since 2008, 69 different Hacker News readers have linked it 165 times, most often “Exponential time complexity in the Swift type checker”. It is still writing: the last post was on 2026-06-08, and you can follow it by feed.
Cocoa with Love is Matt Gallagher's long-form blog about Swift, Cocoa, software design and programming.
Most-linked posts?
- /4 people · 4 mentions · first linked 2011-04-08
- Exponential time complexity in the Swift type checker4 people · 4 mentions · first linked 2016-07-17
- Comparing Swift to C++ for parsing4 people · 4 mentions · first linked 2016-05-07
- Compiling a Mac OS 8 Application on MacOS Sierra3 people · 3 mentions · first linked 2017-01-13
- /3 people · 3 mentions · first linked 2013-01-09
- An aside about flatMap and monads2 people · 4 mentions · first linked 2017-07-03
- The design of every Mac application2 people · 2 mentions · first linked 2010-06-24
- The worst possible application (exploring app design patterns in Swift)2 people · 2 mentions · first linked 2017-10-22
- Thoughts on Objective-C and how it might/should evolve2 people · 2 mentions · first linked 2010-07-16
- Cocoa with Love: Easy custom UITableView drawing2 people · 2 mentions · first linked 2009-04-28
What Hacker News says?
When I learned Objective-C I remember being flabbergasted at all the method and argument names that were exceedingly wordy. At some point I read a blog post[0] that said while this is out of the ordinary when it comes to most code having long, descriptive names helps when reading code. Some people complain that it involves too much typing or takes up too much space. In reality, we spend much more time reading code t…
Comment linking /2009/06/method-names-in-objective-c.html
on “Please put units in names”Submitted Compiling a Mac OS 8 Application on MacOS Sierra as a story · 139 points
HN discussionAwesome, I wasn't aware of that one. Other good ones I know of are the already mentioned Cocoa with Love http://cocoawithlove.com/ Cocoa is my girlfriend http://www.cimgf.com/ and bbum's weblog-o-matic http://www.friday.com/bbum/
Comment linking /
on “Ask HN: What programming blogs do you read daily?”Submitted Exponential time complexity in the Swift type checker as a story · 133 points
HN discussionHere are the ones in my reader, admittedly I haven't visited often enough over the past couple of months: http://www.igvita.com/ http://ejohn.org/ http://codingrelic.geekhold.com/ (Denny covers assembly and networking issues often in great detail) http://buhrmi.tumblr.com/ http://elegantcode.com/ http://72lions.com/ http://kellabyte.com/ (mobile-ish dev) http://lambda-the-ultimate.org/ http://ihumanable.com/blog htt…
Comment linking /
on “Ask HN: What programming blogs do you read daily?”Submitted Objective-C's niche: why it survives in a world of alternatives as a story · 101 points
HN discussionHere is my list of solo developer blogs. Usually they are on topic. This does not include personal blogs I follow that happen to be developers. @mdo (Bootstrop) - http://markdotto.com/ Keith Cirkel - https://www.keithcirkel.co.uk/ Coding – Corbin's Treehouse - https://www.corbinstreehouse.com/blog Aaditya Purani – Ethical Hacker - https://aadityapurani.com/ Ben Balter - http://ben.balter.com/ fulldecent - https://pr…
Comment linking /
on “Ask HN: What are good solo developer blogs that you enjoy reading?”Submitted Objective-C's niche: why it survives in a world of alternatives as a story · 70 points
HN discussionI only want one feature from Swift: faster type-checking. If you write a few lines of math, or a moderately complex SwiftUI expression, suddenly the typechecker starts timing out. Swift is the only language I've ever used with this problem. https://hachyderm.io/@evanw/109859384302551859 https://www.cocoawithlove.com/blog/2016/07/12/type-checker-i... https://danielchasehooper.com/posts/why-swift-is-slow/ This isn't m…
Comment linking /blog/2016/07/12/type-checker-issues.html
on “Swift 6”Submitted Minimalist Cocoa programming (2010) as a story · 55 points
HN discussionI was wrong about some of them being drawing frame related. See https://www.cocoawithlove.com/2008/12/drawing-custom-window-... . Apparently customizing the window frame. The CA prefixed ones are correct. Apparently, at least on a Mac, it was more about battery than performance (at least for what Mozilla did) but it was still about the amount of work they were doing per frame (for Mozilla).
Comment linking /2008/12/drawing-custom-window-on-mac-os-x.html
on “Electron apps cannot be submitted to the Apple store”Submitted Alternative Objective-C object allocation for large arrays as a story · 42 points
HN discussionActually, even very basic code can cause it. The type system of Swift has issues. https://www.cocoawithlove.com/blog/2016/07/12/type-checker-i... let a: Double = -(1 + 2) + -(3 + 4) + -(5) Still fails on a very recent version of Swift, Swift 6.1.2, if my test works. Chris Lattner mentions something about him being more of an engineer than a mathematician, but a responsible and competent computer science engineer tha…
Comment linking /blog/2016/07/12/type-checker-issues.html
on “ML needs a new programming language – Interview with Chris Lattner”Submitted Back to the Mac? 12 features from iOS I'd like to see in Lion as a story · 34 points
HN discussionIt's not slightly more flexible, it's hugely more flexible. As someone who has apps that consist of a complicated web of tableviews, Matt Gallagher's work is amazing and helped me immensely. Although, I think this link is better: http://cocoawithlove.com/2010/12/uitableview-construction-dr...
Comment linking /2010/12/uitableview-construction-drawing-and.html
on “Reminder: "Broken gets fixed, but shitty lasts forever"”Submitted A simple, extensible HTTP server in Cocoa as a story · 24 points
HN discussionOh yeah I agree that Three20 is a cluttered, monolithic mess. What I should have said was that Three20 was the first major attempt (that I know of) to break away from the strict nested-controller way of making data-driven apps by implementing a pretty nice URL-based application model. Matt Gallagher has also done a good job of deconstructing the Apple Way and try new approaches: http://cocoawithlove.com/2009/03/recr…
Comment linking /2009/03/recreating-uitableviewcontroller-to.html
on “Reminder: "Broken gets fixed, but shitty lasts forever"”Submitted Cocoa with Love: Showing a "Loading..." message over the iPhone keyboard as a story · 23 points
HN discussionNeat, good to know! And it does seem my mental model of event loop was broken. Accessibility related interactions don't have any related NSEvent. They are handled as part of the "conceptual" run loop, but they seem to be dispatched internally by AXRuntime library from a callback off some mach port. And because of this, the call to nextEventMatchingEventMask in the main -[NSApplication run] loop never even sees any s…
Comment linking /2009/01/demystifying-nsapplication-by.html
on “Codex for Almost Everything”Submitted Version control for solo Mac developers as a story · 21 points
HN discussionMore Favorites: - iOS Cookies ( http://www.ioscookies.com/ ) - iOS Goodies ( http://ios-goodies.com/ ) - NSHipster ( http://nshipster.com/ ) - Cocoa With Love ( http://www.cocoawithlove.com/ )
Comment linking /
on “iOS Dev Tools”Submitted Cocoa with Love: Mac QuartzGL (2D drawing on the graphics card) performance as a story · 20 points
HN discussionCreating a closure and scheduling it on a queue seems like a pretty heavyweight way to ensure exclusive access (see https://www.cocoawithlove.com/blog/2016/06/02/threads-and-mu... for more). EDIT: aren't you the one that wrote this article ? :))
Comment linking /blog/2016/06/02/threads-and-mutexes.html
on “What's new in Swift 4.1”Submitted What is a meta-class in Objective-C? as a story · 20 points
HN discussion"Does need extra work in some cases" is an understatement. With type 'inference' that's unidirectional, like in C and C++, you only need to look at each expression once. Thus, in most cases, the whole job is O(n) in the number of expressions. Admittedly, there are exceptions. For example, it's possible in C++ to create humongous types: auto p1 = std::make_pair(0, 0); // pair<int, int> auto p2 = std::make_pair(p1, p1…
Comment linking /blog/2016/07/12/type-checker-issues.html
on “WWDC 2018 What's New in Swift Recap”Submitted How blocks are implemented (in Clang/LLVM) as a story · 17 points
HN discussionhttp://cocoawithlove.com/2010/03/streaming-mp3aac-audio-agai... My guess is Pandora has some fairly sophisticated server-side streaming that responds to ACK/FIN-type feedback from the iPhone client.
Comment linking /2010/03/streaming-mp3aac-audio-again.html
on “Handy Light: Tethering App Camouflaged as Flashlight”Submitted Cocoa with Love: Debugging tips for Objective-C programming as a story · 17 points
HN discussionFYI, http://cocoawithlove.com/2010/04/options-for-porting-objecti... http://cocoawithlove.com/2010/04/design-of-multi-platform-ap... http://cocoawithlove.com/2010/04/porting-mac-program-to-wind... edited to put links in chronological order
Comment linking /2010/04/porting-mac-program-to-windows-using.html
on “Open source Cocoa implementation for Windows and Linux”Submitted Cocoa with Love: Variable argument lists in Cocoa as a story · 16 points
HN discussion