YAPC::Europe talk slots stats

I've made a draft calculation of what we've got in talk proposal list regarding time limits.

There are 36*20 + 28*40 + 10*60 + 120 = 2560 minutes of submitted talks right now.

Out of those there should be 5*60 + 40 = 340 minutes of talks to be given in one thread, thus having 2200 minutes (37 hours) in parallel.

As we'd like to start not earlier than 10 a.m. and wrap up at 6 p.m., minus 1 hour lunch, minus about an hour for coffee breaks and breaks between talks we come to 6 hours of talks a day, minus 1.5 hour of those given in one thread (keynotes and lightning talk…

Combining Syslog and DBI

Saw an interesting interaction today. The Sys::Syslog module makes use of fork to prevent a blocking write to the console. Unfortunately, this means that if you are connected to a database via DBI and try to log anything via syslog, you'll run the issue of the DBI handle being closed under you. Even the DBI property of InactiveDestroy cannot save you b/c of the fork being hidden in Sys::Syslog. Thanks to David E Wheeler for the DBI AutoInactiveDestroy attribute which saves the day!

VS2010 Is Too Old?

> cpan Win32::Console::ANSI

ANSI.xs(12) : fatal error C1189: #error : your SDK is too old... (see the README file in the distro)

Fix:
@Set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
@Set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE

Perl Epigraphs

Many Perl release announcements included an epigraph, a short excerpt from a literary or other creative work, chosen by the pumpking or release manager. This file assembles the known list of epigraph for posterity, and also links to the release announcements in mailing list archives.

It's quite interesting to read through the epigraphs in epigraphs.pod - a small insight into the Perl pumpkings. How many epigraphs do you recognize?

Perl 5.12.4-RC1 is now available

Pheasant is pleasant, of course,
Lobster I freely endorse,
In pate or patty or pasty.
But there's nothing the matter with butter,
And nothing the matter with jam,
And the warmest greetings I utter
To the ham and the yam and the clam.
For they're food,
All food,
And I think very fondly of food.
Through I'm broody at times
When bothered by rhymes,
I brood
On food.

-- Ogden Nash, "The Clean Plater"

I've just uploaded the first release candidate for Perl 5.12.4 t…

Installing Local Perl And Libraries On Mac Book Snow Leopard

I recently installed Perl 5.14 on a new Mac Book running Snow Leopard so I thought I'd share my findings and experiences to save the next person doing this some time.

I started off by doing a search on Google for "install perl mac".
Hit number 1: Download Perl - www.perl.org http://www.perl.org/get.html

That suggests you have a perl already installed, which is currently perl 5.10, or you can use App::Perlbrew.

It wasn't quite that easy so I've documented below exactly what I did. I've given feedback to Leo Laporte who …

one-liner for separating iCal events by category

Attempting to move a friend from Outlook to Google Calendar, we exported the calendar to an iCal file.

I wanted to create separate Calendars for each event category.

I searched cpan for modules to read the file and found iCal::Parser, Text::vFile, and Text::vFile::asData.

I really didn't need to parse the data, because then I would have to figure out how to unparse it, and i didn't want the data to get messed up in the process.

I was definitely justified: simply doing iCal::Parser->new->parse($file) put my CPU at 3.5 load for 2+ minutes, whereas this one-liner takes a fraction of a second:

perl  -MIO::File -nE 'if(/BEGIN:VEVENT/){ warn("event not ended: $e") if defined $e; $e = $_ } elsif(/END:VEVENT/){ $e .= $_; $e =~ /^CATEGORIES:\s*(.+)\s*$/m; ($n=$1||"")=~s/\W+/_/g; ($fh{$n} ||= IO::File->new("cal-$n.txt", "w"))->print($e); $e = undef; } else { (defined($e) ? $e : $v) .= $_ } END { print $v }' outlook.ics > leftover.txt

Then a bit of verification:

$ expr `wc -l < outlook.ics` - `wc -l < leftover.txt`
16604

$ cat cal* | wc -l
16604

$ diff <(grep -h CATEGORIES cal* | sort | uniq -c) <(grep -h CATEGORIES outlook.ics | sort | uniq -c)

Then I split leftover.txt manually because I don't know that much about the iCal format and don't know what other possibilities there might be, but the file I had was pretty straightforward... there was a 20 line header, and 1 line tail ("END:VCALENDAR"), and everything in between was events.

$ for i in cal*; { cat head.txt $i tail.txt > icals/${i%.txt}.ics; }

Now I have separate calendar files for each category. Now, if only Google Calendar would let me upload them all at once and name them like I name my files... oh well. I've gained enough already, I can do this part manually.

A Pink Camel in the wild

Poor camel. Who would do such a cruel thing?

pink_camel.jpg

Also, that monkey looks like it's about to take a crap on Amsterdam.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.