Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
2011 Rubyist’s guide to a Mac OS X development environment (thoughtbot.com)
130 points by bradly on Aug 9, 2011 | hide | past | favorite | 27 comments


Having a standalone GCC installer is a nice option (especially if you have an Air with limited disk space), but if you want to avoid the hassle of debugging the occasional compilation failure, Xcode is the way to go.


Just a note about GCC/XCode on Lion (esp. if using homebrew):

The default GCC installed by Xcode is no longer GCC you expect it too be, it's actually a hybrid of LLVM and GCC

/usr/bin/gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1

A non-hybrid version in installed at:

/usr/bin/gcc-4.2 --version i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1

It's a rather important change to GCC on mac, it even broke `brew install mysql` for awhile:

https://github.com/mxcl/homebrew/issues/6277

Some great hackers found out it was linking to Apple's internal pthread library.

Code-softly hackers.


It also breaks building GCC due to an LLVM issue (it gives a nice internal compiler error). It's fixed in LLVM upstream, but nothing Apple ships yet.


The 4GB download when all you actually want is GCC is also pretty painful.


Does anyone know of a site that collects these sorts of stories? I was recently looking to set up an environment to start experimenting with a new language and I have the ability to do it on ubuntu, os x, or windows 7, but I had trouble finding advice on the tradeoffs of them, beyond the stereotypical "use linux!" type stuff.


Any word on homebrew installing gcc?


There's always Kenneth Reitz' GCC-without-XCode installer[1].

[1] https://github.com/kennethreitz/osx-gcc-installer


Man, I was looking for something like that just a few weeks ago, and somehow completely failed to find it.

The exact phrase I sued was "install GCC without XCode", which turns up, not the project, but a bunch of stackoverflow questions asking whether such a thing is possible. Most of the answers are pessimistic or involve copying it from installation CDs that didn't come with my Air.

The first result now has the correct answer, but said answer is but a few days old! :)

Thanks!


Just too bad 2011 OS X is hurting even more than ever for a competent programmers editor. TextMate is dying by inches and it never really had the powers of the Unix ones anyway. As for BBedit, it's pretty much a HTML editor with syntax highlighting for some other things. You might as well use Dashcode.

Yeah, Emacs blah Vim bleh, but those are not really OS X editors. I do be using Emacs, but I crave real Mac-iness and integration.


Alloy's MacVim fork aims for better OS X integration: https://github.com/alloy/macvim

You're not going to get a better editor than vim or emacs. If you really refuse to learn either, there's always SublimeText 2, which is in beta right now. It's what most imagine TextMate 2 would have been (and yes, I'm aware that TM2 is being developed, but it's nothing more than vaporware to me at this point).


I have no problems with the current MacVim and I like that it isn't "better integrated". I would rather it work the same on every platform that I use it on.


Sublime Text 2 is hot. It's already gotten some Lion updates like Lion scroll bars and full screen support.

It's cross platform (Windows, Linux and Mac), but still feels excellent on OS X.

http://www.sublimetext.com/2


I really like Sublime Text 2. My only complaint thus far is that in order to change colors in themes -- in my case, I only change the comment color in Monokai Bright from grey to green -- you have to find and manually edit the config files. Which, honestly, is pretty easy. I like the fact that I can use it both at work on Win7 and at home on my macs.


It's interesting, but my hands keep trying to use emacs key bindings. Unfortunately, there are no pre canned settings and I didn't want to spend the time making an emacs binding override.


It took awhile to warm up to but I think I'll be finally purchasing my license once the next update rolls along.


I felt exactly this way until a few months ago when I tried Sublime Text 2. Love it; keeps getting better every build (which actually happen quite frequently).


Just too bad 2011 OS X is hurting even more than ever for a competent programmers editor.

Seriously? Mac OS X has the best of both worlds: vim and emacs come pre-installed and we have the best of the GUI editors like BBEdit, TextMate, Espresso, SubEthaEdit, Fraise, Vico, etc.

As for BBedit, it's pretty much a HTML editor with syntax highlighting for some other things.

BBEdit kicks ass. Yes, it has great HTML tools(http://www.barebones.com/products/bbedit/benefitsstandards.h...) which were updated and enhanced recently in version 10 (http://www.macworld.com/article/161180/2011/07/bbedit_10.htm...). But it can also handle the hairiest tasks you can throw at it. Being a hardcore text editor is great and all; where it has always shined is supporting Mac OS X technologies: AppleScript(http://macosxautomation.com/lion/applescript.html) (scriptable, recordable, and attachable), Automator(http://www.barebones.com/products/bbedit/automator.html) without sacrificing the Unix goodies--it's scriptable using Perl, Ruby, Python, etc. I don't know of another editor that has a document type (Unix worksheets http://www.barebones.com/products/bbedit/benefitsintegrate.h...) just for executing shell commands without leaving the editor itself.

I would put BBEdit's feature set against any editor on any platform.

I have no affiliation with BareBones; just a satisfied customer for many years.


Yeah, bbedit has tons of ways of running scripts and stuff. It just sucks at editing text. It doesn't know how to indent code, or even format stuff like bulleted lists in plain text.

That's the problem with Mac editors, they have fancy sidebars and think opening a directory of files or running a Unix pile is hot stuff, but they're not much better than a text box in Safari at actually editing text.


They're coming now - or at least soon - e.g.

* Vico ( http://www.vicoapp.com/ )

* Kod ( http://kodapp.com/ )

* Chocolat (Alpha) ( http://chocolatapp.com/ )

also don't forget SubEthaEdit ( http://www.codingmonkeys.de/subethaedit ) and Espresso ( http://macrabbit.com/espresso/features/edit/ ).


Honestly this gets me close enough: https://github.com/samsonjs/config/blob/master/emacs#L436-46...

But I haven't used Emacs as my primary editor in Lion yet. In might feel more out of place once apps start supporting restore and all that stuff.


ActiveState Komodo is pretty sweet. Has nice code-completion. File browser on the left pane.


Are there programmers editors for other platforms that are better than what is available on OS X?


brew install emacs --HEAD --cocoa


aquamacs?


+1. I find that Textmate and aquamacs in tandem provide enough coverage for different coding tasks. Also, I find IntelliJ, RubyMine, and PyCharm great when I need auto-completion and a full IDE environment. (Some of my Clojure using friends may laugh, but IntelliJ with the Clojure plugin is my favorite Clojure hacking environment.)

Aquamacs is what I use for all Gambit-C Scheme and Common Lisp coding.


Wow, I do almost exactly the same thing. I thought I was weird cause I don't know anyone else that does it.

But, I get frustrated with clojure in intellij because it doesn't understand leiningen. The clojure repl, for example, doesn't load the dependencies from lein.


If I'm editing in Emacs I often use something else for project wide search. Even TextMate's find-in-project is better than using grep in emacs.

I think a better grep mode could be written but it doesn't exist yet afaik.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: