Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

perrin (4270)

  (email not shown publicly)

Perrin is a contributor to various Perl-related projects like mod_perl, Template Toolkit, and Class::DBI. He is a frequent speaker at OSCON, YAPC, and ApacheCon, and a contributor to several perl-related books.

Journal of perrin (4270)

Sunday September 30, 2007
06:23 PM

MacOS X is a harsh mistress

[ #34574 ]

When MacOS X came out, combining things I like about the Mac with Unix, I was tempted. But I waited. I figured I'd give them time to iron out the bugs, time for the hardware to catch up to the new rendering technology, etc.

Now that Macs are running Intel chips, I figured I had waited long enough, and I bought one of the new iMacs. It's a really nice machine, and except for some glitchy rendering here and there (tooltips that remain on the screen, for example), it's a solid OS.

However, getting a dev environment that's as productive as Linux has been a real chore. Here are some of the things I've been dealing with:


You don't expect to spend a lot of time fussing with terminals these days. They should just work, right? Well, I first tried the terminal app that comes with the OS. It had broken key mappings for page up/down, which I fixed. It also makes only a really half-hearted attempt to do X11-style mouse paste, which is really irritating since I'm so accustomed to it.

I tried an alternative, called iTerm. It has better mouse paste support, but it has broken arrow key mappings. When was the last time you had to fix your arrow keys on Linux? It's like 1997 all over again.

Both of these seem to confuse my screen session about their terminal capabilities. iTerm does better at showing color (e.g. in man page headings) but both of them cause screen to do its horrific visual bell ("Wuff wuff!") until I manually tell it to use a normal bell.

Text Editors

Everyone seems to love TextMate. I do plan to try it, but it's very unlikely that I'm going to pay $80 for a closed source text editor in this day and age. If you're one of those people who loves TextMate and thinks it's worth the money, I'd be interested to hear your reasons.

I have tried TextWrangler, and found it pretty decent in some ways. I got perltidy wired up to it without trouble, and the SFTP browser is pretty lame, but works. I also like the Emacs key support. However, it has no code folding, and the syntax coloring is pretty weak compared to most Linux editors, like Kate, vim, and Emacs.

I tried Eclipse + EPIC, which is actually better than I expected. Syntax coloring is nice, and it feels pretty responsive. On the downside, I can't figure out how to make a filter for perltidy to work on just a selected region rather than a whole file. I also can't figure out how to get .html files with Mason code in them to switch into Perl mode. And then there's all the project-oriented Java cruft in the menus.

I tried a promising-looking Emacs port called Aquamacs. It's Emacs with keys remapped to normal Mac bindings, and easy-to-use font menus, separate windows for each buffer, etc. It looked pretty nice, but none of the elisp extensions I want to use (tramp, mmm-mode) seem to work with it. I admit to being a novice at this stuff, but I gave it a pretty good try and couldn't make them work.

The Carbon Emacs package from Apple worked great with elisp packages. In fact, it's really nice all-around: good syntax coloring from cperl and mmm-mode, tramp for SSH access, easy perltidy integration. The only real issue I've had with it is how poorly it plays with the rest of the Mac. Copying and pasting something from the terminal or Firefox into it seems to require some tricky incantations. I haven't been able to do it without resorting to clicking on menus. I suspect there's three or more different copy/paste systems happening at once here and they are not playing well together. It also took me a crazy amount of effort to change my font size, which is very non-Mac but somewhat expected from Emacs.

Overall I do like my Mac, but it's disturbing how reminiscent of the early days of Linux this has been. I may resort to running X11 with an xterm and maybe Kate if I can figure out how to get it running. I figure if I have to I can always run a double-boot (or Parallels) with Fedora. If anyone has tips about getting X11 mouse paste to work on the Mac, or taming Carbon Emacs, or getting Kate to run, pass them over.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • As far as editors go, have you tried Active State's Komodo? They just open sourced it not too long ago and I've heard some good things about it: []

    It's built on Mozilla/XUL technologies so if the copy-paste in FF works in OSX, then it should work in komodo too.
  • I too was frustrated by the lack of a good terminal program to replace Windows' SecureCRT, but iTerm finally won me over with its extremely flexible key mappings. Any keys that don't work the way you expect, you can almost surely remap. I also like the ability to move sessions in and out of tabs, and "Send Input to all Tabs" is a great lazy way to handle repetitive tasks.

    For editing, I use the Carbon Emacs builds at [] - many varieties of both 22 and 23 are available. Never had a
  • First I've never learned (or bothered to learn) Emacs ... I was taught by my mother* that if you're gonna learn a Unix editor learn vi cause it's everywhere. Second, I started out using Windows and have always preferred a GUI editor. I don't know why but I like tabs and windows to click on.

    TextMate won my heart because it worked naturally with what I expected and was very easy (for me as a novice) to customize in the few places I wanted more. I can write extension commands in Shell or Perl (or Ruby or Pytho
  • ...were largely on the interface side. I wrote down my accumulated tips [] on the subject, though I don't expect them to appeal to everyone's tastes.
  • I've been using iTerm with good old terminal based emacs and vi and it has been working pretty well. I was using Aquamacs for a while, but I ended up with a desktop full of buffers and found it easier to keep them hidden in iTerm.

    One really annoying thing about running emacs in the terminal is that you have to use ESC for the meta key. But I've been able to trick out emacs using perlnow and an autocomplete elisp ( setup so while there are some nits in the system,