One more little Moose Trick

Well had another good day with Moose as I solved a little problem I was having when trying to write a serializer for my AD&D Character class.

Well the gist of it is I was starting to set up a little JSON web service nothing fancy just give the current character values when requested. Of course creating JSON is easy just express what you want as a hash ref and then use good old JSON::to_json to make it into a JSON string.

Well that was simple enough but then I ran into the problem that I did not always want all of the class to be sent down the pipe I just wanted the current Character Attribute levels not all the tombstone and historic data unless I asked for them.

Well I started out with a silly thing looking like this;

Another event in Oslo

I mentioned previously that we were aiming to organize a second free public talk in Oslo. And I can now confirm that, in addition to my talk next Wednesday night, I will now also be speaking at the University of Oslo, on Friday March 28, from 1615 to 1800.

I will be presenting an entirely new talk on Perl 6, entitled: A Programming Language for Computer Scientists (And Other Crazy People).

Although there with be a definite CS slant to the talk, it will be neither abstract nor abstruse, but full of practical examples of working code. So anyone with an interest in programming languages—and how we might teach them better—is most welcome to attend. If nothing else, you should come along to see just how amazing (and how fully implemented) Perl 6 now is.

Meanwhile, there are still a few seats left in Monday's Perl 5 Masterclass here in Oslo. It's not too late to sign up on-line...though, admittedly, it probably is too late to get your boss to actually pre-approve the necessary funding and time-off. Still, as a truly great computer hacker once observed: "It's always easier to ask for forgiveness (or reimbursement) than it is to get permission (or budget)" ;-)

Damage control is not quality assurance

During this year Perl QA Hackathon, even though I organized my first Perl event more than ten years ago, I still learnt a few things.

QA Hackathon 2014

This year's QA hackathon was held last weekend in Lyon. 30 of the nicest and cleverest people I know met for four days with the common goal of improving Perl's quality with specific reference to testing and the toolchain. I was there too.

Where Have You Gone Perl.org??

Been well over a week and the perl foundation web site is still down?

Is anyone out there even aware of this??

There must be someone??

The facebook page has been recently updated and the news page has a recent update.

Some of the members even blog on this forum.

Is there no one out there that can fix it as it is rather embarrassing to the community as a whole, as this is suppose to be one of the leading Perl organizations.

Oh well at leas the donation page sort of works? However, do I really want to donate any money to a site that looks totally neglected broken or even worse hacked??

Not much of a post I know but I wanted to post on something a little more useful and I had I bookmarked a page in the perl wiki for it and I have been trying to get at it since before last week so I guess I am just a little frustrated.

Oh well I will take some cheese with my wine please!

Veure - The Game That Isn't

Some of you may remember me talking quite a bit about Veure a few years ago when I was living in Amsterdam. I never discussed on the Web what it was about.

Now it's time to fess up, but I've posted the story of Veure to my personal blog instead of blogs.perl.org because it's not really about Perl (and blogs.perl.org kinda struggles with images). Veure was/is a Perl-based MMORPG. It's not done, but I included a few screenshots.

There's nothing like a bit of self inflicted public shaming.

Today I had a case of the magically missing data structure. We have a bit of code that's very hard to test with automated testing, and that part of the code died at an important point in time. Pending the refactor guy getting onto the root cause I came up with this nice snippet. At the time I said "this is the kind of code that you're simultaneously proud of and ashamed of". So I figured I'd put it here as a bit of public shaming.

pjam on rails, part 2 ( pjam projects )

Recently I wrote a post about a pjam - a perl applications build server. Now I continue the topic and try to uncover some pjam vital features.

First of all, central point of pjam is a "project", which is the collection of URLs with a source codes for your application:

Every url therefore holds a part of source code for you application. Modern applications can consists of many parts, so an application can be represented by many URLs in your VC system. Currently pjam supports only subversion VCS, one day I may also add git.

