Top all-time · #2416
Greg Parker
Personal blog · sealiesoftware.com/blogprogrammingsystems
Greg Parker writes Hamster Emporium, a personal blog at sealiesoftware.com about programming and systems. Since 2008, 31 different Hacker News readers have linked it 38 times, most often “Hamster Emporium: [objc explain]: Non-pointer isa”. The last post was in 2013, but the archive is still widely read.
Most-linked posts?
- Hamster Emporium: [objc explain]: Non-pointer isa3 people · 4 mentions · first linked 2013-10-09
- An Illustrated History of objc_msgSend3 people · 3 mentions · first linked 2013-12-30
- Objective-C and fork() in macOS 10.133 people · 3 mentions · first linked 2017-06-05
- Objective-C and fork() in macOS 10.133 people · 3 mentions · first linked 2017-06-19
- /blog/3 people · 3 mentions · first linked 2013-05-15
- /blog/archive/2009/01/27/objc_explain_Non-fragile_ivars.html2 people · 2 mentions · first linked 2016-05-20
- Selector uniquing in the dyld shared cache (Snow Leopard performance)2 people · 2 mentions · first linked 2009-09-04
- Fun with debugging a complex Cocoa app, with Dr. Greg Parker2 people · 2 mentions · first linked 2010-09-01
- /fringe/2 people · 2 mentions · first linked 2017-08-01
What Hacker News says?
> second, because Objective-C does not require you to use dynamic dispatch if performance is a concern. No one is preventing you from doing plain-old C-style functions for performance criticial sections. That's just writing C, not Objective-C. But if we're going to go there, then neither does JavaScript. You can even use a C compiler if you like (Web Assembly/asm.js). > ARC reference counting on 64 bit iOS, as imple…
Comment linking /msg/x86-mavericks.html
on “React Native for OS X”Submitted An Illustrated History of objc_msgSend as a story · 110 points
HN discussionThat's my understanding too, and I believe you're referring Greg Parker: http://www.sealiesoftware.com/valgrind/
Comment linking /valgrind/
on “Twenty years of Valgrind”Submitted An Illustrated History of Objc_msgSend as a story · 54 points
HN discussionhttp://www.sealiesoftware.com/fringe/
Comment linking /fringe/
on “Ask HN: Which abandoned proprietary software would you resurrect?”Submitted Selector uniquing in the dyld shared cache (Snow Leopard performance) as a story · 25 points
HN discussionAt first I remembered this and wondered if it was related: "The rules for using Objective-C between fork() and exec() have changed in macOS 10.13. Incorrect code that happened to work most of the time in the past may now fail. Some workarounds are available." http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_... But seems like no, actually, at least not obviously.
Comment linking /blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
on “I think I found a Mac kernel bug?”Submitted Compare historical maps of Mars to the real thing as a story · 2 points
HN discussionivar layout: http://www.sealiesoftware.com/blog/archive/2009/01/27/objc_e...
Comment linking /blog/archive/2009/01/27/objc_explain_Non-fragile_ivars.html
on “How Swift Achieved Dynamic Linking Where Rust Couldn't”Submitted Objective-C and fork() in macOS 10.13 as a story · 2 points
HN discussionGreg Parker, who works on the Objective-C runtime, has a blog post that goes into more detail: http://www.sealiesoftware.com/blog/archive/2017/6/5/Objectiv...
Comment linking /blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
on “Why Ruby App Servers Break on MacOS High Sierra”Submitted Objective-C and fork() in macOS 10.13 as a story · 2 points
HN discussionIf you are already familiar with high-level Objective-C, I would recommend looking at the headers for the language runtime. All of the inner workings are exposed as C functions you can play with. Also take a look at Mike Ash's blog, which dives into a lot of details: https://mikeash.com/pyblog/?tag=objectivec Also: http://www.sealiesoftware.com/blog/archive/index.html
Comment linking /blog/archive/index.html
on “OS X app in plain C”Submitted Fun with debugging a complex Cocoa app, with Dr. Greg Parker as a story · 2 points
HN discussionIt's not that easy. I mean, just sending a message could entail one of objc_msgSend, obj_msgSend_stret or objc_msgSend_fpret, and which one you want to use is not always as clear-cut as you might prefer ( http://www.sealiesoftware.com/blog/archive/2008/10/30/objc_e... ). And then there's the hassle of defining classes dynamically, which entails six function calls just to create a class with one empty method, and one…
Comment linking /blog/archive/2008/10/30/objc_explain_objc_msgSend_stret.html
on “GHC 7.8.1 released”Submitted Objective-C and fork() in macOS 10.13 as a story · 1 points
HN discussionHere's one optimization: http://sealiesoftware.com/blog/archive/2009/09/01/objc_expla...
Comment linking /blog/archive/2009/09/01/objc_explain_Selector_uniquing_in_the_dyld_shared_cache.html
on “macOS 11: copies of dynamic libraries are no longer present on the file system”Submitted An Illustrated History of Objc_msgSend as a story · 1 points
HN discussion> IDL operations are not particularly slow. Last I measured, a call from JS into C++ is between 10 and 40 CPU instructions of fixed overhead To put that in perspective, that's the same number of instructions as objc_msgSend, which every Objective-C method call in native iOS or Mac apps goes through [1]. "The DOM is slow compared to native" is a common meme, but it's not that simple. [1]: http://sealiesoftware.com/ms…
Comment linking /msg/x86-mavericks.html
on “Faster DOM”Submitted Hamster Emporium: [objc explain]: Non-pointer isa as a story · 1 points
HN discussionIt's not just SQLite in macOS. http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_... In general, I don't see how one could safely rely on a third-party library spawning or not spawning threads unless they explicitly make guarantees regarding not using them as part of their public contract.
Comment linking /blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
on “Fork() without exec() is dangerous in large programs (2016)”Submitted Experimental Port of Valgrind Memory Debugger for Mac OS X as a story · 1 points
HN discussionApple's been using that for more than a decade: https://www.mikeash.com/pyblog/friday-qa-2012-07-27-lets-bui... http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_e... OCaml's also been using tagging to mark unboxed type pretty much from the start, nearly 30 years ago: https://dev.realworldocaml.org/runtime-memory-layout.html#:~... .
Comment linking /blog/archive/2013/09/24/objc_explain_Non-pointer_isa.html
on “Ointers: A library for representing pointers where bits have been stolen (2021)”For the under-the-hood details of message dispatch, see "An Illustrated History of objc_msgSend" http://sealiesoftware.com/msg/index.html
Comment linking /msg/index.html
on “Method dispatch in Swift”Objective-C (and Swift) don't have the fragile base class problem: http://www.sealiesoftware.com/blog/archive/2009/01/27/objc_e...
Comment linking /blog/archive/2009/01/27/objc_explain_Non-fragile_ivars.html
on “Swift: Things I really wanted that won’t make it”Top three replies to the PS thread: > . . . It's a miserable language, full of unexpected behaviors and badly designed features. . . > I haven't met a single person who likes PowerShell. It's perhaps the textbook example of ugly design that looks technically consistent but utterly unfriendly and mind bogglingly verbose. . . > PowerShell is one of the few bits of software which has actually made me throw a computer i…
Comment linking /blog/
on “Online trolls are harassing a scientist who helped take pictures of a black hole”There's some good info on that here: "Dissecting objc_msgSend on ARM64" https://www.mikeash.com/pyblog/friday-qa-2017-06-30-dissecti... "Let's Build objc_msgSend" https://www.mikeash.com/pyblog/friday-qa-2012-11-16-lets-bui... There's also the "Illustrated history of objc_msgSend", although it appears a bit dated, it has some nice commentary on the evolution of this very performance-critical part of the objective-c…
Comment linking /msg/index.html
on “The Objective-C Runtime and Swift Dynamism”The calling conventions are described here https://developer.apple.com/library/ios/technotes/tn2239/ with links to more in depth descriptions and other useful informations. This article has some more good tips on extracting information from those registers. http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_e...
Comment linking /blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html
on “iOS 8 Debugging Case Study”The man behind Objective-C these days (and for the past decade plus) is this guy: http://www.sealiesoftware.com/blog/ .
Comment linking /blog/
on “Interview with Brad Cox, the Man Behind Objective-C (2009)”Dyld (dynamic linker) does this I think, it's effectively similar to other relocations. Each dynamic library brings its own set of selectors (I just think of them as strings in the data section of the binary, referenced indirectly via a pointer in the objc_selrefs section of the binary which can be updated as needed) and at runtime they're uniqueified. See https://www.sealiesoftware.com/blog/archive/2009/09/01/objc_…
Comment linking /blog/archive/2009/09/01/objc_explain_Selector_uniquing_in_the_dyld_shared_cache.html
on “Objective-C is just, like, a leaky abstraction over C”