Back on Linux (after one year of Apple and OS X) - <AUTHOR> http://dywypi.org/2012/02/back-on-linux.html <comment><USER3> What an uninformed rant.

When someone rants about memory usage it is usually a sign he knows nothing what he is talking about. On virtual memory systems with on-demand paging that use shared libraries and where all file system I/O is mmap(2) based, memory is managed in a very different way than what most people expect. It's understandable, most people don't know and don't have to know what virtual memory is, even if they have a superficial understanding of swapping. Most people, even most technical people, don't know about the implications of shared libraries in memory _measurement_.

The users are presented with data they don't understand. Everybody talks about things like "this app is using 300MB of RAM", when such statements don't make any sense in the modern world. The way file systems, file system caches, virtual memory, and shared libraries in the context of virtual memory interact is architecturally identical on all major operating systems today, including Windows, Mac OS X, Linux, Solaris, and the BSDs. There are various differences in implementation making each system optimized for particular workloads, but understanding the differences between the system is out of reach of most people who complain on their blogs, and it only affect out-of-reach workloads anyway. It's funny how much can one advocate for something when all alternatives are the same.

But all memory management rants are nothing compared to mentioning Mac OS X' repair disk permissions feature. Of course, this feature doesn't magically repair anything, but it's sold as a panacea. I read the first paragraph about memory management and decided to give it one more chance, but then repair permissions was mentioned as a solution. Sorry, this is no HN worthy.

<comment><USER4> Okay, I really think you know much more about memory management than the writer of the original post, the question for me is using chrome with a few tabs (8 for example) and Dropbox besides the default applications I face huge slowdowns (the system becomes unresponsible for a few minutes), the same happens with Safari, for a system that was described for me as "it just works" this really sucks. This with 4GB of RAM in my MacBook Pro.

I face no such problem with Linux or FreeBSD in the same hardware.

<comment><USER5> Open activity monitor, and check which applications use a lot of memory. (Look at the "Real Mem" column).

If your computer frequently freezes, the problem is mostly a specific application (Virtualbox comes to mind), not just Mac OS X itself. 4GB are more than enough for casual browsing.

<comment><USER3> Activity Monitor is a tool too blunt for these kind of scenarios. It pains me, Mac OS X has DTrace which makes it a breeze to find out what really happens, however, the only GUI tools built on top of DTrace are profiler for programmers, nothing for the casual user.

Activity Monitor presents data that's not really useful and does so in an intrusive manner and in a confusing display.

Mac OS X already comes with parts of the DTrace toolkit, you can install whatever you're missing: <http://www.brendangregg.com/dtrace.html#DTraceToolkit>. These tools allow a very deep understanding of performance problems.

<comment><USER5> If your problem is that you are running out of RAM, Activity monitor will tell you precisely what app is the culprit. Nothing "blunt" there.

If you want to know why a specific app is frozen (beachballing), you can click the "Sample Process" button in Activity monitor to perform a time profile.

Yes, if you want more details, you have to use Instruments or write your own DTrace scripts. But I doubt that even a time profile is useful to the "casual user".

<comment><USER3> Sorry, but no, you're just illustrating the problem I've mentioned. In a virtual memory system with on-demand paging, memory mapped I/O, shared libraries and copy on write pages even measuring and interpreting memory stats is very difficult and subtle.

The "real memory" column is resident set size, a completely useless metric for the problem at hand because of many reasons. One reason is that much of the physical pages can be shared, indeed most of them usually are, on my system a chrome process has a 120MB RSS, but after closer inspection 110MB is shared, and after even closer inspection 90MB is shared with non-chrome processes. Closing the process with top RSS usage might do very little for decreasing memory pressure. Another reason is that physical memory usage is very misleading, if the system is swapping, a process has less resident physical pages than the virtual pages it uses, that's the reason the system is swapping in the first place! A process can thrash memory and have a relatively small RSS.

You also simply assume what the problem is without actually testing for it. You need to look why the system spends time in kernel mode, maybe it's not swapping, most likely is not swapping in this particular case, it's more likely to be the random I/O caused on-demand paging of memory mapped things or something more subtle, like copy-on-write pages being written to. It also could be a million other things.

Even if the problem is caused by memory pressure, memory pressure is a remarkably generic term, the VM system has many components and different components are affected by different workloads. A simple metric like RSS can't tell much.

Yes, Activity Monitor is very blunt tool.

<comment><USER6> I _do_ understand how memory works on modern systems, and I agree that Activity Monitor can still be used as a blunt tool.

My system (MBP, 4 GB of RAM) works beautifully most of the time, but I noticed that sometimes when I went to a new tab in Chrome, there was a multi-second delay. I opened up Activity Monitor, went to a new tab, and noticed that my disk activity had spiked. I figured that the memory system was swapping in/out a lot of pages, so I looked at rough memory usage, and saw that the Shockwave Flash plugin had close to 1 GB in RSS. I then realized that using YouTube as a music player is probably not a good idea - Flash was designed to run as the main thing you're doing, not in the background while you're doing other things. I killed the tab, and I had no more problems.

Blunt tools can still be useful. The problem isn't the tool, it's the knowledge that people have when they use it. For example, I know that RSS overcounts, but I also suspect that the Flash plugin isn't sharing enough to make a big dent in 1 GB. And, it turns out I was right.

You wrote an excellent explanation above about modern memory systems, I find it strange that you're harping on this particular point so much.

<comment><USER7> Yep, I checked out my Activity Monitor and the Flash Plugin was also the culprit, using over 890mb of RAM. I'm running Firefox with multiple tabs (5), Chrome with multiple tabs (7), pages, X-Lite, Adium, mail and thunderbird and 4GB of RAM with no problems.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Last July I bought one of the new Macbook Air's. The price for the hardware you got was unbeatable, and that was ignoring build quality! While previous Air's were anemic tarted up netbooks, the 2011 Air's were (and are) powerful enough for everyday use.

There was just one problem with the Air however. Horrible Linux support. I'd been using Kubuntu happily for years. After looking at all the ugly dirty hacks people were using to get their Air's running, I decided to give OSX a trial for 6 months or so. Long enough for Linux support to mature. I hadn't used OSX since the early 2000's and it looked like the OS had come a long way. To be precise, what really changed my mind was how far the OSX modding community had come. Despite being hated and loathed by Apple, they had managed to fill in some of the gaping holes in core functionality that Apple philosophy forbade, such as a way to remap keys (in all applications, not just some). I could finally remap the Apple key to something that didn't break my touch-typing habits on all the other OS's I use daily!

6 months later, I'm ready to jump ship. I like OSX Lion's touchpad gestures, but beyond that, I'll miss little else about the OS. OSX isn't bad mind you, but it's infuriatingly difficult to modify when it does something you don't like. It's buggy. It's actually pretty dated and ugly looking now too. OSX's virtual desktop management has absolutely _nothing_ on KDE's.

Unfortunately, just as the next version of Kubuntu was starting to look like a good one for the Air, Canonical announced that they are ceasing paid development of Kubuntu. My favorite KDE distro is now officially on deathwatch. Maybe it will live on with community support, like any other distro has to, or maybe it'll fall by the wayside. I appreciate what Canonical is trying to do with Unity, but it's not for me. I'd long felt like Kubuntu, despite it's many virtues, was being treated like a red-headed step-child. This tears it. I haven't decided what distro I'm going to yet, but it will be one that puts KDE first, and that rules out anything Ubuntu.

<comment><USER9> Kubuntu isn't on death watch, there was one person being paid to work on it, the rest was community support. The last version he didn't even work on (he was off working on bazaar or something) If Kubuntu does die it will be at least like 3 releases out.

