Live data from Hacker News

Hacker's Guide to Setting Up Your Mac

lapwinglabs.com

71–80 of 267 posts

Re: Hacker's Guide to Setting Up Your Mac

#71
post #62

Earlier quoted context omitted.

I get the joke, and it was the first thing that popped in my head too. But in all seriousness, OS X is Unix as well, and can do pretty much any Unix based task that GNU/Linux can. Sometimes the best tool for the job is the one you already own.

Have the Mac folks got focus-follows-mouse yet? http://steve-yegge.blogspot.it/2008/04/settling-osx-focus-fo... In general, I don't think I'd ever give up Linux. It's a hacker's OS, by and for hackers. Being able to pick apart and fiddle with any portion of, from the kernel on up, is a wonderful, empowering feeling, and something that has proved useful both personally and professionally over the years.

Indeed, when I'm on GNU/Linux I always set the WM to focus-follows-mouse, click-to-raise. But strictly speaking, that's an X11 thing, not a Mac/BSD/Unix/Linux thing.

I didn't mean any slight against GNU/Linux; I use it every day (and I don't mean on a phone or tablet either). But I also have used Macs for stuff that works better on a Mac, and Windows for stuff that works better on Windows. There isn't a "Best OS" period, because every use case is different. There's only "best for the job at hand".

Re: Hacker's Guide to Setting Up Your Mac

#72
post #6

Step 1. Install linux

I get the joke, and it was the first thing that popped in my head too. But in all seriousness, OS X is Unix as well, and can do pretty much any Unix based task that GNU/Linux can. Sometimes the best tool for the job is the one you already own.

The biggest problem I had with Mac OS X was it's user space unix tools. Everything GNU is ancient from before GPL3, everything BSD is crazy ancient from FreeBSD 5.. it's pretty awful.

Thus why macports for me was king. HomeBrew tried to hard to not replace your user space, though I haven't looked at it in a long while. I'm on Linux everywhere now.

Re: Hacker's Guide to Setting Up Your Mac

#73

You still have to replace /bin/bash and /bin/sh binaries, even after doing a `brew install bash`. ...right? `brew install bash` will just give you /usr/local/bin/bash, and then use that as your interactive shell.

No, you change your user shell to the shell you want. You can do this in the "Accounts" preference pane by control-clicking a user, selecting "Advanced Options" from the context menu, and changing the "Login shell" setting to your preferred shell.

  #!/bin/bash

Re: Hacker's Guide to Setting Up Your Mac

#74

The next thing you should do is update the unix tools you already have on your mac. This is more relevant than ever since the recent "Shellshock" debacle. How many developers are launching bash scripts with environment variables defined by third parties?

not to mention that many scripts & apps often hardcode the system bash (i.e. /bin/bash) so they won't use the homebrew version

Re: Hacker's Guide to Setting Up Your Mac

#75
post #73

Earlier quoted context omitted.

No, you change your user shell to the shell you want. You can do this in the "Accounts" preference pane by control-clicking a user, selecting "Advanced Options" from the context menu, and changing the "Login shell" setting to your preferred shell.

#!/bin/bash

That should be #!/usr/bin/env bash, particularly for BSD which does not install bash in /bin. Nothing new about absolute executable paths being non-portable, #!/bin/bash is as bad as #!/usr/bin/python.

Re: Hacker's Guide to Setting Up Your Mac

#76
post #42

I do not wants to flame, but is there a reason people dislike Macports so much. I tried Homebrew when it was 1-2 years old, but stuck with ports bc it was so stable, compiles from source, and I never heard a serious problem. I heard the opposite complaint on the net, but almost all Macports hate was from many years before. I am the only one who chose not to rely on Homebrew!?

People don't really dislike Macports, they just like shiny new things on github.

Re: Hacker's Guide to Setting Up Your Mac

#78
post #42

I do not wants to flame, but is there a reason people dislike Macports so much. I tried Homebrew when it was 1-2 years old, but stuck with ports bc it was so stable, compiles from source, and I never heard a serious problem. I heard the opposite complaint on the net, but almost all Macports hate was from many years before. I am the only one who chose not to rely on Homebrew!?

I would think you can't find recent Macports complaints because nobody uses Macports. I didn't even realize it was still being updated at all. I stopped using it many years ago because it was frequently long out of date and broke in ways that I found impossible to fix without wiping everything and starting over. I switched to Fink, which broke occasionally but I was usually able to rescue it without too much hassle.…

Huh. I had no idea. I've been using MacPorts for what must be a decade, or close to it. Tried Fink a few times, never had any luck -- but never had a reason to find anything new (brew). I guess the Ports versions of everything I use are "good enough". If it ain't broke, and all that.

Re: Hacker's Guide to Setting Up Your Mac

#79
post #42

I do not wants to flame, but is there a reason people dislike Macports so much. I tried Homebrew when it was 1-2 years old, but stuck with ports bc it was so stable, compiles from source, and I never heard a serious problem. I heard the opposite complaint on the net, but almost all Macports hate was from many years before. I am the only one who chose not to rely on Homebrew!?

I prefer Homebrew over Macports, because the Homebrew default is to use the stuff your system already has. Macports always wants to pull in (newer versions) a bunch of stuff that's already in OSX.

There's benefits to both approaches. However, I really only need a few extras on my OSX laptop, and I don't really want to end up compiling dozens of extra stuff just to get the latest version. Sometimes I want to force that new version, but only if there's specific functionality I'm after. Others really want to get the latest and greatest of everything constantly...

Re: Hacker's Guide to Setting Up Your Mac

#80
post #27

Earlier quoted context omitted.

This is the work of Jonathan Perkin (from joyent): http://www.perkin.org.uk/ It's great. It really is. I never understood why it's not used by more people. Homebrew is simply awful.

Because it's relatively new and Homebrew is simply useful? Would be great if you could elaborate some, maybe I'll be the next convert :)

pkgsrc has had OS X support since Oct 2001.

Source : http://www.netbsd.org/docs/pkgsrc/pkgsrc.pdf

Post reply on HN