A few weeks ago, while I was doing one of those activities that allow the mind to disconnect and roam of its own (could have been while I was showering, or riding the bus, or attending a team meeting, I don't recall), an idea hit me. The game Monopoly has variations themed on everything under the sun, from countries (Canada-o-poly, eh!), to TV programs (the Simpsons), to pets (Cat-o-poly), to God-knows-what. So why not do a Perl-themed variation of it?
Embperl HTML::Mason
Acme::Bleach Acme::EyeDrops Acme::Buffy
Email::Filter Mail::SendEasy::SMTP Mail::Box
Net::Telnet Net::FTP Net::SSH
DBD::SQLite DBD::MySQL DBD::Pg
PerlQt Wx Gtk
XML::LibXML XML::XPath XML::Twig
Module::Build ExtUtils::MakeMaker
The whole idea tickles enough my fancy that I might whip up an SVG rendering of the board one of those days.
note: this message was originaly sent to the PerlWar mailing list (http://babyl.dyndns.org/mailman/listinfo/perlwar)
Almost on the anniversary day of the initial release of PerlWar, I'm happy to announce that I (finally) stamped and released PerlWar 0.02 (now in transit toward your nearest CPAN mirror).
Although the innards of the game engine have been massively rewritten, the look'n'feel of the game itself has remain mostly the same. The new elements a player might care about are:
To kick the tires, I've created a new ad-hoc, Blitzkrieg game at http://babyl.dyndns.org/pw/alpha/. The game will be run this Friday (Oct 27th) at roughly 8:00pm EST. Everybody who wish to participate is welcome. For whoever was in the last game, I've migrated the names and password to the new player master list. If you weren't there or have forgotten your password (which would be small wonder, considering that it's been over a year), just poke me and I'll do all the appropriate magic.
I must admit that I find the journal editing page of use.perl.org a wee bit irksome. First, there's the itsy bitsy editing box (I'm sure there's a configuration somewhere to increase its size, but I haven't found it yet). Then there is the HTML formatting that, in these days of wikiness, feels awfully verbose and clunky.
The first itch, admittedly, can be solved by using Firefox's plugin ViewSourceWith , which allow to edit textbox field in your editor of choice.
But the second itch remained. So I rolled up my hack sleeves and typetty-typed a script that takes in a journal entry in good ol' pod, converts it to SlasHTML (using Pod::Simple and a XML::XPathScript template) and then uploads the result to use.perl.org (using Slash::Client::Journal ).
The script can be found
here . To have it work for you, grep for
cookie_file
in the code and change it the right value for you.
pod2slash entry.pod
prints the formatted entry to STDOUT, and
pod2slash -p entry.pod
publish it to use.perl.org.
NOTE: for some reason the upload mechanism seems to choke when there are links. Darn, darn and triple darns.
ah AH! It took me almost one year, but I finally got the sucker!
In the PerlWar web interface, I have this Embperl upload page. Except that ever since its conception, the little devil fails something like once every five times, without any visible reason.
Well, the reason, it turns out, is that Embperl 2 doesn't chdir to the page's directory (whereas Embperl 1 did). So if you're trying to open a file using a relative path, it'll work or not depending of the mood and state of the apache process the request is riding.
The solution? Add the following to the top of the page:
[-
$path = $epreq->component->cwd;
chdir $path or die "couldn't chdir to $path: $!";
-]
Yesterday, I decided to put in action two of the neato keyboard layout optimization tricks that I got from the the vim tips rss feed.
optimization 1: ( $caps_lock, $esc ) = ( $esc, $caps_lock )
In vim, one hits ESC a gazillion time a day and
CAPS LOCK maybe, on two or three times a century. Yet, the first
key is located at the outside periphery of the keyboard while the
second sits, fat and proud, in the middle of things. Not fair. Well,
doing a xmodmap escapswapper fix that engineering blunder,
where escapswapper is:
! Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
optimization 2: y/123456789/!@#$%^&*()/
When one programs in Perl, one gets to type '$', '@' and '%' six times per line (or more, if you're a Perl golfer or swear a lot in your comments). In comparison, numbers are used a wee bit less frequently. And yet, it's the symbols that get the shift tax. Not fair. Again, a little remapping easily corrects this gross injustice:
in ~/.vimrc
autocmd FileType perl source ~/.vim/my/perl_map.vim
and in ~/.vim/my/perl_map.vim
" map each number to its shift-key character
inoremap 1 !
inoremap 2 @
inoremap 3 #
inoremap 4 $
inoremap 5 %
inoremap 6 ^
inoremap 7 &
inoremap 8 *
inoremap 9 (
inoremap 0 )
" and then the opposite
inoremap ! 1
inoremap @ 2
inoremap # 3
inoremap $ 4
inoremap % 5
inoremap ^ 6
inoremap & 7
inoremap * 8
inoremap ( 9
inoremap ) 0
I'm afraid there is a dark and sinister conspiracy going on in the Perl underworld, and that I misadvertently stumbled in the middle of it...
I've heard rumors of it a few years back, but at the time I had discarded it as nonsense. I mean, who in his or her right mind would think something that big, that far-fetching, could be kept secret, and yet be true?
But yesterday, I've read the same information, typed straight from the fingertips of an undisputable source (which identity I of course wouldn't reveal, to keep him safe from harm):
Dahuts have their hands (err, hooves) in the AxKit project.
Yes. Dahuts. Those secretive animals decribed as half-llamas, half-yetis by both scholars of mythical lore and slightly tipsies sailors in bars.
Incensed by that discovery, I tried to access one of the thomes of knowledge on the subject. Namely: Acme::Dahut. But a critical, central piece of information has gone missing.
Website downtime, or the action of the Alpian Illuminati cabala trying to suppress information to leak out to the public? I don't know, but one thing is for sure: my great-great-grand-father's rusty yet thrusty musquet is loaded and ready shoot any albino monk who will happen to wander down my street...
This week, I got the poke that (I hope) will me nudge back into Perlwar development.
The first step: re-install the project's Trac environment and subversion access (they had been down since the great Summer Upgrade). I'm pleased to report it's been acheived without much ado or angst.
I was also displeased to discover that spammers got their grubby hands on the link leading to the former at some point and viciously spammed the wiki and the bug database. *sigh* On the plus side, I don't have to reach very far now to find links about porn, medications or baseball uniforms.
-----------
One a different topic, the Hypocritial Distortion of a Word that Really Gets my Goat award goes for this week to "Synergy". As in "the merger of our two companies will create synergies" when one means to say "the merger of our companies will allow us to lay off a ludicruous percentage of our workforce".
Re-installed awstats on Babyl (a leftover task from the Great Reinstallation of Summer 2006).
Looking at its site I realized I'm still listed as one of the developers (I contributed a small snippet of code in the days of the Code Red worm). I should kick myself and see if I can't dive back into it one of these days.
On an unrelated note, someone poked me via email, asking if Perlwar is dead. Nope, it's just sleeping very, very deeply. That's another thing I have to dive back into. (*sigh* so many things to dive into, so few speedos...)
Today I discovered Stylish, a very cool Firefox plugin to create per domain/site/page CSS style. To test it, I decided to give a Perlish flair to the Friend/Fan/Foe icons on use.perl.org:
@-moz-document domain("use.perl.org") {
img[alt="Friend"] {
background: url(http://babyl.dyndns.org/misc/camel.png) top left no-repeat !important;
padding-top:16px !important;
width:16px !important;
height:0px !important;
}
img[alt="Friend of Friend"] {
background: url(http://babyl.dyndns.org/misc/llama.png) top left no-repeat !important;
padding-top:16px !important;
width:16px !important;
height:0px !important;
}
img[alt="Fan"] {
background: url(http://babyl.dyndns.org/misc/dog.png) top left no-repeat !important;
padding-top:16px !important;
width:16px !important;
height:0px !important;
}
img[alt="Foe"] {
background: url(http://babyl.dyndns.org/misc/panther.png) top left no-repeat !important;
padding-top:16px !important;
width:16px !important;
height:0px !important;
}
img[alt="Neutral"] {
background: url(http://babyl.dyndns.org/misc/ram.png) top left no-repeat !important;
padding-top:16px !important;
width:16px !important;
height:0px !important;
}
}
Here's a screenshot of the result.
From T::P::S's manpage:
Test::Pod::Snippets's goal is to address those issues. Quite simply, it extracts verbatim text off pod documents -- which it assumes to be code snippets -- and generate test files out of them.
-----------
Test::Pod::Snippets: on its way to a CPAN near you. In the meantime, it can be peeked at in its svn repository or its web interface.