Monday, October 13, 2008

Windows

I hate it. It's ok as a desktop OS but it is horrible to do systems programming for. Why the !@$!*(&@ doesn't it have select() or even WaitForMultipleObjects() for pipes? No, registering events to trigger on overlapped writes is not sufficient. Do you
realize what a horror of unportable code that is, O pig-headed Microsoft? Not to mention excruciating to implement in perl or python.

Nor is there any excuse whatever for a minimum sleep/select resolution of .002 seconds. What is this, 1985? Do I have a turbo button my computer? This server's CPU (just one of 4) can do 500,000 operations in that time. Waitable timers are once again just not useful. If they were so damned easy, you'd have made sleep() use them internally.

Really, die in a fire already.

[Update] ActiveState python makes time.clock() use QueryPerformanceCounter(), so it provides very fine resolution for wall clock time. This is utterly unlike the meaning of time.clock() on unix-like platforms, so you would never expect it. It is wonderfully useful though. And yes I used thread message queues in the end, though not the Windows API versions, because again complex Windows-only structures are not useful for cross-platform scripting.

No comments: