August 25th, 2005


(no subject)

Didn't really do much on Tuesday (well, made icons for 100contest, got carried away with it, and still aren't quite sure if the two I've entered are my favourites out of the 9 I made - some of which, btw, really suck), and yesterday it poured with rain all day, so my plan of sitting outside and reading my book didn't really get off the ground ;) I did go out briefly and check when the barbers up the road was open for J ... it was quite nice walking around, for a short while, in the rain :)

Ooh, also yesterday, I got a Gold Star for Observation :) So I made myself one. Why, yes, I am silly. gold star

I read the bit in the Learning Perl book on sorting, which was easier than I expected. So first I made my script sort the list on kills/game ... then I thought about it a bit more and decided that it would be best done on the ratio between kills/game and deaths/game. So I got that working, got a new copy of the logs as from yesterday, and discovered that people with spaces in their names broke my script. Pah! Pah, I say! J gave me the way out of that problem - I'd forgotten that if you put bits of a regexp in () then you can refer to those bits later as $1 etc. So instead of splitting the line into bits at the spaces and putting it in an array then picking particular ones of them I could use a regexp to match the line: /^\s*\d+:\d+ Kill: [\d|\s]+: (.+) killed (.+) by (.+)/ Then $1 is the killer, $2 is the dead person and $3 is the weapon (which I'm not using yet). It took me a while, and J's help, to notice that there was not always 1 space at the beginning of the line, and that's why the numbers were screwy. But it works now :) I need to re-write the other bits to use regexps too, I think, and then turn that whole section into a collection of if/elsif/else statements, rather than the somewhat fucked up if/next collection I have. No I don't know why I did that either.

I also made it take a file with a list of botnames as an argument and take those out, coz who cares ;) And the names don't always come attached to the same difficulty level, so it's hard to generalise over the games, anyway. It's probably possible to get that out of the file and put the stats in as something like <name>(<level>), which might be interesting, but I'm still tending towards who cares ;)

I need to read about data structures next, before doing too much more to this script though - I may need to gut it and re-write, best to do that before getting much more carried away. Though I might make it output 3 tables rather than one, each sorted on a different stat - kills/game, deaths/game and kill ratio. Current output: Team Arena stats; Western Quake stats.

Does it say something bad and wrong about me that I can't type 'ratio' right first time? It always starts life as 'ration' and then gets corrected.

I've just this second realised that if anyone's name is part of someone else's name then they'll not get distinguished properly. That needs fixing.

iconstillness closed voting last night, winners here. I totally missed the zodiac theme of the source images, but I think a fair few people did too. My entries were:

circle inset icon only the game icon