Rick Swift & Apple & Embedded I make things. Sometimes, I’ll talk about it here.

My Gorram Frakking Blog

TextWrangler & BBEdit as External Editor

I use tools like Perforce and Subversion on a daily basis. I'm a Mac user at heart, and I hate tools like vi and emacs. However, Perforce and Subversion both use external editors like vi and emacs to allow the user to change things, namely checkin comments.
Well, BareBones Software has a pretty decent little text editor called "Text Wrangler" that comes with a command-line utility edit to make it easy to use TextWrangler from the command line (they also make BBEdit, TextWrangler's commercial big cousin). Invoking edit (use "bbedit" when working with BBEdit) all by itself launches TextWrangler. Specify a file name and TextWrangler opens that file, allowing you to edit it with a proper Macintosh user experience.
But, edit can do much more, including this: if you invoke edit -w <file>, it will open that file in TextWrangler, and block until you close the window! (I've tried this before using Apple's open -a command, but it immediately returns, making it useless.) This means you can use edit -w in the external editor configurations in Perforce and Subversion. And, if you add --resume to it, it will return to the Terminal.app after you're done editing. This may not seem like much, but it's more than any other non-CLI Macintosh text editor has been able to do.
Note: Chris Cotton tells me that TextMate also supports this usage.
Basic configuration for most UNIX tools is to set the $EDITOR environment variables (like this in bash:

EDITOR=edit -w --resume
export EDITOR

Read on for alternative information on how configure these tools.


To configure an external editor for Perforce, you can also set the $P4EDITOR environment variable.
To configure the external editor for Subversion, modify your ~/.subversion/config file to include this line:

editor-cmd = edit -w --resume

See the Subversion Book for more information on setting external editors.

Stamps

Being a fairly wired (and wireless) kind of guy, I rarely send out snail mail. I use the web, email and IM whenever I can, and I use an online bill paying service. Hence, I rarely need stamps. I used to alway ask someone for a stamp, and inevitably they refuse the dollar I offer in exchange (lacking change but considering my time to go buy stamps more valuable).
But I finally got to where I have a small book of stamps in my wallet and another on my desk. Now the problem is that I use them rarely, and often have old stamps after the Post Office hikes rates.
Instead, The Post Office should issue stamps for first-class mail with some kind of code, rather than a price. Something like FC-1, -2, -3...etc., incremented each time new rates are effected. I think they already do something like this, but in addition, they should honor older uncanceled stamps as valid for first-class letter delivery, rather than for their face (or book) value. I mean, I paid for some number of first-class stamps, I should be able to use them without having to get extra stamps, just because I don't mail that often.
Now, I'm happy to have the stamp revert to it's monetary value when I combine it with other stamps. But they've gotten to use my money since I bought them, money that could otherwise be earning me interest. So, I figure they owe me the delivery of several first-class letters.

NASA Flies Again

A stunning and awesome return to flight liftoff at 7:39 AM, PDT. STS-114 couldn't have asked for a more beautiful day for a more perfect launch. Plus, the new cameras made for some kickass views!
Congratulations to NASA and to the thousands of people who helped make it a success!

Improved Motor Platform, Assembled

Okay, so I lack focus. Too many projects. School and work, whatever. I’ve finaly gotten most of the parts for the new base constructed. I used EMachineShop to make the motor mount brackets, and found EPPCO, a local Berkeley machine shop, to do the axle block.

Assembled base three-view Assembled base overhead (actually underneath)
Assembled base three-view Assembled base overhead (actually underneath)
Assembled base side view Drive train closeup
Side view Drive train closeup
Drive train overhead
Drive train overhead view

I got in!

Finally! Woo-hoo! Awesome! My application to transfer from U.C. Berkeley's College of Letters and Science into the College of Engineering was accepted.

Interestingly, they wanted me to accept the admission (like I'm going to say "no"...)!