Rewriting Pod::Readme

Back in 2005, I wrote Pod::Readme. It languished a bit, and David Precious took over maintainership around 2010.

The core idea for this is that README files contain redundant information that is already in the POD, but not everything in the POD should be in the README (such as the details for individual method calls).

It's recommended in Task::Kensho but I'm not aware of many people using it. The few buildtool plugins that generate README files from POD seem to use plain POD-to-text modules.

So I've started re-writing it. My fork is on GitHub. My hope is to have something that module authors will want to use, and will use by default.

YAPC::EU is over. Everybody is back to their realities. Ado continues...

YAPC::EU is over

Благодаря ти Марияне, че направи това събитие истина! - Thank you Mariane, for making this event true!

Many of the the recorded videos of the talks are on Youtube already.

I met splendid people there. Yet once again my doubts about the vitality of this community showed to be pointless. And it is hard to understand how it continues to exist without a giant company to push the technology behind it further.  Yes there are companies that supported the event. The technologies them selves (http://www.perl6.org/ and http://www.perl.org/) however exist and evolve thanks to enthusiasts from the community. The Perl Foundation helps a lot.

Everybody is back to the usual activities

5 part YAPC::EU report in German

unless you already seen my tweets and you understand German - you maybe wanna read this thread in the biggest German Perl forum.

Firebase - Build Realtime Apps

Firebase - Build Realtime Apps :

I’ve been using Firebase a lot lately to build real-time web apps both in Perl and in Javascript. I figured it was high-time I give them a shout. If you are looking for an easy way to build real-time web apps, have a look at Firebase

[From my blog.]

Link to public version control system (GitHub or otherwise)

You might know one of my pet peeves is to get people to link to the public version control system of their CPAN modules. Earlier I created a few reports , and in the last couple of days I have started to check the most recent modules again.

When I find a module that does not have a link from its META files to its VCS, I try to locate if there is a public VCS at all, if there is one on GitHub, I send a pull request. If I cannot find a public VCS I check with the author if there is one elsewhere or if s/he prefers to keep the VCS private. I am happy to let you know that most people reacted positively to these pull-requests and questions.

Once they merge the pull request I usually mention that the MetaCPAN dashboard lists all of their modules that have no link to VCS (or no entry for license) in their META files.

Book Review: The Origins of the Irish

The Origins of the Irish, J. P. Mallory, Thames & Hudson: London, 2013, ISBN:9780500051757

To give away the game before starting, I would like to say that this book would be an excellent addition to the library of anyone who has an interest in the pre-history of Ireland. While it is not my area of expertise, it illuminated much which I had already gleaned from the writings of others; however, this was done in a highly engaging and effective way. One of the main advantages of this book is the way in which the key points are gathered at the end of each chapter which reminds the reader of all the foregoing material. This would easily make this a book which should appear in any Celtic Studies course. The additional factor which makes this book even more valuable is the easy style and humour of one who has an absolute command of the primary and secondary material. However, this is not a book without its flaws which will be discussed anon.

I learn something about tell(), then abuse it.

I learned a new thing today, or remembered a forgotten one. I can use tell to affect the file handle that $. uses.

It all started very simply. I was going too far in my answer to How do I add the elements of a file to a second one as columns using Perl?, a question I found by looking for the most down voted open questions without an accepted answer. As usual, I thought the answer would be easy. And, for the most part it was.

Then I wanted to make it even easier. I thought Perl might not be necessary at all when we have things like paste and head and tail and other command-line thingys. The problem was a header in one input file and no corresponding header in the other. How could I make paste ignore the header?

A comparison of memory use for primality modules

Performance and memory use are two areas of concern for many libraries. Last December I made a number of changes in my Math::Prime::Util module to reduce memory use, and bulk88 helped really tweak some of the XS. I thought I'd pick a simple task and look at the speed and memory use of a number of solutions.

isprime from 1 to 10 million
Memory Time Solution
2096k 72.6s Perl trial division mod 6
2100k 124.8s Perl trial division
3652k 36.2s Math::GMP
3940k 14.8s Math::GMPz
4040k 1.9s Math::Prime::Util (no GMP backend)
4388k 1.9s Math::Prime::Util (with GMP backend)
4568k 1.4s Math::Prime::Util (GMP + precalc)
4888k 4.4s Math::Prime::XS
5316k 245.1s Math::Primality
5492k 29.8s Math::Pari
6260k 1.5s Math::Prime::FastSieve
~16MB >1 year regex

Try rakudobrew and play with concurrency

rakudobrew is similar to perlbrew, but it's for Rakudo (a.k.a., Perl 6), the Perl-inspired language that we've all come to have a love/hate relationship with. I urge you to try it out, but first, some interesting new developments that you should probably know about.

A GUI for CPAN::Mini

After having read yet another tutorial about CPAN::Mini, I once again had the same thoughts:

  • CPAN::Mini is so cool
  • Imagine the use together with CPAN::Mini::Inject and Stratopan!
  • Damn, a configuration file. Where to put it? How do I find it again a month later when I forgot about my minicpan setup? Putting it just somewhere is like undocumented source code. And Windows + configuration files?? WTF!
  • Why can't it just be one of those nifty nice-looking applications like the Github for Windows - simple, easy to use, beautiful? With installers and start menu entries?

This time, I tried to change it. Having thought about it every time I read a post about CPAN::Mini, I was prepared a bit. I planned a feature set that could be completed eventually some day in the future. The result is a working GUI where CPAN::Mini can be configured and executed.

Have a look:

Introducing IOD file format

If you're looking for a configuration file format, you might want to try IOD (short for "INI on drugs"). IOD is basically INI, with more precise specification and some extra features. If you are not using any of the extra features, you're practically using the good ol' INI format.

IOD tries to capitalize on the INI's popularity and simple syntax, and on top of that tries to define more precisely the format and to add some features that makes it more convenient and powerful to use.

Format is more precise. Because there is no single, official specification for INI, variants emerge and they support different set of features with different behaviors and incompatible syntax. IOD tries to define things more precisely, for example:

Conference Survey

Loved YAPC::EU::2014? Hated it? Perhaps the conference would have been perfect if only we'd done X? What was your favourite talk? Could some talks have been improved?

You should have received an email from Barbie with an invitation to complete the YAPC::Europe 2014 Survey:

As an attendee of YAPC::Europe 2014, we would like to invite you to participate in the online conference surveys. Whether you are an attendee, speaker or sponsor, we would like to get your feedback regarding any talks and tutorials you attend, as well as the conference itself, with the aim of helping to improve the conference experience for future attendees.

Please shout at the organisers or email barbie[at]missbarbell.co.uk if you have any problems completing this, or did not receive an email with your keycode!

Swiss Perl Workshop -2 Weeks

Only two weeks until SPW 2104. :-)

