Cross posted from my blog

Welcome to Perl 5 Porters Weekly, a summary of the email traffic on the perl5-porters email list. The smartmatch discussion continues to be very popular, so its summary will go at the end of this post. There was also a very long, very tedious thread about how Perl ought to handle UTF-8 output which almost demonstrated [Godwin's Law] [1] (the longer a thread continues, the higher the liklihood someone will call someone else a Nazi.)

If you're reading this on my blog or somewhere else on the web, you can now find the summaries in Markdown format in [this github repository] [2].

Also, since there seems to be influx of new readers, ohai! I started writing these summaries after YAPC::NA 2012 after having a breakfast conversation with Gabor Szabo. If you don't already read his Perl Weekly email newsletter, you really ought to sign up for it.

Topics this week include:

  • Term::ReadLine::Perl not moving forward
  • DTrace probes for loading-file, loaded-file, op-entry
  • My Perl Foundation Grant for Improving the Perl Debugger Was Accepted
  • utf8 problems (still, )
  • fixing smartmatch (again (still))

Moving to Moose Hackathon 2012 Roundup

OK, so another MTMH 2012 blog post. I'm trailing far behind everyone else, but better late than never.

MTMH 2012 was a joint hackathon between the people working on p5-mop (a project to get a Moose-lite metaobject system into the Perl 5 core) and the Perl RDF toolkit, with a few Rakudo people thrown in too, ostensibly for convergence between the p5-mop and Perl 6 metaobject systems when possible. As somebody in the RDF camp, though with a toe in the Moose water, I decided to get a better feel for Moose by playing around with a few MooseX projects. (The results include MooseX-DeclareX and MooseX-Interface.) There's really a lot of cool stuff behind $self->meta. If you've never gone behind has, extends and with when using Moose, you really should.

Sorry I can't dance, I'm holding on to my friend's purse

Don't you love static web sites? So easy to deploy, so intrinsically safe... On the other hand, writing all your HTML by hand, like in 1994 (before server-side includes, for example) is rather painful.

Of course there are tools like Jekyll, but they kind of force you to adopt their conventions when you write your site.

What I'd really love to do, is to write my web site using one of those nice web frameworks we have now, update the data in there using all the nice tools they provide, and then generate the static version of the site to deploy. Most the fancy "dynamic" stuff can be handled with JavaScript on the browser.

This is what wallflower does. Given a list of URL and a Plack application, it will save all those URL into a set of files, ready to be uploaded.

Some advantages to this approach:

Writing transactional functions

This post is written mainly as a personal note to remind a future me.

Proc::ProcessTable needs a C lover

I just tried to install Server::Control on a linux box.
It depends on Proc::ProcessTable which blew up during testing:

t/process.t .. Can't load '/home/gabor/.cpan/build/
Proc-ProcessTable-0.45-rKuJSH/blib/arch/auto/
Proc/ProcessTable/ProcessTable.so' for module
Proc::ProcessTable:  /home/gabor/.cpan/build/
Proc-ProcessTable-0.45-rKuJSH/blib/arch/auto/
Proc/ProcessTable/ProcessTable.so: undefined 
symbol: pthread_once at 
/opt/dwimperl-5.16.0.1/perl/lib/5.16.0/x86_64-linux/
DynaLoader.pm line 190. at t/process.t line 9.
(I had to break the lines of the error as putting it in <pre> tags caused the lines to be cut off. Sorry for that.)

Moving to Moose Hackathon roundup

After returning from the Moose/RDF hackathon in Norway and moving to another city this weekend, I finally have the time to tackle two tasks on my TODO list at once, viz finally starting this blog and writing up on the hackathon.

The Moving to Moose Hackathon 2012, organized by the Oslo Perlmongers was a five-day event that catered both to the Metaobject Protocol enthusiasts (who use Moose now and may soon use the new p5-mop to be moved to Perl5 Core) and developers interested in using Semantic Technologies and RDF with Perl. I was one of the RDF guys.

"White knight", a meditation

If you think "white knight" is a crap term, a convenient argument-by-dismissal tactic, then you probably already know all this, but there may be some useful ideas for the next time someone attempts to spring this on you.

On the other hand, if you're one of those who think it's the scored-the-touchdown-high-five-we're-done-here way out of any situation where you've said or done something crappy and then been called on it, you're probably not going to read this anyway, but I shall go ahead and write it so you will have to waste energy making up increasingly vituperative denials which I will pointedly ignore.

A peculiar dream

I dream a lot. There was a period of 30-40 consecutive days in my high school year when I remember, because I made a note of it after realizing the fact going into the second week of that period, that I dreamed every single night. The frequency has gone much down nowadays, into only about once or twice every week or even less. I still make a note of some of these dreams, especially if the story is peculiar, and I try to find the possible triggers that made my mind decided to weave that story. Sometimes the connection is obvious, and sometimes it is less so.

Last night the dream was related to Perl, somewhat.

YAPC::Europe 2012 proceedings are online

Our paper version of the proceedings was a success. We've given away all printed versions. If you missed it or your colleagues prefer an electronic version, we have the PDF version of the proceedings now online at

http://act.yapc.eu/ye2012/stuff/proceedings_ye2012.pdf

My Top MySQL Gripes

Due to some (legitimate) criticism I received for complaining about MySQL in another forum without bothering to say why, here is my list of my top MySQL complaints:

Yes, triggers should be avoided, but if you can't avoid them, don't cripple 'em.

Many of these issues force devs to push logic into the application layer where they're far more likely to be buggy.

Actually, if I could just have three of those fixed, I'd want custom data types (with operators, please), sane default values and check constraints.

MongoDB 0.46.1 Released

I'm happy to announce that version 0.46.1 of the Perl MongoDB driver has been released to CPAN! It should make its way to your local mirror soon. This release has mostly minor bugfixes and some housekeeping, but more and better stuff is coming down the line. I've written a detailed post about the release and future plans on my blog here: MongoDB 0.46.1 Released . Enjoy!

blog moved to domm.plix.at

After finally managing to produce a valid atom feed I have now moved my Perl blog to my self-hosted server at http://domm.plix.at/perl.

Blog posts are aggregated via Ironman, and I tend to spam twitter after publishing a new post (at the moment by hand, but I guess I'm going to automate that soonish), so might want to follow domm_favors_irc to stay up to date on my ramblings.

Or do you prefer to have me add short posts here, pointing to my proper blog? (of course I'd remove this blog from Ironman first to prevent duplicates)

Anyway, thanks to the people running blogs.perl.org for providing me with a blogging home after use.perl.org shut down.

Social diagnostics

First, a huge thank-you to all the folks who have commented on my post (whether they agree with it or not) and who have followed up on Perlmonks to say "well, I think this might be correct" - or not, as long as it's not about me, but about the topic. I think it's important to talk about what happened, even if no one's mind is directly changed.

I'm afraid that at least one of the participants feels singled out, which was not my intention. I am truly sorry that this person feels attacked. This was totally not what I wanted or was trying to do.

To try to clarify this social thing for folks who normally ignore it or don't see the point, I'm going to invoke an extended metaphor here.

All I wanted to do, to go all technical about it, was to issue a social diagnostic: a warning, not an error message, that said "I think Perkmonks needs to be inclusive, and sexualizing software doesn't do that".

Perl 5 Porters Weekly: August 20-August 26, 2012

[ Cross posted from its home blog ]

Welcome to Perl 5 Porters Weekly, a summary of the email traffic on the perl-5-porters email list. Sorry I'm running a bit behind this week; there was really a tremendous volume of email this week, mostly about Ricardo's changes to smartmatch and the given/when syntax. Since that's the case, I'm going to put all of the non-smartmatch mail first, and a good sampling of the discussion around smartmatch at the end.

Topics this week include:

Simple Singleton in a few lines

The other day I was working on a library which needed to have a small list of dependencies and guaranteed to run on Perl versions 5.10 and above. In order to keep the dependencies minimal I decided to code a singleton() method like this:

sub instance {
    my $class = shift;
    state $self = $class->new(@_);

    return $self;
}

Just to get me right. This is not a complain to Moo*X::Singleton modules. The snippet above is very primitive, does not provide a separate initialization and has no way of clearing an instance. But sometimes this simplicity might do its job.

Marpa::R2 is beta

[ blogs.perl.org has been a wonderful home, but I have finally given in to the lure of static blogging. This is cross-posted from the new home of the Ocean of Awareness blog. ]

Marpa::R2 is now beta. Marpa is a new parsing algorithm, based on decades of prior art. It is a practical and efficient solution targeted at all parsing problems that are too complex for regular expressions.

Thread pool for a boss/worker model

This is a pretty simple idea - a boss thread assigns work to a pool of worker threads who do nothing until some work enters their queue. This way the boss can fill a queue very quickly and you have multiple back end processes that can consume that queue.

I'm using threading and not an async thing because some of the work I'll be assigning to threads are long-polling operations. The workers will hit some REST API route on some other application, and some of those routes take up to 30 seconds to complete or have dependencies or followup work. Rather than block and spin in an async call, for my tasks, its easier to have a queue of work and workers that execute them.

YAPC::Europe 2013—week minus 50

There are no dates for the YAPC::Europe 2013 announced yet but assuming a year contains 52 weeks and the conference is planned to happen in August, let's roughly estimate there are about 50 weeks before the conference. We'll just hot fix the numbering as soon as the dates are known.

So what's new about the conference. Believe me or not, we are not sitting and waiting for the end of June to start doing conference preparations :-) We've got intensive discussions in the mailing list to set up the roles among the organisers, launched internal wiki pages and made a brief research of some minor details.

In the following few weeks we will closely look at every of our seven venues that we have in mind. Just to list them:

Quote of the day

Chip Salzenberg:

According to John P. Linderman:

Barring some sort of formal definitions, the C code determines the language (pretty much what happened to trigger this whole thread) rather than the language determining the parser, and that just seems wrong.

WRT Perl 5, I’m afraid that horse is not only out of the barn, but has wandered off the ranch, joined a wild herd, and sired several foals.

#perl6 highlights for week ending 2012-09-01

I (raiph) have switched to selected highlights rather than an exhaustive summary and changed some other things. I'd appreciate comments from both #perl6 regulars and those who are just reading these reports saying whether or not these changes are an improvement over last week's report. (Alternatively gmail raiph.mellor.)

2012-08-26:


2012-08-27:


2012-08-28:


2012-08-29:

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.