Upcoming
18 October 2008
in stream
tagged with
[london]
[perl]
and is
[geotagged]
I will be attending London Perl Mongers Social Meeting on Thursday November 06
I will be attending London Perl Mongers Social Meeting on Thursday October 02
02 October 2008
in stream
tagged with
[london]
[perl]
and is
[geotagged]
I will be attending London Perl Mongers Social Meeting on Thursday October 02
decrypt-emp.pl
30 April 2008
in links
tagged with
[emp]
[emusic]
[perl]
Perl parser for the eMusic .emp file format, which I had hoped that they didn’t use any more. Alas, this turns out not to be the case.
The Corrosion of Aaron Stone » Blog Archive » Perl in Apache with mod_perlite
07 November 2007
in links
tagged with
[apache]
[mod_perl]
[perl]
Another attempt at replacing mod_perl
http://hydricacid.com/general/perl-in-apache-with-mod_per...
Piers Harding / DJabberd-Delivery-OfflineStorage-0.02 - search.cpan.org
08 October 2007
in links
tagged with
[cpan]
[djabberd]
[jabber]
[perl]
DJabberD offline message storage.
http://search.cpan.org/~piers/DJabberd-Delivery-OfflineSt...
Examples at Clicker
23 October 2006
in links
tagged with
[chart]
[perl]
oooh, a pretty perl charting library
Perl for windows ce / pocketpc
10 October 2006
in links
tagged with
[perl]
[pocketpc]
bwhaahaha. ahhahahah. haaha. ah.
CamelBones, an Objective-C/Perl bridge for Mac OS X & GNUStep - Release Notes - 1.0.0
11 July 2006
in links
tagged with
[cocoa]
[mac]
[perl]
[programming]
Camelbones 1.0. Congratulations to Sherm
http://camelbones.sourceforge.net/documentation/history/d...
Bot::BasicBot 0.7
11 June 2006
in blog
tagged with
[irc]
[perl]
[release]
- Updates for new PoDo::IRC
- No longer do 2 server connects on startup
- the connect test doesn’t break itself by faking a connection first
Use lighttpd instead of mogstored
05 June 2006
in links
tagged with
[perl]
[webdav]
How to use lighttpd as a mogstored instead of perlbal. Cunning
http://lists.danga.com/pipermail/mogilefs/2006-June/00032...
The CPAN Search Site - search.cpan.org
18 May 2006
in links
tagged with
[json]
[perl]
[rpc]
The perl implementation of JSON-RPC. Ships with JSON.pm, which is nice.
encoding::warnings - Warn on implicit encoding conversions - search.cpan.org
22 April 2006
in links
tagged with
[perl]
[unicode]
Looks like it solves my favourite all-time problem in perl - no clear distinction between characters and byte sequences. Horay.
http://search.cpan.org/dist/encoding-warnings/lib/encodin...
Perl DateTime objects, time zones, and ISO8601
13 April 2006
in blog
tagged with
[date]
[perl]
[time]
Here’s what I want to do. DateTime objects conveniently stringify to their ISO8601 date representation. But last week the clocks changed, and all my code broke, because this representation doesn’t include the time zone. I want a DateTime object that will stringify to an ISO8601 date including a timezone. Shouldn’t be too hard.
Template::TAL
03 November 2005
in blog
tagged with
[perl]
[template]
Yay, I’ve released Yet Another Templating Language. This one is a perl implementation of TAL, which is a nice XML-based templating language I’ve been playing with recently. There are other (sort of) implementations, but I consider Template::TAL (a) closer to the spec, and (b) more abstracted - I can load templates from anywhere, not just disk. It’s weaker in other respects, of course, but that’s life..
The London Perl Workshop 2005
28 October 2005
in links
tagged with
[conference]
[london]
[lwp]
[perl]
[programming]
[workshop]
Yay. I liked last year’s
http://london.pm.org/pipermail/london.pm/Week-of-Mon-2005...
debian.pkgs.cpan.org — debified CPAN packages
23 October 2005
in links
tagged with
[debian]
[packages]
[perl]
debian repository of CPAN modules. Very, very cool
PerlWarRules - PerlWar - Trac
18 October 2005
in links
tagged with
[corewar]
[game]
[perl]
looks.. so.. fun..
Perl Loves UTF-8
16 October 2005
in talks
tagged with
[perl]
[unicode]
Given for the first time at the london.pm tech-meet at the Fotango offices on 2005/02/24, this was a 5-minute rant about perl, character sets, and why noone can ever get them right. The slides were written in OmniGraffle for some bizarre reason, but I think it worked quite well, and may use the technique again some time.
Open bugs in JavaScript
09 October 2005
in links
tagged with
[javascript]
[perl]
AnnoCPAN - Petal
05 October 2005
in links
tagged with
[perl]
[petal]
[template]
[xml]
search.cpan.org: Fotango Ltd / Froody-42
04 October 2005
in links
tagged with
[fotango]
[perl]
[xmlrpc]
Text::Textile
23 September 2005
in blog
tagged with
[perl]
[text]
Props to Brad Choate, who has released Text::Textile 2.03, freeing me from the burden of maintaining it myself. Yay.
search.cpan.org: Perl::Review - Engine to critique Perl souce code
22 September 2005
in links
tagged with
[perl]
[pierre]
[programming]
[review]
AnnoCPAN - DBD::Multiplex
31 August 2005
in links
tagged with
[dbi]
[perl]
AnnoCPAN - MIME::Types
31 August 2005
in links
tagged with
[mime]
[perl]
MogileFS
25 July 2005
in links
tagged with
[filesystem]
[perl]
PoundPerl group photo
29 June 2005
in photos
in set YAPC::NA 2005
tagged with
[perl]
[toronto]
[yapc]
Bot::BasicBot::Pluggable 0.50
19 March 2005
in blog
tagged with
[irc]
[perl]
finally, I have a Bot::BasicBot::Pluggable release out. muttley’s been bugging me for weeks, and the last release was in June 2003, which is ridiculous. When you just use things straight from the svn repository, you forget how long it is since you’ve done a release.
There’s a Bot::BasicBot 0.60 release to go along with it, with better character set support, no massive improvements, though. I should push that guy to 1.0 soon…
photo gallery
06 January 2005
in blog
tagged with
[perl]
[photos]
[php]
All I want, and I don’t feel that this is a lot, is to be able to put photos on my web page from iPhoto. Because writing iPhoto plugins is a pain, this requires me to use either Flickr, which I don’t want to (because I’d like to control my own photos, please, and not pay money for it), or php gallery, which has it’s own issues for me, mostly that it’s written in php.
As a perl (most of the time) programmer, I resent the fact that my web page is increasingly powered by php, but alas that’s where all these little toys come from nowadays. I’ve dabbled in php myself a little now, and it seems like a bearable language, although not one I’d actually want to write serious code in. Of course, with my colo going through.. pain recently, it’s tempting to restrict myself to a very simple subset of things, specifically, a subset of the stuff that the main box admin uses, because I know that it works and I don’t have to think about it. No more compiling weird perl/C modules on solaris as root with bizarre things tacked onto the end of my library path for me. The other colo has debian on it, which I like, but only 64 megs of memory, which I don’t. Hardware (even virtual hardware) sucks.
Of course, having got a gallery, I want to do things like have ‘5 most recent’ pictures on the front page of the site, and this is where things fall down a little. Noone else seems to want to do this stuff - I may end up subscribing to my own RSS feed, syndicating from one bit of my site to another, which seems disgustingly wasteful.
unit tests
04 January 2005
in blog
tagged with
[perl]
[tests]
Tests are a blessing and a curse. They are the developer’s friend - I can barely write code nowadays without a test suite. How else will I know when I’ve broken something? I’m very lazy - I can’t be bothered to manually run through every feature, or even to start up the web server (or whatever) in most cases. Edit, save, run tests, edit again, is my preferred cycle, and for this, the tests must be as comprehensive as possible - not only testing the features, but testing the things that shouldn’t work, and testing every nasty, hard-to-track-down bug you’ve ever found - there’s nothing worse than spending hours tracking down the same bug that you fixed last month.
But for deployment, tests are just annoying. Take CPAN modules, for instance. Most of the time, yay, tests pass, install the module. But as with all things, all the interesting things happen when things break, and the tests don’t pass. In my experience, if there are any failures at all, either all the tests fail, because there’s a dependancy that failed to build and you can’t even ‘use’ the module, or one or two out of 45,000 tests failed, because there’s a tiiiny little broken case on whatever bizarre architecture I’m using this week, and I’m just going to force install it anyway. This would seem to be served better by a much simpler ‘does the thing superficially work?’ test suite used for deployment, separate from the development test suite.
Writing recursive closures
15 December 2004
in blog
tagged with
[perl]
I discovered the other day that you can do quite horrifying things with perl. A closure in perl is a nice concept - it’s a block that can reference things in the scope that it’s declared in, but that can be passed around and used in quite different scopes. For instance, suppose I wanted a function that, say, converted a string to utf8 bytes (yes, I’m obsessed with utf8). I can do this like this:
my $closure;
$closure = sub {
my $val = shift;
return Encode::encode("utf8", $val);
};
And call it later as:
print $closure->("héllo");
This is dead nifty. But because a closure can reference things in it’s scope, and $closure is in it’s scope, it can call itself, or at least, it can call the function pointed at by $closure. So we can make this function recursive:
$closure = sub {
my $val = shift;
if (ref $val eq "ARRAY") {
return [ map { $closure->($_) } @$val ];
} elsif (ref $val eq "HASH") {
return { map { $_ => $closure->($_) } keys(%$val) };
} else {
return Encode::encode("utf8", $val);
}
};
Until the assignment is complete, the inside of the closure won’t work, because $closure is undefined. But by the time we call it later..
return $closure->( [ "héllo", { foo =>"bår" } ] );
..everything works.
Crazy, I tell you.
UTF8 Openguides
13 December 2004
in blog
tagged with
[perl]
[unicode]
[utf8]
[wiki]
I foolishly offered to make OpenGuides UTF-8 safe. Because I don’t do that enough at work, or something. Anyway, it’s going quite well - because I did all the grunt work in CGI::Wiki a while ago, it’s just a matter of finding all the inputs and outputs and making sure they’re encoded properly. So far, the page contents and names are utf-8 safe, along with the cookie preferences, so your username is good. The search stuff looks scary, and there are various broken plugins, etc, etc, so there’s still stuff to do. I should also do the hooks properly - CGI::Wiki should offer nice functions for this stuff.
Anyway, there’s a demo site here in case you feel like trying to break it. The patch against OG is here, out of my svn repository, of course.
London Perl Workshop talk
11 December 2004
in blog
tagged with
[cocoa]
[perl]
I gave a talk today at the London Perl Workshop, brilliantly organised by a shadowy cabal of mysterious figures. Every talk I saw was great, to the point that the inevitable clashes with other talks that I wanted to see were really annoying, but fortunately everything was filmed, so presumably there’ll be video of the talks I missed available at some point. Likewise, all the slides will be around at some point, but until then, my slides are here. Powerpoint, I’m afraid, it’s what the work laptop has, and 1.5 megs, because it’s full of pictures…
Class::Persist 0.30
10 December 2004
in blog
tagged with
[perl]
[release]
I’ve done something I’ve wanted to do for ages - get another release of Class::Persist out. This one I consider massively improved over the last one - it’s dropped some of the nastier dependancies, doesn’t require it’s own magic database tables to be created, can properly put objects into more than one database, and, my personal favourite new feature, all objects are maintained properly as ‘singletons’ - you can only have one copy of any given object around at any one time.
The release should be here: Class::Persist 0.30.
Bot::BasicBot 0.5
01 December 2004
in blog
tagged with
[irc]
[perl]
[release]
Bot::BasicBot 0.50 is released. The big thing in this one is nick tracking - the bot will keep track of what nicks are in a given channel, and if they’re opped or not - this is mostly so I can re-write slavorg on top of Bot::BasicBot, and bin slavorg2…
Release Frenzy!
16 August 2004
in blog
tagged with
[irc]
[perl]
[release]
[wiki]
Had a bit of a release thing over the weekend, new versions of Bot::BasicBot, URI::Title, AudioFile::Identify::MusicBrainz were released, and I’ve also given the world URI::Find::Simple. Now I need a release of Bot::BasicBot::Pluggable to sync it up with Bot::BasicBot, and I have some german translations to integrate into CGI::Wiki::Kwiki. Insane, I tell you.
AudioFile::Identify::MusicBrainz
13 August 2004
in blog
tagged with
[mp3]
[perl]
[release]
After much muttering back and forth between blech and I, I have written and released AudioFile::Identify::MusicBrainz. The old MusicBrainz client relied on the C library they distribute, which was silly for something that sent and recieved pure RDF, so a pure-perl implementation was just begging to be written.
So, upsides, it works, there’s exactly one sort of query you can send it, but that’s fine, it’s the important one - you can say ‘I know this about a track, tell me more’. The next step is to give the user a nice choice, and then let them write the updated information back into the ID3 tag.
Downsides, I’m not using ‘real’ RDF parsers, I’m using XML::DOM. This worries me, frankly, I’d much rather do the right thing, but I get a headache trying to make the perl RDF stuff work. There’s an RDF::Simple out there now, though, so maybe I’ll try that…
I’m going to get a reputation here for stupidly long module names, you know.
broken tick
13 August 2004
in blog
tagged with
[irc]
[perl]
I’m releasing another Bot::BasicBot at the moment, to change the semantics of the tick() method. Instead of getting called every 5 seconds, you now need to return a value from the tick() method, and you will be called again in that many seconds. this is waaay more useful than before, but of course it’ll break anything that uses it. Oops. But 0.2 has only been out a short time, so I should get away with it.
More of a problem is what to do with Bot::BasicBot::Pluggable, because I now can’t just pass the tick method straight through. I have a new version in CVS that I’m very happy with, needs more tests, though, but the feature still stopping release is per-module tick events. I want every module to be able to have independant tick events, instead of sharing one global tick, but haven’t come up with an elegant way of doing it yet..
CGI::Wiki::Kwiki
13 August 2004
in blog
tagged with
[perl]
[release]
[wiki]
Well, in the end, rather than fold my code into CGI::Wiki and its example scripts, Kake has persuaded me to release the thing as an actual module. So, the world now has CGI::Wiki::Formatter::Kwiki and CGI::Wiki::Kwiki. I’m not sure about the name of the latter, but given that is was mostly written as a Kwiki importer and front end, it made the most sense. I hope that people also realise that it doesn’t have to have anything to do with Kwikis at all, and can be used as a stand-alone wiki front end..
They still have very small version numbers, the formatter needs code, tables and comments, and the Wiki front-end needs tests (bad me), but as far as I can tell, for the most part they both work. The code is much cleaned up from the “last release”:/blog/programming/CGI-Wiki, all modular and everything, I’m much happier with it now.
You can get them both from CPAN.
Bot-BasicBot-Pluggable 0.04 released
13 August 2004
in blog
tagged with
[irc]
[perl]
Hah, finally I bullied simon into releasing Bot::BasicBot 0.04, allowing me to release a version of Bot::BasicBot::Pluggable that actually installs and builds and works. Thanks, Simon. I’ve bumped the version number to keep in sync with BasicBot, not totally sure why, as I suspect I’ll rapidly overtake it, but I’d like to get >10E-1 at some point…
Anyway, read the docs, or download the code, send me feedback.
blogroll
13 August 2004
in blog
tagged with
[perl]
[template]
[xml]
Ah ha! I have a blogroll. Ph33r me.
In other news, Template::Plugin::XML::Simple is really nifty.
<p class="code">
[% USE blogroll = XML.Simple('/export/home/tomi/web/jerakeen.org/blogroll.opml') %]
<p class=header>blogroll</p>
<p>
[% FOREACH section = blogroll.body.outline %]
<a href="[% section.htmlUrl %]">[% section.text %]</a>
[% UNLESS loop.last %]<br />[% END %]
[% END %]
</p>
build_m3u
13 August 2004
in blog
tagged with
[mp3]
[perl]
I was reading this article on m3u files and decided to scratch one of my long-term itches, building a decent windows playlist on the file server. It’s a.. large collection, so I don’t want to build things on the client end, you see, it takes bloody ages.
Up till now, I’ve just created a list of paths, and used that as the playlist. This had 3 disadvantages:
- it’s very hard to have it sorted by anything useful, using the filename is hopeless as there are several different naming conventions involved. blech’s fault.
- I’d quite like to have the track lengths already by the tracks when winamp starts, as opposed to have it add them whenever you see them.
- for some reason, winamp starts much faster when there are EXTINF tags in the playlist file. Don’t know why. Don’t care.
So now I search the server for files, read the id3 tags, sort by artist/album/tracknum/title and print out, along with the track length and name in an EXTINF tag. The whole process takes almost exactly 2 mins, but it’s not very memory-efficient. For various complicated reasons the server has almost a gig of memory in it (ok, they’re not complicated reasons - we just don’t own any other boxes that can use the stuff) so I don’t care about this.
code is here, if you care. It’s hard-coded for my server, but the only thing you’d really need to change is at the beginning, where $root and $remote are defined - $root needs to be where the music lives on the server, $remote is where it lives on the network. For my server, I samba share /music on the server cowboy as cowboymusic. Also, $playlist should be where you want the playlist to go.
Bot::BasicBot::Pluggable
01 January 2000
in code
tagged with
[irc]
[perl]
Bot::BasicBot::Pluggable is a framework for writing IRC bots, based on Bot::BasicBot. It hides all the annoyance of having to deal with the IRC protocol, and lets you write small, self-contained modules that perform specific tasks.
Toybox
01 January 2000
in code
tagged with
[cocoa]
[macos]
[perl]
[webkit]
ToyBox is my web browser. It’s written in perl, using Camelbones. At one point it was one of the smallest Camelbones apps in the world, but now the graphics for the buttons have bulked it up a bit.. Annoyingly, it’s not pure perl - I needed some ObjC to handle drag and drop and things - with the 0.3 CamelBones, this should be avoidable, I really should update it.
Template::ModTT
01 January 2000
in code
tagged with
[perl]
[template]
mod_tt is an apache handler that processes Template Toolkit templates natively in the apache server without the configuration overhead of a full mod_perl and Apache::Template install. Template::ModTT (this module) is the perl interface to the mod_tt hander available to you when running under mod_tt.