<comment><USER10> Canonical recently stopped funding Kubuntu: [http://www.geek.com/articles/chips/canonical-to-stop- funding...](http://www.geek.com/articles/chips/canonical-to-stop-funding- kubuntu-2012027/)

<comment><USER11> If you read the article you posted, you'll know "stopped funding Kubuntu" means Canonical "has paid for developer Jonathan Riddell to spend the last seven years working on Kubuntu" and will ask him to do something else after 12.04. He already wasn't fully dedicated to Kubuntu for a year or so.

</comment></comment></comment></comment><comment><USER5> I don't even know where to start with the author's complaints about the memory model. Inactive memory is not "memory from a recently used app". Inactive is just like active memory. It is not unused memory. Inactive memory is memory that has not been accessed recently and will therefore be swapped to disk first. Just like active memory, it can be be freed immediately if it has not been modified (eg. a memory mapped file, or a local copy of some shared memory), but if it has been modified, it must be paged to disk because otherwise data would be lost.

All the purge command and "Repair permissions" do is swap out lot's of memory. But this is not unused memory. This memory will likely be paged in again sooner or later. It does not help much if you simply have too little memory. That's why the author claims he has to run the commands again and again. But the problem is not the broken memory management system. The author simply has too little RAM.

Which leaves the question: Why does Mac OS need more RAM than Linux?

Well, there's the simple fact that there is much more stuff running in the background on Mac OS. You have automatic indexing of every file on your hard drive and file system monitoring. Try downloading an app that opens some file type. The moment it is unzipped, the Finder automatically uses it to open supported files.

Then you have an automatic version control and backup system running in the background, for every single file on your hard disk (Time Machine). Additionally, many Mac apps aggressively cache data in memory. Take iTunes. You can scroll lag-free through music libraries with tens of thousands of songs and their album artwork, and filter them instantly.

These things use up RAM. Lot's of it. And that's why you can't run 3 VMs on your Mac if you only have 4GB.

If you don't want the extra features / bloat of Mac OS please go ahead and use Linux. But don't write a completely ignorant piece about how you think the memory management model in Mac OS is broken without reading the real docs: [https://developer.apple.com/library/mac/documentation/Perfor...](https://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html)

</comment><comment><USER12> After two decades of Unix use, in 2000 I switched to Apple and OSX - the only reason I considered it was because of the design of the Titanium Powerbook, which I saw in those days as an amazing piece of hardware design, which - amazingly - gave me a Unix workstation in a fantastic portable package. I simply couldn't believe that Apple, of all people, were delivering what I'd wanted for years - a smart, functional, fully working Unix workstation in a portable format.

So I was very happy for a year or two, and am now on my 4th Macbook Pro. The Macbook Pro (17") has come to represent everything that I desired in the 80's and 90's for a Unix workstation.

But: only because I'm running Linux on it. Mac OSX, sure, has its time and place - but when it comes to putting the power of this amazing bit of hardware to good use, nothing beats having a proper Linux distribution onboard. Proper memory management, proper user security model, proper levels of abstraction between a user program and a system service, and so on. Its simply an amazing bit of gear, now that I've set it up right.

Oh, though .. how I wished SGI had gone a different path, and released their Indy laptop to great fanfare. How I wish they hadn't been usurped by Microsoft, it would be so, so nice to have an SGI laptop in the 21st Century ..

<comment><USER13> How is the power management? I run a linux (ubuntu) thinkpad for work, and while I find the OS pleasant to use, I have found the battery life dire compared to windows-using colleagues.

<comment><USER14> I run ubuntu 11.10 on a thinkpad and I find that battery life is on a par with Windows.

You might want to investigate the ASPM power regression issue; pcie_aspm=force might work for you (or wait for ubuntu 12.04 which cw the 3.2 kernel containing the fix)

<comment><USER13> Thanks, I'll give it a try.

</comment></comment></comment></comment><comment><USER15> I've had a few Apple machines over the years (mainly as test machines and toys). I've had two MacBooks, one MacBook Pro, an iMac and a couple of Mac Minis. I have nothing now other than a cheap second hand desktop PC (and some cash in pocket!):

I agree with the build quality - they are good quality as in good materials and good fit. However, with my EE cap on, the designs themselves are bad and are quite dangerous. When there is literally that amount of LiPoly cells sitting inside a chassis, you want to be able to isolate the power. One bit of water in it and it's effectively an incendiary device. I've seen one recent MacBook Pro (pre-thunderbolt) go up with my own eyes quite spectacularly and wouldn't want something you can't drop the cells out of rapidly if you inevitably pour your coffee in it.

With regards to the software, I found the OSX environment inconsistent and XCode absolutely terrible. The OSX environment is inconsistent from the "task focused" application designs that you see. Every shipped application has its own set of behaviours and pretty much ignores a common standard resulting in head scratching. The keyboard shortcuts system is horrid and doing anything without the trackpad is hard work. XCode was just a mismash of concepts thrown together badly. As a comparison point, Visual Studio is a lot more mature and consistent and that is saying something.

The whole Apple/OSX ecosystem is a good attempt but it's not good enough for the money on the basis that some of the fundamentals are flawed. I'd actually throw more money behind Microsoft at the moment as they are heading in what I percieve to be the right direction. Apple started at a good point and have got worse. Microsoft started at a bad point and are getting better.

TBH however, the best OS/hardware ecosystem I've come across so far was SunOS4 and Sun4 architecture in the early 90s.

<comment><USER16> Sorry, I find it a difficult to believe that Apple would release a laptop that would catch on fire if you spilt a cup of coffee on it - I suspect your story has been sprinkled with a touch hyperbole. Evidence, please :)

<comment><USER17> LiPo batteries explode if you short them. Doesn't even need to be a very long short, or a very big one. They are _incredibly_ sensitive to fast discharges. Water easily conducts well enough to cause problems, especially if it messes up another power conduit. It isn't guaranteed to catch fire, but the risk is certainly there, especially in such a thin form factor - you don't have much space in there for containment or fancy routing to reduce the chances of a short.

Again, it's not guaranteed, but Airs are rather more at risk than other laptops because of their construction.

<comment><USER18> Id believe it just based on the ridiculous Amount of heat the mac laptops seem to generate. Im constantly turning mine off to cool down

<comment><USER19> > _I'm constantly turning mine off to cool down_

use <http://www.macupdate.com/app/mac/23049/smcfancontrol> \- when the thing gets hot, just increase the fan speed (to 5700 rpm or whatever you machine's max is) for a minute or two, and then everything gets back to normal.

</comment></comment></comment></comment></comment><comment><USER20> I prefer Linux over OS X as well. The OSX userland is a strange mixture of GNU and BSD tools in sometimes ancient versions. OSX has a UNIX certification but there are some bugs in their POSIX API or even missing functions like clock_gettime. Linux seems more POSIX compliant.

The OSX package managers suck. I tried fink, macports, and homebrew. A lot of packages are simply broken especially now after Apple switched to clang. You end up in all kinds of weird situations. A friend of mine recently wanted to install Octave and gnuplot with homebrew and it took him several days until he gave up.

It's hard to get help with problems in OSX. This might have been improved. But back when I started using OSX in 2005/6 it was really bad. It was rare to find people with a good knowledge of the deeper layers of OSX. It was a complete different culture than Linux or even Windows. Maybe that has improved now that OSX is much more popular.

And it feels like Apple is more and more ignoring the UNIX folks.

<comment><USER5> The problem is that you are treating Mac OS as if it was a Linux distro. If you want the Linux experience, with package managers and command line utilities and X11, then Mac OS is not a good choice.

Package managers with automatic dependency resolution are a typical feature of a Linux installation. But they go against the core principles of Mac OS X. Software on Mac OS X is distributed as self-contained packages, that can either be simply dragged to the application folder or installed by the Mac OS Installer program (or with single click if the Software is available on the Mac App Store). Typical software written for the Mac has no external dependencies.

The fact that package managers like homebrew or MacPorts exist does not mean that they are the preferred way to install software on your Mac. Compare it to wine on Linux: You can run Windows software on Linux, but it will never be the real thing. MacOS tries to be compatible to Unix, but nothing more.

<comment><USER21> Part of the rationale for package management with dependencies in linux is so that libraries are shared (only loaded into memory once) between different executables. If OS X is giving up some of that sharing in exchange for simpler installation, I wonder how much that has to do with the memory usage complaints in the comments here.

<comment><USER22> > If OS X is giving up some of that sharing in exchange for simpler > installation,

I don't really see how OS X has 'simpler' installation than any well- structured Linux distro. What could be simpler than typing pacman -S <packagename> or apt-get install <packagename>, using a single, built-in package manager that automatically fetches, builds, (possibly) compiles, and installs all dependencies at the same time?

Even if you're terrified of the command line, it's not like you can't build a GUI that makes that process look more appealing.

And please don't try and tell me that brew or macports are replacements - they're not. They're ersatz substitutes that do a passable job of installing some (but not all) development packages and basic applications. They don't manage system libraries, and they don't manage many applications that have to be installed from the App Store or from .dmg files. That's not one system - that's three or four, and they don't all play nice with each other.

In the time it took me to write this comment, I was able to upgrade all of my installed applications, system libraries, python modules, and absolutely everything else - all in one go.

Command-line or not, I can't see how one can argue OS X has 'simple' installation on _any_ dimension, compared to (most) Linux distros.

<comment><USER23> _"Even if you're terrified of the command line, it's not like you can't build a GUI that makes that process look more appealing."_

Just FYI, you don't have to build one yourself. Plenty of GUI front-ends to Linux package managers already exist.

</comment></comment></comment></comment></comment><comment><USER24> I agree with the author: Apple has _by far_ the best hardware in the PC business -- here's a great example of the extremes they go to in order to manufacture superior machines: [http://www.businessweek.com/magazine/apples- supplychain-secr...](http://www.businessweek.com/magazine/apples-supplychain- secret-hoard-lasers-11032011.html)

Alas, Apple's #1 target user is _not_ the developer; it's Aunt Tillie. And this shows in the choices they make for OS X.

IMO Linux distributions have vastly superior software installation and management tools because they _had to_ evolve them in order to survive and thrive in the wilds of the Internet. There has never been an 'Apple Store' with a 'Genius Bar', so to speak, for Linux users.

I agree with the author that Debian and its derivatives, like Ubuntu, have perhaps the best software-management tool on earth: apt-get. The damn thing is fast, and in my experience never breaks anything -- the system is always kept in a consistent state. (My experience with other software management tools -- particularly RedHat's yum -- has been less than 100% trouble-free.)

<comment> mike-cardwell I've never had any of the hardware in my three Thinkpads fail on me. My Macbook, in the space of three years, had its plastic casing start to flake off, its battery failed, its power adapter failed, its hard drive failed. The other piece of Apple hardware I owned is a TimeCapsule. That lasted a couple of years before it conked out. Luckily this was a known problem and I got a free replacement. I have a friend who went through three iPhones, that all just conked out on him before upgrading to an Android device, which he has had no problems with.

Apple hardware _looks_ good, but it's limited in function, and poor quality.

A Thinkpad keyboard kicks the shit out of a Macbook keyboard. My Thinkpad has a built in smart card reader, gps and a 3g modem. All work flawlessly under Ubuntu. It has both a nipple as well as the trackpad. The nipple on my Thinkpad is much better than the trackpad on my Macbook was.

<comment><USER24> mike-cardwell,

I had the internal fan on a Thinkpad suddenly fail at a critical time during a business trip, rendering the laptop unusable. Very unpleasant. The machine was less than two years old. It soured me on the Thinkpad brand.

Based on your comment, and given your high HN karma, I'll reconsider Thinkpads. I just bought a System76, but next time I'm on the market for a new laptop, I'll look at Lenovo's offerings.

Thanks!

</comment></comment></comment><comment><USER25> My first reaction was "Linux developer prefers developing Linux software on Linux - News at 11".

However, I suppose there is more to it than that. The issue is that the fact OSX is Unix under the hood is merely an implementation detail and always has been. I'd much prefer it if Apple used a solid, up to date Linux distro under the hood, but they don't. To me using the Unix system in OSX feels a bit like using Cygwin on Windows.

Conversely with modern virtualisation software, you can have your cake and eat it. I use OSX to run desktop and media apps, at which it excels, and have Linux and Windows 7 running in VMs. Perhaps not good enough if you're doing resource intensive stuff like heavy duty compiles on your Linux system, but for my purposes it works very well. It has the added advantage that if I hack around with the VMs and something goes wrong, I can usually revert to a recent VM checkpoint.

<comment><USER26> That UNIX environemnt works perfectly well for me as a software developer and I don't see how it compares to Cygwin in ANY way shape or form. All my favourite tools are there and I can install more using homebrew. I build server backend software on Mac OS X and deploy on FreeBSD and soon Linux, I've never had an issue. Cygwin is COMPLETELY different, man is that crap a pain in the balls.

</comment></comment><comment><USER27> Inactive memory is not an OS X specific, and it's actually implemented in a number of other OSes, including FreeBSD.

> when it's on disk, it definitely is not made active quickly.

If an application is unloaded then many operations need to be taken to initialize stuff, reading the disk for various stuff, processing some data, allocating memory (which will be zeored out, then initialized with whatever struct and data the program needs)

If an application memory is swapped, then reactivating that memory consists of:

1\. paging memory back in RAM

2\. there is no step two

 _Paging_ is key, as it means the data is in a format efficiently readable and that can be put back in memory at a very reduced cost. Compare this to reading random files entrenched in a filesystem and scattered on a disk, plus doing some more processing.

> First usually freed around 200MB of memory

Out of 4GB. Wow, what an incredible improvement! Pardon me while I go write a cron entry running that command every minute so that my system can stay in good shape!

> When arriving to work the first thing was to hit repair disk permissions

This is absolutely astonishing. Seriously, Repair Permissions is a glorified ch{mod,own} -R. Quiz time! Why do you thing it reduces the 'Inactive Memory'? Because it's hitting the disk. Hard. Actually every system file gets hit. And in doing so, those files make their way into the cache and the Inactive Memory gets properly evicted. So the supposedly non-functional memory management turns out to be perfectly functional after all.

> And of course this does not support installing Python, Ruby, Perl on any > other software that has its own way of distributing software.

which is bullshit (although there's no Perl).

       $ brew install python

even gives you a _distribute_ 's _easy_install_ out of the box. You can install Ruby the same way (and since it's 1.9 it includes _rubygems_ ) but I'd recommend using rbenv+ruby-build, which is also in the package list.

Apparently the author wants python/ruby/perl packages provided by the package manager, which might just be a bad idea given how bad the status of those packages is in Debian. One would be much better served with pip+virtualenv and rbenv/rvm+bundler.

There's a brew-pip if you really want to integrate

> And in case you mix up MacPorts and homebrew, you're deeply screwed.

How so? they live in completely different directory trees. As long as you don't screw up your PATHs or something they're oblivious to each other. I've had them living side by side for some time before dropping MacPorts without any issues.

> working command line tools

        $ brew install coreutils

But I'd hardly describe BSD utils as non-working (hint: I did not install coreutils yet I spend my days on the command line).

As for compile time, it's hardly a problem as Homebrew mitigates that (contrary to MacPorts) by not duplicating every library already available in the OS. Besides, the system (much like ABS on ArchLinux) is made to make you writing your own packages or tweaking an existing one a straightforward affair. Compare to creating a .deb properly, which is, _ahem_ , non-trivial. Yes, it would be faster not building stuff (like Arch which brings the best of both worlds together) but hosting binary packages has a cost that skyrockets as you have more users (plus one would need to make binary builds for the various OSX versions, a problem that simply doesn't exist). What's more, having software compiled from the 'original' source instead of third party is interesting in a number of ways, including running vanilla software instead of the heavily patched ones of Debian.

I'm glad the author has found a place for him but going on such an uninformed rant is unfair.

<comment><USER28> I feel you are being unfair about the uninformed rant. Picking at a couple of things I know about:

1) I've tried installing both Macports and homebrew, and some utils did not work, as whichever got put in the path first, confused the other. I suppose I could have made a seperate symlink directory, for just the binaries I wanted.

2) I found 'brew install coreutils' broke some build scripts , which expected proper mac tools, if I put them all in path.

