warning: good weekend ahead
Mood: happy! not sick!
Music: Lordi - "Hard Rock Hallelujah"
Posted on 2006-05-26 09:37:00
Tags: pictures music ruby palmtogooglecalendar links
Words: 500

Already this weekend (starts on Thursday!) has been good - we finished Maraudon last night in WoW, which was fun (despite an infuriating part where Dextra and I (the two people who can rez) died and had to spirit rez and fight our way back. Scary!), and I got a shiny new dagger and orb.

Another good thing - I'm not sure yet, but I think I've solved my work problem...but not in a great way. It's like finally arriving at Disney World in Georgia (the country, not the state), and you're tired but happy you finally got there, and then getting out and realizing that Tennessee (where you started) is really right across the street from Georgia (the country, not the state). And you think everyone is mocking you for taking such a roundabout journey when you were right there, except they presumably aren't. Whee. I think I'll put this analogy to rest :-)

I have a problem...I cannot stop listening to "Hard Rock Hallelujah"! Seriously. Sometimes songs stick in my head so long, it actually makes my stomach hurt (and can keep me up at night). This song isn't there yet, but it's headed that way...

I put up pictures of Stephen's graduation. Next up - pictures from wonderjess's graduation! And then the pictures I will have acquired in the intervening time. Yikes.

Had a breakthrough in the palm to google calendar thing last night.

So the problem I had been having was that, when you connected to start the syncing process, it wouldn't return until it was done, which means that you couldn't poll for status updates. (actually, I guess you could, but then you'd have two connections open at once unnecessarily) So, I tried something like this:


# Create session and return session id to browser
pid = fork do
# Do long-running stuff
end
Process.detach(pid)

Interestingly, this works when you run the script from the command line, but not when you're doing a POST to it! I'm not sure if this is an Apacheism or something. After digging around for a while, I found the solution is to do something like this instead:

# Create session and return session id to browser
pid = fork do
$stdout.close
$stdin.close
$stderr.close
# Do long-running stuff
end
Process.detach(pid)

(Note: this is incorrect. See update here) and this makes everything work well. Except that I'm having some difficulty access variables declared in the pre-fork section inside the forked process. I bet they're getting destroyed or something when the parent finishes. But, on the whole, I'm closer to getting it to work. Yay!


"How to cheat good" (by a college professor). Tip number 8 is hilarious!

Top 50 Places to Have a Beer in America - I was a little disappointed/surprised there were no Texas places in there. (although this is just the places with highest scores on BeerFly - maybe there's some geographic bias there?)

DeLay campaign cites Colbert bit as evidence of innocence...um, wow. After the White House Correspondents Dinner thing, I thought everyone had figured it out!


7 comments

Comment from medryn:
2006-05-26T11:51:34+00:00

I've been to #44!

Comment from wildrice13:
2006-05-26T16:12:10+00:00

I saw that one, and it sounded extremely familiar. Did you post about it on your journal? Cuz I've been to Baltimore exactly once, and I did go to a bar, but it seems quite unlikely that it happened to be the one on that list.

Comment from anonymous:
2006-05-26T12:05:46+00:00

Is there some reason you're forking instead of using a Thread?

Comment from omega697:
2006-05-26T12:11:26+00:00

And is there some reason I wasn't logged in? ;o)

Comment from gregstoll:
2006-05-26T12:18:38+00:00

Because, as is my understanding, when the script ends, all threads are terminated.

Comment from omega697:
2006-05-26T12:28:54+00:00

Couldn't you keep an array of all the threads you have open and then join each of them at the end of the script? Or does the script need to terminate?

Comment from omega697:
2006-05-26T12:30:20+00:00

Oh right. Yes, it does.

Don't mind me...

This backup was done by LJBackup.