Thursday, February 22, 2007

Build Apache on Vista

It's reported that APR fails to compile on Vista with the latest SDK. This is due to the new macro MCAST_JOIN_SOURCE_GROUP in Vista. The workaround is quite simple:
1. open the generated apr.h;
2. set _WIN32_WINNT to 0x0600;
3. set APR_HAVE_IPV6 to 1 (or there would be a link error with the function find_if_index).

Btw, just got back to Beijing this morning. Well, there's rather a lot of work to do.

Update1: ASF Bugzilla Bug 40398
Update2: APR 1.2.9 on Vista

Wednesday, February 21, 2007

Chinese New Year

Wow, this is my boy. Why is he always that cute:-)

Lanterns everywhere.

The skyline of Haikou (Google Maps).

Wednesday, February 14, 2007

Mercury

There is no messenger service in Vista, and I cannot get notifications from the SVN server by "net send". So I use the HTTP Server API in Vista to build a lightweight message delivery service called "Mercury" for receiving notifications (by cURL, for example) and popping up message boxes. It's quite simple, only about 150 lines C++ code. Here are some notes.

1. ATL is of great help for building Windows services.

2. The model of HTTP Server API 2.0 is more flexible, which requires binding handles to URL groups. Notably, HttpAddUrlToUrlGroup returns the error "access is denied" when running as a basic user.

4. I/O cancellation in Vista simplifies the development of asynchronous programs. I've successfully used CancelIoEx to cancel blocking HttpReceiveHttpRequest in another thread; However, CancelSynchronousIo does not work. I'm still trying to figure out why.

4. Services in Vista are running in a separate session so that MessageBox has no effect for user sessions; use WTSSendMessage instead for notifications.

5. The security model in Vista is interesting and sometimes a little boring; set the appropriate privilege level when registering services or attaching processes in Visual Studio.

Friday, February 09, 2007

The Vista Era Begins

I'm on Windows Vista Now. It took me the whole afternoon to migrate all my files from XP to Vista. All applications run well, and my current code also works on Vista: at least the TLS implementation does not change and even low-level instrumentation is fine. It's awesome. Maybe I'll try the new system features later, especially some I/O improvements.

Sunday, January 21, 2007

Orcas Sucks

It crashed my Visual Studio 2005 and took me another afternoon to restore the system. So maybe that's why it's suggested to install on a virtual machine. The shipped SDK headers seemed not up-to-date with Vista, for there're quite a lot of annotations missed as far as I've looked into.

By the way, the program of NSDI '07 is out, where waikok published a paper titled WiDS Checker: Combating Bugs in Distributed Systems. Congrats!

Saturday, January 20, 2007

Orcas

Orcas (the next generation Visual Studio) January CTP was just released. It took me the whole afternoon to download and find more disk space to install it. I've got little interest in .NET 3.0 development right now, though the new C# features such as LINQ might be attractive. I wish it could be better integrated with Phoenix, especially for the "lost" type information in HIR.

Sunday, January 07, 2007

Start Over

So here is the year 2007.

For the last three months, it is busy and enjoyable. I quite look forward to the subsequent work, which is really challenging and exciting.

I got some time last weekend to review the show One Tree Hill. I've been loving the songs in this show for quite a long time, such as I Don't Want to Be from Gavin DeGraw (the theme song), Overdue from Get Up Kids and The First Cut Is The Deepest from Sheryl Crow, many of which are performed in Karen's Cafe. It is also fascinating that most episode titles are named after titles of songs. I love songs:-)

Well, it is hard to comment about the characters. I do understand Lucas's decision to leave the town and start over at the end of Season 1. In my mind the story ends there. From Lucas's eyes, I can see tiredness: maybe because of either Haley's new life with Nathan or the things messed up with Peyton and Brooke. I cannot really accept some stories in the following seasons such as his disease or Keith's death; their short starting over and immediate coming back is somewhat ridiculous. But it's life, unpredictable and messing.