A feature Test::Most probably won't get

I often see this at the top of tests:

use Test::More;
if (not $ENV{TEST_AUTHOR}) {
    plan skip_all => 'Set TEST_AUTHOR to run this test';
}
plan tests => $num_tests;

In fact, I see that so often I thought about adding support for this in Test::Most.

use Test::Most tests => $num_tests, 'author';

ElasticSearch gets facets, scripting and better performance

I've just released ElasticSearch.pm version 0.18 which supports ElasticSearch version 0.9.0

Some of the major new features in ElasticSearch 0.9.0 are (or see the Detailed release notes )

Facets support

ES now supports a wide range of facets ie aggregated counts based on your current search:

* Term facets

Returns the most common terms associated with the current query, which eg could be used to populate auto-complete fields

* Statistical facets

Returns statistical information on numeric fields, eg count, total, min, max, variance, sum of squares, standard deviation

* Histogram facets

Breaks the value of a numeric or date field up into buckets, which can be used to draw histograms, eg the number of posts per week.

Scripting support

The mvel dynamic scripting language can be used for:

* Script fields

script_fields can use stored values to return dynamically generated values

* Custom score

Benchmarking perl 5 and perl 6: part I - loading overhead

I know rakudo star is in its first releases. But it helps if we can start looking to it as a complete tool instead of a prototype, or we will never get out of the prototype.

Therefore, I decided to perform a simple test: run the usual "hello world" program from the command line, both with Perl 5 and Perl 6. After a bunch of runs, the average measures are:

P6 Gentle Intro, Part 2

Part 1 available here.

Arrays

A Perl 6 arrays is an ordered container for a list of scalar items - meaning, you can count on the order of items in the array. Here are some ways to create lists and assign them to an array:

my @primes1 = 2 , 3 , 5 , 7 , 11 , 13; # using the comma operator
my @primes2 = <17 19 23 29 31>;        # same as the comma seperated list
my @primes3 = @primes1 , @primes2;     # this works, giving a single combined list

Functions and operators which return lists also work. For example the range operator:

my @range1 = 1 .. 10;
my @range2 = 'a' .. 'j' ; # it's magic :)

Note that assigning a list to an array will "use up" all available items - the following will not assign anything to @p2:

my (@p1 , @p2) =  <2 3 5 7 11 13> , <17 19 23 29 31>; # @p1 is the same as @primes3, @p2 is an empty array

Rakudo is ...

I'm not entirely sure why so many people are benchmarking Rakudo. The dev team knows that Rakudo is slow. The decision to not optimise for performance is deliberate. It's far more important to make the code correct because fast code which is incorrect isn't very helpful.

Despite our knowing what's going on, I see many people who haven't followed the Perl 6 development process (which would be just about everybody) complaining that this new language they've heard about is incredibly slow. I fear that so much talk about how sloooooow Rakudo is will start to define Rakudo in the minds of many.

We should be blogging about the neat things we can do with Rakudo. Try to create positive associations. All of this talk about performance, particularly when the dev team made it explicitly clear that they weren't focusing on performance yet, is just going to earn Rakudo a black mark.

London Perl M[ou]ngers August Social, 2010-08-05, Piazza delle Vettovaglie, Pisa

By a happy coincidence, the regular London Perl Mongers social meeting falls on the second day of the YAPC::Europe Perl conference in Pisa, Italy. We shall be holding it at the Piazza delle Vettovaglie, which has a few food and drink vendors. It'll start after the conference. All are welcome.

Standard blurb:
Social meets are a chance for the various members of the group to meet up face to face and chat with each other about things - both Perl and (mostly) non-Perl - and newcomers are more than welcome. The monthly meets tend to be bigger than the other ad hoc meetings that take place at other times, and we make sure that they're in easy to get to locations and the pub serves food (meaning that people can eat in the bar if they want to). They normally start around 6.30pm (or whenever people get there after work) and a group tends to be left come closing time.

If you're a newcomer or other first timer (even if you've been lurking on the mailing list or on IRC) then please seek Leon (the guy in orange with a stuffed camel) out - we have a tradition that the leader of this motley crew buys the new people a drink and introduces them to people.