3) I find about 10% of the time I try to install something from brew, it fails to build. g++ 4.6 failed just 20 minutes ago. That is a real pain.

I can't comment on the memory, except that I find my 4GB of RAM seems to go much further when I dual-boot my macbook into Linux. It might happen to be the programs that I run.

<comment><USER27> 1) You could also create some wrapper scripts setting the path, or have someting inspired by virtualenv handle it, or maybe different terminal profiles. Those breakings really are edge cases.

2) Don't put them in the PATH. They're prefixed with 'g' so you can make an non-prefixed _alias_ for your interactive shell, and use the prefixed variant in your scripts if need be. If you write portable scripts you're either using common features or use some vars for those utils, aren't you?

3) g++? that's not in homebrew...

Honestly though, MacPorts is a _real_ pain. That's why I worked with others to bring Arch's pacman on OSX (dubbed ArchOSX) some years ago, but binary hosting was proving being a chore, and then Homebrew started taking off, and in my case Just Works.

<comment><USER29>
        3) g++? that's not in homebrew...

He probably meant GCC, which does have recipes in Homebrew.

        Homebrew started taking off, and in
        my case Just Works

This is the first time I ever heard anyone saying it.

In general Homebrew did a good job for me, but it did break on me a couple of times. And when it did, fixing it caused me a lot of stress, because in the end it's really not much better than " _./configure && make && sudo make install_".

What I don't understand is how come we can't have binary repositories, like Debian's. Certainly Debian has to handle much more architectures and the number of packages contained is really huge. So how come there isn't such an alternative for Mac OS X? Why are solutions like Homebrew and MacPorts insisting on compiling the packages locally?

<comment><USER30> If you are attached to binary packages, there's always fink which might even predate Macports.

Unfortunately, building the packages and then keeping them current takes quite a bit of infrastructure which is why fink's binary packages are really outdated at times.

