peteg's blog - hacking - mac

New MacBook Pro.

/hacking/mac | Link

It's been about four-and-a-half years since I bought the last one. I'd been hanging on for Apple to release a machine with the latest quad-core Intel processors, but those got released just before these new models, back in June, and so I am stuck with some earlier year's. (I think Apple might have known that the yields were poor.) What forced my hand was that Isabelle started reliably crashing the old machine, perhaps due to the heat, dust and possibly borderline support for the memory I put in it. Or maybe it did have the infamous GPU hardware bug, despite getting a new mainboard in September 2013.

Anyway, what I give up with the new machine is a DVD drive, which I only ever used to reinstall the OS, and an ethernet port, which I will miss if I ever get back to hacking hardware. Also they have gotten rid of the Kensington lock slot. I now have to use Yosemite, which is not hugely different to Mavericks, so shrug. What I gain is USB3, a superfast SSD, a very sharp screen, and less weight to lug around. I doubt the battery life is going to matter, or the extra ThunderBolt port. So faster, yes, but otherwise pretty much a wash. I do like having a machine where the only moving parts are the keys and the fans though.

Buying the thing was an ordeal. It was quite expensive: $2.5k and another $230 in Illinois state sales tax (I mind paying money to the state less than to the Fed), but amortised over four years it's not so bad ($2 a day). I live quite close to the Lincoln Park Apple Store and figured that if I put enough cash on my Visa debit card, things would go OK. But when I got there I figured what the hell, let's try putting some of it on the credit card. This failed, and the card got totally blocked. They like doing that to me — why they can't just reject the transaction and notify me I don't know. I'm never going to rely on it when I'm overseas. Then the debit card got blocked too, as it has a $2k daily limit. The lady at my credit union told me about that, and said I could go pull another $1k in cash from an ATM. Another two calls to them got it unblocked, two trips to the ATM ($600 limit per withdrawal there) got me the difference, and an intervening switch of sales assistant finally allowed me to pay for it. The machine was brought up from the stockroom three times, by the same girl, to my excruciating embarrassment. They insisted I take my 84 cents in change. This is why I shop online.

After that I spent the whole afternoon sitting in the Apple store reinstalling Yosemite (all for a case-sensitive root partition) and Xcode. Everything comes off the internet now, so it's slow. At home the Migration Assistant took five or more hours to scrape my data off the Time Machine backup. After that, reviving the usual arcana (MacPorts, the venerable perl blogging script, some settings) went far more smoothly than previous times.

Update 2015-08-02: The right shift key ceased to pop back up after mild use. A trip to the Genius Bar at Apple Lincoln Park on Monday 2015-08-03 got it replaced, and we'll see if it's fixed.

Mavericks did not eat my homework.

/hacking/mac | Link

I've been using Snow Leopard for five years now, which is getting on to Windows XP longevity. Having left academia, I just now figured that whatever was keeping me on that tired platform has probably gone to the grave, and moreover Mavericks looks a lot more enticing than Lion ever did. Ergo upgrade.

So far no real problems, apart from new (empty) windows in Chrome interacting in a nasty way with Spaces. I lost my RSS feeds, as I knew I would; there's a widget in Chrome that is somewhat usable but a long way from either Google Reader or the old Mail.app. Conversely the new Mail.app seems a bit faster and less buggy... though it keeps hitting up IMAP servers from a lifetime back. I had to reinstall MacPorts, as always. clang seems a lot faster than GCC. My venerable perl blog script broke, as always. Fast times.

/hacking/mac | Link

Since my MacBook Pro got a new mainboard, and being told that the new Intel CPUs are not much faster (though more power efficient), I decided to upgrade it with 16Gb of 1600MHz DDR3 1.35v memory, for $181.56 from MSY. This old 2011 Sandy Bridge can handle those specs but Apple does not admit it; so far so good though, as my readings of the internet suggested it would be.

Addendum: Mac OS X leaks like a sieve. The purge command reclaims the "inactive" memory that the OS refuses to via automatic means. Looks like I was wrong to blame FireFox for being the fat pig that it is; there's a fatter one hiding behind it. After a purge the system typically has about 10Gb free.

/hacking/mac | Link

My MacBook Pro was playing up; maybe an external disk got frisky, maybe some projector somewhere, I don't know. It's working again after four (4!) visits to the Apple Store. First up: Bondi was totally useless. They reinstalled Snow Leopard and sent me on my way. The CBD store decided the DVD drive was busted, but when it came back it was sicker than before, with scanlines on the LCD and a complete refusal to start. They took a week to replace the guts and it has been OK since. All of this was free under AppleCare; that has about six months to run. I'm not very impressed with the working knowledge of the geniuses. I did enjoy being without it for a week though.

