OT: PLOS ONE Has an RSS Feed

If you like to follow academic progress in CS, PLOS ONE has an RSS feed. (I don't know my feed types upon inspection -- it might be Atom rather than RSS. Still nice to have the feed, though.)

Gluu fer the Wëëbb Part 2

Well in my first post of this series I just managed to get a listing up and running utilizing the Toto plugin well lets move on a little.

Well it seems I have my list and the underlying urls I have 'http://localhost:3000/character/view/Glarp_Gnlnarn' which is correct but of course it is not a 100% 'REST' as I think that by convention 'character' should be the plural 'characters' but then again in the POD they say this is a BREAD interface not a REST and the author defines it as

'- in a BREAD application, browse and add are operations on zero or many objects, while edit, add, and delete are operations on one object'

Ok I can buy that so back to doing some code.

Well back to doing a little coding.

So this time out I again start with my route and sub

Maintainer's Notes on rt.cpan.org

If you are a CPAN author, this is for you. Otherwise it's still time to become one!

RT.cpan.org has a little known feature called Maintainer's Notes. Maintainers of a CPAN distribution can put a piece of HTML above the tickets list.

Introducing fsql and chart

These are two command-line utilities to help you slice/dice and visualize data on the console. fsql utilizes DBD::CSV and a few other modules to let you perform SQL queries against CSV/TSV/LTSV/JSON/YAML files. chart generates simple ASCII charts. I'll give an example for using these tools.

Viewing monthly CPAN releases activity

I maintain a file called releases.txt in the LTSV format. Whenever I do a release, this file gets updated with a new entry.

Finding out how many releases I've done, or even how many releases for a specific year/month/day, is easy. The good ol' Unix commands like grep and wc suffice:

% wc -l < releases.txt
2746

% grep date:2014-03 releases.txt | wc -l
91

But what about something a little more advanced? What if I want to know which month I've done the most releases? Enter fsql:

Gluu fer the Wëëbb Part 1

Having been a fan of Mojolicious for a few years it is only reasonable that I pick it as the platform but this time instead of going with my usual default layout and architecture I wanted to give the Toto plugin a whirl.

This plug-in provides a bootstrap flavoured navigation framework. So you can get a nav bar running across the top one, a side bar for and a row a and also a row of tabs underneath each side bar.

Well out of the box with about 3 mins worth of install and a cut and paste from the PDO one gets this

toto_1.jpg

Ok that was painless it even gives you a little hint at what the controller is doing on the side for Toto newbies like me.

Well lets goes back a second and think what I need to display for my AD&D Moose stuff. Well I really just have two parts done so far,

  1. Create a Character and
  2. Display a Character

Strawberry Perl 5.18.2.2 released

Strawberry Perl 5.18.2.2 is available at http://strawberryperl.com
(all editions: MSI, ZIP, PortableZIP for both: 32/64bit MS Windows)

More details in Release Notes:
http://strawberryperl.com/release-notes/5.18.2.2-32bit.html
http://strawberryperl.com/release-notes/5.18.2.2-64bit.html

I would like to thank our sponsor AuditSquare.com for resources provided to our project.

CPANdeps pass/fail display now working again

Some months ago the way that third parties got access to the CPAN-testers results database changed. Instead of just downloading a SQLite database, there is now an API. This is good. It means that to get all the new reports since your last query, for example, you only need to transfer a few reports across the network instead of downloading all 40 million-odd records every time.

The change was well-publicised in advance, with a fairly long deprecation cycle. But I just never had the tuits to make the changes I needed, and so eventually that part of CPANdeps just stopped updating. It was still reporting dependencies OK, but didn't have any pass/fail data after a particular date.

Well, I'm pleased to say that it's back. Most of the work was actually done by Andreas König, whose script I am using as a shim to import data into the database that the rest of my code expects. I've also made a few other tiny changes which most of you won't notice, and also made the scripts that build the site rather more efficient so that they won't hammer search.cpan.org so hard when populating the site's metadata cache.

Next on my to-do list is to make the same fix to cpXXXan.

Moose to The Resque

Well not really but it did save me a good deal of time. I have been slowly putting together a small stand alone web app with Mojolicious to trunly demonstate what I have been doing with all these Moose posts.

Well I was just setting up a controller (using Mojolicious::Lite here to save space) and was creating my first form and like I many I have created before I started with a validator; something like this


app->validator->add_check(range => sub {
  my ($validation, $name, $value, $min, $max) = @_;
  return $value < $min || $value > $max;
});

post '/create' => sub {
  my $self = shift;
    my $validation = $self->validation;
    $validation->required('strength')->size(1, 2)->range (3,18);
    $validation->required('intelligence')->size(1, 2)->range (3,18);

and then I though 'I am just recreating all that validation that I already have in my 'RPG::ADD::Character' class' So why not let Moose validate itself?

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.