Whenever I see the Darwin kernel brought into the discussion I can't help but wonder how different things could have been if Apple had just forked Linux and ran their OS services on top of that. Especially when I think about how committed they are to Darwin it really paints a poor image in my mind. The loss that open source suffers from that, and the time and money Apple has to dedicate to this with a disproportionat…
Apple’s Darwin OS and XNU Kernel Deep Dive
171–180 of 186 posts
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#172Earlier quoted context omitted.
They created Swift as replacement for C, C++ and Objective-C, why should they bother with Rust? Even Google on Android and ChromeOS is not exposing Rust to userspace, Java, Kotlin, C, C++, Javascript, Typescript, remain the official userspace languages.
Low-level code is being written in Rust. Of course userspace doesn't require low-level languages (and I don't quite get why C and C++ are exposed to the userspace and Rust is not). Swift is not a replacemente for C and C++, but rather for Objective-C. Do you have any sources for those claims?
> Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code.
-- https://www.swift.org/about/
> Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics.
-- https://developer.apple.com/swift/
"Introducing a Memory-Safe Successor Language in Large C++ Code Bases"
https://www.youtube.com/watch?v=lgivCGdmFrw
"So we feel pretty strongly, obviously at Apple our sucessor language is Swift and I am here to talk about features of Swift, both to try to sell you on to it, but also to talk about the things we think are pretty necessary and the ways in which a programming language can support, you know, clear code, safer and more correct code."
"Like I said before, Apple has always intended for Swift to be a sucessor language for all of our predecessors, from the top to the bottom of our stack, accessible to novices, powerful enough for experts, it is real a tall order.
From https://youtu.be/lgivCGdmFrw?t=1996 to https://youtu.be/lgivCGdmFrw?t=2042
"Swift as C++ Successor in FoundationDB"
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#173Earlier quoted context omitted.
Low-level code is being written in Rust. Of course userspace doesn't require low-level languages (and I don't quite get why C and C++ are exposed to the userspace and Rust is not). Swift is not a replacemente for C and C++, but rather for Objective-C. Do you have any sources for those claims?
Yes, Apple themselves, apparently folks wanting Apple to use Rust don't read Apple's documentation or watch talks done by Apple compiler developers. > Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code. -- https://www.swift.org/about/ > Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow co…
But isn't Swift lower-performing than C, C++ or Rust?
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#174Question for the author, who is here in the comments: for clarification, to what extent is the article a deep dive into the OS itself (e.g., reverse engineering) vs. a deep dive into the extant literature on the OS?
In the case of XNU and Darwin, a lot of the sources are also blog posts from reverse engineering efforts by security researchers and jailbreaking communities so it blurs the lines.
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#175Earlier quoted context omitted.
> Even in the default out-of-the-box configuration, Apple isn't exercising editorial control over what apps you can run Perhaps not in the strictest sense, but Apple continues to ramp up the editorial friction for the end user to run un-notarized applications. I feel/felt A level between "disable all security" and what macOS 15 introduces would be appreciated.
More knobs would be nice, yes. Still nothing stops you using a customized file browser, browser, archiver etc that doesn't set the xattrs at all.
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#176Earlier quoted context omitted.
> 32-bit apps, which IBM introduced with OS/2 2.0, were never supported. This was obviously due to the divorce, but also that the Cruiser API wasn't finalized. > Our initial OS/2 API set centers around the evolving 32-bit Cruiser, or OS/2 2.0 API set. (The design of Cruiser APIs is being done in parallel with the NT OS/2 design.) ... > Given the nature of OS/2 design (the joint development agreement), we have had lit…
I’d love to read the document you are quoting - is it publicly available anywhere?
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#177At the risk of nitpicking, there are a bunch of things that are not quite right. Nonexhaustive list: - Discussion of paging mixes together some concepts as I described in [1]. - Mach port "rights" are not directly related to entitlements. Port rights are port of the original Mach design; entitlements are part of a very different, Apple-specific security system grafted on much later. They are connected in the sense th…
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#178What impresses me most about technical documentation like this is how it structures knowledge into comprehensible layers. This article manages to explain an extremely complex system by establishing clear relationships between components. I've been experimenting with similar approaches for documentation in open source projects, using knowledge graphs to link concepts and architectural decisions. The biggest challenge…
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#179Earlier quoted context omitted.
Yes, Apple themselves, apparently folks wanting Apple to use Rust don't read Apple's documentation or watch talks done by Apple compiler developers. > Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code. -- https://www.swift.org/about/ > Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow co…
Oh, you seem to be right. But isn't Swift lower-performing than C, C++ or Rust?
Embedded Swift project also started as means to replace Safe C use cases at Apple, like iBoot firmware.
https://support.apple.com/en-jo/guide/security/sec30d8d9ec1/...
https://github.com/swiftlang/swift-evolution/blob/main/visio...
Once upon a time, C compilers were quite lousy versus handwritten 8 and 16 bit Assembly code.
Re: Apple’s Darwin OS and XNU Kernel Deep Dive
#180Earlier quoted context omitted.
They created Swift as replacement for C, C++ and Objective-C, why should they bother with Rust? Even Google on Android and ChromeOS is not exposing Rust to userspace, Java, Kotlin, C, C++, Javascript, Typescript, remain the official userspace languages.
Low-level code is being written in Rust. Of course userspace doesn't require low-level languages (and I don't quite get why C and C++ are exposed to the userspace and Rust is not). Swift is not a replacemente for C and C++, but rather for Objective-C. Do you have any sources for those claims?
Swift is not a replacement for anything; Apple will even say as much. It just fills the hole for a scripting language that they had for decades. Plenty of new Obj-C is still (and will continue to be) written for a long time.