64 bit windows adventures

As Kjetil put it, my new PC at work puts me way ahead of the curve. I got a AMD 64 bit Dual-Core machine, with 2 GB of RAM and 2×250 GB RAID-0. I figured XP Professional 64 bit would be the right OS to run.

There is not a lot of software availabel for 64 bit Windows. Luckily, it runs 32 bit legacy applications nicely, so it’s okay to mix and match. Still, there’s some trouble.

The first problem came after I installed Thunderbird. I installed the official 32 bit release, because the 64 bit releases struck me as pretty experimental. When I fired it up, it almost immediately reported “connection timed out connecting to server” on my IMAP account. Turns out, there’s a known bug in Thunderbird with dual core machines: The timing code uses the QueryPerformanceCounter() fucntion. It can be fixed by assigning a processor affinity to the program, so it only runs on one of the two cores. You can do this either manually from the taskmanager, or once and for all using a progam called imagecfg.exe (goolge for it if you need it).

The next issue was more serious: There are no 64 bit versions of TortoiseCVS and TortoiseSVN. The reason that’s serious is that they are explorer shell extensions, and to extend the 64 bit Windows Explorer, your program has to be a 64 bit application. There’s a 32 bit version of Explorer for those cases, but I was hoping to avoid that kind of switching around. I mean, I’ll have the 64 bit Explorer open by default, so CVS will be cumbersome. Let’s hope they get on the case soon.

The third issue is compilers. We use VS2003 to make Anarchy Onlie, and while we’re not switching AO to 64 bit, I really want to be able to compile my own 64 bit apps. There’s no 64 bit compiler with VS2003, though (I hear that VS2005 has one), so I’m not sure where to get one from. Intel has one, but I’ve found it cumbersome to use. Which reminds me, I have to look into 64 bit cygwin. I guess that’s not ready yet.

But man, this thing is nice.

[ media | Briskeby-Joe Dallesandro ]

Windows 98 is sh%t.

Last friday I got reports that on Windows 98, my new patches for the longest journey don’t load their savegames. Somehow, the game didn’t seem to find them. I had one player send me his saves, and verified that they were healthy, so it was definitely the loading.

I found the bug this morning: Windows 98 doesn’t like doubel backslashes in a filename. So if I write C:\TLJ\\Save1, that won’t work, because it’s not the same as C:\TLJ\Save1, and although all later versions of windows seem to just collapse multiple backslashes if they aren’t at the beginning of a pathname, Win98 doesn’t. So yes, I’m guilty of adding that bug, and I feel slightly stupid for that, but not too stupid.

The interesting part about this was that it was nigh impossible to find a Windows 98 machine in the house. Noone has that stuff anymore, and frankly, I’d feel bad about connecting it to the network. So I installed MS Virtual PC, and in the Virtual PC I installed Windows 98. And in that Windows 98 I installed the longest journey for testing, and then Visual Studio and everything else I needed for debugging.

And I did all that through remote desktop, because I was sitting at home. Everything worked like a charm. That virtual machine stuff is pure magic every time I play with it, and so is remote desktop. Fun!

[ media | Corpse Bride Soundtrack – Victor’s Piano Solo ]

Small cosmetic changes

I made some cosmetic changes to the site. Most importantly, I hae a working blogroll now (see the “Blinkenlights” section on the right). Much better than the hand-kept linklist I had before, and easier to update, too.

[ media | A-Ha-Halfway Through The Tour ]

Miranda and ICQ avatars

I had the damndest time figuring out why my ICQ avatar was not showing up for other people. Since it isn’t obvious, I’ll post it here, someone else might find it useful:

  • make sure your avatar image is less than 4 KB.
  • make sure it is no bigger than 64×64 pixels.

ICQ seems to take both these restrictions serious, and Miranda doesn’t give a hoot. Less than 4 KB means that JPEG is most likely the format you’ll want to use unless you have a simple drawing for an avatar.

Speaking of Miranda: I tried out some other messengers lately, and they all fall short on one of my basic requirements:

  • Full keyboard control (open contacts, open message, select contact all without mouse)
  • Avatar support
  • Clean look (Win2K classic, preferably)
  • Support for Jabber, ICQ and MSN
  • Compact, no-nonsense contact list