There are still some seats free. The organisers would like to ask for timely registration to make it easier to buy food, drinks and appropriate amount of fun. Inadvertent last minute show-ups only get water, dry bread and seats in the hallway. ;-)

Attendees, please leave your preferences and allergies here, so that our kitchen team can try and take these into account. This is especially important for the attendees dinner, taking place at the venue, but also for the lunches and coffee breaks.

Also, and especially if you are from Switzerland: Help tilt the Kickstarter Campaign for brian d foy who wants to work for his expenses and is going to teach "Mastering Perl" after the workshop, in Switzerland. The campaign is well underway, but could use a little more love, especially local love.

See you in 2 weeks at the Flörli in Olten.
floerli2006.jpg

Thanks to our sponsors:
www.leanux.ch | www.perl-academy.de | www.oetiker.ch | O'Reilly | WSIWLT GmbH

Please don't use ::Tiny unless it meets the ::Tiny criteria, thanks!

Don’t get me wrong, I really, really, really appreciate effort put into making something as small and efficient as possible.

However, it seems like we have a recent trend of using ::Tiny for things that do not meet the actual criteria of ::Tiny.

That is bad because seeing ::Tiny gives a certain expectation that, when not met, could be surprising, even bad.

Just because it is way less bloaty than something, like say, Moose: still not necessarily “::Tiny”.

Here are the rules Adam Kennedy originally defined for what ::Tiny means:

  1. The module should be implemented in "as little code as possible"
  2. The module should implement a useful subset of functionality
  3. The module should use at least 1/10th the amount of memory overhead, ideally less than 100k
  4. The module MUST have no non-core dependencies
  5. The module MUST be only one single .pm file
  6. The module should be back-compatible to at least 5.004
  7. The module should omit functionality rather than implement it incorrectly.
  8. If applicable, the module should be compatible with the larger module.

