Hackathon SOLD OUT!

The Hackathon & pre-conference Hardware Hackathon at YAPC::NA 2012 has sold out! Now all the pre-conference activities have completely sold out.

We have less than 50 tickets remaining for YAPC::NA 2012 before all 400 of those are sold out as well. If you’ve been procrastinating about whether to buy your ticket now or later, don’t wait. They’ll be gone soon. Buy your badge today!

[From the YAPC::NA Blog.]

A milestone for Alien::Base

I have been working on a set of base classes intended to make creating a new Alien:: distribution for some library as easy as making a simple Module::Build based distro. So far the code isn’t on CPAN yet, follow its progress on GitHub.

I haven’t been feeling so well today, so I have been sitting around watching movies (which I own on DVD) on TV. Of course I can’t sit still that long without doing anything so Alien::Base saw a burst of activity today.

Along with testing I am also keeping an Alien::Base-based Alien::GSL (which provides the Gnu Scientific Library) in the examples folder. The big news today is that this example distro can now query the GNU FTP server, pick the newest version of the library. It then downloads, extracts and builds the library in a temporary folder. Finally it “installs” the library in a File::ShareDir directory in the Alien::GSL root/share directory. Even this isn’t as cool as how it does this:

cpXXXan is moving ...

... although you probably won't notice.

Executive summary: your disks hate you

Until about 20 minutes ago, cpXXXan ran in a virtual machine on a box that I rent. That box also hosts VMs for CPANdeps, for some of my own CPAN-testing activities, and a few other things. I did it that way because it was cheap and convenient. However, over the three years that it's been running (gosh, is it really that long?!?) this has become a rather, umm, "sub-optimal" solution.

That's because the CPAN has got much larger, as has the number of CPAN-testers reports. Even worse, the rate of increase of both has been consistently increasing. This means that the amount of work to be done for the daily imports of new data, both for cpXXXan and for CPANdeps, has increased dramatically. This means that the jobs take longer, and scheduling them has become a Hard Problem.

The Perl Learning Environment

For YAPC::NA, I'm creating a new course called "From Zero to Perl" (although I'll probably actually call it "0..Perl"). JT Smith wants to create not only new Perlers, but new programmers, and he wants to start them with Perl. I'm up for the challenge. However, there are some things that you might have opinions and suggestions on.

The Learning Perl course I teach assumes that you already know how to program, just not in Perl. Some non-programmers do alright, many struggle, and a few outright fail. Most of those have nothing to do with Perl as a language. Programming as a way of thinking is hard, especially for the complex things people what to do right away with Perl. It's easy to make a turtle draw geometric shapes, it's not conceptually easy to design a blogging platform.

Tweakers Anonymous

John Anderson will be giving a talk at YAPC::NA 2012 described as:

Have you ever spent most of a day getting your editor set up “just right”? Have you justified the time spent on customizing your configuration in terms of the overall productivity gains that are going to result once you remember what key binding you put that new tweak on? Or maybe, whenever you see a tweak described for that _other_ editor, you can’t rest until you’ve duplicated and maybe even expanded upon it for the clearly superior editor you use? If the above hit too close to home — particularly if you’ve ever written a program specifically to allow you to more easily deploy your editor configuration on a new machine — this talk is for you.

We’re going to talk about editor tweaks that make writing, testing, running, and otherwise working with Perl faster and easier, so you can focus on the stuff that really matters: beer, go karts, and cool new editor color themes…

[From the YAPC::NA Blog.]

Why is this "use" a syntax error?

Many Perl developers are unaware that they can assert a module version with an import list at the same time. For example:

use Test::More 0.96 tests => 13;

However, the following is a syntax error:

use Test::More  .96 tests => 13;

Frankly, I don't know why. Here's a program which demonstrates my confusion. It exhibits more or less the same behavior on 5.8.9, 5.10.1, 5.12.4 and 5.14.2.

And the output is:

Video Recordings for YAPC::Europe 2012

We are looking at recording some or all talks at YAPC::Europe. The most promising option for recording and publishing the talks seems to be to hire a professional team. We don't want to hire that team just to find out that posting of the talk material is unwanted, like Andrew did in Riga.

As a way forward, we will likely ask for the (audio/video) publishing rights on your talk if you submit one. This will not mean that your talk will necessarily get recorded and published, because we don't know whether we will record all rooms on all days. But all other things being equal, we will give submitted talks preference that allow us to publish the video afterwards.

If you think that recording talks is a waste of money and time, as nobody will watch them anyway, please also comment below. It would save us a great deal of organization if there is consensus that videos are undesireable anyway.

Install your own Perl with your own CPAN


I know, I know ... it exists a powerfull tool called perlbrew

but

there is more than a way to do it :-)

read Install your own Perl with your own CPAN

every feedback is welcome

YAPC::NA 2012 is going to be great. Nope, not because of all the...



YAPC::NA 2012 is going to be great. Nope, not because of all the talks, or activities we have planned. It’s because this sculpture adorns the lobby of the Pyle Center (aka the conference facility for YAPC::NA 2012). This place was made for Perl. =)

[From the YAPC::NA Blog.]

Why would I use Tie::Array::CSV?

