Perl in Pop Culture
Watch the last 30 seconds of this video.
Watch the last 30 seconds of this video.
Hello. I am needing some help to understand some cpan testers build failures under Solaris. The reports are:
If you have any idea on what is going on, please post here a comment, or mail me.
For some weeks I now have my Perl benchmarking ready.
It is a whole little infrastructure, based on Tapper and Codespeed, an own not regularly updated CPAN mirror (to keep dependencies stable), and a dedicated benchmark machine.
One server (perlformance.net) is running the Tapper result database, the Tapper website, the codespeed graph rendering website and the CPAN mirror.
The second server (perl64.org: 6 core AMD Opteron 4180, Debian/Squeeze)
is dedicated to only run benchmarks, without any disruption from email, web,
or other services. I also took care of disabling all OS features that typically lead to deviation, like ASLR and Core Performance Boost.
Learn about the overall vision from my YAPC::EU 2011 slidedeck.
The benchmarks are produced by Benchmark::Perl::Formance.
So what do you do when you need to load a module from a string? Do you do eval "require $module"? Well as many of you may have read, that is How (not) to Load a Module. This mechanism is unsafe in certain situations, but sadly there hasn’t been a good answer for it.
What do you do when you want to load a module only if it is installed, or only if it is of a certain version or higher (without dieing). Of course there are eval ways around that too, but could they be easier?
This post announces Module::UseFrom, which lets you do all of these things. But it gets better! All of these actions are done using the much safer bareword form of use, accomplishes this at compile time, and does it without any evals[1]!
It does all this using Devel::Declare to inspect a package variable in your module and inject a bareword use statement. This means that it avoid most (all?) of the problems Schwern’s post (above); if it fails to create the right statement, perl (yes lowercase) dies on the use Bareword::Module statement.
Check it out, fork, comment etc. https://github.com/jberger/Module-UseFrom
Happy New Year everyone!
[1]: ok, there is a s///e, but its for convenience, and its safe.
Linode is sponsoring a beer party at YAPC::NA 2012. We’ll have beer, wine, soda, and water available for an hour before the banquet at YAPC this year. Thanks to Linode for being so generous!
[From the YAPC::NA Blog.]
I think we've all seen code like this example from perlipc:
my $ALARM_EXCEPTION = "alarm clock restart";
eval {
local $SIG{ALRM} = sub { die $ALARM_EXCEPTION };
alarm 10;
flock(FH, 2) || die "cannot flock: $!";
alarm 0;
};
alarm 0;
if ($@ && $@ !~ quotemeta($ALARM_EXCEPTION)) { die }
The "Learning Perl, 6th edition" book review had the distinction of being iProgrammer's most popular review of 2011, between more than 250 reviews on a vast variety of subjects with thousands of reads each, but the Perl review reached top spot with 10,800 reads (figure untill 29/12/2011)
The benefit is that it exposed the language to a wide audience, since the site appeals to a general programming public from C# to Javascript, therefore I do hope that it managed to attract "new blood" and/or converts !
Stevan Little will be giving a talk at YAPC::NA 2012 described as:
Introduced at YAPC::NA 2011, the Jackalope web-service framework was still a work-in-progress. Now a year later, Jackalope is still a work-in-progress but has seen over a year of real world usage. Come to hear what worked and what didn’t work about the framework and about building REST web-services for a large organization.
[From the YAPC::NA Blog.]
We are still alive!
Our silence regarding the progress and especially
the venue location and conference dates is owed to the restrictions of
the planned venue which explicitly forbids mentioning the date and
place before the contract is signed by both parties.
We didn't keep up with the post frequency after the first blog posts,
but as the contract should be signed at the start of January 2012, you
should see more frequent updates from us again. We can't promise to compete with the excellent communication of YAPC::NA 2012 though.
We wish you a good start in 2012 and hope to see you in Frankfurt!
I read Schwern’s post How (not) To Load a Module just as I was wanting to dynamically load different Module::Build subclasses for different OSes. It struck me just as odd as it seems to for everyone that use-ing a module from a string should be so hard.
In my spare time, I have been working on some use problems using Devel::Declare and it gives some intersting hope here. Preliminarily I am calling it UseX::Declare but hopefully someone will come up with something better. Basically it provides a function called use_from which acts like:
use UseX::Declare;
BEGIN {
our $var = 'Net::FTP';
}
use_from $var;
Through the magic of Devel::Declare, the parser sees:
As if I did not have enough modules to take care already, I just started a new one. It is still on its beta version as I did not have much time to test it, and write a decent API. It is available in the usual place: https://metacpan.org/release/AMBS/Lingua-Identify-CLD-0.01_01
This is an interface to a library by Google for language detection. As far as I could understand, it is part of the Chrome browser, and was just released as open source. Details here: http://code.google.com/p/chromium-compact-language-detector/
It is available at GitHub, and I am happy to receive issues or pull requests. Just bear in mind that no API is still defined (although I have an idea of what I want) and that I do not have much time to solve your issues right ahead.
Finally, a thanks to Jean Véronis that pointed me the library and asked kindly for a Perl interface to it.
There will be a Game Room at YAPC::NA 2012. Our sponsor cPanel has helped us arrange this spectacular extra social event.
The idea was actually brought up on ideas.yapcna.org several times in various ways. Some people suggested doing a poker tournament, while others wanted to play RPGs, while others wanted to play board and card games, while still others wanted to do a LAN party. (Who knew there were so many gamers in the Perl community?) We decided to do them all in the form of a game room.
You may have seen this:
I had debugger syntax highlighting working before, but I overcomplicated it and never figured out how to approach the problem.
I was inspired to try again by Mithaldu's post about augmenting the debugger. Once I realized that I had a much better strategy than previously, the code was straightforward.
I tested it on 5.12.2. I offer no guarantees. It's on Github as DB--Color. You don't like it? Fix it :)
If you saw @kraih's recent MetaCPAN tweet, you'll know that MetaCPAN's ++ feature has been gamed. Now, we were aware there was some potential for gaming. Initially you needed a PAUSE id to be able to ++, but this had an unexpected side effect in that there were some requests for PAUSE accounts with the justification of "I'd like to be able to ++ on MetaCPAN". Because this placed an additional burden on the already busy PAUSE admins, we were asked to remove this requirement.
First of all, let me start by saying how appreciative I am to the Perl weekly newsletter http://perlweekly.com for making me aware of Citrus Perl in the first place. I've wanted to make robust GUI apps in Perl for sometime and this software appears to give me the tools I need to do just that.
The install
http://www.citrusperl.com/platform/osx32.html
I currently run Snow Leopard and I wanted to be able to create apps for all recent version of OSX, so I chose the u32 build.
Glen Hinkle will be giving a talk at YAPC::NA 2012 described as:
Get an overview of what Mojolicious has to offer, and what makes it unique in the Perl community. Learn how to quickly make and deploy a web app (even if you have no web development experience) and know what resources are available to you going forward.
Best served with beginners, intermediates looking for direction, and those curious to see what this whole mojo thing is all about.
Get on the bus!
[From the YAPC::NA Blog.]
I wrote the following on Facebook:
I have a very good reason for including this regular expression in my book. It's a tiny part of a much longer one I once wrote.
(?x-ism:(?-xism:(?!\.(?![0-9]))(?:(?:(?i)(?:[+-]?)(?:
(?=[.]?[0123456789])(?:[0123456789]*)(?:(?:[.])(?:
[0123456789]{0,}))?)(?:(?:[E])(?:(?:[+-]?)(?:[0123456789]+
))|))\b|\b(?-xism:[[:upper:]][[:alnum:]_]*)\b))(?:\s*
(?-xism:(?:\*\*|[-+*/%]))\s*(?-xism:(?!\.(?![0-9]))(?:(?:
(?i)(?:[+-]?)(?:(?=[.]?[0123456789])(?:[0123456789]*)(?:
(?:[.])(?:[0123456789]{0,}))?)(?:(?:[E])(?:(?:[+-]?)(?:
[0123456789]+))|))\b|\b(?-xism:[[:upper:]][[:alnum:]_]*)
\b)))*)
At which point, many people piled on and criticized this without asking why I was going to include this. I should have known better than to make such a cryptic post and then head to bed, so here's the explanation.
Before I cover the main topic of this entry, here are some short news and action items:
If you have not acted against SOPA - the proposed online blacklist/censorship bill, you should. Follow the link for information on how to act against it.
I have announced the next Tel Aviv Perl Mongers meeting on my technical journal on LiveJournal.com. It will take place this Wednesday, on 28 December, 2011. More information in the link.
Anarchy Golf is a new server for Code Golf, which are online programming competitions for implementing code as shortly as possible. It supports Perl 5, Perl 6 and many other languages. There is an active challenge, where the only Perl 5 submission so far is mine, so I could use some competition.
Now for the main topic of the post. Recently, three patches were integrated into the perl-5 core implementing new features in the perl debugger:
I have created an official web site for Marpa. Marpa is attracting new users, to the point where I thought it might be useful to have a site to act as a central directory. The official web site won't have much in the way of new content. With new content, I plan to continue to do what I've been doing -- post it to this blog.
I've started the site with an annotated list of the most important Marpa-related posts in this blog. I hope this will help people newly interested in Marpa figure out where they want to start. Those who've been following this blog for a while might also want to check the list to see if they've missed anything worthwhile.
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.