Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Saturday, March 27, 2010

Mac OS X

Source
The Apple operating system appears to be fairly FreeBSD'ish.
Their question is , does Apple use fairly standard FBSD, or have they redone it to their needs? In other words, if these kids learn the platform OS on their new Macs, are they learning FBSD or some hybrid OS that only applies to Macs?
Short answer - no.
Long answer - Mac OS X is based upon the Mach kernel. Certain parts from FreeBSD's and NetBSD's implementation of Unix were incorporated in Nextstep, the core of Mac OS X. See
http://en.wikipedia.org/wiki/History_of_Mac_OS_X
However, OS X Leopard is UNIX-compliant with some sort of certification.
OS X does have FreeBSD's virtual file system, network stack, components of its userspace and few other stuff. See apples on webpage about UNIX technology that is included with 
OS X - http://www.apple.com/macosx/technology/unix.html
Personally, I own a mac book and I find it command line quite like UNIX with perl, python, shell and friends. YMMV.
http://www.freebsdfoundation.org/
--------------------
Does Apple have redone the FreeBSD OS to their needs?
It's been redone to fit their needs.
http://developer.apple.com/Darwin/
------------------
To turn your question around, it is possible to run FBSD (and Linux, AIX, etc) apps on OSX as long as they stay inside of the realm of 'Nix. Turns out that OSX supports X11 very well.
I moved a lot of my C code, perl and perl-tk scripts over to FBSD and they run fine. (Even the C binaries have a good chance of running) Just to play, I also moved them to OSX and many also ran. For something like PerlTK, I just used the downloaded version for Linux for both other OS's. A surprising number of (smaller) Linux apps will run on FBSD even without the emulator loaded. C code works fine also - again assuming that OS specific code isn't imbedded.
The problem is that (for graphical stuff), 'nix's use X11 and Mac uses Aqua which makes GUI code totally incompatible at the GUI level.
Since I can move the same stuff from Linux to FBSD, the assumption goes that FBSD apps can be moved to OSX. Again with the caveate that the program doesn't use something specific to the OS that it is coming from.
But, as DRJ says, standard OSX apps won't run on a 'Nix system, unless you compile them for X11. And then still probably not if they are in any way complicated. But it is fun to try moving stuff between OS's just to see what sticks, although unless you really hate yourself, I would definitely stick to developing on the same OS that I was going to publish to.

No comments: