OS X Unix

Discussion in 'Mac Programming' started by knightjp, Aug 20, 2015.

  1. knightjp macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #1
    There are quite a few who consider that Linux is pretty much the best for any kind of development. Because of its Unix heritage and being open sourced. I do not know about that. I would say that it depends on many factors. But since Linux is open and has quite a few developers already, you could develop for anything; including iOS and Android.

    Perhaps.. The same people say that FreeBSD is about the only thing that comes close to it. This is also because of the unix heritage.

    I'm not a developer. So I could be wrong. But anyways the key word here is Unix. Since OS X shares the same Unix heritage, could OS X also be used in the same way with the same development tools as linux?

    Is there a way to harness the Unix capabilities of OS X?
     
  2. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #2
    I don't think anyone who known what they are taking about considers Linux to be "the best" developer plattform unless Linux is the target plattform. Linux is a clone, it dosen't have a Unix heritage.. OS X is fully posix and unix compliant, BSD has been around before Linux and have more of a Unix heritage.
     
  3. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #3
    Come to think of it. You are correct. I forgot that Linux was a clone. However it is interesting that FreeBSD's port system uses quite a bit of programs and drivers that were developed by Linux developers. So with that in mind. Since FreeBSD is truly Unix, and Mac OS X has the same heritage, would we be able to install software the same way that we install it on FreeBSD using the ports?
     
  4. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #4
    OS X has an equivalent known as Macports which you can install and use like ports on freeBSD. There are also other repos available like Homebrew and fink. And I believe that pkgng is also available now, not sure how mature it is though.
     
  5. 556fmjoe macrumors 65816

    556fmjoe

    Joined:
    Apr 19, 2014
    #5
    I guess it depends on what you are doing. I strongly dislike glibc. I like BSD's libc significantly better.
     
  6. Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #6
    OS X and iOS are much more than "just" Unix, and to generalize a bit, these differences are what makes it impractical to write native OS X or iOS applications in a Linux distribution or a BSD variant.

    Many power users "harness the Unix capabilities" of OS X either by using the native command line tools through the Terminal, or by extending its functionality by installing common command line tools using Fink, MacPorts, and similar as mentioned by another poster. It's just not as common to use non-native graphical user interface applications from other Unices, often for the very basic reason that using other UI elements in OS X hurts your eyes. :)
     
  7. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #7
    Well I'm not a developer, so I have no idea what those are. I would like to get into it as a hobby though.
     
  8. burne macrumors 6502

    burne

    Joined:
    Jul 4, 2007
    Location:
    Haarlem, the Netherlands
    #8
    That's like saying that Windows is a OS/2 clone.

    (Which it isn't)

    The answer is complicated enough to fill a book. But the short version is: linux is a kernel, nothing more. The bulk of the proper full versions of UNIX, OS X, BSD and linux are the GNU utilities and these are more or less shared between the platforms, and many generic UNIX application, which you can run on any platform. GNU make does a wonderful jobs of adapting the built environment to the machine you're on, and compiling OpenOffice on linux is exactly the same as on FreeBSD or OS X. The built in mailer software in OS X server is postfix and dovecot. We use the same software on a cluster of linux machines to provide mail for a few million customers.

    GNU and generic UNIX Open Source is what makes 'UNIX-like' these days, and wether the kernel is XNU, BSD or linux isn't very interesting.
     
  9. Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #9
    Sorry, but I have to pick some nits:
    Many people use the word Linux when they describe the GNU tools (and all other related or unrelated software of which a working "Linux" system consists) running on top of a Linux kernel.
    The relationship between "Linux" (in that context) and Unix is very different from the relationship between Windows and OS/2, in that the GNU environment was created from scratch as a Unix clone. This differs from the BSDs, which where built from a base of actual AT&T Unix(*), and only picked up (some) GNU tools as needed. Install a FreeBSD system from scratch today, and try to use its commands as you would a GNU system, and you'll get a lot of errors. Why? Because it's not GNU-based. You are free, though, to install GNU tools on top of a BSD, and most of them will work brilliantly on that platform too.

    OS/2, on the other hand, was never meant to be a Windows clone (even less the other way around). The two systems were the result of a failed cooperative work between IBM and Microsoft, where the original intention was that OS/2 would replace DOS+Windows (which at the time probably would have been the technically superior choice, though not really a cash-cow for Microsoft).


    *) Reference: https://en.wikipedia.org/wiki/Berkeley_Software_Distribution#/media/File:Unix_history-simple.svg
    (from https://en.wikipedia.org/wiki/Berkeley_Software_Distribution)
     
  10. subsonix, Aug 21, 2015
    Last edited: Aug 21, 2015

    subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #10
    There are usually BSD versions of the utilities as well as libc versions that are non GNU. It's appropriete to call Linux a clone since Linus made it without knowledge of FreeBSD, as a clone of system v. BSD has a history that goes back to research Unix the first TCP/IP stack, and sockets was implemented on BSD for example.

    But I agree generaly, it's relevant here however since the question is posed in a way that makes Linux appear as having more genuine unix heritage, when the exact opposite is true.
     
  11. theluggage macrumors 68030

    Joined:
    Jul 29, 2011
    #11
    The fact that OS X is UNIX(tm) and Linux isn't may be true, and a fun pedant point, but has very little practical upshot.

    UNIX(tm) is a trademark that you can licence from the Open Group for any operating system that passes their conformance tests. POSIX is an ISO standard for a cross-platform API and full POSIX-compliance requires certification (in the past, even Windows has had some level of POSIX compliance).

    The only real reason that Linux isn't UNIX and POSIX is that the licensing and conformance testing costs money and doesn't play nicely with the GPL license*. AFAIK individual Linux distributions could pay up and become UNIX(tm) if they wanted.

    OSX uses BSD-derived tools in some cases where Linux favours GNU tools - but those GNU tools have been popular replacements/upgrades for the traditional BSD and SysV tools on "real" Unix systems since the 1980s, and OS X uses a ton of GNU tools (including, until recently, the GNU C/C++ compilers) anyway.

    The main feature of "Unix heritage" since the early days has been multiple competing "flavours" of UNIX and Unix-like systems interspersed with the occasional lawsuit. To claim "Unix heritage" as some sort of pedigree is a joke. To claim that OS X is not a "clone" is, to say the least, debatable and, if that really worries you, there is always FreeBSD which is certainly no more a clone than OS X. In practice, the way you use, configure and manage Linux feels far closer to a traditional Unix system than OS X does.

    However, to get back on topic:
    Basically: yes - a lot of the Unix development tools are already installed on the Mac, and some more get installed when you add xcode. Or you can install one of the free package managers - homebrew, macports or fink - from which you can easily (if, sometimes, slowly) compile most of the usual suspects from the open source Linux/Unix world. You'll need to install XQuartz to run Linux/Unix GUI software.

    However, whether that makes sense depends a bit what you mean by "development" and "development tools". If you want to develop "native" apps for either Mac OS or iOS, then Unix is pretty irrelevant - you'll use xCode. If you want to develop "native" apps for Windows then you should consider using Windows (MS Visual Studio isn't rubbish). If you want to develop cross-platform apps in something like Python or Java then a lot of the tools (e.g. Eclipse or NetBeans) are cross-platform anyway.

    I think the sweet spot is web development for deployment to a Linux web host. Because its a Unix system, its easy to replicate something very close to the environment of the server on your Mac. All the technologies you might need (Apache, PHP, Perl, MySQL, PostgreSQL, node.js, Tomcat...) can be installed either by a package manager or using an app like MAMP. Actually, several of them are already installed by default, but not always the latest versions, and using MAMP or MacPorts avoids messing around with system files. You can get the best of both worlds: the OS X GUI for editing, all your favourite graphics software (and/or the MS/Adobe software you need to deal with the files people send you) - plus the same server technologies and file structure as your target.

    The alternative approach, though, is to install Linux on a virtual machine using VirtualBox (free), Parallels or VMWare and do your Unix-y stuff on that. You can have separate VMs for different projects, choose the Linux distro that most closely matches your deployment target and use shared folders so that you can still use Mac-based graphics tools and editors.

    *That and, as burne points out above, pedantically Linux is just the kernel and not the operating system, although that is at odds with the way the word is used outside of the Linux developer community.
     
  12. subsonix, Aug 21, 2015
    Last edited: Aug 21, 2015

    subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #12
    I didn't bring this up, I've never Said that FreeBSD is a clone.. But the Linux or GNU community certainly seem more fork happy as opposed to honouring traditional principles. A comparrison I've seen when comparing is that Linux is what you get when a bunch oc PC enthusiasts makes a unix system, FreeBSD is what you get when a bunch of greybeard makes it.

    If you read the question, you'll see that it is on topic. OS X also use BSD syscalls and APIs from FreeBSD and have a definite BSD flavour. Beside your remark relating to licensing and standards, it's a unisputable fact that BSD has been around since the very beginning and conrtibuted to cross-pollination of what Unix has become, since the question related to historical heritage, it's absolutely on topic.
     
  13. burne, Aug 21, 2015
    Last edited: Aug 21, 2015

    burne macrumors 6502

    burne

    Joined:
    Jul 4, 2007
    Location:
    Haarlem, the Netherlands
    #13
    Even better: Windows *IS* POSIX certified. Windows is 'a UNIX' following that silly definition. :p

    (And, none of the open source *BSD is. All are not licensed UNIX and all lack the POSIX certification..)
     
  14. theluggage macrumors 68030

    Joined:
    Jul 29, 2011
    #14
    The Wikipedia Article is a clear as mud, but I believe that the 'Single UNIX Specification' standard required for UNIX is a superset of POSIX. I.e. POSIX is necessary, but not sufficient, to be UNIX. However, the whole "let's standardise Unix" thing is a circus that has been going on since before OS X or Linux and had mainly benefitted lawyers, rather than programmers. I think the diversity has been Un*x's strength and prevented it from degenerating into a stagnant monoculture with locked-in applications and an obsession with running legacy binaries.

    ...and Windows NT and later is what you get when the guys who wrote VAX/VMS make a CP/M system.

    Whichever way you cut it, the Unix-like features of OS X are sometimes very useful if you want some of the the good bits of Windows (big name applications) with the good bits of Unix (sensible directory structure, powerful CLI interface, good networking, shedloads of free industrial grade software) and the good bits of Mac (GUI that was designed by people who wanted to use a GUI to do stuff, not just to look superficially like NextStep while running 8 copies of VIM).

    You're not the same guy who just innocently re-ignited the editor wars in that other thread, are you? :)
     
  15. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #15
    What editor wars? What other thread?
    I'm just a simple guy asking a simple question. I don't mean to start any wars or anything.

    I seen reviews and quite a few guys I know who work on Linux always claim that Mac OS X is just something like a toy. They claim its not as capable a OS that Linux or FreeBSD is. Being a fan of OS X and knowing that it has a Unix kernel, I wanted to make sure that it wasn't just my imagination and wishful thinking.
     
  16. MacScott macrumors regular

    MacScott

    Joined:
    Jan 27, 2012
    Location:
    Indiana
    #16
    GNU= GNU is Not Unix :)

    and yes, Vi > Emacs!
     
  17. burne macrumors 6502

    burne

    Joined:
    Jul 4, 2007
    Location:
    Haarlem, the Netherlands
    #17
    Specifically with regards to running a GUI, an IDE and producing code, I think OS X is about the best way to solve that problem. Stuff like Eclipse just runs fine. If you can manage with xCode, it's just a mouse click away. If you want odd stuff, anything that runs on a UNIX runs on OS X. GNUCobol? REBOL? Ada?

    You could do the same on linux, *BSD or Windows but it requires a lot more knowledge or the end result will be a lot less stable.
     
  18. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #18
    Well this ad for Apple and Unix is pretty much true then?
     

    Attached Files:

  19. millerj123 macrumors 6502a

    Joined:
    Mar 6, 2008
    #19
    Which part? It's marketspeak to suggest that an Apple laptop causes all others to go to dev/null. The rest are quotes about people's opinions. It is true that the Powerbook is running Unix.
     
  20. burne macrumors 6502

    burne

    Joined:
    Jul 4, 2007
    Location:
    Haarlem, the Netherlands
    #20
    As far as I'm concerned: yes. Then again: how many people have migrated from a Tadpole SPARC to a Macbook Pro?
     
  21. theluggage macrumors 68030

    Joined:
    Jul 29, 2011
    #21
    Yes, but Linux users claim that FreeBSD is not as capable as Linux, and FreeBSD users claim that Linux is a buggy, insecure toy. Advocates of different flavours of Unix and Unix clones have been playing "my clone's better than your clone" since forever. Before Linux came along it was BSD vs. System V.

    That's a blast from the past. I think it says 2002 at the bottom - which would match the Powerbook G4 Titanium. Relatively early days for OS X. Apple made more fuss about the Unix side back then - Mac OS 9 and earlier weren't Unix-like, they weren't <i>anything</i> like, and really didn't appeal much to "power users" so this was a new market.

    Back then the Mac was still using PowerPC processors that were, arguably, superior to Intel (especially the G5s in the desktop Macs and XServe) - so that was a selling point for the scientific computing market. Also, although it looks a bit fugly now, the Powerbook G4 Ti was a seriously sexy laptop in its day and nothing else looked like it (that soon changed!)

    Plus, both Linux and FreeBSD have improved in terms of hardware compatibility and ease of admin since then (although they're not perfect). Another thing these days is the widespread use of virtualization, especially as a development environment: its so easy to set up a virtual Linux or FreeBSD machine that is safely partitioned off from your main machine, and still access it via the OS X GUI.

    Its worth reading between the lines in the picture: its really showing the Mac's Unique Selling Point as a Unix machine that can run Word, Excel, Powerpoint and Adobe Photoshop, talk to you iPod and play DVDs. That's the real appeal of Macs as a Unix machine (and I agree its a big one): not that its a better Unix than anything else.
     
  22. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #22
    Well my questions were whether OS X was able to run and so the exact same things that Linux and FreeBSD guys are able to do.
    If it is, then that is awesome, really. If means that you are having a system that can pretty much do the advanced Unix and bash stuff as well as run classic every day programs and suites from Microsoft and Adobe.

    This is pretty much why Mac OS X is my fav OS ever. Linux guys can call me an Apple fanboy, but seeing what I've got running on my system, I'd be happy to have that title. :)
     
  23. burne macrumors 6502

    burne

    Joined:
    Jul 4, 2007
    Location:
    Haarlem, the Netherlands
    #23
    You can call me a linux fanboy.. I run several thousand linux machines and once again as much linux VM's. You can even call me a FreeBSD fanboy, as I run several hundred FreeBSD machines. You can hardly call me an Apple fanboy, since I run just two OS-X machines. :p
     
  24. knightjp thread starter macrumors newbie

    knightjp

    Joined:
    Aug 20, 2015
    Location:
    Dubai
    #24
    Then you can tell us what can be done on a normal Linux distro like Ubuntu, OpenSUSE and Fedora that you cannot do on OS X.
     
  25. Toutou macrumors 6502a

    Toutou

    Joined:
    Jan 6, 2015
    Location:
    Prague, Czech Republic
    #25
    You can only install OS X on a Mac. You can install Linux based OSes on pretty much anything including a smartphone, a server or a scientific cluster system.
    An yeah, most of them are free to use and distribute and completely open-source.
    Seriously, what kind of answer did you expect?
     

Share This Page