When do you upgrade perl?

How do you decide to move to another version of Perl? Some people use the latest version right away, some people make big jumps once a decade. Some never upgrade. What's your style?

I made a SurveyMonkey page for it: http://www.surveymonkey.com/s/DX5HW95.

Pass it around, tweet it, facebook it, buzz it, bump it, do whatever you crazy social kids do. Retweet it.

You don't have to justify anything. I don't really mind if you are using an older perl and I'm not going to tell you that you are wrong. There's room to explain yourself if you feel the need. Or, if you have a good restaurant recommendation, let me know about that too.

Google+: A Review

So, I got an invite to Google+ so I logged in and had a look around. I do like the rotary phone style addition of people to a “Circle”. Overall, it has the normal Googlely look and feel, which I like. However, there are problems, mostly due to lack of integration with the rest of Google. It is as if the team had no clue about any of the other piecemeal attempts at social networking that Google has tried.

CUDA and the Perl Data Language

Yesterday I announced the release of my Perl-accessible bindings for CUDA. CUDA is marketed as a massively parallel, high-performance computing architecture. When you think about Perl and high-performance computing, I would hope that PDL, the Perl Data Language, comes to mind. :-)

PDL is a CPAN distribution that gives Perl the ability to compactly store and speedily manipulate the large N-dimensional data arrays which are the bread and butter of scientific computing. Today I will discuss how CUDA::Minimal and PDL talk with each other. (In case you're curious, tomorrow I discuss error handling in CUDA::Minimal.)

Vienna.pm donates $10.000 for Perl 5 Core Maintenance

domm writes:

The Perl 5 Core Maintenance Fund aims to raise $25.000 to to pay for Nicholas Clark and Dave Mitchell to work for 3 months on the Perl 5 core, fixing bugs and making other improvements.

Vienna.pm decided to set aside $10.000 as "match funding" - ie for every $1 that someone else donates, Vienna.pm donate $1, until $10,000 + $10,000 is raised, and only 20% remains to reach the target. The hope is that "match funding" will encourage people to donate a bit more themselves than a simple unconditional donation.

Dancer Recent News (1.3060 and the future 1.3070)

Dancer is moving (or dancing?). There are some news (some more relevant than others) that I would like to share here.

First some less relevant, but nevertheless useful features. Starting from 1.3060 you can access parameters values using a similar syntax with CGI:

   get "/foo" => sub {  my $name = param("name"); };

Not a killer feature, but handy. Also useful, there is an accessor for cookies:

   get "/bar" => sub {  my $cookie_value = cookie "cookie_name";  };

The location and name of the log file can be defined in the configuration file, or directly on your code. Use variables log_dir and log_file for that:

   set log_dir => "/var/log/dancer/", log_file => "app1.log";

You might also notice that set can set multiple variables at once.

Demos: GraphViz V 1.06 and Graph::Easy::Marpa V 0.90

Hi Folks

Check out the demos for GraphViz2 V 1.06 and Graph::Easy::Marpa V 0.90.

YAPC::NA 2012 in Madison, WI

It's official, MadMongers has won the bid to host YAPC::NA 2012 if Madison, WI. I wanted to share a few quick links with you:

The official blog of YAPC 2012.

The official RSS feed of YAPC 2012.

The official Facebook page of YAPC 2012.

The official Twitter feed of YAPC 2012.

dip.pm: Dynamic instrumentation like DTrace, using aspects

I like DTrace and wanted to have at least part of its power for Perl progams, beyond the DTrace probes already provided by perl. So I used Aspects to create dip.pm. Allow me to quote from the manpage:

Perl's first real CUDA bindings released

Since my first blog post back in December I've written and made thorough use of a simple Perl interface for CUDA. Today, I've posted it on github, and in this post I'll give a relatively simple example of how to use CUDA with Perl via Inline::C. (In case you're wondering, CUDA is a technology provided by nVidia that lets you compile and execute highly parallel code on your CUDA-capable video card.)

First, of course, you'll need to install ExtUtils::nvcc. At the moment this only works with Linux (maybe with Mac OSX, definitely not yet with Windows). It has only been confirmed with Ubuntu. See directions on the ExtUtils::nvcc wiki. (If you manage to install it on other systems, please let me know and edit the wiki or send me your notes!) If you have that installed, installing CUDA::Minimal is just a simple CPAN install.

First Script

So, at this point I will assume you've installed CUDA::Minimal. What can you do with it? Here's a simple example:

Ubic progress - manuals, easy installation, cross-platform

