At YAPC::NA 2012 we’re introducing YAPC Bingo! These cards...



At YAPC::NA 2012 we’re introducing YAPC Bingo! These cards are a fun way to help make sure you get the most out of YAPC. You can cross each thing off as you accomplish it working your way toward a bingo. Or maybe, if you’re an over achiever, you’ll attempt to cross off all 25 and achieve a mega-bingo!

[From the YAPC::NA Blog.]

running perl with -MO=Deparse in node.js

I've hacked a '-MO=Deparse' option to perlito5. Now I can check the parser by comparing the output with perl:

$ node perlito5.js -Isrc5/lib -MO=Deparse -e ' ${ xxx{zzz}[3] } '
# Do not edit this file - Generated by Perlito5 9.0
use v5;
use Perlito5::Perl5::Runtime;
package main;
$xxx{'zzz'}->[3];
1;


compare to:

$ perl -MO=Deparse -e ' ${ xxx{zzz}[3] } '
$xxx{'zzz'}[3];
-e syntax OK

Reading the Federal Register with Perl

In case you're curious:

% grep -rli assassin federal_register | wc -l
      50

That's 50 mentions of "assassin" in the US Federal Register since early 2000. There's some interesting stuff buried in this publication.

Recently I wrote a post about more Americans giving up citizenship than reported. While I don't have exact numbers (they're hard to find), I managed to put together some information that seems to show that far more Americans are giving up citizenship than the Federal Register reports, but I'll skip the background.

Basically, I decided to download the entire Federal Register in XML format (it's in the public domain, too). Unfortunately, this snippet of code is not going in the book.

Announce: CGI::Snapp::Dispatch with PSGI support

I've uploaded to CPAN:

o CGI::Snapp::Dispatch V 1.00.

This distro includes CGI::Snapp::Dispatch::Regexp.

Both modules support usage in a PSGI environment.

This module is a partner for CGI::Snapp, and together they are almost drop-in replacements for CGI::Application, CGI::Application::Dispatch, CGI::Application::Dispatch::Regexp and CGI::Application::Dispatch::PSGI.

The default for logging is to not create a logger, as per CGI::Snapp V 1.01 below.

There are 63 tests.

PSGI is supported without needing a module called CGI::Snapp::Dispatch::PSGI.

o CGI::Snapp V 1.01.

This has a new mutator _psgi() for use by CGI::Snapp::Dispatch.

Also, the default for logging is now to not create a logger.

PSGI is supported without needing a module called CGI::Snapp::PSGI.

o CGI::Snapp::Plugin::Forward V 1.01.

The tests explicitly create a logger since CGI::Snapp V 1.01 now does not.

o CGI::Snapp::Plugin::Redirect V 1.01.

The tests explicitly create a logger since CGI::Snapp V 1.01 now does not.

Start Planning Your YAPC Strategy

From guest contributor brian d foy:

Conferences are virtually non-stop activity, networking, hacking, and socializing. YAPC, which is only three days, will have over 400 people moving around between talks, between buildings, and to other places in Madison. There’s a lot more going on besides the conference schedule: you don’t need to show up to hear the talks (they’ll be uploaded), but you do need to be there to hang out with people, carry on unstructured conversations in real life, and drink with other attendees.

The problem, though, is that many things are already in motion by the time that you step up to the registration table to get your badge. YAPCs have been going on for over a decade and many of the people already know each other in meatspace. They already know who they’ll go out with in the evening, they already know who they want to pair program with, and .

You need to start planning your YAPC strategy early and start lining up the things you want to accomplish.

I love Github

Github makes accepting patches from other people and applying them soooooo easy!

Instead of having to extract the patch from an email onto my workstation and manually apply it, applying this contribution was a simple matter of clicking on one button.

Thanks Mark - and thanks Github as well!

Simple HipChat notifier

We needed a simple way of sending messages to HipChat (great online chat software, BTW), so I cooked up this:


#!/usr/bin/env perl

use strict;
use warnings;
use WWW::Mechanize;

# See https://www.hipchat.com/docs/api/method/rooms/message for info
my $url = 'https://api.hipchat.com/v1/rooms/message';
my $api_key = 'your-api-key';
my $from = 'User-to-post-as';
my $room = 'room-to-post-to';
my $message = $ARGV[0];
my $color = $ARGV[1];

my $mech = WWW::Mechanize->new;
$mech->post( $url, {
room_id => $room,
from => $from,
color => $color,
message => $message,
auth_token => $api_key,
});

Quick and dirty - no error checking. Works well for the situations we are using it in, but you may wish to make something more robust before doing anything serious with it.

Enjoy!

A little help in VIM...

Practical Tools for Perl Emergencies

Josh Jore will give a talk at YAPC::NA 2012 described as:

This is a collection and walkthrough of things I’ve found useful for debugging emergencies in production.

[From the YAPC::NA Blog.]

Explaining Web Programming via Plack

I'm currently writing Chapter 15 of my Beginning Perl book and it's about Web programming. The first part is about server-side software and the second part is about clients.

When I finally sat down to write about Web applications, I thought of what I should do. Some of you may remember my old Web programming course, but that was written around CGI and just wouldn't do. So I need to use something modern, but since I have a deadline, that means writing about something I know fairly well. That seemed to leave me with two primary options: Catalyst or Dancer. The latter is easier to use, but still "magical" enough to hide things I wanted to explain. Exploring other options would mean learning to use them and possibly missing a deadline.

That's when inspiration struck.

make test errors failed to map segment from shared object

I had to install a version of Storable 2.30 for a client on their server and was getting the following error

failed to map segment from shared object: Operation not permitted
Can't load '/tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so' for module Storable: /tmp/del/Storable-2.30/blib/arch/auto/Storable/Storable.so: failed to map segment from shared object: Operation not permitted at

The error was due to the fact that I was trying to build and run the tests on a /tmp directory which had noexec enabled , moving to a different directory solved this issue

Perl 6 Tablets: what happened this week

We're consolidating. Quality of about 50 entries was raised, escape chars for zero width assertions added, precedence table updated, better explanation of this compile time / runtime thing, the flipflops and zip operator.

And hurray i got help from raiph mellor, who has ambition to stay and constantly raise the quality.

But main news is something else. Im done with socialtext. Really. I had to dance around the syntax all the time, never knowing how this character would be displayed or if I had to put {{ }} around it. But even that doesn't helped --> which is used in Perl 6 in signatures to define the return type. And to make headlines, that also work as a link to the top of the page was sheer impossible. Lets not speak about beauty. So I left the wiki and moritz++ was kind to set up the URL http://tablets.perl6.org/, were further development will take place. This means you can easily fork it. Its just html for now, but lot more automation for generating html, pdf and pod (for Perl6::Doc) I expect to happen.

Modeling Physical Systems with Modern Object Oriented Perl

Joel Berger will give a talk at YAPC::NA 2012 described as:

Many scientists use Fortran for their numeric modeling. Some of my fellow Ph.D. candidates have done all of their work in Mathematica. Closer to home, L<PDL> provides Perl with some really nice numerical array handling power. Still, all of these tools left me looking for something higher level.

In this talk I will present some of the modeling paradigms I have been using in my research. These simulations model physical systems as Perl objects (rapid designing of classes via L<MooseX::Declare>). Dynamics are closures which genereated by some objects and influence others. Using this paradigm, simulations are written quickly and are tremendously flexible and extensible.

For the majority of the talk, I will use a Perl-level fixed time-step differential equations solver. At the end, I will introduce (ever so briefly) my L<Math::GSLx::ODEIV2> module, which I use to solve systems of differential equations which are made of closures over these object/closure systems.

I hope this talk will show that high-level languages can be used to model physical systems and make it feel very natural to the Perl programmer.

[From the YAPC::NA Blog.]

Marpa v. Parse::RecDescent: some numbers

The application

In a recent blog post, Flavio Poletti described an unusual language, one which he'd written a parser for, using the very traditional method of recursive descent. Specifically he'd used Perl's Parse::RecDescent module. Several people asked me how Marpa would do on this language. This post contains a comparison, including a benchmark.

The reader who wants an exact description should look at Flavio's post and code . I call it a Dyck-Hollerith language because it combines Hollerith constants (strings preceded by a count), with balanced parentheses (what is called a Dyck language by mathematicians). Here's Flavio's example:
A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!))

