I’m very pleased to announce that Double Prime has decided...



I’m very pleased to announce that Double Prime has decided to sponsor YAPC::NA 2012. Here’s how they describe themselves:

Founded over 10 years ago to support an eCommerce initiative from a new client, Double Prime, continues to evolve and grow. Today, with a team of 80+ engineers, project managers and designers and over 150 eCommerce websites in 25+ countries, we have established ourselves as a leader in customized international and domestic technology solutions.

Our core technical and corporate philosophies have proven successful in the highly competitive world of eCommerce. What we hold true:

  • Creating solutions to meet and exceed your expectations  
  • Customizing our development around your requirements  
  • Personal and frequent interaction with our team  
  • Simple and efficient technical implementations  
  • Partnerships are critical to building and growing success

[From the YAPC::NA Blog.]

SQLite Database Fixes

Recently Andreas alerted me to a problem with the SQLite database used to store the basic metadata for the CPAN Testers statistical database, aka cpanstats. On reading the database, for some queries an error message is now being returned; "database disk image is malformed". It's unclear where the error has occurred, but it seems to have been something that has only surfaced recently.

As a consequence I am now rebuilding the complete SQLite database. This means that the downloads available from the Development website will remain static until this is complete. Once complete and all is fine, then the backup mechanisms will be re-enabled.

However, there is the possibility that the database has grown so large now (with over 17 million records), that the data storage, and particularly the indexing, is not being written to disk correctly. With the database currently being around 5GB uncompressed, and just under 1GB compressed, it would be beneficial to reduce its size for efficiency, disk IO and bandwidth. So I have started to think of the alternative options.

What I learned from YAPC::Brasil

I had a great time at YAPC::Brasil, but I really only understood the talks that I was giving (mostly). As with any conference, though, the talks are the least part of the conference. I think we spent as much time on the town as in the conference room. That's where all the good stuff happens, anyway. Most of the stuff I learn about Perl doesn't come from the talks but the casual conversations I have.

Speaking to the non-english audience

Conferences can be tricky things for non-native speakers, whether as someone giving a talk or listening to a talk. The common language, Perl, can overcome this just showing the code. I just put code on the slides, and make the interesting bits a different color:

Free local guides

the mental monitor box and the guys in the last row

On my "how much you can handle"-tour I gave my talk about Perl 6 array and hashes thrice. Third time masak and jnthn were in (the last row as any troublemaker in school) the audience and spottet some serious errors (I think it was an former rakudo bug). but its fixed and uploaded now. ( Arrays as in [] will not flattened inside a signature and so the number of elements in @_ on the last question in round 1 is 4.) I also did some changes in the tablets as a result. (re metaop "%" and "%%" introduced and "**" fixed in index A and B). Have to start the grant nonetheless.

I’m pleased to announce that pair Networks has decided to...



I’m pleased to announce that pair Networks has decided to sponsor YAPC::NA 2012.

pair Networks, Inc., a global Web site hosting and domain name registration company, headquartered in Pittsburgh, PA, hosts hundreds of thousands of Web sites for businesses, bloggers, artists, musicians, educational institutions,and non-profit organizations from around the world.

pair Networks first went online in January 1996 and has experienced strong growth year after year.  pair Networks is well-managed, consistently profitable, and one of the world leaders in its industry.

All of pair Networks’ operations, including datacenters, support operations, administrative facilities, and employee commutes & business travel are 100% Carbon Neutral. Plus, pair Networks is powered by 100% renewable energy.

To learn more about pair Networks, visit: http://www.pair.com/

[From the YAPC::NA Blog.]

German Perl Workshop 2011 - Speaker Evaluations

I have now sent out all the talk evaluations from this year's German Perl Workshop or more correctly Der 13. Deutsche Perl-Workshop. If you were a speaker and haven't received an email, please check your spam folders first, and let me know (barbie at cpan . org) if you don't find it. The mail will have come from barbie at birmingham . pm . org.