(For those people who don't know about it yet - ubic is a flexible, powerful, extensible perl-based service manager. Something like upstart or daemontools, but better.)

So.
Lots of cool stuff happened in last few months.

First, ubic is now cross-platform and runs on *bsd, Mac OS X and pretty much any posix-compatible OS out there (no Windows yet, sorry).

Second, installation is now as easy as possible. Just do "cpanm Ubic && ubic-admin setup", and you are done. (Pass "--batch-mode" to setup command if questions annoy you). It's even possible to install ubic in home folder without root access and use it with perlbrew or whatever you like. Even on shared hosting, if you have the ability to edit crontab there.

Third, 1.30 release finally got some new manuals. They are far from perfect, but I believe they are much better than old PODs with which it was pretty obscure for new user to figure out where to start.

Porting pmtools to Perl 6

I proposed to port pmtools (Perl module tools) to Perl 6.

Unfortunately, I will be porting pmtools while unsupported.

C'est la logiciel.

Why are people asking for a Perl name change again?

There has recently recently been an increase people asking, seriously or in jest, for Perl 5 and/or Perl 6 to be renamed and others offering rebuffals of various types. You could say a heated debate seems to be going on.

However, one thing stands out here: It does not seem to be clear to either party exactly why the party is saying what it is saying. And when the realization arrives, some realize that it should be fairly obvious and stop arguing, but do not make their realization public, leaving others to make the same mistake.

As such, i'll try to put it into the most simple words i can here:

The existence of Perl 6 means that for the decision makers in IT, the managers and CEOs who are not even programmers, Perl 5 appears to be obsolete.

$perl6 = 'Duke Nukem Forever';

For those of you who get the reference, great. For those of you who don’t, I recommend reading the development section over on Wikipedia.

I write this with some hesitation, because I know it’s a touchy subject that has been going the rounds recently and that people have some very strong opinions about it. Mostly I’ve been lurking: nodding here, shaking my head in disdain there. There are good points all around, but I can’t help wanting to say something, and so, I’ve decided to try to gather my thoughts and lay them out.

Perl bug? Weird combination of do, local, and something else?

UPDATE: This perl bug has been fixed

I was writing some very simple unit tests last night and was baffled when one didn't work. The code was very simple, something I thought I had done hundreds of times:

return do { local $/; $fh->getline }

But I stumbled upon some weird voodoo... It's extra baffling to me considering this recent post/bug discovery by Brian D Foy.

It's not the same thing, but it seems similar to me. Unfortunately the commit that fixed Brian's bug 93548 does not fix this one.

I refactored the problem down to a pretty small sub, and am further baffled by the minor variations that cause the problem to go away.

Here is the script and the output from various perls... Interestingly this test appears to include another bug that was fixed somewhere between 5.10 and 5.12...

Bead, ivory, off-white

Chromatic makes fun of Alberto. I understand the sarcasm: much of it, I share. (Falling into editorial we seems common in Alberto’s posts.) And yet, Perl From The Outside.

Calling it Perl 6 was sensible at the time of its inception, for all the reasons chromatic outlined there in caricature. But the premise and direction of The Language has evolved dramatically since the time its name was chosen. In premise it’s a similar idea now, and at the same time one with naught in common with the original. And still, the name persists.

As programmers we (yes, us, us all, not editorial we) should know of the importance of naming: any good programmer spends a lot of time in agony over variable names and function names.

What we (the editorial, this time) have done here is refactor the entire codebase rug from underneath the variable, yet insistently kept its now-misleading name the same. Become, became: we left the frame.

On the other hand – of course! –, names create. There are no things until there are words to name them. And also: names identify. You don’t rename your son or daughter because they’ve grown and changed.

And Perl 6 is Larry’s baby.

I get that. And yet: Perl From The Outside. Perl From The Outside.

I don’t know what to say.

FPW (French Perl Workshop) - Report 1

I reached Paris yesterday morning and went to see Alexis Sukrieh (sukria) - founder of Dancer - at his office at Weborama. I was invited to give the Moose talk there as well, and happily agreed. While I was imagining 2-4 people, the room was full and it was very nice. I got to see Damien Krotkine (dams), who is also a core Dancer developer, and one hell of a guy.

Paris is really beautiful, and it's most beautiful when you don't take the regular route, and instead spend time in the smaller streets, and seeing life through the eyes of a Parisian and not a tourist. I still carry my camera with me everywhere (and I only finally put the suitcase at home in the evening) so that kind of spoils it a bit. :)

Broken MT Update

The installation of Movable Type on this site was a couple[1] of versions behind so last night I decided to update the site to version 4.37.

Unfortunately, while carrying out the update, I skipped a vital step. I forgot to copy over the many site specific plugins which are installed here. This meant that for approximately ten hours overnight (UK time) the site was broken and it was impossible to create new blog entries or to post comments.

I think the problem has been fixed and the site should now be back to normal.

Apologies for the problems. I'll be more careful next time.

If you see any problems with the site, please report them over on github.

[1] For embarrassingly large values of "couple".

GraphViz2 V 1.05 does Marpa grammars and Set::FA::Element STT's

Hi Folks

Yep, both Marpa-style grammars and Set::FA::Element-style state transition tables can now be graphed.

As always, the demo page is the place to start.

After that, hit CPAN.

Does do-given work right?

[This is now [perl #93548]]

Perl 5.14 added a return value to given if you put it inside a do. However, it looks like that return value can't be a value in a lexical variable the you define inside the given:

PPI-Based Script to Convert Test.pm-based Test Programs to Test::More

Some CPAN modules I inherited used the old Test.pm for some of their t/*.t scripts instead of the more modern Test::More. This annoys me to no end because Test.pm is very limited. When I worked on Config-IniFiles, I did the conversion manually, which was a lot of work. More recently, I started working on XML-LibXML which has over 40 of those pesky Test.pm scripts, and I did not have the nerve to do all the manual and menial work.

As a result, I ended up spending a few hours studying PPI (the Perl Parsing Interface), and writing a script to automatically convert Test.pm-based scripts to Test::More. The main issue at hand was that in Test.pm, a single argument ok() tests for the scalar's truth, while a double argument ok() tests for simple equivalence (similarly to Test::More's is()). Eventually, I got the script working, with some limitations (see the page).

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.