The 1989 C standard didn’t allow variable argument macros. They were added in the 1999 standard. To use one according to the standard, plug in “__VA_ARGS__” where you want the variable arguments. For example:

#define print(…) real_print( __VA_ARGS__ , 0)

Of course, your compiler may or may not support either this feature or a nonstandard variation.

You might have guessed that, after all those years, the MS compiler still does not support them!!! arghh. crap.

Wiimote fun

Some while ago, I was considering to buy a gyroscopic mouse from Gyration for my future Media Center, but I’m becoming more and more convinced I should simply buy a Wiimote instead 🙂

There are lots more possibilities while still fulfilling the original needs. The Wiimote IS a gyroscopic mouse but adds the following advantages:

  • IR blaster / receiver (1024×768 resolution!!) 4 point tracking @ 100Hz
  • relatively cheap! (40 EUR)
  • speaker
  • joystick and more buttons than standard mouse
  • on-board storage
  • programmer / hacker friendly
  • go play multiplayer on a friends console 🙂

After looking at all the neat programs Johnny Lee put together, I guess you understand I can’t wait to try this out myself 😉 Also, be sure to check out his blog and numerous videos floating around the web.

First time I heard of the cool wiimote possibilities was when reading a post of Xfennec, in which he made a simple showcase of the possibilities with libwiimote using his favorite 3D engine Raydium. Be sure to check out the vid. I was really impressed back then, but of course Johnny did a lot more impressive stuff, the guy is a legend by now. Johnny does not use the libwiimote lib, but rather the dotnet WiimoteLib (I mention this ref especially for andrasj 😉 )

I have to admit that at first glance the .net lib seems more attractive due to its event based mechanism (internally, it does an async read on a stream in a loop though). The C lib looks a bit more basic but very easy to get started.

Team Fortress 2

CGSociety has an interesting feature about Team Fortress 2.

The art in TF2 and the game in general is indeed quite special imo 🙂 Having played it for a few hours, I really can appreciate the game Valve put together. High usability, restricted weapon selection and funny cartoonish graphics and animations trick the player into believing that this really is an easy kids game, but nothing is less true. Well.. it actually all depends on the players 🙂

A lot of rookie players (I have the impression there are a lot, me included 😉 ) just don’t get the full potential of the game and do a brute force attack. But due to unique gameplay elements, you are forced to find better or switch tactics all the time. For example, you simply can not find a sniping spot and snipe until you are discovered, simply because after each kill, the killee (heheh =) ), is presented a nice close up snapshot of his killer!
On top of that, because the game keeps track of your kills and hangs a big fat nemesis icon above your head for the people you killed a lot, you can be reassured to spend some payback time. 😉

There does not exist such thing as a fail proof tactic, each can be countered. And this is not because of the right weapon choice, but because of the wide range of characters. It takes some time to handle each of them in an effecient way and unless in each class someone knows what he does, the team simply doesn’t work. And that’s in fact my only problem with the game, I guess. 🙂 A lot of people don’t play their class well and also don’t care “because they just wanna frag”. That’s okay, if the other team agrees with that 😉 The minute they start playing “intelligently”, they win. Of course, the game wouldn’t be called team fortress if team play wasn’t a key part of the game 😉 yet, on public servers, we all know it is sometimes hard to find the team spirit …

Lirc on openSUSE 10.3

I somehow always procrastinated the installation of my Hauppauge WinTV PVR 150 IR remote because it somehow didn’t work out of the box, but today I took another shot at it and was surprised how easy it all turned out to be!

The first thing you need to realize, is that you need to install a kernel module: lirc_i2c. Unfortunately, due to a string length being shortened in recent kernel, the suse provided kernel module does not work! Instead, grab a freshly compiled one from here. After having this installed, you should already have a working remote! (you might want to tweak your /etc/sysconfig/lirc : choose the hauppauge driver and the lirc_i2c module, but the defaults seemed to work too). You can test your remote by doing a cat /dev/lirc and pressing some remote buttons.

Easy, no? 🙂 The rest is application specific configuration 😉 Be sure to have a look at KDE’s infra-red app, IRKick, which does a great job at binding through DCOP!

One thing to note though, is that the default lirc config is supposed to create a device /dev/lircd from /dev/lirc when starting lircd, but in my case, it wouldn’t do that until I specifically told it to create that one through the –output param (only had to do this once).

I was greatly helped by the following sources: mythtv 1, 2

google video resume bug?

one of the features I like about google video is that you can click in the middle of the progress bar and it will start playing the vid from there without having to buffer all the previous. I use this feature when watching long presentation (or some keynote 😉 watch this if you still haven’t!) and I don’t have time to watch through in one go, I can return later and resume where I left off. Unfortunately, this doesn’t work anymore??! I used it yesterday, and today, no go! Is this a bug? Are you experiencing it too? Am I going crazy? 😉

Also, it seems the download feature has been removed…