For future reference: my retail copy of Snow Leopard is too stale to boot this machine. The grey disks that came with the machine crashed when restoring the Time Machine backup (!). Fortunately an up-to-date Snow Leopard got things back.

Goodbye VMware Fusion, hello VirtualBox

/hacking/mac | Link

I got sick of VMware Fusion 3.1.3 failing to bring the bridged ethernet interface back up after sleeping, and figured that it wasn't worth $US40 to find out what the newer v4 does on the now near-obsolete Snow Leopard. Time to try out the free/libre VirtualBox that so many people have mentioned.

Well, installing Debian is easier than ever. Configuring the network was quite tricky though, as I have a relatively complex setup. The first adaptor is a NAT interface for talking to the internet. The second is the ethernet bridge that serves TFTP and NFS to the ts7250 ARM board when I'm hacking it, and the third a host-only adaptor so I can SSH into the virtual machine. That all seems to work OK. The bridged ethernet is even more reliable than before: it always comes back after sleep, and the TFTP boot does not time out like it used to under VMware.

... and then there is the USB connectivity: I plug the FTDI-based AVR programmer into the virtual machine so I can make install there. This doesn't work too well with VirtualBox due to this bug, though cranking the number of CPUs down to one does get it to go: I can program the AVR using it. The USB performance seems a bit dire though, and this is one area where they lag VMware by a long way.

I don't know if the graphics emulation is much chop as I use X11 over SSH to (only) run Emacs.

When too much hardware is barely enough

/hacking/mac | Link

