YAPC::Europe 2014, day 1

(crossposted from blog.tobez.org)

When I came to the venue 15 minutes before the official start of the registration, people at the registration desk were busily cutting sheets of paper into attendees' badges. Finding my badge turned out to be a tad not trivial.

This conference is somewhat unusual not only because it is conducted over the weekend instead of in the middle of the week, but also because the keynotes for every day are pushed till the end, even after the daily lightning talks session.

The welcome talk from Marian was about practical things such as rooms locations, dinner, lunches, transportations and so on. Then I went on stage to declare the location of YAPC::Europe 2015 (which is Granada, Spain by the way). After that Jose Luis Martinez from Barcelona.pm did a short presentation of YAPC in Granada, and Diego Kuperman gave a little present from Granada to Sofia.

YAPC::Europe Day 1

A day of two breakfasts, one at the hotel and one at the conference venue (more Баница) while meeting everyone.

First big announcement of the day was that YAPC::Europe 2015 will be in Granada, Spain.

And then the first talks of the conference. I chose to attend Welcome to Auditing and toughening as part of the Security Development Lifecycle which was an interesting look at how hardening a system is just a small part of the security development lifecycle. John highlighted the importance of a threat model and how avoiding vulnerabilities as early as possible is the only way to go. He went though a few practical examples of where was the best place to fix
vulnerabilities.

Over sandwiches at lunch we had a little discussion about the compromises between fixing vulnerabilities and maintaining backwards compatibility.

The Wi-Fi has been a little spotty, but mosh make it usable.

Next up was Code I'm proud of: where Thomas explained lots of little hacks, from passwords and Bread::Board to microblogging.

Type::Tiny Tricks #6: Tricks with Tuples

Let's say you want an attribute to accept a pair of numbers - perhaps a geographic co-ordinates [ 50.873, -0.002 ]. You could constrain the attribute as ArrayRef[Num], but that would accept an arrayref containing a single number, or eight numbers, or even a reference to an empty array.

With the Tuple type constraint, you can be more exact in expressing which values are acceptable:

   isa  => Tuple[ Num, Num ]

Live Streaming

We are hoping to live stream the conference which starts on Friday morning. We will have streams of all three tracks:

Hall Vitosha
Hall Musala
Hall Rodopi

Hope you can join us!

Language design: Exploiting ambiguity

[ Cross-posted by invitation, from its home on the Ocean of Awareness blog. ]

Currently, in designing languages, we don't allow ambiguities -- not even potential ones. We insist that it must not be even possible to write an ambiguous program. This is unnecessarily restrictive.

This post is written in English, which is full of ambiguities. Natural languages are always ambiguous, because human beings find that that's best way for versatile, rapid, easy communication. Human beings arrange things so that every sentence is unambiguous in context. Mistakes happen, and ambiguous sentences occur, but in practice, the problem is manageable. In a conversation, for example, we would just ask for clarification.

YAPC::Europe Day 0

I travelled from Heathrow to Sofia, Bulgaria very early this morning. I managed to bump into a few Perl Mongers on the flight over and we were welcomed by a camel sign at the airport. I managed to find my hotel and have a proper shower. First order of business was to have a proper lunch, I bumped into someone and we took the shiny new metro system into town and explored the center of town. I managed to pick up a Баница , a pastry with fresh cheese. We then wandered around, found a great Rodin exhibition and made it to the evening meetup a little early. Luckily we weren't the only people turning up early and started drinking a Zagorka or two. Very drinkable.

Type::Tiny Tricks #5: Wrapping Moose/Mouse Type Constraints

So you have this Moo class, and it turns out what you really need for it is the StrictVersionStr type constraint defined in MooseX::Types::Perl. You could switch the class to Moose, but long term you want to stick with Moo.

Eventually you'll steal what you need from MooseX::Types::Perl, so you don't have the Moose dependency, but for now what you really want is to be able to use a Moose type constraint within a Moo class! What a predicament you've gotten yourself into! Type::Tiny to the rescue!

   {
      package Local::Eg5;
      use Moo;
      use MooseX::Types::Perl qw( StrictVersionStr );
      use Types::TypeTiny qw( to_TypeTiny );
      
      has version_number => (
         is   => "ro",
         isa  => to_TypeTiny( StrictVersionStr ),
      );
   }

Bring your dirty YAPC::EU 2013 money to YAPC::EU 2014

Nicholas Clark:

It turns out that it’s quite hard to change Ukrainian Hryvnia back into your local currency. Apparently you need to get a special form to do it, which seems to be about as common as a Ryanair refund.

Given that quite a few of us aren’t that likely to return to Ukraine any time soon, it implies that there’s quite a lot of paper money sitting around various Perl monger’s desks, drawers etc, not earning its keep. For each individual it’s not much in value, but I suspect that all together it adds up to a few thousand Pounds/Euros/Dollars etc. Meanwhile, the Ukrainian central bank is very happy about all currency it got in return for selling us [its] bits of paper.

So I thought that it would be a good idea if we put the notes carefully to one side, and then all took them to Sophia next year, where at YAPC::Europe 2014 someone from Kiev can come with a big bucket, collect the money, and take it back to do useful things with it.

I assume that the intervening events have not made changing the currency any easier…

In any case I’ll be bringing my 70 along, and bulk88 has expressed interest to buy, should none of our attendants from the Ukraine want them.

CPAN Day - 317 Uploads and 21 Guns

Sometime in May 2014, ETHER mentioned on IRC that she would soon be passing me up on this leader board. I was number 20 and she wasn't far behind. I guess I took that as a challenge, because this past weekend on CPAN day, I moved into the #6 spot. This post explains how.

