Entering MooseX, Part the Sixteenth

Well I really mean it this is I think the last last .t for this module. This time I will be testing the use of my new module as a trait. So here goes

I start with the usual suspects

Automatic variable highlighting in vim: the easy way

Three days ago, Ovid was nice enough to write about variable highlighting in vim. When I tried that vim script myself, I soon ran into the bug that was also found by Robin: If the cursor is above a hash, the actual use of the hash won't be matched.

So I took a look at the vimscript code and ... found that it's way too much code for my taste.

Math::Prime::Util, May update

Math::Prime::Util 0.41 was released, with new functions (valuation, invmod, vecsum, binomial, forpart), and the usual crop of performance improvements. In particular, primality testing on x86_64 got another big speedup.

On prototyping in public ... the long version

I recently posted a quick update on the p5-mop project the other day, something I have been meaning to do for a long time. I am sure given the slow and often rocky progress of this project that many people have their doubts if will ever see the light of day, and to be quite honest, some days I found myself doubting it as well.

And Now for Something Not Moose Releated

Well been eating way too much over the past posts so I though i would go though today's little upset for a change in pace.

Well today I was going back in time a little and had to write up a little script that would get the latest file on a dir and count the number of lines in it (don't ask why) and the do a little more processing.

Well it seemed simple enough and I have done similar before but for kicks I decided to do a Google search for 'Get the latest file with Perl'

Well my eye got sore after reading the endless variations on the same theme, from 30 line monstrosities to one line wonders that would befuddle even Peteris Krumins?

Well then I harkened back to something that Lary said in his YAPC::EU 2010 Keynote talk, that Perl was denounced in the Unix world because it does everything but doesn't do it well.

m_img_12879.jpg

Automatic variable highlighting in vim

After viewing an interesting post in Reddit about programming in color (syntax highlighting that focuses on data flow instead of syntax), I saw that one user had developed a very similar feature for PHP. The idea is to highlight the variable that your cursor is currently on. I liked what he wrote, so I modified it for Perl.

Transparently testing Catalyst applications for memory leaks

Summary: you can use CatalystX::LeakChecker to check every request in your test suite for memory leaks.

From my blog, here.

DOIs for Perl Module tarballs, probably

A while back, Mark Fisher wrote about DOIs. As an academic, I asked about how I might cite a DOI for some Perl work. I was recently made aware of two possibilities.

Entering MooseX, The Check is in the Mail

Well if you believed the title of this post then you will believe this one as well. So I left off yesterday with a failing .t

 
my $test2 = test_one_of_fail->new();
eval {
   $test2->ping();
};

ok(scalar($@),"test_one_of_fail");

In the case I was able to run the 'ping' sub so it fail because I got nothing in the '$@'

Nestoria Developer Blog

Following in the footsteps of Booking.com, NET-A-PORTER and All Around The World I am happy to announce that Nestoria is launching a developer blog as a sister site to our more general company blog.

You can find it here: http://devblog.nestoria.com.

Bookmark it, Feedly it, follow it on Tumblr - whatever the kids are doing these days.

As you can see we've already made four posts since we launched on Tuesday, 2 days ago. We don't intend to keep up that kind of pace, but we do intend to post at least once a week on various topics that interest us and we hope will interest you. If you're interested in Perl, Linux, web servers, database servers, JavaScript, testing, mobile web, software development, virtual servers, physical servers, and/or system administration then you should find something interesting in the blog sometime in the coming months :-)

If you want an overview of Nestoria I've actually given quite a bit of information away in an interview I did with Ovid right here on blogs.perl.org: Perl Startups: Lokku/Nestoria.

As a sneak peak one of our next posts on the Nestoria Dev Blog looks like this:

Of course I couldn't give away the winner here - you'll have to read the blog to find out who wins this month's Gittip donation :-)

After All This, Octypus

So, in my most recent careering of things, I'm doing QA/Special Projects work for a startup in California. (Cytobank, if you're curious. I have rarely worked with more splendid folks, I have to say.)

Under the 'Special Projects' umbrella is a crusty little batch testing tool I'm cobbling together. Nothing spectacular (and in deep need of refactor already, I keep seeing stuff that needs work), but it's nice to get back into an editor and actually see code I wrote do work.

It's also pretty nice to think about the possible long-term implications. The mail monitoring system I wrote over a decade ago, Matriarch, is still in use as far as I know. Now, I've got Octypus: We have Sauce, we have Selenium, and Octypus gets tentacular in both of 'em. We tell it what to run, tell it what platforms to run it on, and it makes the runs requested happen. Boom boom boom.

I'm still working on the reporting features it needs, but oh, I have missed this stuff. I really, really have. It's good to be back in the text editor, y'know? Maybe I'm waxing a little too ecstatic, but it's the day after my nhhhhmpth birthday, and I feel the elation of ten years ago. That's something to remember, at least for me. :D

Who's running @PerlUpdate account on Twitter?

Does anyone know the answer?

It's currently just publishing anything that has the word "Perl" in it. You'd be surprised how many people have "Perl" as their last name.

If you know who the person is behind the account, please contact me, or contact them telling them I would like to contact them about it.

It's getting ridiculous.

Entering MooseX, The Last Test I Promise*

Well nearing the end of my test now, I have done the basic stuff in this post,the api parts here, the validation bits in this one and the instance bits with my last one. So to carry on I think it would be prudent to test this in a composed setting though I doubt anyone would use it like that.

So will name this one 40-composit and I start as usual with my testing boilerplate and my three little roles

Video of Dorothy’s Jenkins presentation from MadMongers



Video of Dorothy’s Jenkins presentation from MadMongers

[From my blog.]

The Perl gittip community has 499 members

The Perl community on gittip has 499 members right now (Wednesday morning, GMT). Who will be the 500th member? It could be you!

Jerome Eteve was the 500th member! Jerome is the author of Alien::ImageMagick, and more.

On prototyping in public ...

I really need to expand on this a little more, but for now this can serve as a status update on p5-mop.

Entering MooseX, Thirteen Lucky for Some

Well going on with my revised tests from my last post I am now going to look at the instance usage of my little MooseX.

Well normally I have been using this MooseX with Classes that use Moose::Util to install new roles so that is what I going to test in this next .t, so lets start with

 
#!perl -T
use Test::More tests => 3;
use Test::Moose::More;
use_ok('MooseX::AuthorizedMethodRoles');

use Moose::Uti;
...

Fun with binomials

I decided to add a binomial(n,k) function to Math::Prime::Util, and found some interesting things while doing it. Overflow detection and mitigation in C and Perl were the first thing. Next was looking at negative arguments, which led to finding some differences in various solutions as well as filing a bug report for Math::BigInt.

Getting CPAN module tarball from local MiniCPAN mirror

This blog post is just for sharing a simple script.

Like many Perl programmers, I have a mini CPAN mirror locally on my hard drive (I put mine in /cpan). Aside from installing CPAN modules offline using cpanminus, I also sometimes want to peek into a dist's files (especially the contents of the t/). So what's a quick way to get the path of a module's tarball, or to extract it?

Normally cpanminus can do this, via cpanm --mirror /cpan --mirror-only --look Module::Name, but it doesn't work on my setup (both on the PC and laptop). So I turn to CPAN.

There are at least three libraries on CPAN that deal with this. Parse::CPAN::Packages is a huge library that does many things, but is very heavy on startup (loads 110k+ source code lines and over 300 files, takes 0.5s just to load the module on my laptop). To get the path of a single module requires almost 8s!

MadMongers (Madison Perl Mongers)

MadMongers (Madison Perl Mongers) :

[From my blog.]

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.