Categories
Software and Programming

IO::All to rule them all

I just wrote my first perl script using IO::All. I think I have to sit down and breath.
The job? change every link in a directory tree of HTML files to use the name of the new server instead of the old one.
The script:


#!/usr/bin/perl
use IO::All;
my ($datadir) = shift;
for my $file (io($datadir)->All) {
	my $text < $file;
	$text =~ s|fred[^\:]*?\:1337|bert|g;
	$text > $file;
}

(The regular expression made use of the fact that the original server, call it fred, was running a web server on a non-standard port, say 1337).

This. Is. Very. Cool.

Categories
Software and Programming

Prototype: Object-Oriented Javascript Library

Prototype: Object-Oriented Javascript Library is written by Ruby hackers for the Rails platform. Used to make these pretty effects.
[ also via Accordion Guy ]

Categories
Software and Programming

Javascript and Paint

Edit in Place with JavaScript and CSS – this is cool. So is his Drag & Drop Sortable Lists.

Here’s a parody of Paul Graham that’s sort-of related to Javascript (few people have looked beneath their natural revulsion to find Javascript’s deeper flaw: curly braces). He’s also written a more serious rant about Paul Graham’s Hackers and Painters essays, which contains some gems of snark:

The fatuousness of the parallel becomes obvious if you think for five seconds about what computer programmers and painters actually do.

  • Computer programmers cause a machine to perform a sequence of transformations on electronically stored data.
  • Painters apply colored goo to cloth using animal hairs tied to a stick.


Great paintings, for example, get you laid in a way that great computer programs never do. Even not-so-great paintings – in fact, any slapdash attempt at slapping paint onto a surface – will get you laid more than writing software, especially if you have the slightest hint of being a tortured, brooding soul about you. For evidence of this I would point to my college classmate Henning, who was a Swedish double art/theatre major and on most days could barely walk.

Also remark that in painting, many of the women whose pants you are trying to get into aren’t even wearing pants to begin with. Your job as a painter consists of staring at naked women, for as long as you wish, and this day in and day out through the course of a many-decades-long career. Not even rock musicians have been as successful in reducing the process to its fundamental, exhilirating essence.

Categories
Software and Programming

Funny Error Messages

Rick Schaut (a Microsoft programmer working on the Macintosh version of Word, who I got to by xslf’s link to a long and patient discussion he has with a pair of AbiWord developers) posted a link to a list of funny C compiler error messages from the old Mac MPW compiler. Apparently, someone in Apple is rumoured to be adding these to the new Mac OS X compilers.

(I suspect I gave a bit too much context in that paragraph. This without mentioning that, oddly enough, I looked at AbiWord just the other day, after reading bad things about how OpenOffice now requires Java. And noticing that if I uninstalled all of MS Office from my laptop, I could have room for, oh, two more episodes of Justice League Unlimited).

Anyway, you have to admire a compiler that instead of spouting obscure gibberish actually says things like:

Categories
Science Fiction and Fantasy Software and Programming

Israeli sites and RSS

Shoshanah Forbes has a post with assorted news about Israeli blogging and RSS. Of interest to me is her casual mention of an RSS feed for HaAyal HaKore, which uses the same backend as the Society site. I got excited for a moment to find, that although Nir hadn’t put an RSS Autodiscovery link in the HTML, I get a response when typing in the URL http://sf-f.org.il/xml/rss. Unfortunately, it’s currently just the message RSS not supported by this Backlash installation.

Hopefully, Nir will bug Tal into getting something live there.