A thousand mile journey starts with one step

I'm slowly (one section per day, on top of my other responsibilities) getting through the questions for the Perl Survey data. My initial step is to convert as much as the quick and dirty code I wrote for German Perl Workshop, into replicable R code, so that we have similar graphics and reports. Once I'm through that I'll start writing some text to explain the graphs, and take some key cross comparisons between different aspects of the results. You can see the results as they are put together on the final_report branch on github.

tl;dr: The end is in sight!

YAPC::EU::2010 - First Afternoon

Following the idea of previous post, I would like to write here some thoughts about the talks I went to this afternoon, at YAPC::EU::2010.

I ♥ perlbrew

I love perlbrew! I like to keep the version of Perl that I normally use as up-to-date as possible, but it's nice to keep other versions around for compatibility. Just now, I needed to know when readline got fixed. With perlbrew, it was faster to check directly than it was to look it up!

SF.pm grant funding proposal to TPF up for public review

A grant proposal I wrote for SF.pm is up for public review. All views welcome - http://news.perlfoundation.org/2010/08/2010q3-grant-proposal-sfpm-fun.html

Your Test Suite is Broken

Here are some indicators that your test suite is broken:

  • It has any failing tests.
  • It emits anything other than test information.
  • It takes too long to run.

People are going to have issues with the second item on that list but they're definitely going to argue with that last one. I don't care. It's time to throw the gauntlet down. Let's look at these three points in detail.

YAPC::EU::2010 - First Morning

I am at YAPC::EU::2010 and I would like to congratulate the Italian organization. Everything is going smoothly. Just a few itches (like the fact of the chairs not being comfortable to be more than half an hour listening to somebody).

For now I watched two presentations:

A Matrix Worthy of Perl 6

The Problem

Wouldn't it be nice to have symbolic matrix operations in Perl? Instead of composing matrices of numbers, we could compose matrices of expressions. Consider the following:

use strict;
use warnings;
use Math::MatrixReal;

my $x = 1;
my $m = Math::MatrixReal->new_from_rows([ [$x, 2*$x], [3*$x, 4*$x] ]);

for(; $x < 4; ++$x)
{
	print "$m\n";
}

The output of this code is:

At the airport en route to YAPC::EU

After a while of loose planning, while working on 20 other things at the same time, we've finally left for the airport. We've taken 4 hours in advanced so we don't worry about delays.

We've reached the airport and got to the terminal so quickly that it left us quite a lot of time. One of the people at the border checkup asked me which metal festival am I going to. "A Perl conference" - "what?" - "computer stuff" - "oh..", "surprised?" - "hell yeah!" I suppose a lot of tattoos give that impression. :)

Unfortunately there isn't much to do here. There's internet connection so I was able to talk to $work and make sure everything is okay to find yet another Slowloris attack on a server. Perlbal to the rescue, Tlousky++!

We went to check out gadgets but there wasn't anything interesting or cheap. Thought about getting a 1TB USB disk (these aren't that common here) but it costs twice as much as a specially-ordered one.

A new way to create error free software

After too many failing cpanreports for perl-compiler releases I'll finally unify my failing test results into manable code of todo logic. Automatically.

Test::TAP::Unify at http://gist.github.com/506341

NAME

Test::TAP::Unify - Create a minimal set of TODO code for a set of test results

SYNOPSIS

Open Perl modules with vim

After reading about opening Perl module via name with vim, I realized it had a couple of (for me) limitations. First, I always operate from my top-level directory in a project, but that post doesn't prepend a lib/. Second, when I'm running a test suite, I see failure which might be from a module in the lib/ directory, but more often than not are in the t/lib/ directory. Since I keep all of my project directories identical, I can use one little bash function to handle this:

A Challenger Approaches

Hello. I guess I'm a bit of a new-comer to the Perl community. I've been using Perl 5 for the past year and a half, and have been having a lot of fun with it. I started playing with Perl 6 the other day, and I can tell already that it's going to be even more fun!

Some things I've done with Perl:

I intend to keep doing cool stuff with Perl, and (hopefully) document it here, for the rest of you to enjoy.

I'm pretty much always on IRC as rcfox, on the Freenode and Perl networks. On Twitter, I'm @RyanFox. Feel free to say hi!

croaching Kephra

finally 0.4.3.2 does install under all sane linux systems and will be packaged to become a .deb package. thanks jozef++.

recently i got 3 new ideas what to put into kephra. elastic tabs i cant implement, like MC hammer said it: can`t touch it. an spelling checker will be implemented for me and wil propably become the first real Kephra plugin and an idea by stefan suicu I will implement ASAP because it seems to me helpfull, especially in oop programming. insert the variable from the last line on curso position.

my talk about the philosophy behind kephra, held here in Pisa, is also almost completed. after i get the listeners feedback it will become another blogpost here.

ElasticSearch at YAPC::EU

If you're lucky enough to be coming to YAPC::EU and you're interested in ElasticSearch, come along to my talk

I'll be giving a brief introduction to what it is, the benefits, and how to talk to ElasticSearch with Perl

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

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

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

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.

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

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.