I've created a couple CPAN packagers over the years, like Module::Install, and Module::Package, but earlier this year I decided to give up on those and just use Dist::Zilla, so I moved most of my active stuff to that. In the past year, as an Acmeist, I started doing a lot of real programming in Bash, and recently I made a Bash-heavy wrapper around Dist-Zilla called Zilla-Dist.

The 19th CPAN Day and the 1st

Yesterday (August 16th 2014) we celebrated the anniversary of the first upload to CPAN by Andreas König (ANDK) (as he worked on what became PAUSE). It was the 19th anniversary, but the first that we've marked in this way.

In one day, 107 people uploaded 775 releases, 41 of which were the first uploads of new distributions, and 10 of which were the first upload by new CPAN contributors. The first two numbers were outright records, and the second equalled the previous best. All of those numbers were higher than I expected.

Type::Tiny Tricks #3: One-off Coercions

Here's a quick way to create an attribute that coerces to an integer from any other number:

   package Local::Eg3;
   use Moose;
   use Types::Standard -types;
   
   has foo => (
      is      => "ro",
      isa     => Int->plus_coercions( Num, sub{int($_)} ),
      coerce  => 1,
   );
   
   __PACKAGE__->meta->make_immutable;

CPAN Day winner?

I didn't think it was a contest but I think Ingy won CPAN Day....

View image

Kephra XP ded prototype works

Mark eting may prefer vampires, but here's a different why Kephra keeps evolving, for all that are interested in dev tools, written in Perl. Oh , btw, it go ready on CPAN day - mere coincidence. :)

CPAN Day

First off, let me say I think CPAN Day is a great idea, and I am happy to take part in it!

For CPAN Day, I have contributed App::HTRender, a command line tool to assist development of HTML::Template-based templates. If you are building a website using HTML::Template and your data model is still fluid (or you just want to quickly test different values) you can lay out your data in JSON format and use the ht_render command to feed it to your template without having to change any of your Perl code.

Additionally, Logical Helion has released a new version of Helios, Helios 2.81. This version is largely a bugfix release, but does include a new command for retrieving jobtype information and some improvements to the helios_config_* commands.

Happy CPAN Day everyone!

Type::Tiny Tricks #2: Types Are Objects

When you use code like this:

   package Local::Eg2;
   use Moose;
   use Types::Standard -types;
   
   has foo => (
      is      => "ro",
      isa     => Int,
      coerce  => 1,
   );
   
   __PACKAGE__->meta->make_immutable;

Perhaps you don't think very much about what that bareword Int is actually doing. Well, it's a function that returns a blessed object. This object is used by Moose to check whether values are integers. Yes, Moose uses the object, and you can use it too!

PPI 1.218 has been released - bug fixes, speed optimizations, tests, doc improvements

On request of Neil Bowers i pushed this release back a day, so now on CPAN Day in 2014 the first update of PPI in 3.5 years has been released to CPAN and will be available on a mirror near you soon.

Since the release candidate only minor changes affecting the release process itself have been made.

The change log has a detailed listing and the git repository is even more detailed (it even has tags if you clone it). That said, the summary of the changes is:

  • a number of fixes to how Perl is parsed, notably around the x operator and some case sensitivity
  • many speed optimizations, allowing PPI to parse big files in reasonable time
  • the 1MB limit is now removed
  • many many doc fixes
  • many more tests for previously untested code
  • PPI is now on Github

A brief history of CPAN

My project for CPAN Day has been to pull together a history of CPAN:

  • How it was started, and by whom
  • The other services that make up the CPAN ecosystem
  • The key modules that have helped shape CPAN

In best CPAN tradition, this is the work of dozens of people, who patiently responded to my pestering via email over the last few weeks. Thanks to everyone who helped get it to this point.

Announcing CPAN.io

To celebrate CPAN Day, NEILB and BOOK are proud to announce a new CPAN-related site, specifically targetted towards playing with CPAN (with the underlying goal of improving it).

Please join us in celebrating the first the day of cpan.io!

The site is rather empty now, but we have grand plans for it. Come play the CPAN game with us, fork cpan.io on github and send us patches and feature requests.

Type::Tiny Tricks #1: Quick Intersections

Type::Tiny objects overload the & (bitwise and) operator to build a type constraint intersection. For example:

   package Local::Eg1;
   use Moose;
   use Types::Standard -types;
   
   has foo => (
      is  => "ro",
      isa => ArrayRef[Int] & HashRef[Int],
   );
   
   __PACKAGE__->meta->make_immutable;

Though that example isn't especially useful. Do you remember Venn diagrammes? Intersections are that small overlapping section in the middle. So the value for foo needs to be something that is simultaneously an arrayref and a hashref. (Which no value could satisfy.)

But there are ways intersections can be used more usefully.

The new Test::Builder - "Why?"

Lately there has been a buzz of activity in the Test-More project (Test::More, Test::Simple, Test::Builder). In fact, it is safe to say that very little code has gone untouched in this process. We are currently on the 34th alpha release of the new Test::Builder, and I wanted to take a moment to discuss the things that are happening!

This is the first of several blog posts that will cover the changes to Test::Builder. This one covers the "why".

Why are things changing? The simple answer of course is "Testing". A more helpful answer is this: Test::Builder is the de facto standard when you go to write a test. Just about any testing tool you use will rely on Test::Builder under the hood. The problem though, is that testing your testing tools is still somewhat archaic.

Currently, if you want to test a test library, you have two choices:
Test::Builder::Tester
Test::Tester

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.