My thanks to all the organisers of GPW2011 and everyone who took the time to respond to the evaluations. From previous experience the speakers have very much appreciated your feedback. I would also like to extend extra special thanks to Max Maischein aka "Corion", who took the time to translate all the questions, templates and emails into German for me.

The results of the main survey will be published soon on the YAPC Conference Surveys site.

Single-file distro

No, not Par.

I have a simple script perlall which is deployed as App::perlall, which comes with Makefile.PL, tests and such, but really I only want to rsync this single script to all of my test machines.

I even wrote a initvm command to deploy it automatically to other machines.

Then I came up with this simple autoinstaller to add missing non-core libs.

BEGIN { # autoinstall the non-core modules
  my @m;
  for (qw(App::Rad IO::Tee IO::Scalar Devel::Platform::Info Devel::PatchPerl)) {
    push @m, $_ unless eval "require $_;" }
  if (@m) { # Checked the API back to 1.76_01 (v5.8.4)
    require CPAN; CPAN->import;
    warn "CPAN::Shell->install(qw(@m))\n"; CPAN::Shell->install(@m); }
  $_->import for @m;
}

My Experience with Inline::C

I know I didn't write here for a long time, and I apologise for it, but I have this entry and another one in mind and I hope they can compensate for it.

For my work on Freecell Solver, I've written some code for encoding and decoding game positions into a compact format, by encoding them as a delta from the position of origin. I first wrote it in Perl, in order to prototype it, and later translated it to C (which is the language that Freecell Solver is written in). I have written some rudimentary unit tests for it, but also wanted to test the code against a large number of positions, by runnign it over the solutions of many Freecell deals.

Four Months To YAPC North America

Now would be a great time to schedule some time off from work so you can come to YAPC::NA 2012. It’s going to be June 13-15 in beautiful Madison, WI. 

While you’re at it, tell your spouse to block off some time and come enjoy our Spouses Program

[From the YAPC::NA Blog.]

Mouse/Moose delegation feature

Using Mouse for my experimental Module Forward::ORM really seems to pay off.

One of my classes just has to delegate method calls to another class, here my first draft:

##  Delegation (using Method::Signatures::Simple)
method manager {Forward::ORM::Migrations::Manager->new}
method create_table (@params) {$self->manager->create_table(@params)}
method add_column (@params) {$self->manager->add_column(@params)}
method remove_column (@params) {$self->manager->remove_column(@params)}

with the Mouse handles command, it becomes:

has manager => (
    default => sub {Forward::ORM::Migrations::Manager->new},
    handles => [qw/add_column create_table remove_column/]
);

This is 46% less code. And the savings will become even bigger as I will add new commands :)

The commit

Today, it's my first day I talk about Perl...

Seriously, I love perl, someone can indicate me good tuts?
lawl

Padre, the upcoming 0.92 release...

It's been quite a while since Padre 0.90, the current development version 0.91 has been bubbling along quite nicely, with some amazing changes introduced through the hard work and effort of Ahmad Zawawi in porting Wx::Scintilla giving us an shiney Scintilla widget for the Padre text editor.

It wasn't enough to just get the module sorted out, but Ahmad went on to really improve the functionality of the editor itself. Check out just some of the goodness to come.

Adam Kennedy has again been deep into the core of Padre and its API's. It takes a lot to commit yourself to knowingly go into a code base break it and then commit to making all things work again.