A sources codes, provided by the list of URLs are checked out from VCS and processed in order. Every source code must hold valid Build.PL / Makefile.PL in root directory. Pjam does standard perl Makefile.PL| Build.PL/ && make|./Build manifest && make | ./Build dist loop to create cpan distribution archive for every source.

Therefore every cpan distribution archive created from source code URL is added to pinto repository. The phase above is called "pinto" phase . If the pinto phase is successful we have *all* project dependencies added to pinto repository.

On the next post I will explain next phase called "compile" one.

Always somthing new.

Well I was just cleaning up a few things in some very old code this AM and I noticed this

Use Config;

die "chown not available!" unless $Config{"chown"};

and a number of similar lines checking for what I though would be 'core' functions, (like I said this was an old piece of code).

What caught my eye was the 'Config' mod never run into that one before so I had a quick read. I quickly determined that all perl programmers will use this module in onlyu one of three ways

  1. Never have a need for or even look at it or
  2. Use all the time and sleep more soudly because of it or
  3. Have a look at, play with until you corrupt your perl and then never play with again

Le sexe et la violence en Suisse

We've just added another public event to my current European speaking tour.

On the evening of Tuesday April 1 (yeah, I know), I'll be speaking in Morges, near Lausanne, giving an updated version of my presentation: Sex and Violence: Social and Technical Lessons from the Perl 6 Project

The talk is free and open to anyone interested in project management, language design, or other related forms of sadomasochism.

While I'm in Lausanne, I'll also be offering two public classes: my Advanced Presentation Skills class and my recent update on "Perl Best Practices" (Perl Even-Better Practices). There are still some places available in both classes.

Note that the sign-up links I've given are specifically aimed at Swiss academics, but the classes are definitely open to everyone else as well. So, if you'd like to attend, but your details don't seem to fit into the sign-up page, you can contact Frédéric Schütz (who is the mastermind behind my repeated visits to Romandy) directly to find out about enrolling in either course.

Donc, j'espère vous voir nombreux à nouveau en Avril à Vaud. Et si vous êtes particulièrement chanceux, je ne vais même pas essayer de parler français! :-)

Job: Full-Stack Web Developer - Helsinki, Finland

Frantic is a web design & development company based in Helsinki, Finland. We're looking for developers:

https://careers.stackoverflow.com/jobs/45707/full-stack-web-developer-frantic

The position is not perl-exclusive; we're looking also for good skills on other web / browser technologies (see the listing above for more details). However, we do have many services running on perl, and many more to come. With good perl skills you'll get immediately to work with loads of modern perl code - mostly Catalyst based sites and web apps that we deploy to Heroku. I'm hoping to fill that need with this job listing, but we can also offer training (both ways) to make it happen.

At this point we're primarily looking for people who can work locally, here in Helsinki. This is because the job includes also some client communication and meetings, as part of the project teams. However, contract and/or remote work can be a possibility later.

Devel::Callsite change and getting more detail about source-code position

Recently, with the good work of Ben Morrow, Devel::Callsite now has an optional level parameter similar to perl's builtin caller. With this you can get the OP address up the call stack.

In the next release of Devel::Trepan, OP addresses will be shown in locations, by default if Devel::Callsite is installed. Currently they are shown only after the debugger command set display op on is run.

But this got me thinking about this and identifying the exact position. I've mentioned this topic before in a previous blog post and on PerlMonks.

Given the tree structure nature the Perl program, it should be possible to narrow positions in a line further. For example, one can use words to describe a position within a line. If for example, that an op address is in the second statement of line 10, one might say just that. Or perhaps something like "second function call on line 10".

Going further, one might take B::Concise output and decompile some fragment with a given op address.

I realize this probably has limited appeal, but still I think it cool. Any takers on an package that can take B::Concise output and an perl OP addresss, and narrow within a line where that OP is?

Well its not software or codeing but it is a good story


