Entries Tagged 'Mac' ↓

More rbenv notes

My last post on rbenv mentioned some things you need to do to get ruby to build on Mountain Lion. Here are a few more things.

This guy Jacob Swanner didn’t want to use either Xcode or gcc. He just used the Xcode command-line tools, with a CC environment variable, thus:

$ CC=/usr/bin/clang rbenv install 1.9.3-p194
$ rbenv global 1.9.3-p194

That won’t work with older versions of Ruby, however, as I mentioned before.

I noted he is also a Homebrew user. I’m not yet ready to go there, although macports gets more and more frustrating with each OS release. (I’m not alone.) (But that’s a subject for some other time.)

And, for convenience, here’s another Homebrewer’s notes on how to get ruby building again with Mountain Lion

Ruby and Mac OS X Lion

When Apple switched from GCC to LLVM in Xcode 4.2, they made it significantly more difficult for me to run ruby 1.9.2. (What are the odds this will get easier with Mountain Lion?)

I was using rbenv and its rbenv-build plugin to install ruby 1.9.2 and it told me this:

$ rbenv install 1.9.2-p320

ERROR: This package must be compiled with GCC, but ruby-build couldn't
find a suitable `gcc` executable on your system. Please install GCC
and try again.

DETAILS: Apple no longer includes the official GCC compiler with Xcode
as of version 4.2. Instead, the `gcc` executable is a symlink to
`llvm-gcc`, a modified version of GCC which outputs LLVM bytecode.

For most programs the `llvm-gcc` compiler works fine. However,
versions of Ruby older than 1.9.3-p125 are incompatible with
`llvm-gcc`. To build older versions of Ruby you must have the official
GCC compiler installed on your system.

TO FIX THE PROBLEM: Install the official GCC compiler using these
packages: https://github.com/kennethreitz/osx-gcc-installer/downloads

You will need to install the official GCC compiler to build older
versions of Ruby even if you have installed Apple's Command Line Tools
for Xcode package. The Command Line Tools for Xcode package only
includes `llvm-gcc`.

Note: when you install that, it doesn’t (appear to) provide an uninstaller. Instead it says this:

If something doesn’t work as expected, feel free to install Xcode over this installation.

Once installed, you can remove Xcode completely with the following:

sudo /Developer/Library/uninstall-devtools –mode=all

Bummer for me, huh? Mercifully, the GCC installation package doesn’t mess up the llvm-gcc link in /usr/bin/gcc. But that means when I do the ruby build, I need to add:

export CC=/usr/bin/gcc-4.2

Mountain Lion

So I looked at the list of 200 new features in Mountain Lion and … meh.

If there’s a company in the world that they didn’t pick in preference to Google, though, I couldn’t figure out what it is. I mean, really: a feature to let you access Vimeo?

I wonder how much of that linkage is built on APIs where you can connect to other alternative services? I understand that Apple feels threatened by Google (why, I can’t imagine, except their legendary paranoia) and wants to partner with everyone else. (Vimeo!?) But I want to put together a best-of-breed workflow. I don’t want a Safari reading list, I want Instapaper. I don’t want Safari bookmarks, I want Pinboard. But I’ll get what Apple thinks I should have, which means the services that are dumbed down enough for computer novices to use on their phones.

Except when those services are business partners of Apples. Like Facebook. I don’t want or need hooks to Facebook, but I’ll be surprised if any way to turn them completely off, either. I wonder how much of my activity leaks over to Facebook, and how does much does Apple get for selling to to them? (And since when does Apple overhang the market like this? Fall availability? Why wasn’t it ready in time for the general release of Mountain Lion?)

As for iCloud…. I’d love it if iCloud did what I want, though. I’d love to share calendars with my family members. I can do that now with Google Calendar. Apple says I will be able to do it now with iCloud. That would be a welcome improvement. It’s not clear that you can do that with your contacts, bookmarks, notes, and reminders, though.

(That is another problem with all the social-media linkage, as well. The social media sites all want me to have one persona. What good is it if Twitter is linked into everything I do, so long as it’s just one Twitter account? And Facebook won’t even let me have multiple accounts.)

Whatever.

Ubuntu Mono Font

