(my $title = "Think Python") ~~ s/Python/Perl 6/ && $title.say;

I'm rereading Allen B. Downey's Think Python, but this time with an eye for writing the equivalent code in Perl 6. I am not sure how deep I'll dig into this, as I am limited by spare time and tools from the book like Swampy would have to be made accessible to Perl 6 somehow. BTW, Think Python is available under a CC-by-nc 3.0 license.

Just using this space as a public scratchpad at the moment. I've got $RAKUDO_HOME/install/bin on my path to simplify things.

$ perl6 --version
This is perl6 version 2012.12 built on parrot 4.10.0 revision 0

YAPC::Europe 2013 in Kiev. Week minus 25. A Ceasefire

Don't like a conference T-shirt that the organisers insist on? Choose your own!

More nice news in this week's conference newsletter.

N. B. We have just passed the first half of the year-long preparation to the conference. Wish us a success!

CUDA::Minimal, back where it should be (but why did it break?)

I just posted an entry about how CUDA::Minimal was behaving weirdly. I hadn't dug around to figure out what was going on, and I went so far as to modify the way the code was compiled and linked to get it to work! My previous post raised concerns about how I would continue with the newly-chosen path.

Well, I decided that I should really figure out what was giving trouble. After many hours (and staying up later than I ought), I figured it out. I highly suspect that these problems are due to interactions with C macros defined by nVidia, but I'm not sure. I'm going to post them here, and possibly also the the perl-xs mailing list, in hopes that they might help somebody solve problems.

There were two big changes. First, all XS code that uses ExtUtils::nvcc has to include this in their boot sections:

Debuggit: now with Data::Printer-y goodness

Short Version: I’ve released version 2.04 of Debuggit.  It allows you to substitute Data::Printer for Data::Dumper when dumping variables.

Long Version:

If I’m known for anything on CPAN (and I’m not saying I am), it’s probably for my work on other people’s modules: my co-maintenance of Method::Signatures in particular, or perhaps my co-maintenance of Test::File (both of which I’ve talked about before).  But the first CPAN module I ever released was Debuggit.

I wrote a post upon the occasion, on my other blog.  I didn’t put it here, mostly because I hadn’t started this blog yet.  But also because it was more of a philosophical musing on procrastination than a useful commentary about CPAN or my particular module.

Names And All That


The debate about the naming of Perl versions has been started by events which allegedly sprang from Ovid’s visit to FOSDEM a couple of weeks ago. The premise is that Perl lacked punch as a brand. It couldn’t get noticed.

Perl at FOSDEM

I was at FOSDEM too. I’d said some things on the London PM mailing list about how important it was, so I thought I’d better go. I took the afternoon off work and drove down to Dover with my partner and jumped on the Dunkirk ferry.

I didn’t get to any of the evening socials. We didn’t arrive in Brussels until late on Friday. I left Carol on her own to explore Brussels for all of Saturday. I didn’t think it was fair to drag her along to an evening meal with a bunch of programmers so we ate together. We had to leave at noon on Sunday to drive back to Dunkirk.

Astro::SpaceTrack upgrade

For some time now, the Space Track web site, which is the official source for satellite orbital elements, has been working on an upgrade to a REST interface. This interface is scheduled to go live on February 20.

My module Astro::SpaceTrack retrieves orbital data from the Space Track web site. To track this change, I intend shortly to release a new version of Astro::SpaceTrack which uses the REST interface by default. My understanding is that the old, screen-scraping interface will be available for an indefinite (but finite) time. For details, click on the post title for the extended version of the post.

CUDA::Minimal takes two steps backwards, one step forward

Edit: I got my original approach to work, see my follow-up.

A week ago I wrote about how I though play-perl was great. I put up a bunch of ideas and waited to see what others would encourage me to do. Two of my ideas got two votes each (some others got single votes), one of which involved revising CUDA::Minimal sot it works again. (CUDA is a means for executing massively parallelized code on your video card.) Well, it compiles now, but it doesn't quite work the way I had hoped and I am facing some basic architectural redesign issues. Herein I describe the old way things worked, and why that won't work anymore. Can anybody offer some ideas for how I might move forward?

Make Gabor happy please

Really, let's just stop doing that.

The thing is that people posting different--both long and short--messages online in their blogs, or commenting other people's opinion are doing one common mistake. They do not want to hear others.

Scan through the texts appeared after FOSDEM (yeah, I never liked that conference :-) most of them have the following common structure: I propose A, as B is completely insane.

I can easily enough skip personal offensive comments found in my email or tweets to me which are just rude. But what is really wrong that everybody wants his own solution to become a standard. This does not give the right to say "we the community" in these cases. That will just not work for the Perl's success.

We are all different and it's what we have to adopt and exploit rather than killing ourselves from within the group of Perl users.

I am sad

I am just sad seeing people paint the Perl 6 developers as the enemy. As the reason for whatever trouble Perl 5 experiences. It looks like a search for a scapegoat. Please, stop this.

Pumpkin Perl Breakdown

Enough broad strokes.

You can find the initial outline and rationale for my proposal here, and my response to the comments and suggestions I got following it here.

And now, here's a breakdown of the what, the why and the how, so that we can make a proper start at turning this from an idea into a concrete reality.

All comments are, as always, very much welcome.

Building pluggable backends with Moo