Neither Trillian nor Gaim were satisfactory. Gaim isn’t so bad, but I hate their UI controls, and the contact list needs to much space per entry. Trillian completely lacks keyboard controls, has no support for Gaim and I didn’t think I’d have to include “searchable history” in my list of requirements, but the fact that it hasn’t got one taught me to expect nothing and everything. Of course, if I chose to pay, I’d get the latter two, but still no keyboard shortcuts.

[ media | Stan Getz & Luis Bonfa-So Danco Samba ]

I need a good linux IDE

I admit it: In the choice between emacs and vi, I choose “none of the above”. I want a C++ IDE. I’ve grown up with Borland Pascal, then used the Visual Studio IDE, and I’ve never used anything without a good integrated debugger.

Switching from Visual Studio to emacs + gdb is something I’m no longer able to do. So this weekend, I had a look at some of the IDE offerings that Linux had. It’s not a happy tale.

First there’s eclipse. Many people (Java people) swear by this, and as they point out repeatedly, it isn’t a Java IDE, it’s an IDE for anything you want. Sort of like Visual Studio is (if what you want is a MS language). I downloaded the CDT, and I like the way that’s all done from inside the IDE. But then… I tried to create a managed makefile from the Eressea sources, because if I’m going away from commandline make, I’d like to also go away from makefiles, thank you. very much. Not possible, though. It seems Eclipse has a weird conception of projects being everything that is in one folder, no more, no less. If I have the sources for my library and two executables all in the same folder, for example, I can’t make eclipse build a library and two executables. Instead it tries to mush all of it together. But really, that is academic, because I couldn’t even get it to do that – Eclipse + CDT crashed every 5 minutes. All I get is some java exception, no option to save my work, and then it’s gone and I’m back to square one.

Code::Blocks was my next candidate, because many people on the Ogre3D forums are raving about that. I installed it on Windows from the binaries, and while not pretty, it looked close enough to what I want. So.. debian packages? No dice. No packages for any distribution, actually. Build it from the sources, they say. But even that isn’t easy. It comes without a configure script, and requires me to install automake, but not the automake I had, no, that other version of automake please, and then it would bitch about something or other and completely refuse to do anything at all. No dice. I didn’t even get a configure script. Screw this.

There’s still kdevelop left to test. Like Obi Wan, it is my only hope to run linux on the desktop. Yes, my web browser and office suite run on linux, too, but without an IDE, I have to stick with Windows as my OS, because programming is what I do 90% of the time I’m at the computer.

Geocaching with Google Maps

I was Geocaching in Budapest last week, and I sorely missed a good overview map that showed me nearby caches. My GPS doesn’t have a map, you see, and I’m used to the good overview from www.sjohagen.net.

So I went ahead and built me a little Google mapping web application. You type in the coordinates, it shows you a map of the area with the 25 first caches as clickable links. So say I’ll be in London next week, all I need to do is find the coordinates of my Hotel, put them in, and voila, I get a map.

Try it for yourself here, but please don’t punish the server too much, it’s on a very old machine.

TODO:

  • Make it faster
  • Make it use proper icons for different cache types
  • Let me hide the ones I’ve already found
  • Show more than 25 caches
[ media | Nikka Costa – Till I Get To You ]

64 bit OS + bochs

I want a 64 bit OS to play with. Trouble is, I have no 64 bit CPU.

But since bochs now apparently emulates AMD64 CPUs, shouldn’t I be able to run e.g. the 64 bit version of ubuntu on it, while running on my old 32 bit hardware? It seems to me that that’s possible, but I can’t find a whole lot of documentation on it.

A simple HOWTO would be real nice 🙁

Making Wrong Code Look Wrong

Here’s a very good article by Joel Spolsky that you should read. It talks about why hungarian notation is a Good Thing, and how almost everyone uses it in a Bad Way.

I was rewriting the recruiting-rules for Eressea last weekend, and the rule there is that “for each peasant in a hex, players can recruit one person, except orcs, which can recruit 2 orcs per peasant, up to a limit of peasants/20, and if players want to recruit more, then the peasants in the hex are distributed evenly”.

The codes ends up looking a bit like when you’re trying to split your bills and you’ve been paying with 3 different currencies… I had a bug in that code, and only found it after I prefixed all my variables with p for numbers that represented peasants, o for numbers that represented orcs and d for numbers that represented the demand of a player – suddenly you see that you assign between them without the proper conversion.