It’s been a fair while since I mentioned my search for the perfect monospaced font to use in Terminal.app, MacVim, and similar apps. But there’s a new contender: Ubuntu Mono. (Click the picture for a bigger version.)

Ubuntu Mono Typeface

(Gruber kind of dismissed the rest of the Ubuntu family, but he agrees the monospaced fonts are nice.)

Photo Manipulation Tools

Here are some of my favorite tools for working with digital images.

Pixelmator. This is my go-to program for digital images, and someday they’ll ship 2.0 and it will be awesome.

Xee calls itself “a lightweight, fast and convenient image viewer and browser.” I agree. The best feature, for my money, is that it lets you losslessly rotate and crop JPEG images. You can do that with jpegtran too, but that’s a command-line tool. Those are great for batch jobs, but image cropping is almost always better done using an interactive GUI front-end.

Acorn is my second-favorite image editor. If Pixelmator wasn’t so darned good, this would be my favorite. Usually what brings me to Acorn is when I need to do something with filters and I can’t figure out how to do it in Pixelmator. The tech support is great, too.

Speaking of filters, I like to goof around with FX Photo Studio, too. MacPhun, the maker, also makes a cute one-trick-pony called Color Splash Studio which is worth the $2 I paid for it.

I also use a ton of different command line tools. I’ll write about those someday Real Soon Now.

Leaving iPhoto

Yesterday I did an “empty trash” command in iPhoto, to expunge 27 thousand photos I’d just deleted. Characteristically, the application hung. Well, it probably didn’t hang. After half an hour, I did a force quit, and on reopening the program and emptying the trash again, it told me there were about 5,000 photos to be deleted. Another 15 minutes wasn’t enough time for iPhoto to clean them up, so I force quit again, broke out a shell in Terminal and did:

$ cd ~/Pictures/
$ rm -rf iPhoto*
$ cd ~/Library/Caches
$ rm -rf com.apple.iPhoto

…which fixed things very nicely.

So ended a 27-month experiment with Apple’s end-user image management software. They also have a “pro” or “prosumer” product called Aperture, and if iPhoto is any indicator, I wouldn’t have it, even gift wrapped.

Between 2001 and 2009, I’d used my own set of tools to manage and manipulate my digital images, but when I got the MacBook, I decided to try iPhoto. That was two versions ago, and the things I disliked with ’09 weren’t fixed in ’10, and there wasn’t any sign they’ve been fixed in ’11 either.

What are those? Primarily two things:

  1. Speed. Or rather, its lack. The software just wasn’t very responsive. Dragging the elevator on a scroll bar felt sluggish, and if that’s not easy, what good is a photo management app?
  2. Noise. Running iPhoto was like playing Flash videos on YouTube: both cause my computer to heat up to where the fan runs. It doesn’t matter what I was doing in iPhoto; I could go away and drink a cup of coffee and it would just start overheating all by itself.

Now, I had some other complaints as well. I don’t need face recognition, and I would like text search, but Apple evidently has the opposite set of priorities. I would love to have uploads to social media sites, but the iPhoto way didn’t win me over at first blush, so I used other tools.

Sometime this summer, I gave up on iPhoto. Since then, I’ve spent my free time copying files out of the iPhoto library and renaming them and filing them elsewhere. I’d like to have tags, but what I’ve learned in 30 years with a Unix shell is that find(1) is pretty good at finding things:

$ find . -name '*whatever*'

for some really tricky things, I break out grep:

$ find . -name '*whatever*' \
	| egrep -i 'one thing|another' \
	| egrep -v 'but not this'

Yesterday, I finished the conversion and (after making lots of backups in lots of places on multiple drives), I emptied the trash in iPhoto. My fan hasn’t run since then.

I also noticed that while those 27K photos took 41 GB of space in iPhoto, they only occupy 38 GB in the filesytem. What was iPhoto doing with the other 3 GB?

Recovering eight or ten percent of a dataset isn’t chopped liver, but the space saving may prove eventually to be even more significant. iPhoto is monolithic. (By default, at least.) You put your files in there, and it’s a huge black box and you don’t need to worry your pretty head about what’s going on inside. But the filesystem gives me all kinds of options about how to manage my image files. For example, I can put different subsets of the data on different media, with symlinks connecting one part with another.