Apple continue to ship their MacBook Pros with insufficient memory. I got jack of this thing hitting swap even though it had another gigabyte on my previous MacBook; subjectively it felt worse for the same workloads, maybe because Chrome is a memory pig. (I'm back on FireFox now.) So last Friday I went to MSY to buy a couple of 4Gb sticks. Their price for Kingstons: $42 each. Apple wants $480 for the pair. That is an insane price differential.

MSY (being MSY) only had one in stock, however, and I wasn't in the mood to wait howeverlong. (It is extremely irritating that they don't indicate their stock levels online, or allow online orders. It is also irritating to have to wait for some bloke to pointlessly, endlessly complain about their refusal to give him a replacement/refund when his son couldn't install a CPU properly.) I hoofed it back to the place where mrak got his last time, in the little slice of Tokyo on George St near the tram line. They wanted $60 a stick which was fine by me, and the bloke helped me install it. While prying the underside off it I tipped three of the tiny screws onto the floor, but somehow by the end of our conversation he had recovered all three. I have no idea how he did that.

Thus far I cannot get it to use the final 1.5Gb or so, even with Windows XP and Debian running in VMware concurrently. Thus I can hope it will last a year or so, though I fully expect Lion to eat it when the time comes.

Today I bought what may have been the last two Logitech USB hubs available in a shop in New South Wales, from Myer in Orange, for $36 each. mrak told me ages ago that these things were reliable and I've been happy with the one I got at the time, which is presently hooked up to the BeagleBoard at ANU. The price tag was $60 each but the bloke gave me a hefty discount on the merest suggestion they were overpriced. I am shocked that Logitech has not replaced this classic hub, and that there is nothing else readily available with its reputation for just working.

When too much hardware is not quite enough.

/hacking/mac | Link

Finally Apple released a new MacBook Pro that was worth buying; I'd been waiting about two years for this. Somewhat surprisingly, given Intel's problems with the SATA interfaces on their new Sandy Bridge chips, Apple managed to roll out the new laptops pretty much under the radar and at a time that suited me: NICTA wanted me to pay off my salary sacrifice by the end of March (the end of the fringe-benefits tax (FBT) year, I believe), so I hurried off to the Apple Store at Bondi, where the service was terrible but everything was shiny.

The calculus of which one to buy was pretty easy, as it turned out. The 13 inch ones, which I would be inclined to buy, only have two cores and crappy Intel integrated graphics, and the bottom-end 15 inch one has an ATI/AMD card that is apparently worse than the previous-generation's NVIDIA one. That left the top-end 15 inch, of which I got the 2.2GHz one as I'm not going to miss 100MHz of CPU performance. I was going to get a high-resolution screen and faster hard disk, but they don't do that in the shop, and teeing up a delivery was a bit tricky, being on holidays and all.

It ended up being a lot of cash with the AppleCare and the 8Gb iPod Touch, free with a mail-in rebate. Yep, I got suckered the same way last time, but this time it's free! What could go wrong with that...

Performance-wise this machine smokes the old Core2 Duo MacBook; building my stock Isabelle theory takes about a third of the time, albeit by toasting my thighs. Given that the unibody is (even) more durable than the plastic case, I expect to easily get four years out of this thing. Moreover I can play finally all those games of yesteryear, such as Portal. I think there are a few issues for Apple to iron out yet, though; it's a lot crashier than the old MacBook, perhaps due to immature graphics drivers.

VMware Fusion 3 is a goer.

/hacking/mac | Link

I've been very happy with VMware's Fusion product since their public beta a few years ago, using it mainly to run a Debian instance for Haskell hacking, and Windows for doing my tax. Recently the slow HGFS performance has been a drag while hacking ikiwiki, as git seems to take ages to perform a commit on my Mac home directory mounted under Debian. Fortunately, the unreasonably cheap upgrade to Fusion 3 yields a massive speedup.

Hmm, perhaps I spoke too soon. It seems a bit buggy: HGFS doesn't seem to cope with colons in filenames, of which there are many in the ikiwiki bugs directory.

/hacking/mac | Link

I had my first encounter with an Apple "Genius Bar" today, having been referred to the one on George St in Sydney by the always-helpful staff at CompNOW at UNSW. In brief, the power adaptor for my MacBook was getting dangerous, with the insulation on the wire between the box and the computer wearing through, and sometimes getting quite warm. Apparently these things are known fire hazards.

The genii require booking, and I think I got the final one of the week: 4:45pm on this, a Sunday, afternoon. The machine is still under an AppleCare warranty, so the bloke replaced it on the spot. The CompNOW people said it would take them three to four days to do the same thing, as they had no stock, and moreover would need to hang onto my adaptor for that time.

Everything is bright and shiny.

/hacking/mac | Link

Last Friday I decided to get the MacBook's case fixed again — due to a design flaw the top keyboard panel tends to crack in the bottom right corner. This is probably related to how I carry it around in a backpack. They also replaced (at least) the caps on the keyboard, which are perhaps a part of the same assembly (?).

I also took the opportunity to buy a copy of Snow Leopard from the pushers at CompNOW on the UNSW campus, thinking my poor little MacBook could benefit from the decreased memory pressure. In brief:

I'm slow: a new Carbon Emacs has been out for a month.

The Mac OS X 10.4.11 Upgrade Killed My MacBook.

/hacking/mac | Link

That's a first, a Mac OS X update that screwed things up so badly the MacBook ceased to function. Oh well, I now know where an Apple store is in Hồ Chí Minh City; I went to:

Thuan My Co. Ltd - Apple Authorised Reseller
98 Nguyễn Công Trứ, District 1, Hồ Chí Minh City.
Tel: 84 8 8218936, 8218937
Fax: 84 8 8218937
Email: thuanmy-sales@hcm.fpt.vn

and tried to buy a copy, nay a licence, of Leopard. I'll spare you that story. The "update" function failed to work any magic (or didn't like the cafés I went to), but the "archive and install" thing did the trick. I get the impression that some database in my old 10.4 installation got trashed.

Here are some fix-ups for Leopard from around the net (sorry for the lack of attribution). Let's fix the Dock (make it look more like Tiger's):


defaults write com.apple.dock no-glass -boolean YES
killall Dock

and the transparent menubar (cut and paste this line, then — eek! — reboot):


sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0.63

Time machine claims to have done something but I haven't tried to use it yet. Spaces is clunkier than I'd expect; using an app that sprays windows around like Finder and expecting some kind of mid-90s "raise" functionality is apparently asking too much. The wifi widget on the menubar finally works like what every user of open networks wants it to. Worth the money? Probably not, but heh, anything to get the MacBook back on its feet. That's the last time I travel without a Mac OS X DVD.

Die, X11, die...

/hacking/mac | Link

This whole Unicode fiasco has finally killed X11 as a viable option for me. I wouldn't have thought it was so very hard to provide a complete set of easily-usable Unicode fonts, but there it is.

