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
Oddities Resources

Jews Evaded Nazis by Living in Cave for Nearly 2 Years

National Geographic: Jews Evaded Nazis by Living in Cave for Nearly 2 Years (link via BoingBoing).
They also have an interview with an American caver who visited the cave and investigated the story, with some more details of the daily cave live.

Categories
Comics Oddities Resources Software and Programming

Weirdness Roundup

Round-up of weird links:

Categories
Oddities Resources

Unsolved murder of Hermetic Academic

In his review of Ash, John Clute refers to Ioan Culianu (the Chicago academic who specialized in Hermetic philosophy, and who was murdered in 1991). That sparked my curiosity. Google finds a chapter from a book about Culianu and his unsolved murder by Ted Anton, called Eros, Magic, and the Death of Professor Culianu. It also finds a transcript of a conversation with his ghost…

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