Thursday, November 30, 2006

The power of regular expressions

So I needed to change every one of our ACE #include preprocessor macros that was globally scoped to be locally scoped.

In other words, every reference such as:

#include <ace/foo.H>

needed to be converted to:

#include "ace/foo.H"

There were about two hundred of them spread across 430 files.

Ah, the power of regex:


sed -i '/^#include <ace/s/[<>]/"/g' *.cpp

Tuesday, November 28, 2006

HP-UX build working

Left the office at 11pm. Got the code to build under HP-UX. Tomorrow will try it out and see how badly it crashes.

Fun fun.

Off to bed.

HP-UX is annoying

Spent the day porting code to HP-UX 11 on Itanium. Discovered this little gem that was causing compilation failures all over our code:

The following code is not legal under the latest revision of the HP aCC compiler:

int main()
{
for (int i = 0; i < 5; i++) {
   // Do something
}
for (int i = 0; i < 5; i++) {
   // Do something else
}
return 0;
}

In their infinite wisdom, they decided to intentionally violate the ISO C++ standard on variable scoping, and to do it by default unless you explicitly tell them not to via a compiler switch:

http://docs.hp.com/en/6162/migrate.htm#forstatement

To add insult to injury, they added this functionality intentionally. Their old compiler operated in accordance with the standard:

http://docs.hp.com/en/6162/migrate.htm

VERY ANNOYING.

Today's Perl test

After telling me that "cat is used to look at the last few lines of a file", here is what today's candidate wrote for his Perl implementation of cat:

=======
cat_pl.

File (Open, cat_pl)
While (!EOF)
$print
=======

Uh, ok.

Saturday, November 25, 2006

Weekend in Jersey

After spending Thanksgiving day with Vikki, I met up with the family yesterday and today. Went to Collingswood market today with Mom; picked up thermals for the Vermont trip.

Met up with Jen and Jayden this afternoon. He is growing up so fast.

It turns up House's Hugh Laurie has a very noticable English accent in real life, which I guess is just testament to him having a very good fake American accent.

Planning on painting the kitchen tomorrow. I just want to be rid of the horrible green.

Thursday, November 23, 2006

Happy Thanksgiving

Did Thanksgiving dinner with Vikki's family, which went swimmingly. Very yummy pumpkin pie. I didn't even miss the turkey. Ok, that's a lie. I missed it a little.

Staying at Vikki's tonight, and then going to visit the family tomorrow. Will perhaps stay the night there and then come back on Saturday, or will just head back to NYC on Friday night.

Want to see if I can prototype my Perl DGBP debugging extension, which will make life much better for the people writing automation code. Would be a pretty cool thing too.

Ah, the smell of a wood burning stove.... It's a good thing.

Off to bed.

Thanksgiving

Going down to New Jersey for Thanksgiving to spend it with Vikki's family.

Found some new bugs in MythTV relating to the way remote control buttons are mapped.

Did some work with HP-UX on Itanium earlier this week. As UNIX distributions go, it's pretty annoying.

Need to get packing now...

Tuesday, November 21, 2006

The Military: A Renewed War Over 'Don't Ask, Don't Tell'

From this weeks's Newsweek

http://www.msnbc.msn.com/id/15790419/site/newsweek/

But making a change won't be easy: gay-rights advocates have seen a troubling signal from the Pentagon. Massachusetts Rep. Martin Meehan and the American Psychiatric Association complained last June when they learned the military's disability policy classified homosexuality as a mental disorder—something the APA stopped doing in 1973. Then the Pentagon quietly reclassified it in July. Last week Meehan and the APA complained once more: homosexuality has now been grouped with other "conditions, circumstances and defects" like bed-wetting, repeated venereal-disease infections and obesity. The reclassification is "even worse," says Aaron Belkin, who studies gays in the military at the University of California, Santa Barbara. "Now [homosexuality] is explicitly deemed to be a defect." Pentagon spokeswoman Cynthia Smith says the Defense Department does "not think homosexuality is a mental illness" and says the classification could be re-examined.

This just makes me angry.

Tuesday, November 14, 2006

MythTv work continues

Made a good deal more progress on getting my MythTV to work. Combining crap lying around my apartment with crap lying around Dan's apartment, I successfully got a PC together that works with the TV-out feature of the video card I picked up.

