11 ms·
macOS Internals
- krackers 3y agoIf you want to go even deeper there's the book series by Jonathan Levin
- DavidPiper 3y agohttp://newosxbook.com/home.html http://newosxbook.com/home.html for the lazy :) They are an updated and much expanded version of "Mac OS X and iOS Internals: To the Apple′s Core" by the same author. Which in turn was an updated version of "MAC OS X Internals: A Systems Approach" by Amit Singh.
- magoghm 3y agoDoes anybody know why they are so hard to buy from outside the US?
- cowsandmilk 3y agoInternational shipping of individual books has become very expensive. Within the US, media mail provides an inexpensive option for authors.
- bombcar 3y agoThe loss of the bookdepository is a big one. For some modern books you can get a digital copy. I almost want to start a website dedicated to people bringing books on the plane with them when flying, but I'm sure that would light every single alarm bell the TSA has ever dreamed of having.
- wkat4242 3y agoOh, interesting. I still have Amit's book here on my shelf. Though I see this author has also given up work on this project. And they are extremely expensive in Europe. At least Amit Singh's I could just grab on local Amazon. Levin's aren't available here.
- nikodunk 3y agoIt's impressive how so many years after he left, the legendary articles by John Siracusa are still having an impact.
- cocacola1 3y agoIf you don't, would recommend listening to ATP, which he's a cohost on. Still a joy to listen to.
- karlshea 3y agoNeutral and then ATP is what got me into listening to podcasts. Still a great one to this day! Their interview of LLVM co-founder/Swift architect Chris Lattner is def a good listen for historical background: https://atp.fm/205-chris-lattner-interview-transcript https://atp.fm/205-chris-lattner-interview-transcript
- sbuk 3y agoUsed to listen to it. Stopped because I cannot stand Marco Arment.
- sgt 3y agoI am mostly fine with Marco but he introduces so much fluff and nonsense that I subconsciously avoid listening to ATP.
- vaughan 3y agoHistory is such a great way to learn anything. It’s interesting - like a mystery revealed, but also provides the why - why things are the way they are. I was looking into accounting the other day, and you can go back to the first document that mentioned credit and debit and introduced modern accounting. There are so many topics like this that seem confusing and arbitrary but it all began extremely simply and pragmatically. Music theory is another example of a fun topic to study historically. And programming languages and operating systems. It’s important to use two learning paths though: historical and modern scientific. Historical usually explains terminology and legacy aspects of such topics, but then topics can also be explained by using modern technology to experiment and observe. Think about unix - it was primarily designed for very low power low memory environments. And databases too. You can learn a lot poking at an existing system, but when you watch the early content on it, you see the why.
- robertlagrant 3y agoAgreed. This is why often reading a Wikipedia page is the worst way to learn something. The best way is to get a teacher to tell you the relevant history leading up to the thing, and it makes much more sense.
- raarts 3y agoCS teacher here. This is my preferred way to teach stuff. Way easier to remember and understand knowledge if you know its origin story.
- vaughan 3y agoDo students respond well? When I was in school, a lot of teachers did a little tidbit of history at the start of topics, but I never latched onto it and found it boring. It was only after my studies that I started to really love going back to the origin.
- raarts 3y agoWell, you can make almost any subject interesting if you do it right. In my experience it's mostly the teachers fault if students are bored. That said, some students cannot be activated whatever your do. We're all people.
- whatever1 3y agoSo the Window server is a memory shitshow for the past 20 years? Today I learned.
- astrange 3y agoPixels use a lot of memory. Especially since they're effectively not compressible.
- pimlottc 3y agoIt’s a bit confusing to say “read these in chronological order” since it’s not immediately apparent that the document is ordered chronologically. It would be clearer just to say “read these in order”.
- chinaman425 3y ago[dead]
- easeout 3y agoThanks for the note; I may tweak that. Does the Highlights section's intro, "These chronologically-ordered highlights…" help? —gist author
- ilkkal 3y agoFascinating stuff, I've never really thought about what problem e.g. frameworks are solving. It's kind of too bad that in my day job my head's in the clouds and usually somewhat removed from most of these system level details. inb4 it's just someone else's computer -- trust me I know
- saagarjha 3y agoThey’re just shared libraries.
- ilkkal 3y agoThanks for the blinding insight.
- saagarjha 3y agoYou’re welcome! Most things are pretty simple :)
- pasc1878 3y agoWhat they solve is that they are not just shared libraries, they include any other resources the library needs like translations, images, other data etc and for developers any header files. But it works if you just treat them as shared libraied - just use -F on the compiler anlink rather than -l and the headers are not needed in /usr/include etc. The are also versioned so easy for two apps to have different versions of the Framework.
- KerrAvon 3y agoMinor clarification: two apps can embed different, incompatible versions of the same framework without versioning — the versioning is a NeXTism that allows the system vendor to ship a newer, binary incompatible version of the framework. NeXT used it with AppKit for a few releases, but when they came to Apple they realized it would be impossible to support something like Aqua with the desired UX without having to update all the versions of the framework every release, which would defeat some of the purpose, not to mention exploding the QA matrix.
- ElFitz 3y agoIt’s funny how I used to think that operating systems, databases, and cloud systems, as these kind of arcane things that were somehow apart from the rest of software. I could not begin to grasp how they could deal with running programs, access control, or any of these things that once seemed so foreign and mysterious to me. And realising that it’s actually just software, that there’s no black magic to it, just lower-level APIs, less pre-built batteries-included stuff to rely on, and probably a whole lot of more complexity, that was… both mind blowing, exciting, and kind of a let down. And it has enabled me to have more realistic expectations from these tools. It however doesn’t take away any of the brilliance and effort that went into the these things, or lessen the credit due to those behind them. I can only begin to imagine the complexity involved in a full-fledged modern OS.
- dlivingston 3y agoIt's turtles all the way down. Layers of abstraction stacked on layers of abstraction.
- selestify 3y agoUntil you get to the physics of transistors and logic gates :) Though I suppose in a sense, even subatomic particles are abstractions over quarks. It’s just that those are no longer abstractions we control.
- underdeserver 3y agoYup. APIs and constraints all make engineering sense. Turtles, all the way down... except when you get to quantum mechanics, that stuff is whack.
- javajosh 3y ago>QM is whack Very much so. But I also think it always had to be that way. A universe of infinite classical regression (atoms made of atoms made of atoms...) would be more insane than whack.
- ris58h 3y agoDoes anybody know how to force sandboxing for a 3rd party app?
- saagarjha 3y agosandbox-exec?
- ideologysec 3y agoYou can write your own sandbox profile if you're so inclined... but not easily, and you can't force it into a container in the Library folder, for example.
- Kwpolska 3y agoThere are also some amusing writings not included here about modern macOS changing things in a way Siracusa dislikes. For example, mandatory file extensions (written in 2001, when the Internet was a thing and file extensions were required for all file exchanges) [0] or the Spatial Finder saga [1] about missing an antiquated way to make a mess on your screen and pretend to be managing folders. [0] https://arstechnica.com/gadgets/2001/10/macosx-10-1/12/ https://arstechnica.com/gadgets/2001/10/macosx-10-1/12/ [1] https://arstechnica.com/gadgets/2003/04/finder/#prev-articles https://arstechnica.com/gadgets/2003/04/finder/#prev-article...
- easeout 3y agoThese are great :) I'd like to do without file extensions again, but internet URL norms have now made that decision for all operating systems. But I'm still kicking Finder windows back into spatial mode three times a day.
- KerrAvon 3y agoHe’s right about the spatial Finder. The Mac OS 9 Finder is still a better user experience. The OS X Finder only become marginally usable when they added the sidebar so that you had some starting reference points; it was much improved with Spotlight because you could then find things without spatial reference points. But I still maintain that adding the NeXT browser view to the OS 9 Finder would be the perfect experience. The OS X Finder went down this awful .DS_Store-strewn half-assed path and it’s still just the weirdest set of choices imaginable.
- bombcar 3y agoI think modern "kids" (who now are in their early 40s perhaps!) don't quite get how useful the spacial finder was to non-technically aligned people. "I left it right here" is a huge piece of memory that our brains have developed over millennia, and the spacial finder played right into that. The "it's in the directory listing in terminal" or "spotlight will find it" or "what is a file" don't really compare, even if they can be made usable.
- 3y ago
- alin23 3y agoThe window server is "lightweight" in that it does no screen drawing itself. It is, to use Apple's term, "drawing model agnostic." WindowServer is such a behemoth nowadays, it took me ages to reverse engineer how to make rcmd (https://lowtechguys.com/rcmd https://lowtechguys.com/rcmd) control Stage Manager. It’s interesting to see it described as lightweight. I guess every lightweight solution becomes heavy and complex with enough usage.
- shinycode 3y agoRcmd is the best app for window management productivity I found in years. Thank you so much !!
- alin23 3y agoThank you! Happy to hear it has become so useful ^_^
- victor106 3y agoLove rcmd. Once I started using it I was wondering how I worked without it
- catoc 3y agoI love your website's privacy page. Also lightweight. ["rcmd does not collect any personal information."] That's the complete page. Great policy!
- alin23 3y agoThank you! Yes, I believe privacy policies should be written for end users, not for lawyers. I tried to do the same with my other more complex app as well: https://lunar.fyi/privacy https://lunar.fyi/privacy
- tremere 3y agoThat's a very refreshing attitude. I had heard of Lunar but was reluctant to try it. Lately my policy has been "the less software the better" precisely because of how predatory most software is. But not your software, it seems! Your privacy policy has made me think it would be a good idea to try and probably buy your app if it works for me. Thanks for being one of the good ones!
- neurostimulant 3y agoMan, I miss those 20+ pages long Ars Technica reviews. They don't seem to publish these kind of stuff anymore.
- kreddor 3y agoThe macOS Ventura review doesn't count?
- galad87 3y agoNot really. It lacks the insight and the attention to small changes and under the hood improvements of the Siracusa's reviews, in my opinion.
- lproven 3y agoStrongly agreed. Siracusa's pieces were all meat, no filler. The modern ones are trivial glances at the cosmetics: all filler, no meat.
- TazeTSchnitzel 3y agoIf this kind of thing interests you: late-2000's/early-2010's Apple had some fantastic documentation, but it's all hidden in the “documentation archive” (https://developer.apple.com/library/archive/navigation/ https://developer.apple.com/library/archive/navigation/).
- pjmlp 3y agoOnly available to us old timers really, as newer devs on the ecosystem don't even know what to search for. I don't get it how they messed this up.
- easeout 3y agoMy hunch is SEO combined with placing less responsibility on the programmer. The new docs have a page per code symbol, and much more focused single-page topic articles, rather than 20-page programming guides. Docs seem to be structured to answer a question right when you have a problem, but then they don't offer a good way to study in depth before you begin. The other day a younger teammate asked a group about some API documentation that said the results are undefined if you call this wrong, and had we ever heard of such a thing. And yes, of course, using framework code in unintended ways is always a garbage in, garbage out affair. This made me realize we have come a very long way in eradicating boilerplate and ceremony in code. There used to be so many things you just had to use the way the docs explained, or else. Doing the boilerplate correctly was a primary focus of code review. Today we have ARC, we don't call alloc separately from init, we never handle KVO without the compiler's help, and we have no IBOutlets to forget to bind. To begin writing for iPhone 15 years ago, I had to study for a week or so with the programming guides, one for the language and another for the platform. Today you can do a one hour tutorial. So, if you can stumble your way through building an app by typing the period key and seeing what methods are available, and the whole platform SDK exhibits Clarity at the Point of Use, would a newcomer even use the programming guides if they weren't down in the archive?
- urthor 3y ago> would a newcomer even use the programming guides if they weren't down in the archive? Yes, of course they would. If you don't learn multiple different paradigms for acquiring knowledge, you'll be automated by ChatGPT. Natural language query searches, category design & grouping via visual hierachies, are merely two forms of knowledge acquisition.
- 2809 3y agoDamn, I was hoping for a MacOS version of SysInternals.
- greggsy 3y agoMe too. I think the closest is Xcode Additional Tools.
- ideologysec 3y agoTry Red Canary Mac Monitor, it does a lot (it's at least a decent equivalent for ProcMon)
- Varloom 3y agoThat’s super interesting.
- ChrisMarshallNY 3y agoThat's great! Now, bonus time: Let's do something like that for SwiftUI. <gets coat/>
- Razengan 3y agohttps://swiftui-lab.com https://swiftui-lab.com and https://swiftwithmajid.com https://swiftwithmajid.com have been a great help.
- glhaynes 3y agoI love the Swift Talk video series https://talk.objc.io https://talk.objc.io. They've done a few reimplementations of SwiftUI components that helped me feel more like I understood those things.
- ChrisMarshallNY 3y agoI subscribe to them. Well worth it.
- MichaelZuo 3y agoStopping the reviews at Yosemite was a smart choice, every later version had noticeably more bugs then the previous.
- vrglvrglvrgl 3y ago[dead]
- mike_hearn 3y agomacOS probably doesn't get enough love from an OS design perspective. Over the years I've had reasons to work pretty closely with the guts of all of Linux, macOS and Windows and macOS is probably my favourite, design wise, although for some tasks you can't beat the flexibility and feature set of Linux. A few highlights that are lesser known: - XPC/Mach is a pretty reasonable IPC system that avoids the huge complexity of DCOM, whilst being more widely adopted throughout the platform than DBUS. - Bundles are frustratingly ad-hoc in terms of detection and layout but the basic concept does work, and is better than the (rough, not really) equivalents on Windows and Linux. - Launch Services does a pretty good job these days of letting apps be purely declarative whilst still keeping track of all the integration points things (in the past it's been a bit rough). - APFS is a very modern FS and the migration of the Apple ecosystem to it was so well executed it was barely even noticed. I can't think of any other platform that has managed to do a migration from one FS to another so smoothly. - Ditto for CPU architecture migrations. Apple's skill at these has become rather legendary now. I remember a time when the computer industry assumed such transitions were simply impossible, Apple did it twice! - The code signing infrastructure is rather complex but well thought out and flexible, even though Apple don't use all that flexibility in practice. They've chipped away at it over the years and by now it delivers concrete and real benefits to end users. In particular it enables apps to be kept somewhat separated even when they aren't sandboxed e.g. on Ventura apps can't tamper with each other unless you specifically give them that permission, and this works without any notion of admin/root escalation or installation, and that's true even if apps aren't opted in to the app sandbox. - The way Apple live the UNIX spirit by having lots of little CLI tools along with man pages for those tools etc is pretty nice. - The sheer quantity of APIs and frameworks that solve modern high level problems is well ahead of any other desktop platform by miles (e.g. the ML frameworks, data syncing). - The way Apple have managed to slowly migrate code out of the kernel is well executed IMO. Likewise for SIP and their whole security/immutable OS posture, something the Linux world is still just experimenting with and Windows isn't even trying. - Their integration API for cloud storage is solidly designed, albeit it's a pity they don't also offer a lower level FUSE-like API for experimental use cases. There are problems too of course. It's very weak that the OS has no way to keep apps up to date except via the store, which then introduces tons of other problems. Sparkle does a great job of patching up this gap, but it should really be a core OS service in this day and age. And the lack of any high level GCd/managed language for their platform continues to be a major weakness. You can have smooth UI and 60fps whilst still offering GC as Android has now proven, and of course there are large classes of apps where developer productivity matters more anyway. Microsoft always recognized that, even the Linux community understood this hence all the bindings into Python.
- wkat4242 3y agoI still have Amit Singh's huge book on my shelf here. Completely outdated now, of course. But it was always quite interesting. It's nice to see someone else has taken on the task of bringing that kind of insight into the modern age. Because Apple certainly won't.