Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

osfameron (3135)

osfameron
  (email not shown publicly)
http://greenokapi.net/blog/

Technorati Profile [technorati.com]

Journal of osfameron (3135)

Wednesday May 21, 2008
06:21 PM

Liverpool - talk on "Readable Perl", Tuesday 27th May

I only recently discovered GeekUp, a very loose grassroots tech/social meetup society in North West UK -- I think that this idea -- a very loose organization based in a number of towns, with no single technology focus, is probably ideal unless you're in a large city that can really support multiple tech groups. So I didn't expect everyone there to be a massive Perl fan, and of course I got some gentle teasing about Perl being unreadable... and so of course I ended up volunteering to do a talk on "Readable Perl"...

3345 Parr Street, Liverpool, 27th May
People like to claim Perl is line noise, with its sigils and regular expressions. But a lot of the features that make it possible to write, yes, truly awful, unreadable Perl, also let you write clean, maintainable code too.

  • those $%&* sigils!
  • There's More Than One Way To Do It
  • strings and data structures
  • map, grep, first class functions
  • metaprogramming and the CPAN
  • modern Object Oriented programming with Moose

20 minutes

If any perlmongers are in the area, it would be lovely to see you!

Thursday August 30, 2007
05:46 PM

YAPC::EU::2007::Vienna talks

First of all, a round up of the talks that I attended and some of those I wish I had.

Tuesday

Keynotes

Cog spoke on how to get the most out of a YAPC - funny and useful. Larry spoke, which was nice.

DB track

I would have liked to have seen Barbie's talk on Selenium, Juerd talking about tuits, Ranguard on evolving architecture, also apparently the perl/ssh for monitoring talk was good, and dakkar spent the morning in the Parrot hackathon playing with tree processing tools.