The other issue is with runtime-dependencies: Self-compiling packages gives you the freedom to, say, build vim without X11 support. With binary packages, the maintainer (or the packaging system) must create n packages for n possible combinations (if the project doesn't have some dynamic-library based plugin system) which is, again problematic from a resource-requirement perspective.

<comment><USER31> That being said, if debian can do it for around 30,000 packages on almost as many architectures as OSX has mere hardware models, why can't OSX do it? With all the app stores and cloud services, Apple is big on 'quite a bit of infrastructure'.

<comment><USER32> Because Apple don't provide these package management tools, volunteering third-parties do.

Apple are never going to provide Linux-style package management tools because the market for them is minuscule compared to Apple's real market: normal people. For normal people, there's the App Store.

<comment><USER33> Developers aren't "normal people" then? If that's seriously the attitude Apple takes towards its developer community ("no, we won't give you the software you need, get it from the crappy community projects") then why do you put up with it?

It seems like the OP's point is pretty valid to me. I use an OS that gives me what I need to do my job.

<comment><USER34> > Developers aren't "normal people" then?

No. They aren't. Developers have needs far greater than that of your average everyday user. Apple sells a machine that is the best possible for the greatest number of users, and doesn't really cater to niche markets. I don't get what's surprising about this.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER35> I was considering going the other way - but after reading this, maybe I'll stick where I am.

\--

One thing that does seem a bit odd:

> _"I'm a long time Ubuntu user, but this time I decided to go with Debian. > Why? Mostly because our servers are Debian and because latest updates of > Ubuntu have mostly focused on breaking the desktop environment."_

vs.

> _"Do I miss something? Sure. Even though Linux in modern times mostly works > out of the box, there's still slight issues with external displays, for > example I can't set the 30" Dell monitor at work to be the only display > without doing some xrand magic. I guess that's really the only thing I'm > missing from OS X, a sane and automatic way of handling external displays."_

I'm a bit sick of hearing this meme perpetuated. Give Unity a chance ... in fact, the author's main gripe about Debian is resolved in a really fluid way by Ubuntu + Unity. I think Unity's multi-monitor support is one reason why it's worth sticking with.

<comment><USER36> What's so special about Unity's multi-monitor support? I didn't realize there _was_ such a thing. As far as I can tell, Unity sits well above the layer that causes most multi-display issues.

Once you've got multiple displays, Unity/Compiz can do stuff to make working with them nicer; e.g. switch windows from one to the other and various other stuff. But if one of the connected displays flat out does not work or displays the wrong resolution, rotation, or whatever, Unity/Compiz usually are not to blame and can't really do anything to help you.

</comment></comment><comment><USER37> Is there anyone who got Linux to work full on a Macbook or MB Pro? I get most flavors of Linux to boot and get a nice X running, however, things I cannot miss like the touchpad control, screen backlight controls and keyboard backlight are completely not working. Also the battery is falling faster than my Android under Linux.

Is there any Linux working well? I have no problem with tweaking (I hacked on device drivers on previous laptops when they didn't work), but even with tweaking I never managed to get it working well. Otherwise I can have nice Apple hardware with my favorite OS....

<comment><USER38> I have a late 2008 unibody Macbook running Ubuntu + Gnome3 (no Unity). Almost everything worked without configuring. Brightness control required one line to xorg.conf and Airplay required installation of one Pulseaudio module.

I really like Gnome 3. It's much faster than Lion in that machine (4 GB of RAM, SSD), the battery lasts the same in my normal use as in Lion, the user interface fits for my freetime use, the visuals are simple and pretty and best of all: Nvidia has much better drivers for Linux than for OSX, so I'm actually able to play Minecraft without any hiccups.

</comment></comment><comment><USER39> Regarding hardware quality:

      "...why there's no PC manufacturers that would
      have the same overall quality of the hardware."

In my experience, business ThinkPads beat MacBooks by a mile for working (e.g. programming). I am surprised to see so many coders use MacBooks. Thinkpads have better ergonomics, are more robust and better performance/configurable hardware (e.g. RAM).

<comment><USER40> Do they still ship with unusable trackpads (that requires you to carry a mouse everywhere if you ever going to use your ThinkPad) or has that improved in recent years? It's the only pain point against ThinkPad for me.

<comment><USER41> If you're a programmer using Emacs/Vim you really don't care for trackpad or mouse for the great majority of your computer needs.

<comment><USER40> The problem is, even with how little I use the mouse (I use Vimperator back then) it's still annoying when I have to.

</comment></comment></comment></comment><comment><USER42> I think the bottom line is that the author is used to working with Debian and thus perceives differences between OS X and Debian as bugs.

It _is_ true that jumping between Linux and OS X can be difficult at times. It's also true that Debian's packaging system is better than OS X's.

</comment><comment><USER43> On the memory side of things (in Linux) RAM is cheap, buy 32GB or whatever your machine can support. Once you have a large amount of memory set /proc/sys/vm/swappiness to a low number like 10 (sysctl -w vm.swappiness=10) if you want to free up memory because some application was eating it up run sync; echo 3 > /proc/sys/vm/drop_caches I rarely if ever have to do this, but it helps to know if you need to do it.

I run Debian/KDE and Kubuntu and it's a fantastic setup. Setting up multiple monitors (I have 2 27" monitors) is a breeze with twinview using kde's systemsettings program. Some xorg optimization tips Option "UseEvents" "On" Option "RenderAccel" "O" in your xorg.conf file under device will speed things up even more

I run all the other os's in virtualbox, its fast (windowsX boot time is about 2 seconds, osx takes a bit longer), and you can even do some 3D stuff, though I don't play any games so I have no idea if those work.

Out of all the operating systems I've used over the past 21 years of working with computers I have found Linux to be the best fit for customization, speed, available software, ease of use, and friendly community. Though I did like vax/vms when I was a kid, I had a mouse! it was awesome :D.

Overall though I would say if your going to be doing development, especially in a server type environment, use Linux, osx was built for your average joe who doesn't know how to use a computer. Linux is usable by your average joe, but it goes beyond that so easily allowing for extreme customization on just about every facet of the operating system that you can imagine. I feel lost without my build, the nice thing is, I put it on a usb stick and I can use it on any computer, thankfully I have never had to do that :D.

And don't worry about KDE, We have a great community, and we'll keep it going. Its not about profitability, and that is what a lot of these business people seem to forget. We work on Linux because we love the system. Not because we get paid to work on it.

</comment><comment><USER44> I really can't understand bitching about memory in this day and age. First thing I do when getting a new machine is to max out the RAM. My Mac Pro has had 32 GB since 2008, iMac all have 16 GB and Macbooks 8 GB. It's such a cheap thing to do and it improves your daily life so much, it's essentially free in the end.

<comment><USER45> My MacBook Pro maxes out at 16Gb. Putting that much in would have cost me 4-5x as much as going for 8Gb! RAM is cheap, but there's a definite sweet spot much of the time.

8Gb is more than enough for the time being.

</comment></comment><comment><USER46> I must be missing something. Why waste 10 min running purge and repair disk permissions to retrieve memory when a restart is much faster???

I abandoned MacPorts for Homebrew. One feature I like is that I can build any package I want (that doesn't have a formula) with './configure --prefix=/usr/local/Cellar/name/version-no' and then do a 'brew link name' to make all the symbolic links or 'brew unlink name' to remove them. Helps solve annoying problems.

My main grump with MacOSX (still on Snow Leopard) compared to Linux is issues with 64 bit Python and MacOSX seems to store files all over the disk. Basically, if you want to work differently from the Steve Jobs Way, it takes a LOT of work. Couldn't agree more about the superior hardware quality.

</comment><comment><USER47> I think this is mostly a case of someone who develops for Linux, but prefers to develop on his desktop instead of a development server that is close to the production environment. This results in requiring the desktop to be closer to that of the production environment. I think this is the main reason I've seen people switch away from having a Mac. Personally, I've always seen my desktop and laptop as a terminal and this approach has been working for me for 20 years now, it also allows me to not having to upgrade my desktop a lot or waste a chunk of my life fiddling with it.

</comment><comment><USER40> >There are at least four different ways of installing software on OS X. Download a DMG image, drag the icon from there to Applications folder, run an installer, install stuff from Mac App Store or compile it yourself. There seems to be no standard way how to do this properly. Of course, being a software dev, I ended up using the last alternative a lot.

It sounds to me like the author expects OS X to be like Linux where its UNIX underlying is the centre point of the OS. That's true to some extend, however OS X abstracts a lot away so the user don't ever necessary to have touch the UNIX part of the package. Once you understands it that way, the way of "installing" software on OS X is reduced to 2 (plus 1) for most people.

One is drag and drop an icon into somewhere in your hard drive; which is not even "installing" since what you do is simply... copy it to your local disk. Installing applications via Mac App Store simply automates this (the plus 1 part). Another one is via PKG installer; if any app does this you should be alarmed that _they're modifying your system_ , they're going to scattered files across your system, uninstalling this thing going to be nightmare, etc.

Once you stepped into UNIX land, you're on your own. It would be nice if Apple provide a central repository of packages, but then I have to worry about outdated packages (given the nature of Apple that avoid anything with GPL/GPLv3). Homebrew has already done a great job covering that.

</comment><comment><USER48> Everything is a tradeoff. There's so much more going on in Mac OS X (especially Lion) than a typical Linux distro that you are literally talking apples and oranges.

For my money, Mac OS X makes the right set of tradeoffs to give an overall good to great user experience, even at the command line. It gets enough of the right things correct that for a developer/hacker/tinkerer, they can take it from there and add whatever else they need.

For me, Vagrant (<http://vagrantup.com/>) has been amazingly useful. I can install any of the popular Linux distros and configure them anyway I want without worrying about Mac OS X's installed apps and libraries. A killer feature: because Mac OS X and VirtualBox share folders, I can still use all of my Mac OS X tools (editors, IDEs, whatever) with Linux. And thanks to Chef, I can spin-up specialized configurations in just minutes. Having access to apt- get is cool and all, but being able to create specialized, configured environments using Chef cookbooks is faster and way less error-prone.

All of this (and more) and I still get all of the benefits of Mac OS X native applications, superb driver support, etc. And all of this on 4MB 2009 MacBook Pro.

</comment><comment><USER49> With regard to memory usage in OS X I have never had any issues with my current iMac. I have 8 GB of memory, and despite very heavy usage (Safari/Chrome/Firefox for browser testing, Coda as IDE, Tower for Git management, Skype, Terminal, iTunes, MySQL Workbench, occasionally MAMP) I rarely see any swap usage. Currently my swap used is 2 MB.

(I must say that I am still using Snow Leopard. I refuse to install Lion because it is pathetic compared to the much more efficient Snow Leopard. I have installed it on my other Mac machine and am not impressed.)

Interestingly the most memory hungry program on my computer is Chrome. It seems to spawn a ridiculously huge number of processes:

        Google Chrome 137.9 MB
        Google Chrome Helper 29.5 MB
        Google Chrome Helper 7.7 MB
        Google Chrome Renderer 123.5 MB
        Google Chrome Renderer 36.7 MB
        Google Chrome Renderer 46.8 MB
        Google Chrome Worker 26.6 MB
        Google Chrome Worker 26.2 MB

That's a grand total of 7 processes and over 400 MB of memory for just three tabs. As much as I love Google Chrome its a little ridiculous.

iTunes is the second worst offender: 300 MB. I have a pretty large library, but its not that large. Perhaps it does some very rigorous caching.

<comment><USER50> mmap+shared libraries. Don't put so much faith into what Activity Monitor tells you about processes and their Memory Usage.

Even so, having free memory gives 0 performance.

</comment></comment><comment><USER51> That's a pretty self-indulgent rant. I've got nothing against the ultimate decision by any means, but that decision is being rationalized -- and rationalized poorly.

8GB of RAM costs $39. If the OPs time is worth so little that they'd rather stew for 5-10 minutes every day waiting for repair permissions to finish, then that's simply their choice. FWIW, I haven't done anything like that on my 4GB MB Air since I bought it, and it almost never gets rebooted. Granted the SSD makes VM usage a lot more transparent, but still...

The software installation comment displays a lack of understanding of what's going on with the App Store; e.g., it's new, things are still ramping up, etc.

As an aside, my 2-cents to anyone new to the platform is to stay away from MacPorts. It does things just differently enough to make future updates (outside of what they provide, or before they get around to providing it) a potential time-sink to sort out. Not worth it to me; it's easy enough to build what you need, and there are plenty of places for excellent guidance.

<comment><USER11> 8GB would reduce battery life and, in some computers, it's not even an option. My Dell notebook is maxed out at 4. And I don't want the extra memory because I prefer long battery life.

<comment><USER51> I honestly can't tell if you're serious or not :)

<comment><USER11> serious || !serious == true

</comment></comment></comment></comment><comment><USER52> These complaints about OSX, esp. installing software, match my problems exactly. I'm a programmer and programme lots. It Just Works™ on Linux with a proper package manager.

</comment><comment> mike-cardwell I recently went back to GNU/Linux (Ubuntu). This was after a three year stint on OSX though. OSX is good for people who don't like to tweak. I'm much happier with my Ubuntu laptop than I was with my Macbook, now I have it set up how I like. I'm generally happier using free software anyway.

</comment><comment><USER53> I can only applaud the author for switching to Linux. Developers using Linux will develop for Linux and we will all be better off. What exactly reasons are, are of less importance.

I really tried several times to switch completely and it's not easy. My bigest gripe is that even with graphics acceleration firefox and chrome are still sluggish in certain aspects and also productivity shortcuts are missing on linux. I tried different flavors and just couldn't make things work. It can't be my everyday machine yet.

If someone would make distribution focused on developers, that would be the best things that happened to linux. Do I really need to install git as package and get stupid office packaged? Zsh and gvim and emacs out of the box.

<comment><USER54> You should check out OpenSUSE which lets you specify which packages you want when you're installing it. You just select the appropriate categories like "Web Development" and it installs a selection of appropriate packages.

<comment><USER53> I will check it, thank you. However what I was talking is a little more customization then that. If it is dev build, it should link to github, start with zsh etc.

</comment></comment></comment><comment><USER55> I run Debian unstable on a quad-core T520 since our servers run Debian testing and everything Just Works, but most of the developers in my shop run Mac OSX and they have endless it's-not-quite-Linux problems: installing MySQL fails because the build thought that it was a fat binary or that it was 32-bit-but- the-libraries-were-64-bit; Mac OSX system paths are kinda weird; or homebrew installed a binary in a bizarre directory.

I can't help but wonder: since all the WMs are adopting Apple's desktop experience, are the multi-touch gestures worth the minor-but-frustrating lack of compatibility? I use Gnome3 and, while I complain about X,Y or Z, it's basically the same as Mac OSX.

</comment><comment><USER56> To me, the three major operating platforms are tools that all have strengths and weaknesses. In the same way that I wouldn't use my nice chisels to loosen a laptop screw, I wouldn't use a MacBook for writing code for our Linux infrastructure. I am more efficient doing that work on Linux itself.

At the same time, I shoot photos and video, and do some writing to take a break from IT. I've tried doing that work using the included tools on all three platforms. I find the Mac platform the most efficient and trouble-free for that work. Linux is second, but is frustrating at times - <USER2> regarding video.

At work, even though we have a heterogenous server environment, we communicate using Office and SharePoint. Also the wireless network seems to work best with Windows. Thus, at work I use Windows 7 with PuTTY, Gnu Screen, and several Linux VMs, and at home I use a MacBook with a Linux VM. These two setups let me use the three PC platforms for the workflows for which they seem best suited.

I think it's missing the point to debate which is the one true platform. We all have things we want to do, things we want to create. In my experience, the question is not "which platform is better in general?", it's "on which platform can I most easily get my work done?". If my current platform no longer works well, I try the others. In the end, I'm paid more for getting more work done in less time, so the efficiency of a platform for that work decides the question.

</comment><comment><USER57> 95% of my problems with any computer occur as a result of me wanting to use a piece of software that requires me to upgrade something. be it the OS or just some library.

in the old days when I ran Red Hat Linux this was the main reason my system would rot: I would want to run some piece of software, the developer had decided to depend on some very recent version of a library not present on my system and I would have to roll the dice and install it. usually it would be okay, occasionally things would break, but eventually it would lead to my system becoming unusable from all the dodgy packages that were installed.

things got a bit better with Debian. and even better with Ubuntu.

to this day I still have this problem. this weekend I had to upgrade my laptop to the latest OS and in the process I managed to brick it. I spent most of my weekend getting it on its feet again.

the thing is: I spend perhaps 1/10 as much time dicking around with my system now as I did when I was running Ubuntu on a Thinkpad. and more of the system works more of the time. I think most of this is down to Macs and OSX being a much less diverse environment. the hardware is well defined, the OS releases are far fewer and thus more defined etc.

that being said: when things go wrong on a Mac it is much more of a pain to sort things out. it is much easier to find solutions online for Linux problems -- and Linux is much easier to diagnose. I'm not entirely sure why.

</comment><comment><USER58> The issue with transitioning back to Linux is not the OS or its applications. The main issue to be able to find decent laptops that are able to run the software. Lenovo, HP, and Dell are among the brands that won't offer a quality experience (think antiglare screen, lightweight, battery efficient and decent weight.) Noise is also an issue with the fan level on most PC laptops today. SJ didn't like fan noise and it may have helped in designing the best laptop on the market today.

<comment><USER59> Except when you do serious computations the MacBook Pro begins to squall serously.

If you do nothing, then yes, it's better even than Windows.

</comment></comment><comment><USER60> I have been a Mac user for the last four years. I used to really like it, everything was stable and polished and just worked really well.

But in the last few months, things started falling apart. My computer would freeze every few days, syncing would destroy parts of my data, the iPhone would crash every now and then, there would be weird random glitches...

I'm certainly not ready to abandon ship yet, but I can see it coming. The Mac is not what it used to be any more.

<comment><USER61> May I ask if you've upgraded to Lion a few months ago? My 4 years old Macbook was not as bad as you described, but it does become a lot less stable than when it was under Snow Leopard. Even Safari does not work properly in Lion.

Snow Leopard was truly very stable, it's the best major version of OS X that I've used. I hope the minor OS X updates will fix out all of the Lion bugs.

<comment><USER60> yes, I did update to Lion.

<comment><USER62> So you must swap distributions, or try recompiling the kernel.

</comment></comment></comment></comment><comment><USER63> In one paragraph he says he has four gigabytes of memory, and after switching to LInux, he says he has eight.

It seems he's misunderstanding inactive memory, which can be either filesystem caching (since it's already backed on disk, can be freed with no penalty) or allocated memory by the processes but not recently used (which would count as used under Linux, and when running out of free mem, would be paged to disk on both Linux and Mac OS X).

</comment><comment><USER64> I can relate to the OP: I like OSX for general work, but prefer Linux for programming workflow and tooling (mainly because of the debian package system). My solution from now on is to do my dev work inside a Linux VM (through Virtualbox). Seems to work well. Would love to see others experiences with similar setups, anyone else going a similar route?

<comment><USER65> I was an ardent Linux desktop user for years (Slackware, Gentoo, Ubuntu), and the model of OSX for desktop, Ubuntu VM for dev works well for me. I have this exact set up doing Django based work. I treat my Ubuntu VM as an IDE... suspend when I am not working, resume and I have 4 desktops in the same state they were the last time I worked (desktop for test server processes + celery, and logs, a desktop for editing files in vim, and one running FF on the project(s) I am working on).

OSX's desktop experience is so much simpler and straightforward for a lot of things. I loathe homebrew and XCode, and actively avoid doing anything with those tools under OSX (but I know I can fire up a terminal when I need to). iTunes and sync'ing to my iPhone have become indispensible, Notational Velocity / Simplenote kicks tomboy/gnote, text expander, Adium, etc. There are equivalents on linux, but they always lack some polish... I know people think OSX takes away choice and power (like some kind of toy OS), but I have come to be okay with that for the convenience and consistency it brings to the table.

Give me a vanilla OSX install over a vanilla ubuntu install any day of the week.

<comment><USER64> Exact same reasons here. I love being able to suspend, resume and clone VM dev environments, and there's plenty of OS X software I really don't want to give up outside of dev work (Keynote, Sparrow, Reeder, Final cut, Pixelmator, etc..)

</comment></comment></comment><comment><USER66> I had a similar memory problems with my 2011 iMac. It had only 4 GB of RAM. The machine started pretty fast to filling up my swap. After it started paging out the machine was unusable for some minutes. I don't know if this is true but I think the HDDs in the 2011 iMac are not that good.

I upgraded the memory to 12 GB. Since then working on my iMac is a lot easier.

But the troubles are still there (from time to time). A few days ago I ran Virtualbox and Parallels Desktop 7. I had a 5 GB big swap, the machine started paging out and it slowed down. I had to quit some apps to solve the problem.

So I have to agree with the author of the article that Lion has a weak memory management. Apple must fix this. Running a 12 GB of RAM machine and getting a sluggish machine?

I think that if I would install an SSD my iMac would be a lot faster. Also the paging out.

</comment><comment><USER67> May be too late for the Inactive page discussion, Windows has this concept of Standby page. It is in an intermediate stage between working set and the Free page list. It's not in a process' working set but still has the data for the process. If it's accessed, it's brought back into the work set. If the system runs out of Free pages, the Standby pages are "freed" into the Free list, becoming available to other processes.

It is like a weak reference memory page that can be brought back to life immediately but also be readied to be freed for other purposes.

Most disk cache memory pages, terminated process pages, and others are in the Standby list. They are read-only pages that can be reused or repurposed either way.

</comment><comment><USER68> I have a Macbook Air and a windows desktop that runs all my test browsers and a linux VM through virtual box. I use VNC to test everything on the browsers I have installed on the windows box and additionally run databases on the linux VM. Super smooth, I have never had any performance issues at all. Modern CPUs are more than fast enough to really do any type of development on as long as you have the ability to offload the occasional compute intensive tasks.

I also only have 4GB on air and yet I can't remember when switching to an application wasn't instantaneous even with 20+ applications open. I won't go back to running Vmware on the laptop, so much faster as a virtual desktop.

</comment><comment><USER69> I'm beginning to wonder if the memory "issue" is psychological. I run OS X Lion on a 2GB notebook. I use Xcode, Python, ImageMagick, Firefox w/Firebug. I've never had noticeable paging issues or felt the desire to upgrade.

</comment><comment><USER70> I was an ardent Ubuntu user and then I bought a Sandy Bridge-Optimus Thinkpad. The high temperature and constant fan forced me to move to Windows 7. The temperature on Linux was at least 10C higher than on Windows.

</comment><comment><USER71> Just out of interest, does anyone know what linux distro has the best Macbook Pro support? Like the author has said, I've always admired the hardware but want to use linux, ideally a debian based one.

<comment><USER72> All of them support the Macbook.

A better question might be which community has the best documentation. I believe Ubuntu probably has the best documentation for the Macbook and is the most noob friendly.

</comment></comment><comment><USER73> After years of DOS then Windows (various versions but not Vista or later), various RPM based Linux distributions with all the weird corruptible state RPM distros can get into this statement rings true to me:

"Most notably I get the ultimate software installation tool, apt-get. A tool that installs binary packages with their dependencies. A tool, that's universally supported by Google et al., so I don't even have any problems installing newest Chrome, for example."

</comment><comment><USER74> This is fairly spot on. Apple makes really nice laptop/desktop hardware, but though OSX as been getting a lot better, it is still a terrible playschool excuse for a unix-based operating systems go when compared to *BSD or Linux.

OSX is certainly a better choice for the pointy-pointy-clicky-clicky masses than windows by far, but we have chromeos and ubuntu for them now. Lets face it, OSX is made to suit the needs of people who just want to use social networks, play farmville, and not worry about running constant spyware scans. It is also largely appeals for people that have been trained that the Adobe Suite is the only way to do professional media/web work, but at least know enough to realize the entire windows ecosystem is irrecoverably broken. (Obviously I am generalizing and there are certainly exceptions but you must admit this is the majority)

OSX is not, nor will it ever likely be made for serious hackers or sysadmins that actually care how things work at a low level, like to choose their own window manager, manage memory, write/apply kernel patches to support new hardware, run enterprise-level systems with rebootless kernel upgrades, have low level file-system control/choices, get and apply same-day security patches, have custom kernel-level security extensions that compile into every binary on the system etc. It is also certainly not for the wider range of users and developers that want an operating system they can install on their existing hardware that for most common tasks "just works", and/or want to easily manage all the software on their system with a mostly unbiased package repository system where everything is free, and where most of it can be legally modified.

I also found it interesting the author chose to give up the multitouch trackpad he liked for a lenovo, after just saying the macbook was nicer hardware. Debian runs great on Apple hardware.

I personally run Arch Linux on my macbook pro and I have full multitouch trackpad with the same gestures, keyboard backlight, all the special buttons work, etc. Many other major distros also have run smoothly on my new and old style mac minis, friends macbooks, and my macbook pro. I daresay many major Linux distros support a lot of Apple hardware better than Apple does.

Decent hardware, complete control over the software, and I can dual boot OSX when I happen to need to open some proprietary formatted file once in a while. Works out fairly well.

<comment><USER27> > OSX is certainly a better choice for the pointy-pointy-clicky-clicky masses > than windows by far. OSX is not, nor will it ever likely be made for serious > hackers or sysadmins that actually care how things work at a low level

This is an extremely short-sighted, elitist point of view. Stuff like DTrace are absolutely fantastic and quite low-level, and applications like Instruments are quite helpful.

> like to

> choose their own window manager

Hmm that's 'low level' for sure.

> manage memory

OS memory management is incredibly tough. J. Random Hacker certainly has a hard time following LKML discussions on the subject, let alone diving into the code. echo'ing stuff in /proc/sys/vm/swappiness does not count as hackerdom on the subject.

> write/apply kernel patches to support new hardware

Nothing prevents you from writing kexts.

> run enterprise-level systems with rebootless kernel upgrades

I doubt the majority of linux servers are running Ksplice or kexec'ing into the new kernel. Your typical Debian install needs a reboot for the new kernel to be picked up.

> have low level file-system control/choices

I think HFS+ has done its time and needs to be phased out, and I would have loved for ZFS to not be acquired by Oracle. Still you can control journaled- ness and case sensitivity of HFS+ drives, which is nice. You can come up with whatever partition scheme you want since /etc/fstab is respected. Also, you can certainly implement/port all the filesystems you want, either 'natively' or through Fuse.

> get and apply same-day security patches

This is an area where the open crowd kicks ass. Many vulnerabilities though are not in the kernel or the base OS but in third party software, which can possibly run nicely on OSX and benefit from openness.

> have custom kernel-level security extensions that compile into every binary > on the system

I'm not sure what you mean by that but if you have kernel security _compiled in_ a userland program to be effective, you've got a problem.

> It is also certainly not for the wider range of users and developers that > want an operating system they can install on their existing hardware that > for most common tasks "just works"

This is true but ironically, I recently built a hackintosh on a Dell XPS 8300 which required much fewer hacks than Ubuntu to simply work. (Debian did not stand a chance as it would have been running half of Sid). Arch Linux fares better but needed quite some work to achieve a fully working environment. Yet in the end OS X is still a better fit for the machine.

> and/or want to easily manage all the software on their system with a mostly > unbiased package repository system where everything is free, and where most > of it can be legally modified.

Homebrew fits the bill. Also note how most of the Unix userland and a good part of the kernel is actually open [0].

So I assure you hackers can have plenty of fun poking around and living daily inside OS X.

[0] 10.7.3 kernel, <http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/>

<comment><USER74> A well constructed reply. I probably will not be as organized but here goes:

Certainly OSX is becoming a lot more open in some respects. There are clearly some people in Apple that have been trying to make some changes for a while, and I applaud that and hope to see it continue. The fact they ship with a lot of major open source tools makes me happy.

Even on my side of the fence I will go as far as to say there are plenty of tools in OSX to meet most needs of most developers.

Also a window manager is not "low level" in the traditional sense. I could of worded that better. It is however something at a lower level than one can have any control over on OSX. If you choose OSX you _must_ accept Apple's choice of window manager. I on the other hand use Awesome, a tiling window manger with a Lua driven UI which allows me to edit just about anything in the UI and reload it on the fly without logging out. Typically everything runs in a single process that consumes well under 20MB of ram. That's the kind of control that OSX does not offer. Sure it is not "low level" but it sure feels that way on OSX when you can't do anything about it no matter how much you program, it's simply outside of the range of what the platform allows short of hacking binaries or running an XServer on top of the existing OSX desktop.

As for memory management I would expect any novice linux sysadmin _should_ know how to go through and kill all unneeded processes, run headless, build a lean kernel tailored to the hardware etc. I make even interns learn how to do things like these. Any professional sysadmin should also know how to build in extensions like PaX or selinux, and recompile any user-land binaries as needed to to support it. For sensitive systems you can also build a hardened toolchain and compile every single binary on your system through it. This means you can force position-independent executables, stack smashing protection, and compile-time buffer checks, which can prevent a lot of 0days in other people's code that might otherwise work with "virgin" binaries. I do all of the above for all my production systems. I also at least always compile my kernels with Pax which randomizes memory addressing schemes at compile time. This way as well so kernels will map memory the same way for added protection against many 0days which will often assume stock memory mapping.

There are lots of things you can really only do to protect a system, if you have all the code sitting there. In OSX you just have to cross your fingers there are no 0-days in any system processes, or that if there are... that apple gets around to fixing them and deploying them fast.

In regard to ksplice, your right. I said enterprise here for a reason. Most sysadmins won't touch it for most uses. People that do know what they are doing with it however and can't afford downtime make use of tools like these to keep boxes online, and even can justify far more frequent kernel updates than they might ordinarily. In OSX you don't even have the possibility to do such things. Most system level updates require a reboot, period.

in response to OSX running better on non-apple PC hardware than Linux... I am hard pressed to buy that without more detail of your exact issues.

Homebrew... Homebew is neat. Truly a step in the right direction. Every OSX install I do, It is the first thing to go on. It only has perhaps a fraction of a percent of the number of packages in a modern Linux distribution, but it at least has a lot of the important command line tools. I really hope this project matures and gets more community support to bring a wider range of open tools to the table. I used macports for a while but broken packages at every turn made it rather unusable.

Regardless, it is still just a fledgling effort. Personal use? Sure, but I would certainly not trust it for a production system. Many packages are very out of date, or are having to deal with the most recent OSX-compilable builds. It's better... but they have a long way to go yet. I do welcome anything encouraging more open source adoption without the OSX crowd though.

<comment><USER27> > I probably will not be as organized

Fear not, as your reply is perfectly organized to me :-)

It is all the more interesting because it goes to the point I willfully chose not to make in my previous comments, namely that Mac OS X (in its current form at least) is unfit for most server roles. I think that there is a use case for SOHO and that even then it needs improvements to seriously tackle that area.

For developers and hackers by large it's more than adequate though.

> in response to OS running better on PC hardware than Linux

The exact phrasing would rather be "running better on _my_ PC hardware" :-) as it's of course purely anecdotal evidence.

