More from my escapades at YAPC::Europe::Munich ...
Day 2 : 19th September 2002
This morning several were suffering. I was disappointed not to find a newsagent or supermarket where I could buy a bottle of water or other refreshing liquid, to replenish my inner spirit, but a gentle stroll to the conference hall nearly did as good. Another lovely sunny day.
Later in the week, I would discover that there was a huge supermarket just around the corner from the hotel. If only I'd thought to ask! With tons of booze we could have bought for alot less than the hotel bar was offering.
Casey West - Creating Dynamic Sites in a Flash with Template Toolkit.
Casey went into alot of the cool stuff you can do with the Apache::Template module, together with the TT2 directives you can place inside your Apache config file. Default HTML filters and the like can be run to automatically run when a HTML file is requested, such that they act much like SSI encoded pages.
Nick Clark - When Perl is not Quite Fast Enough
Or the alternate title - /sacrificing (?:style|maintainability) on the altar of speed/
Nick's talk looked at some of the optimisations that can be done to improve the speed of your code. Not always about rewriting code, but sometimes looking how you are running the code and whether there are settings which can reduce overheads. The three main areas for improvement are the Ops (operation instructions), CPU and RAM. The first can be reduced by rewriting code in a simpler form that allows the perl internals to do the work for you, the example used showed a loop transposed into a pack/unpack, which improve the speed by 30%.
CPU and RAM usage can be improved by throwing more hardware at the problem, or the program maybe written in such a way that actually uses more memory and processing that it needs to. For example POD code is best left to the end of your script or module, especially if it's quite detailed, and after the __END__ directive. Another useful improvement can be to not 'use' modules with their associated symbols, the difference between 'use Socket' and 'use Socket ()' had a 30% speed improvement from the first to the second.
The talk did cram alot into 30 minutes, and there are many optimisations that weren't covered. However, seeing as Nick is looking to expand the talk into a tutorial for future conferences, the next presentation should have many more great ideas.
In the meantime, slides can be seen at: http://www.ccl4.org/user/nick/P/Fast_Enough/
Jonathan Stowe - How to Intergrate Anything with SOAP
Gellyfish's talk was never going to be the pivotal talk of the conference, but still nursing a hangover and without slides he carried on regardless. Taking a few questions from the audience, he did managed to expand on some the aspects of SOAP, such as running perl code from non-perl applications in a banking system.
At times it was tortuous, and I don't doubt that those not in the know had thought this was going to be quite an indepth talk. Greg McCarroll had to leave after a few minutes because he could keep from giggling. The first of many who gradually left the hall, prompting halfway through one young lass to request that if anyone else was going to leave, could they leave together.
Greg McCarroll - The Simulation and Visualisation of Objects in 3D Space.
3D gaming in Perl. Greg looked at some of the aspects of 3D gaming, which Perl might not be an obvious choice for. A brief digression into Sully and MUD games entertained, while the ideas for what was possible or might be achievable were enlightening. Greg looked at the interfaces to Pov and OpenGL, the modules
use Visualisation::Scene; use Visualisation::Object::Point;
and even did a human example to explain why 4 co-ordinates were needed to describe an object in 3D space. You check the details at: http://www.sourceforge.com/projects/povs.
Thomas Klausner - The Dark Art of Obfuscation
Basically an introduction and explanation of all things obfuscated. An excellent talk if you want to see the other way of doing this, as obfuscation generally uses underused commands and features of the language. All nice things to know in the real world as they can provide shortcuts, as long as they're commented :)
Slides to Thomas' talk can be found at: http://domm.zsi.at/talks/obfu_yapc2002/
Paul Johnson - Testing and Code Coverage
Paul took the idea of Schwern's testing talk and took it further, by explaining why it was important not only to test, but ensure you tested as fully as possible. The Coverage modules look at your tests to see how much of your code is being tested, not just in terms of whether a statement has been tested, but whether all possible branches, paths and conditions are covered.
Working primarily with Devel::Coverage and Devel::Cover, Paul went into the mechanics of using the modules within your test scripts.
Slides can be found at: http://homepage.swissonline.net/pjcj/testing_and_code_coverage/index.html
Next up were the Lightning Talks. It's difficult to describe the individual talks as they are over so quickly, and most are much better to see than read about. But they are in brief:
Lightning Talks
Damian Conway - Perl 6
This was always going to be the most anticipated talk of the conference. So much has been said of what Perl 6 will be about, that yet another talk about it would still managed to confuse, amaze and stun ... and it did. Perl 6 is different from previous versions, and some aspects of it will need serious thought before attempting, but the essence of the changes really applies to the real professionals of the language. The majority of changes to mere mortals aren't that scary ... except regular expressions, but then most people seem to find them scary anyway.
From what I understand from Damian's talk, the new version will give you ALOT more power. There are many instances when subroutines and blocks can now appear in may new contexts, eg the 'for' syntax. Alot of what Perl can do, did make my head hurt, but it was obvious enough to realise that much of your regular code won't need to make use of these features, but it's great to know you can do more if you want to.
I did like the new switch statement, or "given ... when", which hides alot of scope for matching underneath the hood. The use of the smart match has been completely overhauled, it nows does much more than was originally anticipated. I think Damian said that he and Larry figured out 37 distinct ways of saying is equal to, which the smart operator now handles.
I got alot out of the talk, but how much of it I'll get to use before Larry changes his mind ("Yeah that's still there ... this week") is another story. Larry did say that the timescale is being ruled by the design, not by any magic date. It'll be ready when it's finished.
For more details read Larry's Apocalypse papers [Latest Apocalypse 5: http://www.perl.com/pub/a/2002/06/04/apo5.html] and Damian's Exegesis papers [Latest Exegesis 5: http://www.perl.com/pub/a/2002/08/22/exegesis5.html].
The Evening
The evening began once again in the pub on the corner, some 20 something people (mostly London.pm and Belfast.pm) took over a large section of the establishment, and attempted to drink the bar dry. By the end of the night the staff were just putting handfuls of beer on the table. The final tab counted 77 half litre glasses of beer :)
Greg's room was our next venue, having been asked to leave the pub ... well it had closed nearly an hour earlier! A song fest, ordering bottles of whiskey from reception and comedy "just a minute" lightning talks ensued. I got a rousing "Happy Birthday", even if it was a few days late, and managed to keep Belfast.pm awake again even though they were on a different floor this time. Some left, some stayed ... others looked bemused. Sleep happened, but much later :)
to be continued...
Re:POD code
barbie on 2002-10-04T12:25:32
Yeah, I should have said that. But Nick was talking about standard CGI scripts, as opposed to mod_perl versions, so the difference will likely be more noticeable. There are cases where mod_perl isn't an option, so anything that helps speed up the wait time is a plus, which was how I was interpreting Nick's talk.