When I did a Marpa versus Perl regexes comparison, I was very careful to choose an application which showed Marpa in a good light. Here I did not pick the application, and it is almost as if it was designed to show recursive descent in a good light.

Nordic Perl Workshop 2012 - June 4-5 in Stockholm, Sweden

On the 4th and 5th of June the 2012 edition of Nordic Perl Workshop takes place
in Stockholm, Sweden. It'll be two days of presentations, hacking, socializing
and other interesting stuff around Perl5, Perl6, the community, projects and
related topics.

Regular attendee fee is 50 EUR and for students a reduced fee at 25 EUR.

Afterwards my hope is to have a hackathon and some touristy stuff for those
who are interested.

In order for the workshop to be great we also need interesting presentations
which my hope is that you attendees will provide! Last submission date is May 6th.

Thanks to Init AB who are sponsoring this year.

See you in Stockholm early June!

To register, submit talks or more information visit the workshop site at
http://act.yapc.eu/npw2012/

/Claes Jakobsson, Stockholm Perl Mongers

Avoiding use_ok in t/00-load.t

There's a discussion on Perl-QA about whether the use of use_ok should be discouraged. I argue that it should be. It really doesn't gain us much, it's historically been buggy, and simply using the module is enough to cause a test failure if the module doesn't compile. So someone asked how to write this t/00-load.t if we didn't have use_ok:

The State of the Acmeism in 2012

Ingy döt Net will give a talk at YAPC::NA 2012 described as:

Acmeism is trying to hack in several programming langugaes at once. Come learn you an Acmeism for great good.

In this talk Ingy döt Net will talk about a module that he has released and maintains in over 6 programming languages. He will talk about his primary acmeist tools: C’Dent, Pegex, TestML and Stardoc, and how they helped him in the process.

[From the YAPC::NA Blog.]

State of the Velociraptor

At YAPC::EU 2012 Matt S Trout will tell you something about the "State of the Velociraptor":

"What shall we do tonight, mst?"

"Same thing we do every night: Try to conquer the world"

As usual, mst presents a madcap recap of the last year in the perl5 community combined with some thoughts on how both madness and method can inform our approach to our language, community and culture over the next year.

Call for Sponsors for YAPC::Asia Tokyo 2012

We're now looking for sponsors for YAPC::Asia Tokyo 2012: http://yapcasia.org/2012/news/yapcasia-2012-sponsor.html

We accept sponsorships in increments of 50,000JPY. For our sponsors, we offer to publicize your logo on our pamphlets, and on our site, as well as a dedicated entry for you under our site (example).

If you have swag to give away, we are happy to distribute them at the venue, along with any advertising material (pamphlets or the like). If you are sending someone over to promote, we are happy to arrange something. Please contact us for details at info-at-perlassociation.org.

We hope to see you at the world's largest YAPC!

Avoiding use_ok in t/00-load.t

There's a discussion on Perl-QA about whether the use of use_ok should be discouraged. I argue that it should be. It really doesn't gain us much, it's historically been buggy, and simply using the module is enough to cause a test failure if the module doesn't compile. So someone asked how to write this t/00-load.t if we didn't have use_ok:

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.