Anyone who has ever run into my will know I like to tell and hear good stories and I ran across one surprisingly on CPAN today.

Well I blundered upon Morale a rather old bit of code that has been around since the last century that total and as it is rather unremarkable old school, well that is unfair really as it was written well before there was a new school and most new school programmer will still playing with their gameboys, that simply stores a scalar value of 1 to 100 for a uses moral and can also calculate the moral for the group based on the individual user values.

It wasn't the 90 lines of code that caught my attention or the 12 lines of POD it was the 100 or so lines of the story that caught my eye.

MetaCPAN 2014 QA Hackathon Retrospective

This was my second QA Hackathon, the first being 2012 in Paris. This year, I had a lot of good conversations with various people about MetaCPAN's role in the Perl ecosystem and I pushed a decent amount of code. A lot of it is waiting to be merged, but here's the gist of it.

On the plane on the way over, I did a bunch of cleanup on the API. Mostly style changes, but it makes some of files easier on the eyes. RWSTAUNER was kind enough to fix my failing build after I pushed the code.

When Ovid released TAP::Stream, breaking it out of Test::Class::Moose, it briefly disappeared from MetaCPAN. This reminded me of how annoying it is to find missing modules. So, I added a view to the author pages which will let you paginate through all releases ever uploaded by any author. I think it's quite helpful, even if it's not something that will be used a lot.

TPF Grant Progress Report: March 2014

This past May, The Perl Foundation awarded a grant to fund development of a couple features in Pinto. Pinto is a robust tool for curating a private repository of CPAN modules, so you can build your application with the right modules every time. This is my fifth progress report on that work.

Helios 2.80 Released

Logical Helion, LLC is pleased to announce a new stable release of the Helios distributed job processing system! Helios 2.80 provides several new features to improve the performance and flexibility of the Helios system. A new jobtype system and job queuing extensions enable you to divide your workload in more complex ways. New configuration options allow Helios to dynamically adjust to incoming workloads. New commands ease administration by providing job and service information at the command line, and the new helios_config_* commands allow you to reconfigure services without having to resort to the Helios::Panoptes web interface or SQL commands. There are performance enhancements and bugfixes as well. The full changelog is here.

For more information about the Helios distributed job processing system, check out the Helios website or our project on GitHub!

Gluu fer the Wëëbb Part 3

There is always more than one way to do something in perl and Toto definitely lives up to that old adage.

When I first started I simply aped what was on the POD so my set up was like this



plugin 'toto' =>
        nav => [ qw{character} ],
        sidebar => {
            character => [ qw{character/list character/search character} ],
        },
        tabs => {
            character=> [qw/view edit delete/],
        };

My 2014 QA Hackathon

My write-up of this year's QA Hackathon in Lyon can be found on my blog. Many thanks to BooK and Elbeho for organising another great event.

Notice: forthcoming change to Type::Tiny overloading

One of the features of Type::Tiny that differentiates it from Moose's built-in type constraint system is that it allows stand-alone coercions which can then be mixed with type constraints as required. So if you had a Split coercion which split a multi-line string into an arrayref of lines, you could do something like this:

use MyApp::Types qw( ArrayRef Split );
 
has lines => (
   is      => 'ro',
   isa     => ArrayRef + Split,
   coerce  => 1,
);

Perl::QA Hackathon in Lyon - Summary

I'm back from the Perl QA Hackathon and had a blast. I really appreciated the work that BooK and Laurent did to pull this off. And thanks to Booking.com for hosting us. In fact, we had a wide variety of sponsors and I suggest you check them out if you're looking for a new position.

To summarize what I did:

Very useful if you distribute tests across multiple boxes or want tests running in multiple processes.

This version makes it easier to migrate from Test::Class.

It's a good starting point for those (like me) who are new to Dist::Zilla.

This version makes method attributes required. There's simply too much benefit for them in tests and making them optional complicated the code too much.

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.