> I am hard pressed to buy that without more detail of your exact issues.

I started writing something, but it's really growing out of scope, so I will probably end up writing a full-blown post about it (which includes details about window managers)

PS: Awesome rocks and is one of my WM of choice, together with xmonad.

<comment><USER74> This discussion will probably result in full blown blog post of my own as well.

Thanks for helping me be a bit more balanced. :-)

</comment></comment></comment></comment></comment><comment><USER75> There is a very valuable post and discussion to be had about why a developer may choose Linux over Apple for their primary dev workstation. This isn't it.

</comment><comment><USER76> I also once spent a year or so trying to rebuild in OS X what I had working in Debian/Ubuntu until I just gave up and went back. The lure of the "Unix inside" was good but didn't fly far in reality. And no, an operating system doesn't get to dictate my desktop when I have under my belt 20 years of experience on it. But the h/w quality is good, I must say--though compatibility with Linux isn't, obviously.

</comment><comment><USER77> using kde, xrandr magic is automatic. including the mode that integrates all screens into one, regardless of the resolution (unify screens)

</comment><comment><USER78> For those of you who got sucked into this conversation. Use whatever OS you want and then use vagrant for your development OS. <http://vagrantup.com/> I promised myself to never use Windows again. I'm happy with my 27 inch iMac and my two laptops running Linux. Life is good :)

