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.]

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".

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.

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.]

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";

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.

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.]

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:

String::Strip 1.02 enroute to a CPAN mirror near you

Steffen from modules@perl.org responded to my email yesterday and made me a co-maintainer of String::Strip. I've applied the 64 bit bug fix to it, and pushed 1.02 to CPAN. Thanks for everyone who responded to my thread yesterday about requesting co-maintainer. This is how open source is supposed to work!

YAPC::NA is almost here!

We’re exactly two months out from YAPC::NA. Can you believe it’s that close already? 

If you haven’t already, then it’s time to get serious about making your travel arrangements for YAPC::NA 2012. 

Remember, YAPC::NA 2012 will be in Madison, WI from June 13-15. Book your flights, your hotel rooms, buy your badge to the conference, and bring your spouse along to enjoy our amazing Spouse’s Program.

[From the YAPC::NA Blog.]

Should Perl have a `chomped` function?

Edit: orginially rchomp, but Aristotle’s suggestion of chomped is perfect!

brian d foy posed an interesting interview question: “What five things do you hate most about language X?” positing that an experienced user of X should know 5 things (s)he hates about it.

In my list is the return value of chomp. Yes I understand why it works as it does

print "chomped" if chomp $input;

but I find that use case happens far less often than the usual

chomp( my $input = <> );

It looks bad, and it is not intuitive, especially to the new user. Just today another one popped up on StackOverflow. This has got to be one of the most common questions on the site.

The road to the QA hackathon part I: It's all about the metadata

In a month an a half, we'll once more have the QA hackathon. Before going to Paris, I'm going to blog about the things that I want to do. I have a fairly packed list of things I'd like to do there; definitely more than I can do in 3 days, but fortunately there will be free-floating helpers that will hopefully help me out.

Also things that require feedback from other people.

Metadata now

Currently, there are three pieces of metadata that may be installed during a cpan install. They are neither complete, nor can one rely on their presence

.packlist

The packlist files contain a list of files that were installed. It's a very simple format, essentially just being a list of files and their types. Pretty much only useful for uninstalling distributions.

However, this is probably also why it's often absent. Many distributions, most notably Debian, remove them from their packages as they don't want the perl toolchain to uninstall files from debs.

Your Perl-driven cyborgs can soon recognize objects

I've made some progress in getting ccv to compile under Windows. Now I can start with opening up the API and writing some XS for it. Soon, the below image can be created completely from within Perl instead of using a shell call out to the executable to find "interesting" points in the object and the scene and match them together.

out-sofa-thumb.png

The SIFT algorithm seems to be quite a useful tool to do feature recognition without any prior training. I hope to (ab)use this to recognize objects and how they move around in movies. Also, I imagine this can be used to automatically stitch images together.

The YAPC::NA 2012 Job Fair and Expo Hall has sold out! We have...



The YAPC::NA 2012 Job Fair and Expo Hall has sold out! We have 20 exhibitors at our expo hall who will be looking for people to fill their Perl jobs. If you’re looking for a job, or are thinking that it might be time to make a switch, then the YAPC job fair is going to be an excellent place to gain some first-hand intel on some prospective employers. 

The YAPC Job Fair will be held at the Pyle Center on Thursday, June 14th from Noon to 4:30pm. It is free to both YAPC attendees and the general public. We hope to see you there!

[From the YAPC::NA Blog.]

Archive::Tar::Wrapper vs. Archive::Tar

If you don't know it, Archive::Tar is SLOW; it even says so. Running NYTProf recently on a project revealed that the major part of the program was taking a little more than 27 seconds to run and a little over 24 seconds of this was Archive::Tar reading the archive into memory. Since I did not need the in memory feature, I switched to Archive::Tar::Wrapper. That sub now takes about 2.5 seconds to run and the equivalent portion to Archive::Tar->new($file); is now Archive::Tar::Wrapper->new; $arch->read($file); now takes 631 ms.

Perl Podcasts

I had to make a last-minute drive to Chicago last Friday, which is about a two-and-a-half hour trip from Madison. So naturally, to pass the time, I loaded up my phone with podcasts. When I was about halfway home, it hit me: I didn't have any Perl podcasts on my phone! Unfortunately, I don't know of Perl podcasts; I've seen Perlcast, but it looks like it hasn't been updated in a year and a half. So, this is a call to the Perl community: are there any Perl podcasts out there?

Request sent for String::Strip comaintainership

String::Strip has a problem on 64 bit environments, and a release has not been made in over 10 years. I have sent an email to modules@perl.org asking for COMAINT as the author has apparently not been responding to RT tickets.

https://rt.cpan.org/Public/Bug/Display.html?id=70028

http://search.cpan.org/dist/String-Strip

If anyone sees this post and has the magic powers to make this happen, I'd be very appreciative if they could help out.

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.