Kevin Dawson has stuck around and continues to prod and poke at the code base, improving the dialogs using the new FBP process to create better dialogs ( another of Adam Kennedy's major efforts out side of Padre ).

Kevin has also introduced patch editing. In Kevins words:

Happy Valentines Day!

It’s Valentines Day, did you remember to get your significant other something special? How about bringing him or her with you to YAPC::NA?

We have a spouses program, a beautiful city on several lakes, tons of night life, cultural activities, and tourist attractions; not to mention more pubs and restaurants than you could hope to visit. You could book a trip today at a romantic little bed and breakfast called Hotel Ruby Marie, which is only about a mile from the conference. There’s even a little bistro on the first floor of Ruby Marie that serves the best croissants anywhere outside of France.

Turn YAPC into a romantic getaway for two! Happy Valentines day!

[From the YAPC::NA Blog.]

Ruby like code blocks in Perl

While thinking about how to best define migrations/tables in my experimental module Forward::ORM, I realized that I might need Ruby like code blocks to keep certain things in scope:

In my first version, I used default Perl:

sub up {
    my $self = shift;

    $self->create_table('authors', sub {my $t = shift;
        $t->add_column('id', 'integer', primary_key => 1);
        $t->add_column('name', 'varchar', length => 40);
    });
}

I then noticed that Method::Signatures::Simple also works with anonymous functions and methods, so my code now looks like this:

Debugging ORA-12157

Does anyone reading this have experience with debugging ORA-12157 TNS Internal network communication error?

Googling for it isn't really helpful. I get a bunch of pages that say the same thing as the Oracle docs (turn on tracing and reproduce the issue).

The problem is that we don't see it consistently enough to even know to reproduce it properly much less create a minimal test case.

Update:
I looked in the alert.log and found a few "ORA-609 : opiodr aborting process unknown ospid" errors each with a corresponding trace file that ends with "opiino: Attach failed due to ORA-12537".

New "dot" feature

I wrote the following email to the Perl 5 Porters mailing list a few days ago. I thought you might enjoy it.

Hello Porters,

I had a dream that Perl 5 had moved from using -> to using . like most modern languages. And moved the existing . for concatenation to ~ like Perl 6. Then I wrote the code and was shocked how tiny it was.

I have this in the leonbrocard/dot branch, but is is really one commit:

http://perl5.git.perl.org/perl.git/commit/0c1fbeee

It's a very small tokenizer patch which interacts with a new "dot" feature. Then you can do things like:

Dyn and Perl

Matt Horsfall will give a talk at YAPC::NA 2012 described as:

Dyn (better known as dyndns.org) is an organization built from the beginning on Perl.

While we’ve incorporated many other languages and technologies into our platforms since then, Perl is still the number one language of choice for development and is at the core of many of our key products.

In this talk I’ll give a brief overview of what we do and how we use Perl to do it. From support management tools, to customer

APIs and UIs, to automated testing and deployment tools, we use Perl for everything.

[From the YAPC::NA Blog.]

Pittsburgh Perl Workshop 2011 - Speaker Evaluations

I have now sent out all the talk evaluations from this year's Pittsburgh Perl Workshop. If you were a speaker and haven't received an email, please check your spam folders first, and let me know (barbie at cpan . org) if you don't find it. The mail will have come from barbie at birmingham . pm . org.

My thanks to all the organisers of PPW2011, the folks on IRC (#yapc) and everyone who took the time to respond to the evaluations. From previous experience the speakers have very much appreciated your feedback.

The results of the main survey will be published soon on the YAPC Conference Surveys site.

Things I learned at Twin City Perl Workshop 2011

My Twin City Perl Workshop 2011 review, featuring lots of photos!

Marpa v. Perl regexes: some numbers

In this post, I pit Marpa against the Perl regex engine. The example I will use is unanchored searching for balanced parentheses. I have claimed that many problems now tackled with regexes are better solved with a more powerful parser, like Marpa. I believe the numbers in this post back up that claim.

To be very clear, I am NOT claiming that Marpa should or can replace regexes in general. For each character, all an RE (regular expression) engine needs to do is to compute a transition from one "state" to another state based on that character -- essentially a simple lookup. It's the sort of thing a modern C compiler should optimize into a series of machine instructions that you can count on the fingers of one hand.

Marpa is much more powerful than an regular expression engine, and to deliver this power Marpa makes a list of all the possibilities for each token

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.