So, on André's advice, I've switched to:

  • Aquamacs, GNU Emacs with a shiny-happy Mac OS X face. Apart from a lot of minor irritations that come with losing about a decade's worth of XEmacs configuration, it seems quite slick. I tried Carbon XEmacs but it doesn't support Unicode out of the box, and I refuse to spend (more) hours fiddling with it.

  • Terminator, an xterm-alike written in Java, is possibly the best thing ever to run on the JVM.

  • A new bash from MacPorts that speaks Unicode better than the crusty old one that comes with Mac OS X 10.4.x.

Of course I'll still need X11 for sundry old-school things like Isabelle, but there the pain is much less.

So, why Aquamacs rather than a fancy closed-source editor? Well, TextMate crashed on me after about twenty minutes of use — I tried to open a file while saving-as another one, and was madly switching programs trying to navigate the directory tree — and so I recall the cardinal rule of editors: anything less than twenty years old hasn't been tested enough. Whether the (relatively shallow) differences that Aquamacs has to GNU Emacs matter is something I will soon discover.

iPhoto Script Export

/hacking/mac | Link

This thing is magic: one can readily write a little script to (in my case) copy images from iPhoto into a Blosxom-friendly location, and output the requisite tags.

Accessing the Mac OS X paste buffer from the command line.

/hacking/mac | Link

If you have ever wanted to ship data to or from your X11 environment, check out pbcopy and pbpaste. Now, if only X had a sane cut-and-paste model, we'd be home...

FireFox 1.5.0.11 Mac-optimised builds.

/hacking/mac | Link

I'm not a huge fan of the new FireFox (v2.x) for reasons that slip my mind now. Fortunately a kind soul is still cranking out optimised builds for the Mac, sans fancy widgets.

André on Mac OS X essentials.

/hacking/mac | Link
André's been procrastinating about something, and so we all benefit from his list of tried-and-true Mac apps. Hmm... XEmacs-style Meta-/ for Cocoa apps? It's all my Christmases come at once.

iPod Shuffle Gripes

/hacking/mac | Link
OK, I've owned the damn thing for about a month, time to put the boot in. :-) What I like:
  • Unplugging the headphones makes it pause. Perhaps all iPods do this, but my iRiver didn't.
  • The control is much better designed than my old iRiver.
What I'd like:
  • Some audible warning that it's out of juice. The little all-purpose LED glows red, I think, and that's that.
  • A way to delete songs on the player itself, so I can fill it up with random crap and on-the-spot nuke the annoying stuff, rather than having to tediously go through it afterwards in iTunes at home.
What I don't like:
  • The dinky dock. My old iRiver had a standard mini-USB port, which happened to be the same as my Canon PowerShot A75. One cable was all I needed. Moreover I have no way to recharge it without having the iBook plugged in and running — there's no juice on the USB bus when it's suspended.
Ars Technica killed theirs by running a car over it. This program may yet liberate me from iTunes inanity.

Powering the iBook from the car.

/hacking/mac | Link

I trudged all over Sydney CBD today looking for a new pair of Docs and something that would let me recharge the iBook from the car. It seems the old Docs shop on Pitt St Mall has folded, and the joint down George St that for years proudly advertised cut-price Docs has gone for the factory- (China-) direct brand instead. I'd forgotten what a hassle it is shopping on the street.

Anyway, to cut a long ramble short, I ended up buying a "Powertech Plus Cat. MP-3463 3.5 Amp Universal Step-up DC/DC Converter for Notebook Computer" from Jaycar on York St for $40. The sealed-in cardboard says it was made in China and is distributed by Electus Distribution, and I can guarantee you that the cardboard was printed there too. I can't find it in either of their catalogues. There is also a 6 Amp version for those who have something hefty.

It works, with one small wrinkle: the iBook-sized plug adaptor is wired backwards! Fortunately the iBook is up to that game, simply ignoring a reverse-polarity 24 volts. The solution is to wedge the plug adaptor onto the cable backwards. For the curious these Italians have the details, or you can try to figure out what Apple is on about.

/hacking/mac | Link
André pointed out Terminator to me, a cross-platform terminal emulator written in Java. It sounds promising; the only things tying me to X.org are XEmacs, a DVI viewer and xterm.

Easing into the 21st Century.

/hacking/mac | Link
Met up with André in Newtown for a coffee and some lunch, and being the unpaid ambassador for Apple that he is, we ended up in the Apple store on Broadway and I parted with $119 for an iPod Shuffle, a replacement for my venerable 256Mb iRiver iFP-390T I bought in Boston at the end of 2003. I can't see why it needs an on/off switch.