Archive for the 'Macintosh' Category

MacHeist Has Started Season #2

December 8, 2007

MacHeist has started again. I’m sure it’s a sign of immaturity that I love this so much — I never even use the loot that I’ve downloaded. But I find the puzzles terribly fun and distracting in the best way. The best puzzle of this type that I ever played was the Python Challenge, which I did several years ago. Very much the same spirit as MacHeist, with perhaps not as well developed a backstory, but which allowed me to continue my Python obsession, and learn some things about the URL and graphics handling that I would have never picked up in my day job.

Platypus: Macintosh Unix/Python/Ruby/etc scripting with pretty icons

November 21, 2007

One of those toys that I keep telling myself I need to do more with is Platypus, which is a development tool that wraps unix/python/ruby/whatever scripts in pretty icons, complete with drag-and-drop and other snazzy bells and whistles. This is one of those things that is easy to do a bad job of, but hard to do a good job of, and they’ve done an exceptional job of writing a complete framework. There’s a posting here that’s a good starting point.

One thing I wish Platypus had was better support of dialog boxes in the scripts; they currently  require CocoaDialog, which seems like a hack to me, and probably more trouble than it’s worth.

Linking to Macintosh’s BLAS/LAPACK

January 30, 2007

Here’s how to link to the Macintosh’s optimized BLAS/LAPACK routines:

-Wl,-framework -Wl,vecLib

Tips for porting to Macintosh OS X

August 30, 2006

Here are my two favorite links for porting to OS X

Gotchas When Porting Unix Software to OS X

Compiling Applications on OS X

I refer to these pages all the time when I trip over bumps in the road.

Creating a new Python command in TextMate

August 27, 2006

I’ve been playing with TextMate for all of about one day, and already I find I’m proficient in it to start writing my own extensions to the Python bundle that comes with the editor.

There’s a neat command in the Ruby bundle that evaluates a line or a selection and inserts the result as text. I wanted something similar for Python. Here’s what I did:

First, I went to the Python section of the Bundle editor and created a new command, which I titled Execute Line/Selection as Python. In the editor for that command I typed the following:

#!/usr/bin/env python
import os
from code import InteractiveConsole

console = InteractiveConsole()

region = os.environ.get("TM_SELECTED_TEXT")
if not region:
    print "n"
    region = os.environ.get("TM_CURRENT_LINE")

console.runcode(region)

That’s all. Everything seems to work thus far. What I find amazing about this is that I’ve been using Emacs for 22 years now, and I’ve never done anything anywhere near this sophisticated, despite having learned elisp for the expressed purpose of hacking Emacs. And yet in less that 22 hours I’ve already expanded the environment.

I’m also writing this in TextMate, of course. I really love Emacs. The first thing I did in my undergraduate research group was learn Emacs. The first thing I did in my graduate research group was to install a good version of Emacs. The first thing I did in my postdoctoral research group was to install a good version of Emacs. By the time I got to my own research position, Emacs was bundled almost everywhere, and I use it almost nonstop. TextMate is the first editor in years that has made me think twice about Emacs. And after only one day. Wild.

Getting Absoft’s Fortran to link to its own Blas

August 15, 2006

I just had an amazingly difficult time getting Absoft’s f90 compiler to link to the version of Blas that they distribute with the compiler. Here’s what I had to do:

1. I had to compile with the options -B108 -YEXT_NAMES=LCS. The former appends an underscore to the compiled object names, and the latter translates the object names into lowercase.

2. I then just linked as normal, with the Absoft blas, via -L/opt/absoft/lib -lblas

Waiting for gfortran to get stable with baited breath…

Desktop Linux

February 15, 2004

After reading stories all year about the ascendancy of desktop linux all year, this story about IBM’s plans to port MS Office to linux is one of the first that I think justifies the desktop linux hype. It is clear that to co-operate with other users, MS Office is essential. Alternatives like OpenOffice, though improving and interesting, simply are not viable yet for most non-nerd users. This is why the IBM move is a significant one. IBM has the business acumen and the corporate infrastructure to pull something like this off. I think with a real MS Office port, desktop linux is a real possibility for most computer users.

That being said, Macintosh OS X already has a compatible MS Office, and it isn’t exactly taking over the desktop market, despite a look-and-feel vastly superior to either Windows or any of the Linuxes. I’ve been using OS X for years, and find it satisfies my Unix hacker side and my make-my-manager-happy side with ease and finese. I think functions like NetMeeting (still missing on OS X) might need to be included for a real business user to contemplate switching, tho’.

But it’s an important step, maybe the most interesting news on alternatives to Windows since Apple bought NeXT and brought Steve Jobs back into the fold.