After (IMO) elegantly solving an SO question using my Tie::Array::CSV, I thought I might share it here to give you all an idea of when you might want to use it. This example is only reading the file, but remember that T::A::CSV gives you full row/column read/write access to the underlying CSV file in place.

The OP needed to find the column with a certain identifier which was 7 chars starting with a letter (in the example data below, this is the fouth column (i.e. index 3)). Then extract the number of repetitions of that identified in that column. Here was the solution that I posted.

Estimating Like an Adult - Part 2

I wrote the followup to my last article on estimating - you can see it here: Estimating like an Adult - What to Steal from Agile

On defined(@array) and defined(%hash)

Perl is somewhat broken as language as it autovivifies symbol values when accessing them.

Clarification because this post has technical errors:

The following is from a naive understanding of the hypothetical defined operator as it is known from other computer languages or the C preprocessor. Perl's defined was invented to check for the undef value, but is often and falsely used to check for definedness of a symbol.

My understanding coming from a CS background was that defined should check for the existence of the symbol type slot, without creating the symbol and slot. "This this symbol exists?" This is wrong. To check for the symbol being defined, use exists in the symbol hash, the "stash".

Conference Hotel Reservations Closing Soon

If you want to a reserve a hotel room at the YAPC::NA 2012 conference facilities then you need to do so now. Reservations close on May 1. 

[From the YAPC::NA Blog.]

Stupid ack trick

My source directories tend to collect cruft, and it can be a pain to separate the real ack hits from the crufty ones. I am ashamed to say how long it took me to think of the following:

function ackx {
    if [ -f MANIFEST ];
    then ack "$@" `sed 's/[[:space:]].*//' MANIFEST`;
    else ack "$@";
    fi
}

Yes, this could equally well have been a small Perl script involving ExtUtils::Manifest, as a more portable implementation, and a cleaner way to get rid of any comments.

My $0.02 on strict and the community

By now most people who would be reading my blog are aware of the kerfuffle going on about people being pushy about strict (and other Modern Perlisms).

As a relatively new Perler (my first scripts are dated 2009) I believe I have an underrepresented opinion on the matter. I was lucky to have had StackOverflow and the community around me as I was learning Perl. Someone, I don’t remember who or with what tone, told me that I should use strict and warnings on my code. Not knowing any better, I did.

Then Perl was easier. Simple as that.

I have learned a lot since then. I know when I need to no strict 'refs' or no warnings 'once'. Personally I wish these pragmas were default. In fact, I have had so little problem with Perl that I’m horrendous at the debugger; I really haven’t needed it. Of course I know that one of Perl’s best assets is its compatibility, and therefore strict/warnings is not default.

require vs Module::Load benchmark

Since I often do:

sub some_func {
    require Some::CPAN::Module;
    ....
}

to delay loading of modules, I am interested in how much overhead this introduces.

After first successful require(), the subsequent require()'s of the same module is very fast (around 0.08µ on my PC) because all Perl does is just convert Some::CPAN::Module to Some/CPAN/Module.pm and check this against %INC. This kind of overhead is comparable to that of an empty subroutine call.

If we change the require line to

load "Some::CPAN::Module";

Early-Bird Pricing Ends Soon

Early-Bird Pricing for YAPC::NA 2012 ends on May 1. Register today before the prices go up!

[From the YAPC::NA Blog.]

A Marpa paper

I have just uploaded a late stage draft of a Theory of Computation paper on Marpa to github. The paper contains pseudocode, a correctness proof, and proofs of my complexity claims. (Marpa, for those unfamiliar, is a new, powerful and fast parser and parsing algorithm. To learn more, check out its web page.)

Progress in software follows two avenues -- implementation (aka "running code") and theory. With Marpa, it was my intention to pursue both. This is not the usual practice, but it's a natural choice in Marpa's case, because the two feed each other. It would have been simply impossible to write the code for Marpa without a theory of WHY the code worked, what kind of speed I expected in which cases, and WHY the code I was writing would be able to deliver that kind of speed.

Got 20 minutes? WWW::xkcd is born!

Lately I've been having weird sleeping hours. I sleep for 5 hours here, then 2 hours there, I stay up till 4am. I know, it sounds like I'm back in school, but really, I'm not.

Yesterday at 1:50am I had the opportunity to actually go to sleep. Should I? Yes! Will I? Hmm... well... maybe I'll just watch another episode of a TV series and hack a bit.

I recently read the "about" page of xkcd and saw there is now (or has been for a while?) a proper JSON output for the comics. This means you don't have to scrape the website to get the comics. This also means you can get a lot of data right away that you might not necessarily get by scrapping. Definitely not as easy, at least.

What if we could drop archives into @INC?

What if I didn't have to install distributions, but instead just dropped the entire archive into a directory, much like a Java JAR file? I don't have a complete idea for this, but I have enough that I want to have public notes on it.

This is something that I think about when I can't do anything else. I'm on a bus or train in Chicago where any sign of Apple technology will get you jacked (the CTA even has signs telling people to be careful with their iPhones. Not Blackberrys or Samsung, or whatever, just iPhones). There's that time between finishing the in-flight magazine and reaching 10,000 feet, or waiting in line for passport control after I wonder if the guys with the guns would really shoot me if I took out my cell phone.

My idea is the confluence of several problems:

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.