See you there, Leon.

Why so puzzled?

I'm really surprised that many Perl people are still puzzled at why Perl web apps aren't as popular, and there isn't as many of them as PHP's.

Guys, in order for a Perl app to build up userbase it...

* Must run on low cost shared hosting

There are ALOT of non-programmer people who are trying to run their own web projects and are starting up with ready, free solutions, that they want to minor-customize themselfs or are willing to pay a little to get small customizations. They most often not doing it for money, or are hoping to get some in the future, but don't have a clear idea on how to at the beginning. And most of them never will make any money, but more people try - more succeed, And those who don't succeed, pass on their accumulated knowledge. Anyways, so, they just get cheap/affordable hosting -- THESE are WordPress, phpBB, etc. users.

A Gentle Introduction to Perl 6 Using Rakudo Star

So, Rakudo Star was recently released and I decided to give it a try. So far, I like what I'm seeing.

The below is meant to serve as a gentle introduction to the Perl 6 language, if it seems to be very "baby-Perl-6" that's because I'm learning the language as I'm writing it. Plus, that's why I called it a gentle introduction! :)

Installation on Windows 7

Announce: Rakudo Star - a useful, usable, "early adopter" distribution of Perl 6

From pmichaud's announcement:

Submitted by pmichaud on Thu, 07/29/2010 - 05:18

On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2010 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the July 2010 release is available from http://github.com/rakudo/star/downloads.

Rakudo Star is aimed at "early adopters" of Perl 6. We know that it still has some bugs, it is far slower than it ought to be, and there are some advanced pieces of the Perl 6 language specification that aren't implemented yet. But Rakudo Perl 6 in its current form is also proving to be viable (and fun) for developing applications and exploring a great new language. These "Star" releases are intended to make Perl 6 more widely available to programmers, grow the Perl 6 codebase, and gain additional end-user feedback about the Perl 6 language and Rakudo's implementation of it.

More …

Startup overhead still matters

We all love Moose, and the subject of this question could have been rephrased better, but why do I get the feeling that not many people write pure CGI or command-line scripts in Perl (that got executed many times) anymore? After all, didn't Perl begin as a tool for sysadmin and only in the mid 1990's got picked up as the darling of CGI/web programming?

There are still many cases where/reasons why Perl scripts need to be run many times (instead of persistently long running).

Test::Class: why have tests in startup?

If you use Test::Class frequently, sooner or later you'll see the following:

sub startup : Tests(startup => 1) {
    my $test = shift;
    my $engines = $test->start_engines;
    ok $engines->are_running, 'Engines should start OK.';
}

At first blush that looks sensible, but I don't think it is. I'll explain my view of the problem and hope that others can explain why I might be wrong.

fork'ing your world

The fork function is a very powerful tool used among many languages. Unfortunately It's not that common among Perl scripts, maybe because most scripts don't really have a need for it. But it's a handy trick to keep inside your hat.

Fork creates a new process running the same program, usually the process that calls the fork is named the parent process, and the created process is named the child process. The fork function returns 0 to the child process, and the newly created process pid to the parent. Using fork can be as simple as:

Rakudo Star Install Party


Hi Mongers,

I'd like to offer my place in Bernal Heights Tuesday next week from 7:30pm until whenever for a Raduko Star installation & Perl 6 lightning talks. As some of you know a significant milestone in Perl 6's release history is coming up this Thursday, http://rakudo.org/node/73 and what better way to get through an install than with local PM'ers!

For those that haven't been chez moi we have a basement, bar, projector, wifi, yard, BBQ, etc so we can eat, drink & give presentations. There's space for at least a dozen seated inside, and more outside (for those that can withstand the Day Star).

Who's interested in something like this? How about giving a talk?
Doesn't need powerpoint but we have a screen & sound if you do.
Anything at all raduko/perl6 related seems cool. Ping me off-list and I'll collate.

Insight on SWIG?

