Apple has moved its product line from OS 9 to OS X, which happens to be based on–you guessed it– FreeBSD. Does this mean we can expect a full .NET environment for Mac OS X? I hope so.
To be precise, Mac OS X is not exactly based on FreeBSD: it is a hybrid of Mach 3.0 and BSD Unix, with various NetBSD and FreeBSD pieces added in. To see an informative example of this lineage, take a peek at the comments in the top utility source code (taken from the Darwin source code):
* Copyright (c) 1984, William LeFebvre, Rice University * * This program is designed to run on either Berkeley 4.1 or 4.2 Unix. ... * HISTORY * 22-Apr-99 Avadis Tevanian (avie) at Apple * Another rewrite for Mach 3.0 * * 21-Apr-90 Avadis Tevanian (avie) at NeXT * Completely rewritten again for processor sets. * * 6-May-88 David Golub (dbg) at Carnegie-Mellon University * Completely rewritten for MACH. This version will NOT run on any * other version of BSD.
That minor clarification aside (which I’ll be lucky if I got right), Paul raises a fascinating question: will Rotor lead to an implementation of .NET on Mac OS X? I’ve contemplated this one myself. What would it take to bring .NET to Mac OS X, assuming Rotor on FreeBSD is the first step?
Porting Rotor to Mac OS X: threads and opcodes
The current version of Mac OS X lacks a full implementation of pthreads. However, the Darwin team is working on it. So, if you’re looking to make a name for yourself as the programmer who ported Rotor to Mac OS X, do you help Darwin finish the pthreads implementation first, or work around the limitations by hacking rotor?
Another hairy issue is the fact that Rotor has hooks into the x86 platform through its JIT (Just-In-Time Compiler). If you want to port Rotor to Mac OS X, you’re going to have to port that JIT. I haven’t written assembly code in years, and even when I did, I was just doing silly tricks with the display list interrupt on my Atari 400. Still, my feeling is that porting x86 assembler to the PowerPC will be relatively straightforward. It would be good to have some Computer Science or Computer Engineering courses under your belt, though.
From Rotor to .NET
Rotor would be a round-about way of porting .NET to Mac OS X. Rotor is a stripped-down version of .NET with simplified internals and far fewer public types than the roughly 4000 that are part of .NET. (Although Rotor is an implementation of the ECMA CLI, it has a few more public types than the approximately 300 specified in ECMA). Rotor doesn’t have Windows Forms, ASP.NET, ADO.NET, and many other things that make .NET the compelling development platform that it is.
Still, porting the core would be the first order of business, so if Microsoft has plans to bring .NET to Mac OS X, Rotor could be a first step.
Who knows? Maybe it will all go down like this (shortly after the ghosts of Abbie Hoffman and Philip K. Dick join forces to put Chew-Z in the world’s water supply):
|2002||J. Random Hacker ports Rotor to Mac OS X|
|2003||Microsoft ports the rest of .NET to Mac OS X|
|2004||Microsoft ports Office to .NET managed code|
|2005||Apple releases OS X for Intel,
Microsoft ports last application (EDLIN.EXE) to .NET managed code.
|2006||Microsoft abandons Windows in favor of OS X :-)|
(One of these events heralds the immanentization of the eschaton. Which one will it be? Wait and see. I think you’ll be pleasantly surprised.)
What do you think? Has daylight savings time made Brian tired and giddy?