Want The Game Crafter to get sposoring? Use your Facebook to vote ASAP!

The Game Crafter is a Perl-shop that allows anyone to create their own board game or card game. The website and the backend code is in Perl. It's providing Perl jobs, and more important, Perl initiative. It shows not only that Perl is alive and well, but that it creates some of the more fun things that are going on.

They were at YAPC::NA 2012 and provided game night with lots of board decks (many of which were given away) and board games for all of us to play.

There is a competition to get $250,000 (!!) of sponsorship for startups. If you have Facebook, you can vote for The Game Crafter to get this money.

Here are the five step instructions.

They have only two more days of voting. Get to it!

I Want My Objective-C

The other day, as they idea of the defined-dereference operator (~> is the favorite at the moment), I proposed the idea of implementing a pragma that changed what Perl does when it's faced with a dereference of, or a message sent to, undef. Right now, of course, it dies.

This bit me hard this evening as we put up some new code; I have a Mason template that calls a series of methods to get a particular piece of status information to be shown to the user. I had bullet proofed it, or so I thought.
my $foothing = $current_object->foo;
if (defined $foothing) {
    my @barthings = $foothing->bars();
    if (defined $barthing[-1]) {
        my $answer = $barthing->baz->status;
    }
}
Yep, $barthing->baz came back undef, and an error page instead of my actual page.

Data::Dump::Color (proof of concept)

rjbs' blog post mentioning Data::Printer prompted me to try it out just now. Coincidentally, earlier today I was investing terminal's 256-color support, Emacs color themes, mc skins, all those color-related stuffs.

After seeing Data::Printer output, I think I want colors in my dumps, but I don't want some new syntax/format; I just want to see Perl. So I quickly hacked Data::Dump::Color. Data::Dump's output is nicely formatted enough as a basis, all I need is to sprinkle some colors to it. The module is barely functional and to make it more proper I'll need Data::Dump to give access to more info.

Sample output:

Eventually I think I'll use Data::Printer. It's just that glancing from the docs, there's no easy way to generate Perl-code (Data::Dumper- or Data::Dump-style) dumps.

Yet Another YAPC::NA Report

Finally, I can sit down to write my report!

This was my first YAPC, and it was fantastic! For many years my knowledge of the Perl community has been through the PDL mailing list, through the many Perl blogs, and through occasional IRC. I attended few Chambana.pm meetings, but they were social and didn't really get me fired up for Perl. My first experience with a collection of Perl programmers would be joining Chicago.pm last fall, and my first Perl conference was DC/Baltimore Perl Workshop this spring. But wow, 400+ Perl programmers in one place!

I gave two talks at the conference: an introduction to the Perl Data Lanuage (PDL) and an introduction to my new plotting library called PDL::Graphics::Prima. Both were well attended and well recieved, and I have gotten a handful of follow-up email and irc discussions as a result of both talks. Building the PDL community was one reason I attended YAPC::NA and I get the impression that it's paying off.

Would you help a small Perl startup?

The Game Crafter is a small Perl startup. We've applied for a $250,000 grant to help us achieve our goals faster. But we need 250 votes to qualify.

One of the things we'd do with that grant money is hire at least one more developer to help add features to The Game Crafter. If you'd be willing to help out, please vote for us to win this grant.

Introducing Template::Plugin::StashValidate

I've been using MooseX::Params::Validate more and more recently for checking incoming parameters. I'm a big fan of the Moose type system, and love the implicit documentation you get from having a block at the top of your sub that lays out exactly what you're expecting to be passed in.

A coworker was recently looking for something similar for Template Toolkit - rather than simply digging around in the Stash for values that you hope are there (and are the right type), could you actually insist that they were there? I said I thought it was a pretty simple plugin, and then went about proving it...

Template::Plugin::StashValidate allows you to specify a minimum set of values (and their types) that your Template Toolkit template is expecting to recieve. You invoke it as a plugin, with exactly the same arguments as MooseX::Params::Validate:

[% USE StashValidate {
'advice_discrepant' => { 'isa' => 'ArrayRef | HashRef', 'optional' => 1 },
'title' => { 'isa' => 'Str', default' => 'My great page' }
} %]

The useful, the playful, the easy, the hard and the beautiful

The useful

I am now using a useful new tool on CPAN, Peter Stuifzand's MarpaX::Simple::Rules. Marpa grammars are often best expressed like this:

    pair ::= a a
    pair ::= pair a
    pair ::= a pair
    pair ::= pair pair
Peter's module allow you to do this, and all the examples in this blog post were run using it.

For those new to this blog Marpa is something new in parsing -- it parses anything you can write in BNF and, if your grammar is in one of the classes currently in practical use, parses it in linear time. Marpa's parse engine is written in optimized C, so that Marpa's speed is competitive with parsers of far less power. Marpa's stable version is Marpa::XS.

The playful

Popular ebooks on perlybook.org in week 25/2012

Here are the most popular ebooks from Jun 18 2012 to Jun 24 2012:

Module
  1. MooseX-IOC
  2. local-lib
Release
  1. Moose
  2. perl
  3. Dancer
  4. local-lib
  5. AnyEvent-RFXCOM
  6. DBI
  7. CHI
  8. SOAP-WSDL
  9. Catalyst-Runtime
  10. Mojolicious

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 hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.