</comment><comment><USER79> I switched for a slightly different reason. In my case, some of the bleeding edge branches of projects I cared about weren't even building on OSX. Also, system default versions of software like GDB aren't quite as recent as their Linux counterparts - which forced me to have to deal with MacPorts and the like.

</comment><comment><USER80> I developed under Linux for over a decade (along with Irix, BSD and Solaris), and started doing web development on OS X in 2010. It's completely painless and I have no idea what this guy is bitching about.

My MBP only has 4GB of memory and it's more than adequate for web development.

</comment><comment><USER81> Who cares? Some anecdotal blurb about not liking OS X is HN worthy? How is this on the front page?

</comment><comment><USER82> If I were in the OP's position, I would just run my preferred Linux dev environment inside a VM.

<comment><USER83> Been there, done that. Reference T-shirt.

Eventually the RAM penalty kills you. Especially if you prefer the Linux environment to the Mac one (and hence are using it more heavily), or the need to run multiple VMs.

The real lesson: if your preferred environment is XYZ, then run environment XYZ. Not ABC. Not PRQ. Not KLM.

And all the ABC/PRQ/KLM fanboi/boosters/shills/fanatics on the planet won't change your preferences (or specific needs, or your twisted path through the world of computing evolution) one whit.

</comment></comment><comment><USER84> Will gladly swap my Lenovo W500 with anyone who would prefer it to a similar or later gen MBP. I love the hardware, and like using Linux to program but for everything else it's too basic.