I've been working through the design and implementation (using Moo) of a module (IPC::PrettyPipe) which implements some backend functionality via plugins. The nature of the module isn't that important; suffice it to say that there's a rendering backend and an execution backend.

I've previously implemented pluggable backends using Module::Pluggable and kin, but since I'm using Moo for this module I thought I'd investigate how its capabilities enabled (or constrained) pluggability.

What goes well with DBIx::Class - the review.

In my case, it went very well with Fideos de Sepia and a nice glass of Fina Enguera.

This is not really a review of Dave's Perl School. His style is competent, informative, sometimes entertaining and pitched right at my level of Perl. Unlike the Moose school I went to in December, this lecture could have gone on for another hour discussing the finer points, but people have lives and we finished at 5pm.

This is more a bit of navel-gazing about what DBIx::Class might mean to me.

Prototype changes across Perl release boundaries

At a previous employer, one of the things I ran into from time to time was the need to get the keys of a hash back out in the same order they were provided. Yes, Tie::IxHash exists to solve this problem: but it always felt like a heavy-weight solution to a simple problem. Why bother adding a new dependency to the system when I could just swap my %hash out for a @hashlike array?


    my @hashlike = (1..10);    # generally the return value of a subroutine

    while (my ($k, $v) = splice @hashlike, 0, 2) {
        ...  # do something with $k, $v
    }

Pumpkin Perl - Redux

And lo, did I write a blog post proposing we rename perl5 to Pumpkin Perl, and lo, did people make lots of comments here, and on IRC, and by other means.

And lo, have I just spent the last three hours going through them all and trying to produce some sort of coherent response to all the various points that people raised.

And lo, here is the result of those three hours, in which I have attempted to cover every important comment and objection I've heard so far. So please, go forth and read it, and point out the things I've missed and any new thoughts you have as a result.

And lo, do I have no idea why I keep saying lo. I think possibly I sprained a neuron or something. Go read the post and think about your comments while I have a lie down in a darkened room ...

... (edit) and I've just posted a more concrete breakdown, nailing down the what, the why and the how and hopefully clarifying the answers to the questions raised in the comments below

First post

First post!

PAUSE permissions should be case-insensitive

The PAUSE permissions model is case-sensitive, which means that Foobar is treated as a different module from foobar. This all works fine unless your filesystem is case-insensitive, like on MacOSX, for example. In this article I expand on what the above means, and give some examples of problems that already exist on CPAN.

My first thought is that PAUSE should be case-insenstive for its permissions model, but maybe there's another solution?

Play Perl is more popular than rt.cpan.org!

Sorry for the eye-catchy title, but seriously, number of Play Perl quests created in 1 week since its launch:

$ curl -s 'http://play-perl.org/api/quest' | jq length
197

rt.cpan.org tickets created after 2013-02-07: 128 (no idea how to add a permanent link to its search results).

Some other stats:

  • 282 players
  • 200 comments
  • 309 likes
  • 1,349 unique visitors
  • 28,222 page views (half of them are probably mine)

New features since my last post:

  • Email notifications (if you have registered in the first few days, go to your settings and set your email!)
  • New Explore tab
  • Players list is now the leaderboard
  • Comments preview with client-side markdown engine
  • Comments and quests editing
  • Auto-highlighting CPAN module names in comments
  • "Like" button in quest lists
Also, tons of JS refactorings and bugfixes, backbone and bootstrap upgrades, etc.

Names and Numbers, Brand and Identity

I've just put a post up on my shadowcat blog talking about where the 'perl 7' meme came from, why it's a terrible idea, and suggesting what we should do instead.

tl;dr - Pumpkin Perl!

This post exists to provide somewhere for people to comment that isn't Hacker News or reddit; I've cross linked it from the end of the blog post itself so hopefully people who want to discuss the idea will find their way here.

(if you haven't seen, there's already been a followup responding to the comments made here and elsewhere and a third post breaking down the what, the why and the how of the proposal)

#galileo on irc.perl.org

Hi all,

I just wanted to drop a quick note to announce #galileo on irc.perl.org as a place to talk about Galileo my CPAN installable CMS and its new companion project GalileoSend which isn’t quite to CPAN yet, but it will be soon.

GalileoSend will make sending files via websocket easy! So far the package includes a command-line sender (client) and receiver (listener/server), a Mojolicious plugin and a javascript client. Futher GalileoSend is a protocol spec, which means if you want to write a client or server in your other favorite language, or a plugin for your favorite framework, its very possible.

Interested? Drop on by and chat about it!

Web Scraping with Perl & PhantomJS

PhantomJS is a 'headless' WebKit browser, mainly intended for use as a web testing framework, and is controlled by a JavaScript API. The 'headless' aspect of that also makes the framework extremely useful for scraping JavaScript heavy websites.

The problem with PhantomJS (up until the v1.8 release on 23 December 2012), was that if you were unfamiliar with JavaScript, CoffeeScript or Node.js (if you were using the Casper.js fork), was that it wasn't very easy understand or control. Since the v1.8 release in December, PhantomJS now supports WebDriver, which basically means you can control it from pretty any language you like (although Perl isn't explicitly mentioned).

Since I like Perl, I decided to give it a go after trying WWW::Mechanize::Firefox + MozRepl, which is great, but doesn't work if you're going double-headless and are running it on a GUI-less server.

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.