2shortplanks's Journal http://use.perl.org/~2shortplanks/journal/ 2shortplanks's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:02:08+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 2shortplanks's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~2shortplanks/journal/ Tor http://use.perl.org/~2shortplanks/journal/21233?from=rss Ooops, I've not been writing in my journal again. I've been busy writing Perl code (or at least, patching Leon's code) honest guv. Oh, and trying to organise things like the London.pm social meeting tonight or the upcoming London Perl Workshop. <p> Today I found out the rss feed that I wrote for the infobot to work out the current time was broken. Basically, the script goes off to timeanddate.com and looks at the <a href="http://www.timeanddate.com/worldclock/">tables</a> on there to work out what time it is the world (since it's easier than working it out yourself - especially when countries keep updating their laws about what time zone they're going to be in and when they're going to daylight saving.) The <a href="http://2shortplanks.com/temp/time2.txt">script</a> as read should have been able to parse the string, but we were getting all these "Tor"s in our output. </p><p> Of course, "Tor" is Swedish for "Thu". </p><p> Yep. The webserver was looking at the accepted languages and if there was no header it was sending back a sweedish version. So what I was seeing with my browser (that was sending those headers) wasn't the same as what LWP was getting. It never used to do this - to be honest, we English speakers of the world are too lazy, we just assume if we don't specify these kinds of things we're going to get English back. </p><p> An additon of:</p><blockquote><div><p> <tt># all those need to have the english headers now<br># or time and date will send us the times in sweedish.&nbsp; bork bork bork<br>WORLD-&gt;header("Accept-Language" =&gt; "en");<br>US-&gt;header("Accept-Language" =&gt; "en");<br>EUROPE-&gt;header("Accept-Language" =&gt; "en");</tt></p></div> </blockquote><p>and everything works again.</p> 2shortplanks 2004-10-07T11:32:52+00:00 journal Life hack http://use.perl.org/~2shortplanks/journal/21071?from=rss At YAPC::Europe this year they had a section called <i>life hacks</i> where you show other people things from your <code>~/bin</code> directory in the hope that someone else might find it interesting. I was too busy at the time to share mine, so I thought I'd post it here. <p> My all time killer script is the one that Tom Insam came up with after we discussed the problem for a while. Basically, we do all our work on a development server and we can ssh and samba mount the device. When I'm working locally on my laptop I can edit any file by typing <code>"ec $filename"</code> and it loads in my local editor (a Carbonized Emacs.) I wanted the same thing when I'm sshed in to the development box. </p><p> So Tom came up with the idea of writing a script that starts another ssh session to the dev box and tails a file on the dev machine. The ec script on the dev machine writes to the end of the file instead of starting a process. The local end of the new ssh tunnel gets the filename and then spawns a local process to edit the file with my local editor over samba. Sweet! Completely transparent. </p><p> Of course it's more complicated than that. Whole YAML data structures get written to the file, so in theory at a later date I can extend the script to do something more useful. And I no longer run it as a shell script, I've got a CamelBones application written that runs the script and tails the output. </p><p> I know it's a simple idea, but the simple ideas are normally the best. It means I don't have to use a X11 forwarded editor from the dev server (eeek) nor do I have to have a seperate terminal for editing (running locally in the directory mounted via samba) and executing code (running remotely over ssh) on the dev server. </p><p> Huzzah.</p> 2shortplanks 2004-09-27T12:46:21+00:00 journal YAPC::Europe::2004 http://use.perl.org/~2shortplanks/journal/20923?from=rss So, I've been really lax in keeping up with my journal over YAPC::Europe. As you can guess, that was because I was busy. <p> Let's see, what have I been doing with my days? </p><p> I've listened to many talks. The ones that stick out are the <a href="http://belfast.yapc.org/wiki/index.cgi?CreatingCrossPlatformGUIProgramsInPerl">talk on WxPerl</a> (short summary: It may be the best tool for the job but it's not a good enough tool to use if that's not what you need the tool to do,) <a href="http://belfast.yapc.org/wiki/index.cgi?UsingPerlToDealWithMicrosoftExcelFiles">Spreadsheet::WriteExcel</a> (soon: charts!) <a href="http://belfast.yapc.org/wiki/index.cgi?AMatterOfCharacter">Unicode</a> (databases are fun,) and <a href="http://belfast.yapc.org/wiki/index.cgi?UsenetGems">Usenet Gems</a> (substr in lvalue context can be odd.) There were also gazillions (well, twenty) <a href="http://belfast.yapc.org/wiki/index.cgi?LightningTalks">lightning talks</a> I watched and they were all really interesting. </p><p> I gave <a href="http://2shortplanks.com/talks/yapce2004/">three talks</a>. The one talk I knew I was giving before I got there was on bundling. I then found out from Geoff I'd had a lightning talk accepted (on Perl and UTF8) and I ended up padding out the end of the WWW Smackdown talk session with an hour from my CPAN Modules talk (in the process of I drunk half a litre of water and still had a dry throat by the end.) I think they all went well in the end, and considering I wasn't expecting to give so many before I arrived, I think I did okay. </p><p> Of course the best thing about YAPC is the chance to meet up with people who I don't get to see that often. In addition to many of London.pm who don't make it to every social meet, there was Birmingham, Paris and Stockholm Perl Mongers in full effect. If I spend time listing all the people who I got to speak to - only briefly - I'd be here all evening. In the end I got my mini-axkit-bof. And I sat in many a scary conversation (including Tim Bunce on the problems with utf8 and databases which has given me quite a bit to think about.) </p><p> What have I been doing with my evenings? We boozed the Tuesday night at the crown, on Wednesday I went for sushi and then headed home early (and ended up hacking automatic unicode handing into Spreadsheet::WriteExcel,) and on Thursday we all headed off to <a href="http://www.theodyssey.co.uk/">the odyssey centre</a> where we split off and ran around doing all kinds of mad things (I had tapas, played air hockey, watched people bowl, play pool and shoot zombies, and of course went to one of the bars.) I tried to stay out of the Crown <em>too</em> much, and almost succeeded most of the time. And Friday night? I'm sitting in the airport watching planes land and writing this (wireless++). </p><p> All in all it was a great conference, it had it's highs and it's lows. But in the end Karen, Marty, and all the orange clad helping crew did an excellent job. Now all I have to do is sit down and go though my notes and work out all the interesting titbits I've learnt so I can write them up here.</p> 2shortplanks 2004-09-17T17:54:58+00:00 journal Leaving...on a jet plane http://use.perl.org/~2shortplanks/journal/20852?from=rss ...pretty sure I'd better be back on friday night in time for a wedding in london on saturday again... (yes, that doesn't scan as well does it) <p> So, I'm just going throught things I need for YAPC::Europe, sorting my life out. This mainly involves not losing my passport again (since I have no other photo id - that and Erena would kill me,) buying Roobios tea to take with me (so I don't have to hunt for health shops in Belfast) and backing up my laptops (which I do every time I go away, and was really grateful I did when my old laptop hard disk died on the way back from Amsterdam in 2001.) </p><p> Still to do; Charge Laptop Batteries. Pick up camera cable. Don't lose plane tickets (paper...how quaint.) Update slides. Put multiple copies of slides on both laptops. </p><p> So, who do I want to meet? I'm going to scare matts by tracking him down and making him look at the Axkit / TT stuff and ask him how I do caching. I'd like to have another game of cards with the Belfast lot. And there's numerous other people I should bump into. Let me know here (or on my <a href="http://belfast.yapc.org/wiki/index.cgi?MarkFowler">wiki page</a>) if you want to meet up.</p> 2shortplanks 2004-09-13T12:53:32+00:00 journal Lots: perl.com article; Test::utf8; Tech meet. http://use.perl.org/~2shortplanks/journal/20816?from=rss Wow. It's all come together in the last 24 hours something chronic. I've uploaded a new module to CPAN. I've had a Perl.com lighting article published. I've given two talks at last night's London.pm technical meeting. <p> The <a href="http://www.perl.com/pub/a/2004/09/09/lightning.html">lightning article's</a> essentially on Test::DoubleEncodedEntities, but it's really about automatically detecting the errors that you can't normally see when you're working because even though they're obvious you're so focused on what you're doing you totally miss them. The theme was extended in the <a href="http://2shortplanks.com/talks/dumb_errors/">first talk</a> on "dumb errors" I presented last night. </p><p> That talk moved onto talk about my new module <a href="http://search.cpan.org/~markf/Test-utf8/">Test::utf8</a> that I released last night. It's a testing tool for dealing with utf8, and along with testing if perl has encoded something utf8 or not, and if the string will fit in ascii or latin-1 it has some rather nifty tests that help catch when things go wrong. It's got a <code>is_valid_string</code> test that can test if a string that is marked as utf8 contains valid utf8. And it's got a test that (taking a leaf out of Test::DoubleEncodedEntities) can tell you if you've double utf8 encoded your string or not (or forgotten to flag it as utf8 somehow.) There's a new version of the module on it's way to CPAN as I type this following the feedback I got last night - it was pointed out that the name <code>is_dodgy_utf8</code> was confusing (as it was testing it isn't dodgy utf8) and has been changed to <code>is_sane_utf8</code> </p><p> The <a href="http://2shortplanks.com/talks/phalanx">second talk</a> I did was the start of my campaign to get London.pm involved in the <a href="http://qa.perl.org/phalanx">phalax</a> project. It was reasonably well received and got a few laughs. We'll have to wait to see if we get any converts. </p><p> Aside from my own talks, the other talks were pretty cool too. Alex's live demo of his music editor which he talked about in his <a href="http://www.perl.com/pub/a/2004/08/31/livecode.html">recent perl.com article</a> was really quite cool and much more impressive than I thought it would be. He really can produce quite cool tracks just by typing code. </p><p> Tom's preview of his upcoming talk at YAPC was quite fun, and I think once he makes the modifications we've suggested to him it'll be a really good talk. </p><p> Simon gave a final "What I've been hacking on" which was a wonderful, if brutally honest, talk about what he's been doing and what stage he's at. He was unashamed in both pushing the new programing ideas he's been working on - extensions to maypole he's been developing while creating new applications to make it even more flexible - and pointing out that he never completes anything (and thanking Simon Wistow for completing everything he'd started.) We're going to miss Simon now he's going away. </p><p> That's enough journaling for now. And under no circumstances should I mention the variation of "<a href="http://www.brewthis.com/Games/37535.html">Drink while you think</a>" that was proposed in the pub last night where you use CPAN modules rather than famous people.</p> 2shortplanks 2004-09-10T10:27:48+00:00 journal One of those days http://use.perl.org/~2shortplanks/journal/20597?from=rss It's one of those days. Even the fun little hack I was writing in CamelBones hates me this afternoon. Documentation (From O'Reilly's Cocoa In A Nutshell):<blockquote><div><p> <tt>&nbsp;<nobr> <wbr></nobr>// Read all available data and converting it to a string<br>&nbsp; NSData *data = [fh availableData];<br>&nbsp; NSString *str = [NSString stringWithData:data];</tt></p></div> </blockquote><p>My code (in Perl:)</p><blockquote><div><p> <tt>&nbsp; &nbsp;my $data = $outhandle-&gt;availableData;<br>&nbsp; &nbsp;my $string = NSString-&gt;stringWithData($data);</tt></p></div> </blockquote><p>The debugger:</p><blockquote><div><p> <tt>&nbsp; Exception raised during posting of notification.&nbsp; Ignored.&nbsp; exception:&nbsp; *** -[NSConcreteFileHandle availableData]: Invalid argument</tt></p></div> </blockquote><p>Bah. Everything hates me.</p> 2shortplanks 2004-08-27T15:36:41+00:00 journal &amp;amp;eacute; http://use.perl.org/~2shortplanks/journal/20515?from=rss Don't you just hate it when it all goes wrong and you end up with &amp;eacute; rendering on your webpage? Because you've some how managed to get &amp;amp;eacute into your source code by double entity encoding your document. <p> It'd be nice to automatically test for that. So I wrote a <a href="http://unixbeard.net/svn/mark/perlmods/Test-DoubleEncodedEntities/">Test::DoubleEncodedEntities</a> to do just that. Winging it's way to a CPAN mirror near you as I type.</p> 2shortplanks 2004-08-23T12:46:46+00:00 journal Data::Structure::Util http://use.perl.org/~2shortplanks/journal/20472?from=rss So, why the boss is away the cats will play. Or rewrite large chunks of the documentation for the boss' code anyway. <p> This week when I have not been staring intently at internal Fotango code I have been rewriting the documentation and fixing some of the bugs in Data::Structure::Util. Later version in Fotango's Open Source <a href="http://opensource.fotango.com/svn/trunk/Data-Structure-Util/">svn</a>. It'll have to wait for Pierre to get back off of holiday before I can convince him to release it to CPAN.</p> 2shortplanks 2004-08-19T11:04:03+00:00 journal Splish Splosh http://use.perl.org/~2shortplanks/journal/20458?from=rss So, Jesse and Jody were in town and we thought we'd treat them to a nice sunny evening sitting outside by the river. <p> It didn't <a href="http://2shortplanks.com/temp/rain_small.jpg">exactly go to plan</a> </p><p> Also, just to kick us when we're down some utter b*$!ard stole Melin's bag from the sushi place we went to recover in. The utter f%&amp;k. We didn't even see how the little s*!t could have got past us. </p><p> Apart from all that, not a bad evening. *sigh*</p> 2shortplanks 2004-08-18T23:40:03+00:00 journal Have xcode, will cargo cult. DANGER: Thunking ahead. http://use.perl.org/~2shortplanks/journal/20419?from=rss So, Perl wise, I've made a start on the thunking layer. It now seems to work okay - in the end I did it by polluting the error classes with extra methods. It's all a bit "run it and see if I get the right errors" atm. What I have at the moment in theory is the one I build to throw away (but we all know how often we end up keeping those.) <p> My next step is to beef up the test suite - the whole things runs out of an Apache::Test environment - so I can check that you can catch all the errors in the right place. </p><p> I've also been cargo culting like crazy with <a href="http://www.codingmonkeys.de/map/log/archives/000107.html">SubEthaFari</a> which is a little mac xcode project that you build and shove in the right place in your ~/Library and through some crazy method swizzling (Object-C symbol replacing) it causes Safari to open it's source in SubEthaEdit rather than it's own source code viewer. This would be great, apart from two things. One, I can't use SubEthaEdit at work without either breaching the license terms or paying for it. Secondly, it's not emacs or vi. </p><p> So I followed the <a href="http://2lmc.org/spool/id/4537">advice of others</a> and did the two line change that <a href="http://unixbeard.net/svn/mark/xcode/EmacsFari/">made it work</a> with the carbonised Emacs.app.</p> 2shortplanks 2004-08-15T22:13:15+00:00 journal Incompatible Errors http://use.perl.org/~2shortplanks/journal/20413?from=rss So, I've got the basic Template Toolkit and Axkit language handers working again. It's in <a href="http://unixbeard.net/svn/mark/perlmods/Apache-AxKit-Language-TT2LibXML/">svn</a> if you want to take a look. Still no dealing with caching, still no advanced configuration options. <p> So I've hit the same problem I had last time. Template Toolkit and AxKit basically have incompatible error handling. They both use objects to do their error handling and they both are naive enough to assume that any object thrown is one of their own type. For example, AxKit:</p><blockquote><div><p> <tt>sub prep_exception {<br>&nbsp; &nbsp; my $err = shift;<br>&nbsp; &nbsp; if (ref($err)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; return $err;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp;<nobr> <wbr></nobr>...</tt></p></div> </blockquote><p>Um...that's not good. if you return a Template::Exception object things are going to go very wrong (because there's no throw method for a start). Even worse is Template::Service:</p><blockquote><div><p> <tt>&nbsp; &nbsp; # there shouldn't ever be a non-exception object received at this<br>&nbsp; &nbsp; # point... unless a module like CGI::Carp messes around with the<br>&nbsp; &nbsp; # DIE handler.<br>&nbsp; &nbsp; return undef<br>&nbsp; &nbsp; &nbsp; &nbsp; unless (ref $$error);</tt></p></div> </blockquote><p>...what you mean like AxKit does. Botheration. </p><p> I'm going to probably have to introduce some thunking, which probably means patching either AxKit or Template Toolkit, or probably both. Darn!</p> 2shortplanks 2004-08-15T11:04:33+00:00 journal More on AxKit and TT http://use.perl.org/~2shortplanks/journal/20390?from=rss So I've again been playing around with the idea of a Template Toolkit Language plugin for AxKit. Developing the example in kip's <a href="htto:wwwaxkitbookorg">book</a> to work with XML::LibXML. Which should be really easy, apart from the fact that Template::Plugin::XML::LibXML wasn't passing tests. Ooops. Much patching of the tests and a release to CPAN yesterday fixed that. <p> So I've been actually trying to use Apoche::Test to test this module and I'm slowly getting there. It's quite swish when it works (we don't use it ourselves at work because apparently it's too clever and autodetects things outside of our build system!) I'm currently playing with writing dummy AxKit lanaguages that unconditionally dump different things in the pipeline so that I can test that the TT language reads and understands the previous data from the pipeline fine. </p><p> Once I've got the basic version done there's still big problems ahead. Firstly, there's the issue of caching. Currently I'm creating a new TT object every time, which means that every single time a TT stylesheet is used it's turning the template into Perl code. This is about ten times slower than reusing an existing lump of code. So I need to somehow merge TT's providers with AxKit's providers so that caching works. Which should be fun. The second major issue is configuration. As far as I can see it atm, the configuration for things like INCLUDE_PATH that kip's already done is on a per server not per stylesheet basis (or perl Location block directive). I'm not sure what the right thing to do here is...I'll have to give it some thought. </p><p> Anyway, slowly but surely.</p> 2shortplanks 2004-08-13T07:43:43+00:00 journal Messing around with httpd.conf http://use.perl.org/~2shortplanks/journal/20339?from=rss So, I decided last night to have a complete reorg of my httpd.conf. I broke each of the virtual hosts up into their own files, so I have<nobr> <wbr></nobr>/virtual/twoshortplanks.com/www/conf/httpd.conf for example, and then use the Include directive to bring them into the main file. This means that all the stuff for each virtual host is truly under<nobr> <wbr></nobr>/virtual now and makes things like backing up a lot clearer. <p> However, I want to go a little further. I'm fed up taking down and bringing up the main servers every time I want to change a config change (which is quite often when I'm playing around with AxKit for example.) So I want to be able to run each virtual host standalone on a high port as well as run it as part of the main server. To this end I've split the remaining main httpd.conf into a common.conf and all.conf. And I've implemented a standalone.conf for each virtual host that uses the common.conf and starts the high-port server. </p><p> This is all fine and dandy, but what I want is an apachectl for each of these development servers. Which leads me to a problem. They're written in bash. Has anyone got any idea how to referrer to a file relative to the bash script itself (i.e. what Perl's FindBin module does?.) I really don't want to have to have a apachectl file that's hardcoded for each and every server.</p> 2shortplanks 2004-08-10T09:53:22+00:00 journal Articles, TBT, Books, CamelBones and YAPC::Eu http://use.perl.org/~2shortplanks/journal/20157?from=rss So, my <a href="http://www.perl.com/pub/a/2004/07/30/lightningtalk.html">article</a> got published on Perl.com. Huzzah. It seems to have gone through some strange change from English English to American English enroute, but hey ho, I'm not picky. <p> I released a new version of Test::Builder::Tester. Minor change to deal with the new Test::Builder that Schwern is going to release Real Soon Now. If you use TBT, I recommend re-releasing your module with a dependancy on the new version so that if anyone installs the new Test::Harness their tests don't unexplainedly fail. </p><p> The <a href="http://www.axkitbook.org/">AxKit Book</a> arrived at work yesterday and I've been pouring over it ever since. It's really good, just thick enough to contain what I want to know without being too thick. It's an irony for all the time I hang out on #axkit-dahut that I've never really used AxKit itself in anger (just all the XML tools it's made up of.) Maybe that's time to change. I'm only slightly upset that ORA seem to have let so many typographical errors slip into the book - there's some examples that contain fragments of XML that are obviously (after a bit of head scratching) meant to indicate things to the publisher (e.g. make this bit bold) and have no place whatsoever in the example that is being covered. But hey, I can live with that. I'll have to get my tippex out when the errata is published. </p><p> I've been playing more and more with <a href="http://camelbones.sourceforge.net/">CamelBones</a> and have had a go at developing some simple applications in this. It helps that the local expert jerakeen sits across the desk from me and I can keep prodding him when I can't get something to work. I'm really impressed that I could write one class in ObjectC and another in Perl and they all interoperate seamlessly - without me having to write a line of XS code! This stuff rocks. </p><p> Oh, and in other good news we've finally got that little bit closer to organising YAPC::Europe from work - acme, richardc, jerakeen, Nicholas and I will be staying in the <a href="http://home.btconnect.com/Days-Hotel/">Days Hotel</a> with all of Birmingham.pm if you want to join us.</p> 2shortplanks 2004-07-31T08:23:42+00:00 journal Typing random unicode on Mac OS X http://use.perl.org/~2shortplanks/journal/20145?from=rss Not strictly Perl related this one, but I've been spending so much of my time dealing with random unicode when I've been programming in Perl that I thought I might share: <p> Normally I use the american keyboard layout (since, as a Perl programmer I really want shift-3 to give me # not &#163;.) This means when I hold down 'Alt' in most applications I can type things like &#8220;special quotes&#8221; and f&#252;nny l&#233;tt&#233;rs. All good and well, but occasionally there's a unicode charecter that I know the code for but there's no keyboard shortcut for. </p><p> Lots of googling later and I'm a little more informed. You know within "International" in "System Preferences" you can enable one or more keyboard drivers in the "Input Menu" that you can switch between (with command-space and alt-command-space, or by using the 'show input menu in menu bar' option.) As well as enabling the charecter palette that allows you to scroll though seemingly all of unicode (useful, if not a bit tiresome every single time you want to enter a letter) you should also enable 'Unicode Hex Input'. When you switch to this keyboard driver it acts just like it would if you were using the american keyboard (yey) but changes the way the 'Alt' key works. Now holding down 'Alt' and typing the UTF-16LE code for the charecter (i.e. the hexcode for the codepage) allows you to enter any unicode charecter you want. Cor, it's just like using Windows again.</p> 2shortplanks 2004-07-30T09:52:44+00:00 journal Four things I learned at YAPC::NA http://use.perl.org/~2shortplanks/journal/20128?from=rss So I just mentioned this on IRC, but I guess I should write this down somewhere where it's not going to vanish <ol> <li> <code>prove</code> is a Test::Harness thingy that you can run test scripts from the command line without using make. It ships with later Test::Harnesses</li> <li> <a href="http://simonf.com/flap/">AMF::Perl</a> is a way of requesting data structures from a webserver in a structured way from Flash</li> <li>More people should know about <a href="http://search.cpan.org/~geoff/Apache-Test/lib/Apache/Test.pm">Apache::Test</a></li> <li> <a href="http://search.cpan.org/~robm/Cache-FastMmap/FastMmap.pm">Cache::FastMmap</a> is a way to do cool caching between processes on the same host with a memory mapped file and <a href="http://search.cpan.org/~bradfitz/Cache-Memcached/Memcached.pm">Cache::Memcached</a> is a cool way to do a cache with a deamon that many hosts can share (not that I've tried either modules yet)</li> </ol> 2shortplanks 2004-07-29T12:41:11+00:00 journal Wost Unicode Joke In the World Evah http://use.perl.org/~2shortplanks/journal/20107?from=rss I've spent too long looking at encodings today. I've created a bunch of <a href="http://2shortplanks.com/unicode/charts/">charts</a> with a terrible hack of a <a href="http://2shortplanks.com/unicode/charts/chart.pl.txt">perl script</a> <p> I also came up with the worst <a href="http://2shortplanks.com/unicode/unicode_joke.jpg">unicode joke</a> in the world evah. I'm so very sorry. </p> 2shortplanks 2004-07-28T17:08:08+00:00 journal This and that http://use.perl.org/~2shortplanks/journal/19936?from=rss So, what have I been up to? Writing an article (which I hope to get published in Perl.com.) Patching Test::Builder::Tester to work with the latest alpha of Test::More. Working out who from Fotango is going to YAPC::Europe and when each of us are flying there and back (Nicholas, acme, jerakeen and I, at various times.) Writing my slides for the tech meet on thursday (outline done, just need to go though them tomorrow.) <p> And that's just the *Perl* stuff. Boy am I dog tired. </p><p> Shoulda gone to Pisa with acme<nobr> <wbr></nobr>;-)</p> 2shortplanks 2004-07-19T21:40:44+00:00 journal Working on the Tech Meet. http://use.perl.org/~2shortplanks/journal/19881?from=rss It's the next London.pm <a href="http://london.pm.org/pipermail/london.pm-announce/2004-July/000102.html">tech meet</a> on Thursday. <p> Organising technical meetings are hard. Organising lightning talk technical meetings are harder. </p><p> I've got fourteen speakers (excluding myself) that I've had to convince to speak at this tech meet. This means they've all been emailed and I'm waiting for their slides (if any) to turn up. I've emailed the announce list announcing the meeting. I've setup the <a href="http://london.pm.org/signup/">script</a> on penderel to allow people to sign up. I've written a guide to speaking at tech meets that I've emailed to all the speakers. </p><p> All that's left to do now is write my own talk, chase everyone to give me the slides, make sure that everyone who's attending knows they have to sign up in advance, get the list accross to morgan stanely, and have a nervious breakdown. </p><p> It's fun being London.pm leader sometimes. I can't make my mind up if this is one of those times.</p> 2shortplanks 2004-07-16T11:39:40+00:00 journal Hertics and Lighning Talk http://use.perl.org/~2shortplanks/journal/19649?from=rss We all went to the pub last night for the traditional Heretics meet. I should say we all did, but of course being the Leader of London.pm I couldn't possibly have turned up. You might have seen my evil twin there though. <p> We talked about the usual things. Shoes. Mail order shopping. Holidays. Visting famous landmarks (Pyramids, Dams, Waterfalls) Mucking about on Boats. Funny furrien languages. The usual stuff. </p><p> (This may be the majority actually linked to the upcoming and just passed Perl conferences...but that's another story) </p><p> After deciding we'd spent quite long enough in the pub some of us adjourned for Curry, but the more sensible of us headed off for Dutch Pancakes. Pancakes are good... </p><p> On an alternative note I see that registrations for <a href="http://belfast.yapc.org/">YAPC Europe 2004</a> have just opened, and so has the CFP for Lightning talks. I've submitted a talk proposal for using utf8 with Perl, because quite frankly I do believe you should be able to explain everything you need to know about Perl and utf8 in four minutes flat. I'll have to see if I get accepted.</p> 2shortplanks 2004-07-02T14:31:21+00:00 journal Test::Builder::Tester release, Test::DatabaseRow to come.. http://use.perl.org/~2shortplanks/journal/19628?from=rss I just released a new version of the test suite module testing module Test::Builder::Tester. We've been using it for a few weeks at Fotango and we haven't had any problems with it, so I thought it was about time I released it to the masses (so they can point out all the things I've forgotten to do in this release<nobr> <wbr></nobr>;-) ) <p> This version now allows you to ignore if the error output doesn't match what you've declared when you're checking the output of your test suite's test. This is most useful when you're developing stuff (I've been using it while I've been building the new version of Test::DatabaseRow) and you're not entirely sure what format the debug output's gonna take, and you don't want to write those tests just then. </p><p> The new version of Test::DatabaseRow's in my <a href="http://unixbeard.net/svn/mark/perlmods/Test-DatabaseRow/">subversion repository</a>. It has loads of new features - testing that all rows match a criteria, specifying criteria based on what a row contains, checking that rows come out in the right order... I think it all works now apart from the debug output - which is of course one of the most important things with a Testing tool - it has to help you <i>fix</i> the bugs once you've found them.</p> 2shortplanks 2004-07-01T16:34:43+00:00 journal The ongoing Mark Fowler world tour. http://use.perl.org/~2shortplanks/journal/19579?from=rss I've been accepted to speak at YAPC::Europe in Belfast, presenting the same talk on bundling stuff for CPAN that I presented at <a href="http://2shortplanks.com/talks/yapcna2004/">YAPC::NA this year</a>. Cool. And I've already written the slides, so I don't have to panic <i>too</i> much, and I'm only speaking for 20min (which is much less than the few hours I've been speaking at previous conferences.) This might actually give me time to sit back and relax at a conference for once. <p> I'm looking forward to it and catching up with people; Of course, just as with this year's YAPC::NA I'm going to be flying out the evening after the conference (this time it's someone's wedding I've got to get back for.) So this time I'm having the forethought to tell people; If you want to meet up with me and have a beer email me/leave a comment here/leave a comment on my wiki page on the YAPC::EU wiki and we'll see what we can do tuesday/wednesday/thursday night. </p><p> See you all in Belfast.</p> 2shortplanks 2004-06-29T16:29:05+00:00 journal Jetlag, unicode, Template Toolkit http://use.perl.org/~2shortplanks/journal/19530?from=rss So, jetlag is a pain in the rear. I'm still stuck in EST, even though I'm living in GMT+1 again. It'd be fine to stay this way, but I'm sure Fotagno would object to me getting into work five hours late, and I can't leave in turn five hours late from the office as that means the pubs would be shut by that time! <p> Not that our special <a href="http://stason.org/">guests of honour</a> turn up to the pub when we <a href="http://london.pm.org/pipermail/london.pm-announce/2004-June/000098.html">arrange meetings</a> for them, oh no.<nobr> <wbr></nobr>;-) </p><p> All this staying up to the wee hours has meant that I've had lots of time to code. This weekend I've mainly been <a href="http://www.template-toolkit.org/pipermail/templates/2004-June/006270.html">patching</a> the Template Toolkit to deal correctly with unicode templates. Which is nice.</p> 2shortplanks 2004-06-27T17:07:28+00:00 journal møøse http://use.perl.org/~2shortplanks/journal/19377?from=rss Wait three months for a journal entry and then two come along at once. <p> I've been playing a lot with UTF8 and the UTF8 flag a lot recently and I ended up creating <a href="http://2shortplanks.com/unicode/moose.pl.txt">This script</a> that creates this <a href="http://2shortplanks.com/unicode/moose.html">list</a> of what happens when you toggle on and off the UTF8 flag for various bytes, print the output to a utf8 filehandle and Devel::Peek Dump the scalar to see what Perl is actually storing. Fun huh?</p> 2shortplanks 2004-06-19T23:10:48+00:00 journal Long time no hear http://use.perl.org/~2shortplanks/journal/19376?from=rss So I haven't written in here in ages. Maybe I should comment on YAPC::NA. <p> My <a href="http://2shortplanks.com/talks/yapcna2004/">talks</a> went okay. People came up and asked sensible questions (which is great, as this means they've been paying attention.) Other people came up and said that they really liked both the bundling for cpan stuff as there's nowhere this is really documented well in one place (to my knowledge - please correct me if I'm wrong) and the modules I selected from CPAN for my talk as there's so many modules on CPAN they couldn't find the wheat in the chaff. It's always great to get feedback like that and is one of the reasons I love to talk. Thanks for everyone's kind words. </p><p> I should really get round to emailing the few people that I didn't get to say thanks for their talk. Geoff, if you're reading this both your <a href="http://www.modperlcookbook.org/~geoff/slides/YAPC/2004/">talks</a> rocked. Simon, though your <a href="http://simonf.com/flap/">talk</a> on AMF::Perl was plauged by technical problems, the software looks really promising. Allison, nice keynote. Perrin, I've learned about a couple of interesting <a href="http://search.cpan.org/~robm/Cache-FastMmap-1.06/FastMmap.pm">looking</a> <a href="http://search.cpan.org/~bradfitz/Cache-Memcached-1.13/Memcached.pm">modules</a> from you. Andy, Bill - you already know that both talks you did rocked. Ian, you've made me think about kwiki again. Worry about people in tin foil hats. </p><p> I took some pictures of which I got iPhoto to create a cruddy <a href="http://2shortplanks.com/temp/yapcna2004pics.html">web page</a> for me. See James and Alex soaked to the skin by several tons of falling Canadian water. Marvel at us watching Euro 2004 on dodgy video feeds. See Katrien being bored by Perl geeks. Be amazed by the funky waffle maker. </p><p> One of the things from the Town Hall was an idea mentioned to write a guide to writing lightning talks. When I get back from New York state, I'll have a go at doing this as London.pm is currently organising a <a href="http://london.pm.org/pipermail/london.pm-announce/2004-June/000097.html">Lightning Talk only tech meet</a> next month. Which, of couse I'm still looking for speakers from. Instructions how to apply in that link.</p> 2shortplanks 2004-06-19T23:05:39+00:00 journal 'ave a natter http://use.perl.org/~2shortplanks/journal/18281?from=rss So, I've been accepted to speak at YAPC::NA. <p> I've got two talks. Firstly there's a new version of the advent calendar talk, which I'm hoping has been accepted as a tutorial. It's another year on, and we're now up to a hundred modules that have been covered by the advent calendar. So, instead of listing all the modules I've picked this year, I'm going to pick my favorites (the favorites of the favorites as it were) and give a tutorial on using them. The CPAN modules every user should know about kinda thing. </p><p> This dovetails nicely with the twenty minute talk I'm giving as part of a London.pm presentation to the UK Unix User Group on Perl. I'm meant to be covering CPAN, showing how cool it is, so I'll probably use the same modules in that as in the tutorial - just without the explaining how the modules work kinda way. </p><p> The second talk I've got accepted for YAPC::NA is about turning a Perl module into a distribution. It's a short talk that covers things like writing a Makefile.PL, bundling the thing, writing simple tests, etc. The kind of thing that all Perl Programmers need to know. I suspect most people at the conference will know this already, but for the intermediate programmers there it should provide useful; More importantly, I think it's a talk that needs writing so there's a resource I can point people at whenever I talk about how Perl's distributions work. </p><p> All this reminds me I need to sort out the next London.pm technical meet, which looks atm like it could be clashing with the Austrian Perl Workshop. I shall have to give this some thought, and find out who, it anyone is going and schedule things accordingly.</p> 2shortplanks 2004-04-11T10:43:26+00:00 journal Meetings, Meetings and Meetings http://use.perl.org/~2shortplanks/journal/18279?from=rss So, there's been three London.pm meetings since I last wrote. First, there was the heretics meeting that took place at the Founders Arms. That was nice: Sitting by the side of the river on the first day of the year warm enough to do it. I still can't believe the barman had to ask "Are you serious" when I ordered twenty pints of special, a waggledance and a pint of lemonade. Maybe he had something against us Lemonade drinkers. <p> The main social meeting this month was at the Windmill on the eve of Good Friday, which meant it wasn't that busy. It's a small venue though so it filled up all the same. I was plagued by a terrible headache the whole day and ended up burbling to myself in the corner, or so it seemed.. hitherto finally turned up and we wished him a happy birthday in the traditional way(we bought him booze.) </p><p> Finally Abigale and his fiancee were in town, and unexpectedly so was I (long story...short version: don't lose your passport) so a few of us met up with them at the Windsor Castle (no, not that one, the pub in Notting Hill) yesterday and ate the truly excellent sausages.</p> 2shortplanks 2004-04-11T10:13:04+00:00 journal Test::DatabaseRow again http://use.perl.org/~2shortplanks/journal/18076?from=rss Just released a new version of Test::DatabaseRow. This copy's been bouncing around the Fotango CVS server for a couple of weeks now and seems okay; I just got the co-maintainance flag from Profero so I can continue to develop it. <p> The changes allow you to get at the results extracted from the database aafter Test::DatabaseRow after row_ok has executed. I'm not sure if I like this interface at all, but darn it, it is practical and saves you having to drop back to using the straight dbi when you just want to do that little bit more complicated test. </p><p> I had a thought about allowing Test::DatabaseRow to have munging functions to munge all values extracted before they're compared. For example, using OpenTDS with a MSSQL database you get back strings that are space padded and it'd be nice to be able to munge them to strip the extra spaces at the end of strings. </p><p> That'll have to wait to the next release.</p> 2shortplanks 2004-03-26T17:50:49+00:00 journal March Tech Meet http://use.perl.org/~2shortplanks/journal/17965?from=rss London Perl Mongers had a tech meet at Morgan Stanley last night. This is the coolest venue we've been in yet. Not only did they have a massive back projected screen, but every two seats had their own LCD screen showing what was on the main screen. How cool is that? <p> Oh the Perl! Yes, we did talk about that. Andy kicked off with his talk on Template::Sitemap, which is essentially how he created a simple XML format that, with a shedload of convince, can be easily accessed from within his website. Looked good - I've implemented similar things in the past, but never really abstracted it out from the site I was working on or added the functionality that makes the sitemap manageable. I look forward to the CPAN release. </p><p> Andy was followed by Shevek explaining Acme::HaltingProblem (which apparently has only one bug), and then jerakeen gave his talk on Bot::BasicBot. Bot::BasicBot was one of my modules that I gave up ownership on because I didn't have time to implement all the features that people were requesting. Tom's done a lot of work, especially in the boring mundane sections, like getting the damn thing to connect to channel if it fails for any network reason. I'd <i>never</i> have had the patience to do that. </p><p> After the break Nik talked about use DateTime to compute sets and intersections to work out a combination of outages on his network. Many questions were asked. Nik agreed that he'd post to the DateTime list to talk about it, so I await that post. He went on to talk about Text::vFile::asData that looks interesting, and reminds me that I should talk to richardc about applying some of the work they've been doing on parsing/generating iCal feeds to doing more with the London.pm.ics feed. </p><p> Shevek talked about SRS, which is a scheme for rewriting email addresses that are forwarded in order to verify that they came from where you thought they did when they're forwarded. </p><p> Finally Simon talked about Maypole, which as far as I can gather is toolkit for creating ways of rendering and editing databases, with powerful default states. Big applications in twenty lines of code. Powerful combination of Template Toolkit and Class::DBI. Looked interesting. I will wait the month he's going to spend (thanks to TPF donations) documenting the code. </p><p> I really enjoyed this meet. As I was saying to James, none of the talks were "This is the best thing in the world ever" or "We've developed the new framework that's going to make everything else obsolete". They were "there's this problem, and we wrote this/used this tool which was helpful maybe you'll find it helpful or do something similar too". I was impressed greatly by the number of talks that talked about other approaches that they'd tried and showed how they'd prototyped similar solutions in the past. Conference organisers take note: These are the kind of talks we really liked.</p> 2shortplanks 2004-03-19T11:09:32+00:00 journal Random Bits http://use.perl.org/~2shortplanks/journal/17911?from=rss Isn't it odd how we pick up random tips here and there? <p> Last week I showed someone the env perl trick. </p><blockquote><div><p> <tt>#!/usr/bin/env perl</tt></p></div> </blockquote><p> As the shebang line. This uses whatever Perl is first in your path. Today they showed me back in return the handy "recursive_test_files" option to Module::Build that lets you put subdirectories of tests in "t/". Sweet. </p><p> The best tip I've learnt and passed on (which I'm sure everyone else knows about by now) is using \G in the mysql shell. This prints out results with a line per column rather than trying to render some kind of table, meaning that things take way more space to print out but don't fall over horribly when the output is wider than the screen and wrapping occurs. </p><p> Hmm. I should apt-get install ispell on this box. Oh well, you'll have to put up with my speeling mistkes for a while.</p> 2shortplanks 2004-03-15T15:25:00+00:00 journal