</comment><comment><USER85> It's unfortunate, but people open up Activity Monitor and get confused by what they see. This is why "FreeMemory" app listed on the Mac App Store went to #1 awhile back.

</comment><comment><USER86> If you have enough ram you can just disable swapping all together which is what I've done on 2 computers that have SSD's and 14+gb of ram

</comment><comment><USER87> just tried purge on my macbook, and it really did freed some memory. never heard before about this command... any ideas why OS doesn't do it automatically from time to time by default? I agree that it doesn't make sense to use swap to move inactive memory.

<comment><USER88> Inactive memory is good for you. Purging it just means that the disk cache is gone and files have to be read back from disk next time you access them.

The author of the article might have seen problems with swapfiles growing, but he certainly does not have the tools or experience needed to accurately find the cause of those problems. So I wouldn't trust what he says very much.

If you have a situation where it seems like the system is stalling or using too much memory, please do run sysdiagnose (see the man page for the handy key combo) and attach it to a report at bugreport.apple.com.

<comment><USER89> One of the most irritating things about OSX memory management is that it appears to swap out inactive memory well beyond the point where OSX itself begins to yell at you for low disk space. Admittedly, I need to free up some disk space, but it's irritating that by rebooting (which I'm assuming is equivalent to purging) I can go from 500mb free to 9gb - and then back within a day.

<comment><USER88> How much memory do you have installed? I'm guessing most of that is taken up by /var/vm/sleepimage, not the swapfile.

There is a way to disable sleepimage, but I'd rather not say it, since you should really clean up your disk.

<comment><USER89> 4GB installed. I looked at /var/vm/sleepimage before and after a reboot and it was 4GB in both cases (at least according to ls). The variation in free memory is greater than the memory I have installed anyway. I didn't however realize that /var/vm existed and contains pointers to the other swapfiles that I can monitor to see how they change. Thanks for the tip!

</comment></comment></comment></comment></comment><comment><USER90> I stopped reading at "repairing disk permissions".

</comment><comment><USER91> Interesting. I am using OS X 10.5.8 with only 2G memory and when programming with Python, PHP, gcc and Apache this is actually OK. Not brilliant, but not slow either. The machine tends to be on all day. I _have_ noticed that Linux does seem to page more than it used to in recent years, this varies with the kernel. There _is_ more Linux disk activity these days than in previous versions, regardless of what swappiness I tell it to use.

I use nano or vim as my editor mainly. The setup I use on Linux is much the same. I don't notice much of a difference in terms of performance between OS X or Linux for the text-based and command-line related stuff that I do. I could sit down and be happy in either OS X _or_ Linux and it wouldn't matter to me which one I'm using. I also use mutt for my email and cmus for playing music in both environments so I am seldom out of the command line for anything.

Although I do find apt-get much more efficient and I can get packages faster and with less fuss with Linux.

I do also use brew on OS X.

As far as I'm concerned, for what I do, there isn't a lot of difference ... I hardly ever use XCode, though.

<comment><USER92> It's because you're using 10.5, last of the great OS-X's. Performance requirements went up in 10.6 and WAY up in 10.7. I have an old MBPro running 10.5 and it consistently feels faster (and is provably far more stable) than my new model work machine running 10.7

<comment><USER91> Really? Glad in many ways I am still using 10.5 then. I've no problem with stability. As you mention it seems quite rock solid.

