Live data from Hacker News

Back on Linux (after one year of Apple and OS X)

dywypi.org

61–70 of 334 posts

Re: Back on Linux (after one year of Apple and OS X)

#61

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?

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.

Re: Back on Linux (after one year of Apple and OS X)

#62
post #34

Earlier quoted context omitted.

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 usin…

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 && s…

I believe Fink provides binaries.

Re: Back on Linux (after one year of Apple and OS X)

#63
post #44

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…

+1. It is interesting that there are no complaints that "system A is slower than B". I don't understand why people bother with VM stats if there are no performance issues.

Re: Back on Linux (after one year of Apple and OS X)

#64
post #2

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.

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 l…

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.

Re: Back on Linux (after one year of Apple and OS X)

#65
post #34

Earlier quoted context omitted.

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…

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 usin…

1) Well, I could do I suppose. That all sounds a bit complicated however.

2) I am not talking about my own scripts, I am talking about other peoples. I could obviously go through and debug them, and then check I haven't broken them on a couple of linuxes, and a mac without macports/homebrew but... I don't want to.

3) You are right, it looks like gcc and gdb have both been taken out of homebrew, I assume because they didn't work. They were there previously.

Certainly I find homebrew very useful. Just now I noticed the one thing I used in fink in now in homebrew, so have removed fink which should also hopefully slove problems.

However, as time goes by, I find the OSX is getting slowly worse. In the days of OS X 10.1, the various command line tools were in sync between linux and mac os x, and now that is certainly not true, and I find the linux set more useful, especially in a default state.

Re: Back on Linux (after one year of Apple and OS X)

#66
post #34

Earlier quoted context omitted.

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 usin…

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 && s…

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.

Re: Back on Linux (after one year of Apple and OS X)

#67
post #61

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?

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 fil…

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..)

Re: Back on Linux (after one year of Apple and OS X)

#68
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.

Re: Back on Linux (after one year of Apple and OS X)

#69
post #51
post #23

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 t…

(I'm the author of the original post) You bring up good points and my article would need some clarification on some parts, I agree on that. I'll just write quick replies back to you, and try to format something on the article itself later. Purge really did free memory and quite a lot. I'm not too expert (as you probably can tell) how the OS X memory management works, but I mostly settled with solutions that seemed to…

The problem with the inactive memory is that it is not freed, it is swapped. So when hitting memory limits of my system, the computer started swapping. Just freeing the memory, in my case, would have been much quicker. Practically my machine was constantly swapping when the memory limit came up.

That's just not true. If inactive memory is something that's already backed by disk (like a memory mapped file), it'll be discarded. Only if it's read-write memory that's /currently held allocated by a running process/ will it be swapped out to disk. Unless you're doing something pathological (like suddenly allocating lots of RAM and forcing paging - what purge utilities do...), the architecture /speeds things up/.

If it's really true that, without doing anything special, things were always being swapped out to disk for you, it necessarily means that there was a process that had allocated (lots, it sounds like) of RAM and written to it, so that stuff had to be paged out to disk to free up RAM without losing data.

It sounds like you were running purge commands or utilities to 'free up RAM'. That is counterproductive. It causes the system to release cached 'clean' (i.e. as already on disk - a mapped file, essentially) mapped RAM and swap read-write memory out to disk, only then have to re-read it all when you actually need it. In other words, using purge 'utilities' actually puts the system into the worst possible state.

Post reply on HN