For now, I’ve stored everything in a single master folder. Within that, files are stored by year (2001, 2002, etc.). Within a year’s folder, I typically store files by the month (01-jan, 02-feb, …). Since I take the most photographs when I’m on vacation, I sometimes put vacation photos in their own folder (04-vac, etc.). Finally, I have a separate folder for video files called ‘movies‘. Those files are typically 10x or 20x as big as a photo, but I only have a handful, so I manage them as a collection.

The files themselves are typically given descriptive names (accident-minivan-01.jpg, home-oleanders-07.jpg) etc. Because I do so much work from the command line, I don’t put spaces in the names. In lieu of a space, I prefer a hyphen (-) to an underscore (_) because it doesn’t require a shift key.

In my next post, I’ll run through the tools I use to manipulate images.

Steve Jobs, 1955-2011

This was my first computer:

Vintage 1985 "Fat Mac"

The 512 kB “Fat Mac.” With an ImageWriter, Microsoft Word and Multiplan (the predecessor of Excel), and MacPascal, it set me back about $2,500. That was 1985 money, so it would be somewhere around $5,000 today.)

I was living in Albuquerque and my roommate, who drank deep of the Kool-ade, had been so affected by Ridley Scott’s 1984 “Big Brother” commercial that he ran out and bought one of the original 128 kB Macs. (If I recall, he bought some Apple stock too. I wish I’d done that when I bought my second Mac, an iBook, in 2003.)

Anyway, a couple of years later, I was working at Bell Labs in New Jersey, and Steve Jobs wasn’t working at Apple any more. He came to Murray Hill to give a presentation of the NeXT computer. I didn’t work at Murray Hill — that was the real Bell Labs, where they got Nobel Prizes in Astrophysics and worked on slug brains. I just worked for AT&T’s R&D unit. But I got to see the presentation way down in South Jersey via the magic of teleconferencing.

By today’s standards, NeXT mail wasn’t all that hot: it was basically email with MIME attachments. But I don’t think he was trying to sell Unix workstations to Bell Labs. (Who would be stupid enough to give up a 3B2 with a BLT running Plan 9 for a mere NeXT box? Ahem. Although, to this day, I’m not personally convinced that email improved when it grew to include anything beyond ASCII text.)

What Steve was doing, I think, was giving AT&T some (desperately-needed) business advice. I admire his chutzpah: a kid in his 30′s, who’d just been sacked by his board, telling AT&T how to do business. But that’s what he was doing.

He was telling them that AT&T Mail was a disaster, particularly compared to what he was selling. But more than that, he was telling them to stick to their core competency. Instead of chasing him (or ignoring him and Inventing-It-Here, as Bell Labs was, ahem, wont to do), he said that AT&T should sell him connectivity. Just give him pipes to move his bits around, that’s what he wanted.

People talk about Steve’s “reality distortion field.” But that day, nobody was buying what he was selling.

That’s a hard message to sell to companies like AT&T. There’s some weird virus that infects marketing people at telecoms that makes them think it’s possible to add value to every bit that passes through their network. Indeed, that it’s not only possible, but their company is also capable of doing it!

Yes, yes, it’s a preposterous notion, but nevertheless, telecom marketers are all infected with it. Twenty-five years later, they still have it. They just can’t stand the idea of simply doing their core business well. They’re terrified of becoming a commodity.

Steve Jobs wasn’t worried about becoming commoditized. None of the businesses he built into category killers are commodities. Pixar is head and shoulders above everyone else in the business. The Mac stands out and commands a price premium in a world of commodity computers. Ditto the iPod, the iPhone, and lately the iPad.

Business is infected with the opposite approach. One of my managers at Bell Labs told me to quit improving a piece of software this way: “You’re polishing a turd.” Steve Jobs knew that you couldn’t make a great company by shipping turds, so he kept polishing products until there wasn’t anything turdlike about them.

Good for him. It will be interesting to see if anyone learns the lesson.

MacPorts tip

I started getting messages when I tried to update my MacPorts tools. I can’t say when it started, because I don’t do it very often. (Like maybe once a month. Bad me.) But it would bomb out, telling me

