links for 2007-08-31

Making Cygwin and Windows cooperate

Cygwin uses a different path scheme than Windows. If you use a Cygwin shell with Cygwin programs, then everything works well. But if you use a Cygwin shell as your default shell (which I do, because face it, cmd.exe sucks) and you’re running non-Cygwin programs, you can run into trouble because the shell may send Cygwin-style paths for filenames to Windows programs that don’t understand them.

For instance today I was using a Cygwin bash shell with a non-Cygwin Perforce client (i.e.: “p4”).

$ p4 open foo.cpp 
Path '/cygdrive/c/dev/project/...\foo.cpp' is not under 
client's root 'C:\dev\project'.

p4 is a regular (non-Cygwin) program and thus it doesn’t understand the Cygwin path that gets sent to it.

One way to fix this would be to find a version of p4 that was compiled against Cygwin.

Another way is to use the cygpath command to convert the Cygwin path to a Windows path.

$ p4 open $(cygpath -aw foo.cpp) 
//depot/project/foo.cpp#2 - currently opened for edit

The -a option tells it to generate an absolute path and the -w option tells it to convert from a Cygwin path to a Windows path.

If there is a God…

I certainly hope that he is spending his time on better things than personally intervening on behalf of Big Brother contestants.

That’s the thought that I have every time I watch another Big Brother contestant pray to God for help in staying in the game.

I’d like to think that God prioritizes peace in the Middle East, stopping violence in Darfur, and well, heck, just about everything else, over helping some random person to win $500,000.

While on the topic of Big Brother theology, has anyone else noticed that in the current season, Amber’s prayers to God often include the oddly recursive phrase “God bless you”.

It’s fun to work out at the Y.M.C.A. (Part Deux)

A little while ago, Ryan posted about some positive lifestyle changes, including a lot in the realm of health and fitness. His post is part of the inspiration for this one. There’s even a bit of a tip of the hat in the title. He named his for a Michael Jackson song — I went a little further back to The Village People.

Well, Nicole and I have been working on our fitness. We joined the local YMCA in March and we go there several times a week to do cardio and weight training. We also walk around our neighborhood a lot and typically each weekend we do a 1 to 2 hour bike ride on the Coyote Creek Trail.

Also, we’ve been eating a lot healthier, mostly inspired by Dr. Mehmet Oz and the book he co-authored: YOU on a Diet.

Last week I reached a couple of milestones. First, I reached 15,000 “FitPoints” on the FitLinxx system that the gym uses. For reaching this milestone, I got a towel. A towel is not terribly exciting, but it’s a symbol of progress. And then there is this most surprising (in a good way) chart from the FitLinxx web site:

FitLinxx #2

Also last week, I did a mile in 11:13. OK, this isn’t the most impressive time ever, but for somebody who struggled to eke out a 15 minute mile in high school, I was pretty happy. And if I’m happy with my progress, I’m more likely to continue, so it’s all good.

I’ve lost about 12 pounds — not bad. I lost a few percentage points of body fat as well, according to our Tanita TBF-622 scale.

Good luck Ryan! And to anyone who is considering getting themselves into better shape, go for it.