Friday, July 30, 2010

More adventures in Linux land

So here I am on Linux verifying correct operation of the RMQ engine. Thanks to a nice little tool called Wubi I've got my Ubuntu 10.04 up and running, and - yes - I know that true propeller-heads prefer other distros, but I have a life to get on with.

Where was I? Oh yeah, Linux; specifically Ubuntu 10.04. It's not actually that bad you know. For an OS who's primary intended use is a bit of office work, surfing the internet, and reading email it's more than adequately capable. It's not that great either though.

sudo - and I thought UAC in Vista was annoying and intrusive. I'll say no more.

Automatic updates. I must have told it "go away and never bother me again" 20 times but it's not getting the message.

apt-get - it's OK. It doesn't fully resolve all dependencies but it does the job.

Config files. Just say "no". Give me a nice clean registry with a logical hierarchical organisation and everything I need accessible and searchable from the one location, all using the same data types and the same API any day please.

Ctrl-Alt-F2 - mental note to self - find out how to get back to the GUI if you're ever going to press these again, please.

Some of the UI is still appallingly primitive and clunky, but it's getting there. I still find the "Hardware Drivers" applet cute. It's almost like a nice little moral ideological policeman ready to tap me on the shoulder and say "ello ello, wot's all this then" if I ever venture out of cozy-wozy fuzzy-wuzzy safe little GPL land.

Enough of that, let's talk about debugging.

OH MY GOD GBD IS RUBBISH!!!!!

A good debugger is a vital part of any development tool chain, and I've been spoiled by having a really really good debugger in MSVC and the Windows debugging tools, but this thing is just plain bad. There is really no comparison, and it has to be admitted that - whatever the real or imagined failures of their business model and the rest of their software - the folks at MS really know a thing or two when it comes to debugging tools.

It's not really that big a deal as I have an MSVC port of the RMQ project that I do most of my work on (I regularly drop into Code::Blocks or Linux to verify that I haven't introduced any MSVC-isms or Win32-isms) but sometimes when I'm debugging a Linux-only problem having a decent debugger helps. A lot.

Message to gdb defenders everywhere: see for yourself! It's really easy! Install Windows, install MSVC (and no, you don't need to go into the registry to configure it, we have GUI tools for that), write a simple enough program - a sort routine that works with pointers, say - and run it in the debugger. Set some breakpoints (you can do this while it's running), attach it to processes, inspect and modify data, use edit and continue, see all of the cool stuff you can do.

Anyway, I've wasted enough time talking about this, and no doubt there are features of gdb I'm yet unaware of that enable you to do this kind of stuff, and no doubt a large percentage of it is down to me preferring the tools I'm most familiar with, and I'm 100% certain that at least some of it was influenced by the fact that when I hit a breakpoint it didn't give the mouse or the keyboard back to the OS, so I'll stop right about here.

Till next time!

6 comments:

Mnemonic said...

Thank you very much for Direct Quake!

Just recently I searched for DirectX 8 or 9 engine for classic Quake to play it in stereoscopy with Vuzix VR920 HMD. I am very happy that your Direct Quake fits very well, and native drivers of VR920 which work via hacked D3D9.dll work like charm.

Second great point is that it runs very smooth on eeePC900 net book which is really awesome in combination with HMD.

I have found one bug if you interested, it's not very trivial to achieve.

1. Run DirectQ and start a new single player game, play a few levels and save near the end level portal.
2. Exit the game.
3. Run DirectQ once more, load the latest save (near end-level-portal) and jump in to portal - DirectQ will encounter an unidentified error and crash to windows.

You can restart DirectQ as much as you want and load that save - you will get crash!

To overstep this crash do the following:
1. Start DirectQ
2. Begin NEW GAME
3. Load latest save
4. Jump to portal and go to further level...
From this point it will work correctly.

I think something initialized when you start new game. When you go straight to loading you will have the level, but portal to next level, or change map command will crash DirectQ!

Maybe this will help for future releases!
Good luck!

gnounc said...

I'll fight with you in favor of cfg files!
They do however need a better folder hierarchy, thats where I wish Gobolinux would catch on.

Sudo is a good idea too, theres just some shit you shouldnt have to ok.(oh and if you think sudo in gnome is bad (ubuntu runs gnome, think of it as windows explorer if you arent familiar) then you should try Kubuntu (ubuntu with kde instead of gnome) Its kde wallet drives me up the fucking wall.
The rest I'd agree on.

Spirit said...

Oh mh, you and your silly Linux rants.

gb said...

mh, install valgrind and then run "valgrind whateverbinary". It's supposed to be a little more interesting.

And yeah, Linux is a different planet underneath the desktop (and sometimes on the desktop).

The sudo and GPL zealotry are Ubuntuisms (and probably Debianisms).

Mind you, I'd say much the same about Windows, when I open regedit it's like OMG all these things lumped together...

haha.

gb said...

also, to never have to use sudo again, you should be able to open a root terminal by typing "su -" and your root password, then call the stuff you need from the command line.

mhquake said...

I'm actually quite looking forward to seeing all the dirty little secrets valgrind unearths, that should be good fun. In fact I'll pop off to install it shortly. :)

The other stuff is primarily just a matter of different culture/different philosophy/different ways of doing things, and is in reality nothing more dramatic than switching back and forth between Lotus 123 and Excel, for example. It's just amusing at times to go off on a rant about it.

In fact it's the small differences that are more unsettling than the big ones. The big ones are there in your face, you know it's different, and you adjust to cope. The small ones are all the little usage habits you've built up over the years that suddenly either do nothing or (worse!) do something completely unexpected. The sense that something is indefinably alien but you can't quite put your finger on it, if you know what I mean.

But all that aside, bad software remains bad software, irrespective of whether it's free, Free, paid-for, proprietary, patented, unencumbered, pulled out of your arse, or beamed down from the moon. It's still bad and nothing can change that, and gdb remains rubbish.