But I stayed in the DB track, catching the end of Smyler's "When MySQL Bites" (to get MySQL to not do certain insane things you have to tell it to behave "traditionally"). I stayed for Philip Stoev's talk on using MySQL client to talk to various databases (good subject matter but didn't hold interest) and Grrrr's talk on DBIx::Perlish (fantastic subject matter, weird syntax, crazy language hackery, didn't follow as closely as I should have. Note to self, as per Grrrr and mst, can't use overloaded ops for this, because you want to be able to really use flow control, which isn't covered by that interface.)

Catalyst track

I would have liked to have seen all of the talks (Jonathan Worthington on Parrot, markov's SOAP stuff, which sounded exciting when we discussed it at lunch - at last, some Perl SOAP stuff that might actually work!
Greg's funny talk. More markov on logging, Brian McCauley on "Usenet gems" and pjcj on the use of Perl in a London bank.) But you've got to make choices, so I settled for the catalyst track:

Saw mst's "Database Haters Anonymous". After first watching the awesome power of Linux failing to speak to a projector (this sight was common over the 3 days), we had a shorter, and angrier version of the talk, which was essentially "DBs suck. Software sucks. These people rock". Great fun, a potted overview of the people and some of the technology behind DBIx::Class.

I stayed for draven's (Marcus) talk about Iusethis. Great slides, interesting project, and Adam Bartosik on a Polish team's experience with Catalyst (sounded interesting, delivery could be improved, but props as a non-native speaker).

Various

I'd wanted to see Nigel Hamilton's talk on Trexy, but somehow having a reasonable lunch hour seemed more tempting. (This was my major critique of IPW2006 too, I think a lunch hour should last more than 1 hour).
I got to meet Nigel later in the week and discuss Trexy though. Nelson Ferraz's "Adventures in Perl 6" sounded great fun, but I plumped for acme's Scaling with memcached, which was great.

Next was difficult, and I had to skip Evil's news2mail (sorry!) and miyagawa's Web Scraper to see Jonathan Worthington on Parrot, but it was my only Perl 6 related talk, and I've never seen him talk before...
Interesting, especially as I've given up on trying to read and understand p6i in the last year. I had wanted to see BooK's Net::Proxy talk (highly acclaimed by everyone I spoke to who'd been to it) but ended up staying for Richard Dice's talk which was slightly dry to begin with, but was actually fascinating. Richard looked at various data about Perl, at the point of view of management and consultancies, and gave a convincing case for the importance of the role of The Perl Foundation.

Wednesday

Keynotes

Damian spoke about positronic variables. OK, as a concept, this didn't work out as useful and intuitive as Quantum Superpositions, but a Damian talk is something to be seen. A non-programmer could attend a Damian talk and be entertained. A great combination of research, improbable connections, silly surrealism, programming bravura, photoshop and theatre.

The sponsors of the "Jobs Fair" spoke for "5 minutes" each. This overran somewhat though, meaning that there was no time for coffee before Dominus's Repair Shop and Red Flags.

Dominus

OK, I'd have like to have seen various of the other talks, especially JJ on Functional Programming and the POE hackathon, but I've read Dominus's material on Red Flags, and wanted to see him perform it as he's a great speaker.

Didn't think all the examples worked as well as in the articles, but a great and useful talk.

Moose track

I missed clkao's talks on Jifty, as I've recently been playing with Moose. Stevan's talk was a little dry but I think communicated a lot of the advantages and excitement around Moose. Yuval's talk was inspiring in scope (his toy project MO uses a set of purely functional transforms to do very clever things to object model stuff) but was maybe a little overdetailed and I couldn't follow it very well.

Clash of the Titans

Dominus vs the Damian. How else would you schedule this? I'd seen Damian's Perl 6 update five or so years ago in Paris, decided to go for Dominus on functional parsing. Funnily enough, this is more or less the only chapter in HOP that I understand, so it was a useful refresher more than anything.

Thursday

Lightning talks

Some of the best lightning talks aren't:

BooK presented this year's French Perl Workshop with a cleverly put together video ("Iasse! Oui nide iou!")

A German from $foo presented Win32::GuiTest using... Win32::GuiTest. Fantastic (he had to move the mouse once to get the testing tool started again... but we'll let him off).

Cog did the last talk... and it overran just a little :-)

Other stuff of note: Abigail complaining that File::Copy is broken, parsing OCR using Regexps, a comparison of image processing tools (conclusion: use Imager for processing, GD for creation), Juerd explained a simple workaround to make unicode string handling consistent.

The value of advance preparation and remembering where you put things.

If I'd prepared my slides earlier, I could have seen various intersting sounding talks about AI, the debugger, demerphq on regular expressions, Abigail on solving sudoku with regexps, and Gerard Goossen's talk about MAD and another cog talk (on how NOT to write a Perl resume...)

But first of all I was working on my slides. The great thing about having slides which are 95% complete is that they will stay 95% complete for ages until I get enough adrenalin kick to finish them.

Then I mislaid my bag. In the office with the auction goodies. Thanks to the lovely organizers for their patience and for seeking me out before I cancelled I of my cards.

My talk

I would quite happily have seen the utterly lovely Karen Pauley, and mock's talk on scalable data collections looked intersting but... it's probably polite to attend your own talk.

This went ok - I think I had too much material and it could have done with being either funnier or more informative. Still, the slides are up here or at Skud's request on Slideshare.

Counterexamples

Saw Trelane on why Perl sucks (and what to do about it) and Marty Pauley on Perl Worst Practises, and why variables are bad. (See also: Haskell).

Thursday June 14, 2007
07:57 AM

Unexpected %INC behaviour on recursive use.

We noticed a lot of "subroutine redefined" warnings in our apache logs. A little investigation later, and it turns out the problem is with recursive uses.

Consider the following modules (named after the classic Italian metasyntactic characters)

package Pippo;
use strict; use warnings;
use Data::Dumper;
BEGIN { warn Dumper( { Pippo => \%INC } ); }
use Pluto;
sub dummy1 { ; }
1;

and

package Pluto;
use strict; use warnings;
use Data::Dumper;
BEGIN { warn Dumper( { Pluto => \%INC } ); }
use Pippo;
sub dummy2 {;}
1;

Here's some output for perl -c (trimming the Dumper output to just show these 2 modules)

$ perl -c Pippo.pm
$VAR1 = {
          'Pippo' => { }
        };
$VAR1 = {
          'Pluto' => {
                       'Pluto.pm' => 'Pluto.pm',
                     }
        };
$VAR1 = {
          'Pippo' => {
                       'Pippo.pm' => 'Pippo.pm',
                       'Pluto.pm' => 'Pluto.pm',
                     }
        };
Subroutine dummy1 redefined at Pippo.pm line 8.
Pippo.pm syntax OK

That is, the first module, Pippo, doesn't set its entry in %INC until after it's finished processing. The use'd module sets its entry in %INC immediately, which is handy, as otherwise we'd have an infinite recursive use. As it is, only Pippo gets used twice, triggering the "Subroutine redefined" warning.

I whined about this in #london.pm, and Nicholas suggested that the timing of this behaviour might possibly be considered a bug. Is there a case for saying that %INC should be set for the file first invoked by perl?

Recursive uses are very likely on the "well don't do that" list, but the timing surprises me in any case.

Monday July 17, 2006
03:34 AM

Firenze.pm July meeting

Happily, the tuna fish has returned to Rose's sushi bar, hurrah! I have a digital video camera on loan from my brother, who has decided he doesn't have anything interesting to do with it (in Kyrgystan) so I brought it along to embarrass the assembled (larsen, Mattia, Riccardo, Cicci, Emiliano, Simone, Anshul), stop conversation, and record a mixture of rather dark blurs and some very bright, slow motion blurs (as this is what happens in the low light mode). Among the topics of conversation:
  • Why we should really be using Java (but note to Java proponents, saying "there's lots of reusable code in the J2EE framework" won't impress most Perl programmers because by and large they will fall into one of 2 camps: the NIHers who may at a pinch use CGI and DBI and probably don't see the point; and the CPAN-addicted, who can't really see how Java has an advantage here.
  • On the other hand Perl programmers may not say "Java is slow" as often as proponents of other languages (perhaps because we get that too...)
  • How to order sushi in Japan (bring along a Japanese professor)
  • some incomprehensible Tuscan muttering about linen.
  • The best seat in the house at Cabaret Larsen's incredible performance of the life and times of Winnie "sex & violence" the Pooh!
  • The forthcoming firenze.pm technical meet

After Rose's, Simone led us to Grom where we enjoyed "Il Gelato di una volta" and Cicci petitioned the assembled savants for Perl wisdom. I didn't even understand the question (serious voodoo with source filters to create a macro to lock thread variables because you can't use a function as that's in the correct lexical scope) but Simone after mentioning preprocessor macros with perl -P then suggested this might be an XY question and pointed sagely in the direction of the shiny `memcached`. And there was much rejoicing.

Saturday May 27, 2006
06:54 AM

Blasphemy

I didn't ever really make a distinction between normal swearing (usually about bodily parts, fluids, and actions/professions involving them) and blasphemy, apart from, when talking to Christian friends, feeling a little self-conscious about using "Christ!" as a mere interjection, when to them it's a good bit more important.

The Italians have some wonderful blashpemies, and as a non-native speaker, it's very easy to assimilate them. In the office once, after I came out with "Porco Dio!" (piggy God), larsen suggested that I should maybe be aware of who I was saying it to, as it was a "bestemmia" and therefore in quite a different category from normal cursing. And in fact, a few days later $boss commented unhappily when I said "Porca Madonna!" a little too loudly ("Porca puttana!" - "Piggy whore" - wouldn't have raised an eyelid of course).

Yet I was surprised to find myself feeling something which I think may be similar to the emotion of outrage in the face of blasphemy, on seeing someone in an online forum with a nick of "Muad D'ib". I'm not sure if this is because this prophet of a fictional universe means more to me than one venerated in this one, or whether it's because by and large people don't call themselves "God", "Jesus" (unless they're Spanish speakers), or similar just because they think it sounds cool.

Friday May 12, 2006
02:13 AM

Firenze.pm May meeting

The event was sadly marred by two exceptions, ENOGLORIOUSLEADER, and ENOBELHAVEN. larsen was kept behind at work and arrived around 11pm, while even more tragically, Belhaven Ale has disappeared from the James Pub, never to return. (Apparently they don't do enough business in Italy to make it worth their while delivering, which is a crying shame, as it's one of the few places I know where you could get a decent pint of bitter).

As well as usual suspect Mattia, we were joined by valdez and Riccardo from Dada, doubled the number of students (Spire and mithenks) and had a surprise visit from davidebe who had traveled from Bologna and wandered the streets of Florence before arriving at the same time as larsen.

The P-word was mentioned, though rarely, with conversation focusing on

  • The 3 types of recorded messages at train stations. (loquendo is apparently good for the speech synthesis side of things.)
  • SSH tunneling for idiots (me)
  • Standards, HTML and CSS in Firefox and IE
  • The Italians may care about Slow Food, but the British care about Beer.
  • Wireless and the thick walls of old houses in Bologna and Rome
  • Sneakernets
  • SMS
  • J2ME, and a notepad for phones
  • Google's Summer of Code
  • .odt, and hippy professors. Openoffice almost good enough to use at at version 2.0
  • .ps a standard my arse.
  • HTML optional declarations
  • Writing an operating system in Perl for fun and er.. fun
  • the Perl Rescue Team!
  • Tripods, flashes, and the "startled rabbit" effect
  • Networks running on ENEL (the Italian national grid) - which still sounds like sci-fi to me
  • How to pronounce Margaret Thatcher (and why some people wish we didn't)
  • Hacknight
  • Catch 22 (not as well-known a phrase in Italian, not sure how it's translated - "Clausola 22" ?)

Plus various other stuff that I either didn't catch, wasn't interested in, forgot to note down, or can't read my notes for... comments welcome. Ah, yes, I recounted a story which involves larsen, an unexpected time change, mobile phones, an Italian hotelier, and my mother. And (according to IRC) a Malaysian tiger, but I'll come back to that another time.

Update 12 May: Spire gave me permission to host his photos of the meeting.

Wednesday May 10, 2006
03:39 AM

Montalbano ero

Yesterday, I discovered on the RAI website, that the Italian state TV was showing Montalbano on Tuesdays at 9pm. This was hugely exciting as I'm a big fan of the series of books on the Sicilian detective, and it was Tuesday at 9:15. Italian TV tends to run later than its trains - unlike the UK where only events of extreme national importance such as war breaking out or snooker will make the TV run late, the baffling game show that came before continued for another 15 minutes. Disappointingly, when it started, I realized it was one of the few adaptations I'd already seen. Worse, it looks like they've already been running the series for 2 months and that was the last one. This will teach me to not check the TV guides on the basis that there is never anything on apart from Lost and Chi Vuole Essere Milionario... Riccardo suggests a handy teletext emulator

The good news, should I ever be connected in a situation other than a) at work, or b) over the end of a phone, is that 8 of the 12 episodes are available on raiclick. (if I can work out the user interface, which seems to contain lots of non-clickable links, and pdf catalogues).

Sunday May 07, 2006
03:46 AM

Which J2ME phone

I've noticed a few people on freenode #j2me ask "Which phone should I use to start Java development on?". The question slightly surprised me - I became interested in J2ME the first time I got a sufficiently interesting phone (SE P800 with touch sensitive screen) rather than the other way round. I've been wondering about the criteria, and thought of the following.
  • reasonable JVM (stability / speed)
  • does it support MIDP 2.0 ?
  • what are the tools provided
    • PC suite to browse and exchange files between PC and phone
    • emulators

  • and do they work on your platform (Nokia's PC suite doesn't on Linux for example)
  • bluetooth to connect and upload your midlets to the phone (because that seems to work, more or less)
  • type of phone (smartphone / PIM-like phone / UIQ device etc?)

<obperl>I see that Jarkko's Perl for Symbian project is still on hold with just the core language and no support for the phone GUI and feature APIs...</obperl>

Thursday April 27, 2006
08:06 AM

110 volt eggs

My mum's Finnish family visited them recently, so in an Easter parcel I got sent some chocolate eggs, the classic Fazer Mignon in a special "110 V" edition. V for "vuotta" as, apparently, the eggs have been produced for 110 years in Finland. They take a chicken egg, remove the egg, then fill it with a tasty nougat chocolate, then plug the hole with sugar. This is to me so obviously a clever (and tasty) way of doing a chocolate egg, that I'm surprised that I haven't seen the concept in other countries. Perhaps it is patented? Or does this particular easter tradition exist in many other places in the world?
Thursday April 13, 2006
03:40 AM

Last night's Firenze.pm social

We met at Rose's, a cafe and sushi bar. As well as the usual suspects,
larsen, me, Mattia, Piero, Simone (all from Dada), and dakkar (now working at
Ask.com), we were joined by some more dadaisti - Massimo, and Marco 2.0 - and some
others: student Claudio, and Leonardo of it.discussioni.misteri fame.

Apart from a major ENOTUNA error, food and drink were pleasant, with severalpeople trying sushi for the first time and a goodly number of shiny 2 litre cans of Asahi
consumed. We discussed (among other things)

        - how to cook sushi
        - the perils of sake on an empty stomach
        - how to get sysadmins to do things
        - INTERCAL
        - why kids these days don't study enough maths at Uni
        - Why (and whether) OpenOffice.org takes 2-20 minutes to open up
        - spending other people's money on overspecced servers
        - Jehovah's witnesses. In the rain.
        - ACT
        - How to get yourself on the banned words list of the Scientologists web
            browser
        - Why not all questions can be answered "Yes/No/Maybe".
        - Is that an African or a European "swallow" ?
        - Sharepoint
        - The Javascript sufferer's club
        - An unusual nervous tic on a table of great historic and cultural interest
        - Tuscany: it's all just hills and flood plains really.
        - Night shift
        - Do girls talk about politics on nights out?
        - Laws on database security
        - "Precarious" work
        - Daring maths
        - Tuscan dialect lesson: "Baccagliare" (Bajagliare)