Got it hooked up to the TV and the cable box. Can now watch TV using this Frankenputer. The only real issue remaining is getting the IR blaster to properly change the channels.

Looks like the root of the segfault I was seeing over the weekend was in fact a result of running at 1024x768 resolution. I dropped it down to 800x600 and the segfault went away. So I successfully worked around the issue, but there is certainly something going on there worth looking at.

Sunday, November 12, 2006

Fun with MythTV

Still waiting for the video card for my MythTV setup. FIgured I would get everything else working so I would be able to just drop in the card and go.

What a pain in the ass.

Turns up the widescreen monitor is a weird resolution and isn't recognized by the KnoppMyth distribution I was using. And it didn't fail gracefully, it just put the monitor in an "screen doesn't support resolution" error. Hacked at the XF86Config file and got it working. Found out that because I didn't have the PC plugged into the ethernet when I installed the distribution, that half the installation process didn't get run (failing silently but telling me the installation was complete). This left me debugging various problems with the configuration as to why I couldn't get sources configured and why the card wasn't setup to do DHCP. Once I discovered this I reinstalled the whole thing and found a bunch of new configuration menus to choose from.

Things got better from there. It recognized my Hauppauge PVR-150 card and already had the firmware in the distro. The remote also worked out of the box. Gained access to program guide info configured from Data Direct

... and when I hit the "Watch TV" button, I get a picture.

... and then I hit the "Program Guide" button and MythTV segfaults from a double-free error.

Building from source now. My hope is that once I can get a debug build and see a backtrace, I can either quickly fix the problem or understand what is causing it well enough to work around it.

Thursday, November 9, 2006

Company Outing

So the whole company went out this afternoon to see the movie Borat. it was pretty offensive but had some funny parts. A strange choice for a company outing.

Afterwards went out for drinks with Dan and Rob at a sports bar in midtown. Got home a few minutes after 9pm.

Had trouble with my video card order, so it probably won't be here until Monday. Very annoying.

Tomorrow is Friday. Yay!

Wednesday, November 8, 2006

Wednesday

Met up with Carter after work tonight. Ordered Indian food for dinner and played some Magic.

Yesterday makes three weeks as a vegetarian.

Found a $24.00 video card for my Tivo replacement on newegg and ordered it.

Looks like the Democrats ended up gaining control of the Senate after all.

Found out tonight that I'm a software engineer dating a woman who failed the only computer class she took in college. Yes, she's a doctoral student in one of the country's most prestigious Psychology programs, but she hates computers. Can we say irony?

Sunday, November 5, 2006

Stupid computers

Spent the weekend with Vikki in Philadelphia, which was nice.

Worked on my MythTV setup a bit tonight. Despite tearing my apartment apart, I couldn't find my old ATI video card with PC2TV, so I'm going to have to buy one (the cheapest card I can find with TV-out). NewEgg has a GeForce 5200 card for $34.00 + 5.00 S&H. It's not alot of money, but I was annoyed that I wasn't able to build the whole thing just with crap from around my apartment. Also annoying is the fact that my sve year old TV has a composite only video input (no S-video), or else I could have saved ten bucks and bought the $25.00 card.

Will ask around the office tomorrow and see if anyone has an old card lying around they are looking to part with.

Thursday, November 2, 2006

Hacking Democracy

HBO ran a documentary tonight called "Hacking Democracy" where they went over how vulnerable electronic voting is. I'm admittedly a bit surprised to see this get mainstream attention. Computer scientists have been talking about this for years, but so far it hasn't gotten anyone's attention.

The best part was when they demonstrated a mock election where they showed eight people cast their votes. Before casting the votes the machine printed a record saying there were zero votes cast. Then 6 people voted no and 2 voted yes. When they then told the machine to tabulate the results, the machine printed out that there had been 1 no vote and 7 yes votes.

In other news, Bruce Schneier reports on the calls for arrest of a man who put up a website that lets you print out boarding passes for Northwest Airlines. Ever hear the expression, "don't shoot the messenger"?

http://www.wired.com/news/columns/0,72045-0.html?tw=wn_index_4

The whole thing just makes me angry.