February 2009 Archives
My Windows Vista/7/8 Wishlist
These are some changes I’ve been trying to get made since Vista entered beta. Now 7’s beta has begun and still chances look bleak. Maybe I’ll have more luck in 8?
- Remove
TransmitFile
/TransmitPackets
limitations. Added back in Windows NT 3.51, theTransmitFile
function lets you transfer a file’s contents entirely in kernel-mode, directly out of Windows’ internal file cache. This requires significantly less resources, is much more scalable, and is simpler to code for. Later on we got the even more functionalTransmitPackets
function. So what’s the problem? Microsoft wanted to guard against people using their desktops as servers: they locked desktops down to handling two concurrent TransmitFile calls at once. With increasingly faster internet connections and P2P’s popularity still rising, this just won’t fly anymore. For what would probably take less than five minutes to change, Microsoft could make Windows seem faster for so many people. - Give me asynchronous DNS! Vista teased me with the
GetAddrInfoEx
function, which has unimplemented placeholders for async functionality. I wonder how much faster browsing the web would be if a browser submitted several DNS requests at once, instead of one at a time? Think of all those nasty Web-2.0 sites that load things from 10 different hostnames, or forum sites that let users display external images. - Implement Linux’s
TCP_CORK
. It forces TCP to send out full frames only—no partials. Think of it like Nagle without the timeout. In some situations this can result in higher throughput, so I’m all for it. - Allow me to bind sockets and files to a thread, for I/O completion ports. It could be very nice to set a preferred thread for I/O packets to arrive on, with work stealing settings. This could improve scalability by helping applications better specify their usage patterns.
- Let me boot from software RAID. I have yet to see a quasi-hardware RAID solution (you know, the ones that come with your $80 desktop motherboard) that doesn’t suck. These things do most—if not all—of the work in software drivers, and every single one I’ve seen has brought performance and stability issues along with it. Windows has it’s own built-in software RAID which should alleviate the need for all this cheap unstable crap. Unfortunately the one big gotcha of full software RAID is that you can’t boot from it. Come on guys, Linux has been letting me keep the bulk of my system in software RAID for a long time now. Time to play catch up.
First thoughts on Qt
I’ve been doing so much C# and XAML coding for work lately, I felt compelled to get back to the place I thrive—real C++.
I’ve always been weary of cross-platform C++ GUI coding. The options just never seemed very good to me: GTK, which doesn’t act anything close to native in Windows. Qt, which seemed good but was under GPL. wxWidgets, which feels like a thin wrapper around Win32 (and was therefor quite easy for me to learn) but has lots of little issues like the inability to scale with DPI. Given the announcement of Qt going LGPL, I figured it’s a good time to start learning Qt.
If you’re like me you might be thinking – “Qt, but that’s not real C++! What happened to using the standard library, templates, and not paying for what you don’t use!?”. Do I wish there was a more modern Boost-quality library? Absolutely. But that doesn’t exist. Perhaps because GUI work is rather boring, and coders who could make a better quality library would rather spend their time on more interesting things. Qt is still the most modern GUI lib I’ve seen for C++ yet. But I digress.
Hunting around the Qt website, first thing I find out: it’s going to be a pain in the ass to compile my Qt-based project with VC++. I’m sure it’s possible with a little elbow grease, but I wanted to get started quickly so I downloaded Qt Creator instead. Creator has a bundle that includes MinGW, Qt, and the Creator IDE. Perfect for a quick start!
Creator turns out to be a pretty good IDE. It is very close to knocking VC++ out of my favorite position. With a few bugs and usability issues fixed, it’s possible I’ll be using it even for pure Win32 apps.
I create a GUI project, hop into the designer and lay out a simple window. I haven’t even read any documentation or tutorials for using Qt at this point, so I get a little stuck. There are no Creator tutorials out there yet, so I skimmed through some other Qt stuff and quickly found my way to the layout model – exactly what I was looking for. The best thing I’ve found in WPF is the ability to have a window layed out automatically based on the size of controls in it, and I’m very pleased to see Qt has something similar. Tie in some events, and I have a simple app created.
Compile the project and oops, some errors pop up. After a little hair pulling, I found out the Creator bundle comes with MinGW GCC 3.4 — very old! It was not compiling some of my standard C++ correctly. I’ll see about integrating TDM’s GCC 4.x builds soon, but fear it will mean recompiling Qt. For now I’ve begrudgingly dumbed down my C++ to the subset that GCC 3.4 works with.
In one day I’ve learned how to create a functioning GUI program with Qt. I’ve also backed away from the designer and learned how to do things manually – I’ll definitely use the designer for a serious project, but learning how things work behind the scenes is important too.
All-in-all I’m impressed with Qt. It feels native on Windows, and has a relatively clean API. It is more powerful and productive than straight Win32, but doesn’t seem nearly as powerful as WPF. Then again, it took me several months to wrap my head around WPF enough to build anything of substance.
CN 2009 recap
This year’s NSU Culture Night was incredible!
Opening up was Kyodo Taiko, performing their Swing and Black and White sets. Black and White is a new, powerful set created this year which I suspect will become a new favorite among fans. As always, Kyodo loves to have fun – doing funny skits in between sets, and always showing off their skill and good humor throughout their performance.
Next was the drama team. Drama always sets the theme for the show, typically about the current issues of the Nikkei community. This year their performance centered on recent buyouts in Little Tokyo, hoping to bring attention to what has been a decidedly stealthy move by corporations that may end up removing a large chunk of the culture from Little Tokyo. This year’s set had plenty of humor to go along with it, occasionally poking fun at rival Los Angeles college USC. They brought back a running joke from last year’s performance which really had the croud busting up. This performance was split into several parts, spread throughout the night.
The Odori (traditional dance) team opened up with their typical slow, exaggerated, meticulous dance. But something was different this year – for the first time I’ve seen, they are using a bit more modern music. They performed Gion Kouta, and expertly merged it’s more complex and slightly faster music with the traditional Odori style. This approach was a pleasant surprise, and puts them more in line with Kyodo’s traditional-modern hybrid style.
NSU Modern’s first set was their very energetic Mad Hatter’s Tea Party, which is a real treat to see live. Modern really shines here, showing a true passion for innovation in dance—these guys must sweat pure concentrated skill.
After a short intermission, Odori started the show performing the aptly named Matsuri, also a more modern upbeat song. This was evocative of a real matsuri (festival) in Japan and was very fun to watch!
Kyodo came back to perform Yonsei, Nanairo, and of course their signature finale Encore. Nanairo is a new set created by this year’s newbie class, but not to fear—this has all the energy you’d expect in a Kyodo performance. Kyodo holds a special place in my heart—the first time I saw them left me spellbound, causing me to fall in love with taiko and seek it out anywhere I could find it. I’ve been to many taiko performances since then—most of them featuring Kyodo—so I am quite familiar with Encore. Yet after all this time, it still fills me with the same glee as if I was seeing it for the first time.
Modern closed the night with their Tribal and Jazz sets, both of which I've never seen before. Tribal was typical Modern style—energetic, fun, super sexy, and good beats. Jazz took a completely different turn with a strong ballet performance, showing Modern’s diversity.
And that’s the night, it was a blast! I was happy to see Leech Sensei there, my awesome Japanese teacher from high school. Looks like he brought even more kids than when I originally came to a CN with him, so I’m glad to see Japanese is getting more popular! I just hope they aren’t giving him as hard of a time as I did, reading Dune in class and arguing with him about the merits of Quake vs. Diablo II ;).
Edit: added missing Kyodo and Modern videos, and updated the existing links to the CN2009 versions. Thanks zachirie!