Categories
Roleplaying Software and Programming

Games for people with lives

I’ve got a small number of computer games, and I play practically none; last time I verged on addiction was probably in University, when I stayed home for a day playing Civilization (that should date me). Which might explain why I like this article, Designing Games for the Wage Slave, which argues that game makers need to make games more playable for people with no time.

Categories
Software and Programming

Making Perl faster

When perl is not quite fast enough

Most modules are able to export lots of their functions and other symbols into your namespace to save you typing. If you have only one argument to use, such as

use POSIX; # Exports all the defaults

then POSIX will helpfully export its default list of symbols into your namespace. If you have a list after the module name, then that is taken as a list of symbols to export. If the list is empty, no symbols are exported:

use POSIX (); # Exports nothing.

You can still use all the functions and other symbols – you just have to use their full name, by typing POSIX:: at the front. Some people argue that this actually makes your code clearer, as it is now obvious where each subroutine is defined. Independent of that, it’s faster:
use POSIX; use POSIX ();
0.516s 0.355s
use Socket; use Socket ();
0.270s 0.231s

POSIX exports a lot of symbols by default. If you tell it to export none, it starts in 30% less time. Socket starts in 15% less time.

Categories
Comics Oddities Resources Software and Programming

Weirdness Roundup

Round-up of weird links:

Categories
Software and Programming

Diff and Merge tools for Windows

Compare It! is a shareware file compare and merge tool, and probably worth supporting if you can’t find someone to pay $129 for a copy of Araxis Merge. Yeah, for work it’s probably fine to keep installing the evaluation copy of Araxis Merge whenever you need to merge a big source code tree, for example, but for small jobs, like merging two versions of an ImageReady-sliced HTML page, you want something you don’t need to re-install every time you dust it off.
Compare It! seems to have picked up Araxis Merge’s use of softer colors, which is a definate improvement over the Windiff-style garishness of various freeware efforts I remember.
Why am I merging ugly generated HTML pages? Because I’m preparing an update of Guy’s site

Categories
short Software and Programming

Tips for writing regular expressions

ONLamp.com: Five Habits for Successful Regular Expressions (via Kottke’s remaindered links.)