If you have a module with ::Tiny in the name space then please either make it ::Tiny or rename it.

Thanks!

/rant

YAPC::Europe Day 2

Just while I was having a shower, the hotel had a 5-minute power cut. I decided to walk down the stairs to breakfast.

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

Today I've mostly stayed in the "Devops" track as I've been doing a lot of web operations recently.

First talk of the day: SyContent - Content in the Cloud with V8. Torsten took us through the history of content management systems. He explained how he thinks content management should work, with Perl, PHP, static JSON files and V8.

Then Docker with Perl - an Introduction where Denis explained what Docker is and how he suggests we use them with Perl, although he doesn't run Docker in production yet. He explained that it really comes out of a DevOps culture. I currently use Docker to package the applications on my personal servers, so perhaps I'm a little too experienced for this talk. I particularly like the Docker workflow.

Type::Tiny Tricks #7: Tricks with Dicts

In Perl, hashes are typically used for two sorts of purposes: maps (where the hash key acts as an object identifier) and dictionaries (where the hash key acts like a field name). A quick illustration of what I mean by this:

   # Maps
   my %ages = (
      alice   => 24,
      bob     => 25,
      carol   => 31,
   );
   my %email = (
      alice   => "alice@example.net",
      bob     => "robert.smith@example.com",
      carol   => "c_jones@example.org",
   );
   
   # Dictionaries
   my %alice = ( age => 24, email => "alice@example.net" );
   my %bob   = ( age => 25, email => "robert.smith@example.com" );
   my %carol = ( age => 32, email => "c_jones@example.org" );

These are two different styles of using hashes. Sometimes one is useful, and sometimes the other is. Sometimes neither is better and your choice of one over the other is fairly arbitrary.

Types::Standard contains a type constraint called Map which is useful for validating references to the first kind of hash. (I copied the idea from MooseX::Types::Structured.) But today I'm mainly going to talk about another type constraint: Dict. (Yeah, I copied that one too.)

YAPC::Europe 2014, day 2

(cross-posted from blog.tobez.org)

Ignat Ignatov talked about physical formulas. When I was planning to attend this talk, I thought it is going to be some sort of symbolic formulas computation, possibly with an analysis of dimensions of the physical quantities. However, despite my (a bit long in the tooth) background in physics, I did not understand a word of it. Apparently, some sort of unification of physical formulas, not entirely unlike the periodic table in chemistry, was presented, with almost no comprehensible details and with scary words like co-homology and algebraic topology. The fact that half of the slides were in Russian, while irrelevant for me personally, probably did not help matters for the majority of the people in the audience. I did not expect any questions at the end of the talk, but there were at least two, so I was probably wrong about general level of understanding in the audience.

Perfect Hashes and faster than memcmp

In my previous post about perlcc next steps I talked shortly about my current project, Perfect::Hash.

Let's talk about Time::Moment and round-trip of strings

In my previous blog post I wrote a lot more about Time::Moment, than appeared in the post (could have been my mistake due to a preview and error and a incomplete copy and a paste, but still very inconvenient). So I have decided to break down my original blogpost in several blogposts.

Time::Moment implements a subset of ISO 8601 (known as 4.3 Date and time of day, 4.3.2 Complete representations), Wikipedia has a good article regarding ISO 8601, but it's not an authoritative source for the ISO 8601:2004(E) standard.

Time::Moment is capable of parsing any string that purports to be formatted in ISO 8601:2004(E), 4.3.2 Complete representation.

Such formats includes the following:

Combinations of calendar date and time of day:

Basic format:
20140808T003146+0200
20140808T003146.705971+0200
20140808T0031+0200

Extended format:
2014-08-08T00:31:46+02:00
2014-08-08T00:31:46.705971+02:00
2014-08-08T00:31+02:00

Combinations of ordinal date and time of day:

Type::Tiny Tricks #4: Inlined Type Constraints

If ever you're unsure of how a type constraint has been defined, you can examine the string of Perl code used to implement it. For example, does an ArrayRef[Int] accept an empty arrayref?

   my $type = ArrayRef[Int];
   print $type->inline_check('$X');

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.