Error: checksum (md5/sha1/rmd160) mismatch for port.

Then it sent me down a wrong path, suggesting it was because my ISP’s DNS was serving ads or something. But it turns out the why isn’t important, because the what to do about it was right there in the FAQ:

$ sudo port selfupdate
$ sudo port clean --dist {portname}
$ sudo port install {portname}

All I had to do was clean out the bad portfile and try again.

Smart Playlists Just Got Dumber

I mentioned recently how handy it can be to create complex “Smart Playlists” in iTunes. Suppose you want to make a smart play list like this one:

iTunes offers boolean logic for constructing Smart Playlists.

It says the songs in this new playlist have to be “My Non Dogs.” (My Non-dogs is another playlist that includes songs that are either unrated or rated 3 stars or above.) But besides not being dogs, this playlist’s songs also need to be performed either by David Byrne or by the Talking Heads. In other words, iTunes gives us a friendly way to construct a query using boolean algebra.

Prior to iTunes 10.4, that was easy enough. There were little buttons at the end of the pane. A ‘-’ button deletes the rule; a ‘+’ button adds a new rule; a ‘…’ button makes a rule with multiple conditions, as above:

iTune's old '...' buttons

The problem is that iTunes 10.4 got rid of the ‘…’ buttons:

iTunes 10.4 no longer has '...' buttons.

Smart playlists can still use boolean algebra: all my old lists still work. The only problem is trying to make a new one. How do you push a button that’s not there?

The answer is to hold down the option key. Then the ‘+’ buttons become ‘…’ buttons:

In iTunes 10.4, hold down 'option' to turn the '+' buttons into '...' buttons

I should point out that taking a screenshot is a lot more difficult when you’re holding the option key. The only way I could figure out to do it was by doing a “Timed Screen Grab” using the Grab utility:

The 'Grab' utility is located in '/Applications/Utilities/Grab.app'

Dragon Dictate 2.5 – not interested

I won’t be taking advantage of the offer I was emailed today, announcing the opportunity to spend $100 to upgrade from 2.0 to 2.5 of Dragon Dictate.

I like that software, I truly do. In five or ten years it will be awesome, and everyone will use it, or something like it.

But today, using it can still be intrusive and clunky. (See my list of complaints here.)

But the real problem is that the company is simply insane with their pricing. For doctors and legal people, they have specialized products with even crazier pricing. But for ordinary people like me, I’m sorry, I quit. It just costs too much.

Take this release. (Please!) It’s a hundred bucks to upgrade. With the exception of the Microsoft Office Suite, I can’t think of a single product I use that costs over $100, brand new. The idea of an upgrade costing $100 is insane.

But maybe if it’s a really impressive upgrade? Like, from 2.0 to 3.0? No. A hundred bucks is still too much. And, frankly, I never saw that much improvement using Dragon 2.0 over MacSpeech 1.5, so I’m not even sure about major version upgrades. Maybe things improved for them, but for me, none of the changes I did see were improvements.

Besides, this isn’t 2.0 to 3.0. They call it 2.0 to 2.5, but there never was a 2.1, so calling it 2.5 is a feeble attempt to make it seem like a more major upgrade than it is, while admitting it really isn’t much of an upgrade. But Nuance or MacSpeech or whatever they were then pulled the exact same stunt with 1.5 just a couple of years back. “Fool me once…”

But version numbers are just marketeer’s puffery. What new features does it provide?

Supposedly, it gets in your way less than the old version. They now recognize that people use their keyboard and mice even when operating voice recognition software. Good for them. That’s a 2.1 feature if I ever heard of one.

  • Better integration with Microsoft Word 2011? That’s a 2.01 feature.
  • Using an iPhone as a remote microphone? Generously, a 2.1 feature.
  • Social media commands? Puh-lease.
  • Better auto-formatting of dates, numbers, etc.? 2.01.

Ah, but now, at last we come to the real reason they want me to upgrade: it doesn’t support Mac OS X 10.7 “Lion.” Whiskey-tango-hotel? That’s not a reason to buy an upgrade. It’s a reason to flood their tech support lines demanding a fix.

(Note: the ArsTechnica story says it’s a free upgrade to 2.0 users. Not so, according to the email I got from Nuance.)