Saturday, May 10, 2008

Bash "nohup"s Background Jobs

In the old days, if you had a background job running, and you accidentally killed your terminal window, the job was killed with it. A special command, nohup ("no hangup"), would prevent this; it detached the job from the terminal's process group.

You can still find /usr/bin/nohup, but bash now automatically nohups all background jobs. Try this from a new terminal window:
$ { sleep 20; echo DONE > /tmp/OUT; } & sleep 1; exit
The window will die, but if you look in another window (or, after 20 seconds, in /tmp/OUT), you'll see the backgrounded job continues.

I say this because I still see admonitions to nohup jobs.

Friday, May 9, 2008

Firefox 3.05beta Grayout

My Firefox 3 beta goes gray annoyingly often. Last night, at BLUG, Kevin Fenzi said that it's a bug related to SQLite, and the workaround is to uncheck the tracking of problem sites, in the Preferences menu.

I haven't decided whether to give that a try, or just wait for the upgrade.

I also notice that someone, on the Google Group used to track Gears tasks inside Google, claims to have fixed the Gears/Firefox 3 incompatibility. I'll believe that one when it shows up. I like the idea of Gears, so it's a pity I can't use it now.

Wednesday, May 7, 2008

Patching U-boot: an Excursion Into the Open Source Process

Yesterday, Jim Black had our first open-source patch rejected -- this one to u-boot.

We'd expected it to be rejected, since we don't know what we're doing yet. We're climbing the learning curve.

Our troubles began when we discovered we needed a public ftp site, which the company didn't yet have. (You could argue that our troubles began when we started doing software, but that's too snarky.)

Dean Johnson, our sysadmin, spent some time Monday night getting one set up, and it was down by the next morning. We couldn't figure out why, so we set up another, on a different box and used it to submit the patch. By the time Denks picked it up, an hour or so later, it was down, too.

He asked us to submit the patch via email, and immediately pointed out a variety of style-and-formatting problems -- spaces instead of tabs, lines that are over 80 characters, and so on.

We think we've fixed those, and will re-submit another try this morning. Stay tuned.

Sunday, May 4, 2008

My New, Easy-to-Use, Mac ftp Client

"Can you show me how to do ftp on my Mac?"

That was the question from my pal, Spider, which popped up in my "chat-in-gmail" window yesterday afternoon.

"Sure."

I don't happen to know the GUI Mac ftp clients, but that's no barrier. Just go to the "ftp://" URL in firefox. Works for me.

For her, it hangs.

Back to basics. Let's see if she has /usr/bin/ftp.

"Open a terminal window."

"How do I do that?"

Now she's fumble-fingering things because of time pressure. Turns out she's asking for help in a panic, because she's got to get out the door and she needs to retrieve some publications from the web.

I have a Mac next to me, so now I'm trying everything out before I tell her, so as not to miss any steps.

She has ftp. Good. She can make the connection. Good. She miss-types a few things, but finally gets in. Good. Something's still not working. She's ready to give up.

"Wait," I say. "I know how to do this."

I do the ftp. I attach the files to an email message. I send it to her.

"Thank you, honey," she says, as she prints them and heads out the door.

I think I'll call it jftp: Jeff-tp.

Saturday, May 3, 2008

Github and Lighthouse

Since Git is the new hotness, and all, I needed to start expanding my brain.

One thing I need to do is play with the hosting services that are coming out -- the analogues to CVSDude for CVS/SVN.

There are a couple, so I started with Github, which is hosting Ruby on Rails, the old hotness. Unsurprisingly, their site is built on Rails, and looks very web-2.0-y.

Github boasts integration with both Lighthouse and Basecamp, two services folks might want to use to track defects and other project-related information, so I wanted to give it a shot. I started with Lighthouse, because I'd used Basecamp before.

Mmmf. The documentation sucks. It took a couple of hours of playing to get even the simple stuff to work. You need to set up a post-commit hook, which they provide -- they offer a pair of choices, actually, but I don't yet know the difference. You download the code, install it in .git/hooks/post-commit, and fill in the blanks. But with what? The directions aren't clear at all, either to me or to other folks using them. And, because it's two independent sites interacting, it's not even clear who to ask for help.

The verdict: potentially nice stuff, which I'll try out some more, but certainly not yet cooked.

Friday, May 2, 2008

Git Delta Chains

I've been playing with git, the new hotness.

One thing I've been puzzled by is the packs; they seem to be almost undocumented. Git stores objects, at request and periodically, in compressed form, in packs. (It also looks like it packs before doing transfers among clones.) These packs are indexed, for better access, but it's a standard, space-time tradeoff.

What's explained in even less detail is the delta chains. Some files in the pack are stored as deltas against other files. These deltas aren't history-based, they're just done by-guess-and-by-golly, and how compressed the pack is depends on how much time you give git to generate them.Link

This all sounds cool, but I wish I could find more documentation. If you see any, let me know.

Thursday, May 1, 2008

Hardy Heron Work-Arounds

I got my world clock to work by choosing "Denver" as my location, instead of "Boulder." I suspect it just knows about airports, since there's a list of sub-places for Denver, and they all look like airports. Still, that doesn't completely explain it, since Boulder has an airport, too -- it's just smaller.

Checking Place Windows, to select that compiz-fusion plugin (System->Preferences->Advanced Desktop Effect Settings) fixes the "windows open under the panel" problem.

After a huge amount of unsuccessful hacking, I finally made my desktop box at work completely unuseable. adamk, in #compiz-fusion, on Freenode (IRC), showed me what to remove and install to get the right drivers. "Then reboot and cross your fingers." When it came back up, it all just worked.

Well, except for printing, but that never works. :-) Maybe today.