SWIG is available for some time to create bindings automagically for C and C++ applications. It supports code generation in different languages, including Python, TCL and Perl.

Curiously, in my years of Perl community I can't recall a talk on a YAPC about SWIG, and I can't recall any post on the usual community blogs about it as well. I would be grateful if any experienced XS user could comment on how good (or filth) is this tool and the generated bindings.

Oops Hiatus

I have done very little to the Perl Survey since I got back from Germany. However, finally I've decided how to format and present the report. Mostly with the help of R2HTML and Makefile.

Now that I've worked out how to write the report in a reasonably replicable way (i.e. minimum code differences between revisions of the survey - so running and analysing the 2012 survey should be much much quicker and easier), I should be able to get through a section every day between now and when it's done, then I can call the grant finished!

YAPC::NA 2010 Survey Results

I've just sent out the speaker mails, which contain all the feedback and evaluations for all the talks. As not all the presentations received feedback, some emails just note that the talk had no responses. If you were a speaker and haven't received a mail (there should be one for every speaker, regardless of the number of talks presented), please let me know, and I'll investigate.

In addition, the results of the main YAPC::NA 2010 Conference Survey are now online.

This year YAPC::NA had 305 registered attendees, with 129 of those attendees (amounting to 42%) submitting their responses. Many thanks to the 129 of you who took the time to take the survey, and all those who submitted 441 evaluations for the speakers. It really is very much appreciated.

Also thanks to Curtis Jewell, who suggested an addition to the survey, which will now feature in the YAPC::Europe 2010 Survey and all future surveys. If you have any feedback regarding the survey, or suggestions for questions, or have any questions regarding the surveys themselves, please feel free to contact me at barbie@cpan.org.

Progress Report: SVN & Mason

Set up a private SVN server on the web with Beanstalk; planning to have it mirrored locally, but until we can get a local one set up, we'll have the web one.

Mason project's going slower than we'd hoped, but we'll see how the rest of today pans out.

Lazy Database Columns and Virtual Vertical Partitioning

Recently we were trying to fix a database performance issue and I had to hit the DBIx::Class irc channel for some advice. Specifically, mysql has an issue where a query with text or blob columns forces a disk sort under certain conditions. Suffice it to say, we hit those conditions with several text columns and benchmarking certain queries showed that removing those columns from a query significantly sped up said queries. That, unfortunately, is a bit tricky under DBIx::Class, but Matt Trout made an excellent suggestion which I later implemented. Why not do a virtual vertical partition of our tables?

Celebrating Perl 6 with a full menu

Rakudo Star, the first [almost] complete and usable implementation of Perl 6, is expected to be released this Thursday, July 29. It is obvious that the community is looking forward to it as there has been a lot of talking, so the Barcelona Perl Mongers will be celebrating, taking advantage of the fact that it coincides with our monthly meeting.

We have prepared a pretty complete menu to introduce you to Perl 6:

  • 20:00 - entrée: a little tutorial to install Rakudo and Parrot
  • 20:30 - first course: the translation of the Perl 6 presentation in Warszawa.pm
  • 21:00 - second course: Pm's presentation at this year's OSCON
  • 22:00 - desserts: /(sausage|beer)*/ out in the fresh

The chosen venue is the traditional C6-E101 room in the C6 building at UPC's Campus Nord (the same place for those of you who have attended previous mongers parties). If everything goes according to plan, we will even be broadcasting the event.

Edit: Thanks to snarkyboojum for reminding me that it's not fully complete yet, but almost there.

YAPC::NA Survey Closed

The YAPC::NA 2010 Surveys have now closed. I'm now reviewing the data to produce the emails for speakers, the website pages for results for public consumption and the feedback documents for organsiers. If all goes well expect to see some postings tomorrow.

In addition, I've been refining the scripts that I use to perform the analysis of the results. One aspect that has been missing for the past few years is the output that provides the raw data. I'm please to say that this has now been added. This now means that when I upload the webpages, I can now provide all the data used to perform the analysis for the webpages. Note that the feedback questions and all the talk evaluations are omitted from this data.

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.