I had no idea that the memory requirement for 10.6 or 10.7 was so high (I've heard anecdotal comments from non-tech friends). But then I'd also heard the official Apple line that 10.6 was meant to be better at memory management and slightly faster than 10.5 because the binaries were no longer dual PPC and Intel -- just Intel.

So, in God's name, why are the later versions so resource hungry?

<comment><USER93> 10.6 adds a lot of new frameworks, which get loaded by Apple's apps, so memory usage goes up.

10.6 does free up disk space (but that's not as useful as memory).

Obligatory: I also went back to 10.5 after spending some time on 10.6, fwiw.

<comment><USER88> 10.6 switched the architecture from i386 to x86-64. Since many third party applications were still i386 binaries at the time of its release, both versions of every system library had to be loaded. That did increase memory use in some ways, but it's not really a problem anymore unless you use Word 2008.

But that's about it; 10.6 is much faster and more stable in every other way, that being the entire point of the release.

Of course, I should say 'was', since it's not even the current version. Unless you're posting from a time warp.

</comment></comment></comment></comment></comment><comment><USER91> Repair Permissions -- seldom does anything.

<http://daringfireball.net/2006/04/repair_permissions_voodoo>

</comment><comment><USER94> HomeBrew and MacPort do screwed up lots geeks' Mac, seriously.

<comment><USER95> I thought that HomeBrew didn't even install things as root, so how can it fuck things up?

<comment> brown9-2 And since MacPorts installs everything in a separate directory from system tools/libraries, how could it screw anything up? Like Homebrew it never installs anything outside of it's home.

<comment><USER95> But what is your point? I never meant this to be a MacPorts vs HomeBrew discussion, I've only used HomeBrew.

Being downvoted I'm obviously missing something. Care to let me know what it is instead of just downvoting me?

<comment> brown9-2 I'm agreeing with you, and also curious how HomeBrew and MacPorts could have screwed up any geek's laptop.

</comment></comment></comment></comment></comment><comment><USER96> Just because homebrew wasn't your thing doesn't make macs or OSX "stupid".

And I used to do Java development in eclipse/netbeans with db, ide and appserv all running on one machine that had 2GB and I never had any issues... memory hogs hello.

I have and am developing on _nix, OS X and windos and I can still simply not understand what this guy is all about - basically it comes down to: for his style of work, some_ nix distribution where he can compile all sorts of additional packages might be the best option. But I never had any of the problems he talks about.

Also, OS X comes with python and perl on board...?

<comment><USER97> > And I used to do Java development in eclipse/netbeans with db, ide and > appserv all running on one machine that had 2GB and I never had any > issues... memory hogs hello.

This matches my own experience pretty well. I have a MBP with 8GB of RAM and a Linux box with 16GB of RAM at work for Java development, but that's because our Java web app at work requires 7GB+ (!) to get off the ground.

Most of my own personal development, be it Java (IntelliJ) or Python (ditto) or C++ (XCode or Eclipse) or C# (MonoDevelop), is done on a MacBook Air with 4GB of RAM with no problems. I'm getting a MBP (yes, with 8GB of RAM, the horror!) largely because I want to be able to replace the optical with a second SSD so I can dual-boot Windows (and because 1680x1050 in a 15" laptop is kind of really friggin' nice, 1366x768 is kind of cramped).

Plus, even if the writer of this post was on point--8GB of RAM is dirt cheap in 2012.

<comment><USER98> I'm rather off-topic, but your monitor resolution comment made me smile.

I'm currently trying to squeeze the last dying days out of my 15.4" Dell Latitude D810 with its expansive 1920x1200 native res. It's a 7 year old machine, but I can't stand the thought of losing it, because the only laptop I know of with that resolution today is the massive MBP 17".

16x10 aspect ratio is pretty much a thing of the past now. It's a sad feeling to think that my next laptop will have lower resolution than what I've had since 2003.

<comment><USER99> Can I ask why they are the "last dying days"?

A refurbished ThinkPad T61p, Core 2 Duo, can unofficially be upgraded with 8Gb and an SSD, 1920x1200 in a 15" screen is now under £300. It is also many years old, but I suspect that a former top of the line ThinkPad would beat any modern bottom of the line laptop for the same money, and better screen spec too.

I'm uncomfortable about how old it is, though, hence wondering if you mean your laptop is falling apart, or if you mean it is too low spec for modern use.

<comment><USER98> I meant my laptop is physically about to fall apart - the screen doesn't stand up on its own any more, and needs to be propped up with some hefty tomes from my undergraduate days. I'm not able to upgrade it, really, either. I stuck an extra Gig of RAM in it, but the HD interface is an IDE, and there really aren't many non-SATA SSDs available.

Might look at a refurb as you suggest - thanks for the heads-up!

</comment></comment></comment></comment></comment><comment><USER100> Well that was a few amusing misunderstandings about OS X :)

</comment><comment><USER101> correct

</comment><comment><USER62> Finally, and article that is not pure "Apple punditry and curmundgeontry"... Upvote!

</comment><comment><USER102> This is the same transition I'm about to have. Goodbye osx, welcome linux and thanks for yor feedback.

</comment><comment><USER103> you got a simple point, why the hell the inactive memory does not get smaller? i think apple should put a list showing which apps leave an inactive memory

</comment><comment><USER104> "Of course, being a software dev, I ended up using the last alternative [compiling things manually] a lot."

Yeah, whatever.

</comment><comment><USER105> Had an iMac for 2 years, loved it for the first few months, and then, over time I grew less and less enamoured with the OS.

1) Finder just plain sucks 2) Window manager is complete azz I guess I prefer Compiz keystroke-snap-to-grid style window management vs dragging windows to desired positions and generally having a cluster-fuch of windows all over the place 3) Spinning beach balls, fun, OSX, the new Windows 4) Overall a McDonald's Linux for the masses

Yes, hardware support is excellent, out of the box works fine, blah, blah; in fact, for those suffering in Windows, I always suggest they buy a Mac; however, saying that, if you are comfortable outside of the GUI, why waste another moment on OSX?

Absolutely stoked here on Fedora 14/Gnome/Compiz ;-)

</comment><comment><USER106> The author is absolutely right. People tend to like Macbooks and iPads for irrational reasons. This is what has been described the "reality distortion field". It's all marketing hype and Apple fanboys who make Apple what it is, the technology has nothing to do with it. The obsession with "Think Different" has brainwashed these vulnerable people.

The reality is that as an avid user of Macs since the old days when the Mac was the real "elite machine" back in the PowerPC days I can say that the new Mac OSX based machines are terrible and do not represent Apple's past level of quality. The new machines are consumer toys, not serious machines like they once were. The comment about a "McDonalds version of Linux" is true.

I actually ended up moving to Windows because around 1999-2000 Apple started moving into it's "Walled Garden" software model and they failed to embrace other hardware setups, this made the Apple too expensive and not nearly flexible enough for a real business/engineering user. At first Windows was a bit of a shock, but by the time Windows XP had arrived I forgot all about the Macs. Yes, the blue screens were annoying but Macs also crashed too. Microsoft has hit a home run in terms of how it generously treats Windows developers too!

Then working on a web development project I was forced to use Linux in the server environment. I can tell you, Linux blew me away. There's a real reason that IBM and Oracle are using Linux as their base OS's. Linux is the OS for engineers and now I use it for desktop along with Windows XP. Steve Jobs ripped off Linux and then broke it to make it into a toy device with OSX and iOS, both some of the worst OS's ever made.

My chart is as follows...

Mac OS-X and iOS = toys for consumrs...

Windows XP and 7/8 = serious business tools...

Linux and Unix = engineering tools for scientists...

<comment><USER107> Irrational reasons? Do you even know what people want in a computer? It's like pegging all BMW buyers as "irrational" because a Kia is just as good a car, all the same features, and comes at a fraction of the price.

I don't know what "walled garden" you're talking about. It was Microsoft that started locking down their systems with CD keys, Windows Genuine Advantage, and Windows Application Certification. DRM everywhere! Apple, on the other hand, has never had a CD key for their OS.

Your ignorance is staggering. Steve Jobs was working on NeXT in 1986, a BSD- based UNIX-type system at its core. Linus Torvalds was in high school. How did he rip off Linux, exactly, when it didn't even exist?

Your thinking is at least fifteen years out of date. Anyone who dismisses OS X as a "toy" doesn't know what they're talking about.</comment></comment>


Ask HN: What programming languages are maintainer/maintenance friendly? - <AUTHOR> Most languages try to be development friendly i.e. trying to be easier during development process, but which languages make maintenance easier and are maintainer friendly? <comment><USER2> I remember once live debugging a web app in production. We asked the user to go try to reproduce the bug and when it hits it, the debugger opened on the exception, we took a look at the stack, found a small issue, fixed it and made the debugger to continue. The page rendered without even terminating the thread that had received that http request. All the user felt was a delay until I've pressed 'continue' on that fixed method in the debuggeer.

The stack was Pharo Smalltalk using Seaside remotely connected using VNC

</comment><comment><USER3> I think golang is probably the canonical example of a language designed for maintenance first and greenfield development second.

But really, the engineering standards at your shop will be the prime determiner of maintainability, not the language that you use.</comment>