Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Upcoming Events with Perl content

Posted by gabor on 2010.08.10 12:46 (#40489)
0 Comments
User Journal
I have not posted here for ages but according to the recent Perl Survey it seems there are still a lot of people who prefer reading use.perl.org than blogs.perl.org or Iron Man

So just to let these readers to know, there are going to be a number of tech-events with Perl content where you could help out.

Test::Builder2::Design

Posted by schwern on 2010.08.09 21:31 (#40487)
3 Comments
User Journal

In an effort to shed some light on what Test::Builder2 is about, I took a few hours and performed a brain dump about its goals and design. You can see the result in the new Test::Builder2::Design document.

The key design goals are 1) that it has to work, 2) that it has to work everywhere and 3) that it has to test everything. This throws out a lot of 98% solutions.

Method::Signatures returns! 5.12, func() and fast!

Posted by schwern on 2010.07.30 19:49 (#40474)
0 Comments
User Journal

Chip submitted a minor performance patch to Method::Signatures today. That drove me to push out a new release making it friendly to 5.12 and adding func() for non methods!

        func hello(:$greeting = "Hello", :$place = "World") {
                print "$greeting, $place!\n";
        }

        hello( place => "Earth" );

For those who don't know, one of the neato features of Method::Signatures is that it can alias references to make working with references less of a trial:

        func popn(\@array, $howmany) {
                return splice @array, -$howmany;
        }

        my @stuff = (1,2,3,4,5);
        my @last_three = popn(\@stuff, 3); # 3,4,5
        print @last_three;

It does this with the amazing Data::Alias module. Unfortunately, 5.12 broke its black magic and its non-trivial to fix. Method::Signatures now makes Devel::Alias an optional dependency. If its available, it'll use it. Otherwise, no aliasing for you.

But that's ok, because perl5i makes working with references enjoyable. And while perl5i is adding its own simple signatures, they're forward compatible with Method::Signatures! They play together, so if you want perl5i and the full power of Method::Signatures you can have them.

        use perl5i::2;
        use Method::Signatures;

        func echo($message is ro) {
                say $message;
        }

Just make sure you load MS after perl5i. The last one loaded wins.

Finally, I was comparing Method::Signatures with MooseX::Method::Signatures and made a disturbing discovery. I always new MooseX::Method::Signatures would have a performance penalty, it does more checks than Method::Signatures, I just didn't realize how bad it was.

Here's comparing an empty signature: method foo() {}.

         Rate    MMS     MS    Std
MMS    3207/s     --  -100%  -100%
MS  1498875/s 46644%     --    -1%
Std 1508351/s 46940%     1%     --

That's showing MooseX::Method::Signatures is 450x slower than either Method::Signatures or a normal method call creaking out a mere 3500 method calls per second as compared to the 1.5 million it should be doing. And that's for a method with an empty signature!

To be clear, that's the speed of calling a method, not compiling them.

Here's one comparing a simple signature that requires a check, so MS can't optimize it away: method foo($arg!) { return $arg + 1 } That's a required positional argument.

         Rate    MMS     MS    Std
MMS    2928/s     --  -100%  -100%
MS   983127/s 33481%     --    -2%
Std 1005357/s 34240%     2%     --

3000 method calls instead of a million.

Now I'm the first to counter arguments bemoaning method call overhead. Usually it doesn't matter. Usually the extra cost of calling a method and checking arguments is insignificant compared to what that method actually does. And MooseX::Method::Signatures has features Method::Signatures does not, most significantly type checking. But my god! Three orders of magnitude of performance lost! And its not even using the extra MMS features. That's just too much.

Perl 6 Is The Language Your Language Could Smell Like

Posted by schwern on 2010.07.29 14:24 (#40472)
2 Comments
User Journal

Hello programmers. Look at your code, now at Perl 6, now back at your code, now back at Perl 6! Sadly, your code is not written in Perl 6. But if you use Rakudo Star then Perl 6 is the language your code could be written in!

Now Microsoft scented!

Some you win, some you loose

Posted by nicholas on 2010.07.28 14:50 (#40467)
0 Comments
User Journal

So, my attempt to avoid 3D Secure was successful, but seems to have had the unintended side effect that I sold my soul for 3 days.

I feel that I have to categorically deny that my product roadmap is in doubt, and that the rumours of forking me to regain control are completely unfounded, and unworthy of any further comment. :-)

See you all at YAPC::Europe next week. Right now, there's another free ticket up for grabs, thanks to Shadowcat.

Strawberry Perl install rolled back

Posted by jdavidb on 2010.07.26 15:34 (#40462)
3 Comments
User Journal

Strawberry Perl 5.12.0 was almost completely installed when suddenly it flashed some message I didn't see into the install wizard and the progress bars started moving backward! I have never seen anything like it. I realized the progress bar caption had been changed to simply "Rolling Back Action" and watched as at least three anonymous "actions" were rolled back, progress bar by progress bar. Then the install wizard simply told me "Strawberry Perl Setup Wizard ended prematurely Strawberry Perl Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard."

I wish it would tell me what the error was so I might have some hope of correcting it.

Hiveminder: personal RT, for free

Posted by jdavidb on 2010.07.19 11:58 (#40452)
0 Comments
User Journal

You mean someone will provide RT for me to use for free on the web? And they've built an awesome AJAX-y frontend for it? And they allow me to tag tasks and they encourage me to keep my work todo list and as many personal todo lists as I want in here? And they give me awesome search utilities for figuring this out and keeping it organized?

It's almost like a dream come true.

"def" or "func"?

Posted by schwern on 2010.07.12 19:06 (#40444)
0 Comments
User Journal

perl5i 2.3.0_01 now has basic methods and subroutine signatures with code basically lifted straight from Method::Signatures::Simple. MooseX::Declare got me addicted, now I want them everywhere.

use perl5i::2;
 
def add($this, $that) {
    return $this + $that;
}
 
method new($class: %args) {
    return bless \%args, $class;
}
 
my $echo = def($arg) { return $arg };

Its alpha for two reasons. First, I don't have time right now to really thoroughly test it, but I really want it.

Second, overriding "sub" is hard. Its been done but its a bit twitchy. Defining a new keyword is easy(er). So what should that keyword be? I've come up with two that have good arguments. "def" and "func". Both are short. "def" has the benefit of being used by other programming languages a Perl programmer is likely to encounter and not hate (Python, Ruby, Scala, Groovy). "func" is nice because it pretty clearly means "function" whereas "define" is a bit ambiguous.

perl5i currently does both. Only one will survive in version 3 (the other will be deprecated). Before you comment on which is your favorite, try it for a little bit. I found a difference between what I thought I like and what I actually use.

Announcing CPAN Testers 2.0

Posted by barbie on 2010.07.05 4:50 (#40435)
2 Comments
User Journal

After 6 months of development work, following 2 years worth of design and preparation, CPAN Testers 2.0 is finally live.

With the rapid growth in CPAN Testers environments and testers over the past few years, the previous method of posting reports to a mailing list had reached a point where the scalability was no longer viable. This was recognised several years ago and discussions for a new system had already begun, with the view that reports should be submitted via HTTP.

At the Oslo QA Hackathon in 2008, David Golden and Ricardo Signes devised the Metabase, with the design work continuing at the Birmingham QA Hackathon in 2009, where David and Ricardo were able to bring others into the thought process to work through potential issues and begin initial coding. A number of releases to CPAN and Github followed, with more people taking an interest in the project.

The Metabase itself is a database framework and web API to store and search opinions from anyone about anything. In the terminology of Metabase, Users store Facts about Resources. In the Metabase world, each CPAN tester is a User. The Resource is a CPAN distribution. The Fact is the test report. Today that’s just the text of the email message, but in the future it will be structured data. The Metabase specifies data storage capabilities, but the actual database storage is pluggable, from flat files to relational databases to cloud services, which gives CPAN Testers more flexibility to evolve or scale over time.

Meanwhile the CPAN Testers community was also attracting more and more interest from people wanting to be testers themselves. As a consequence the volume of reports submitted increased each month, to the point that the perl.org mail server was struggling to deal with all the mailing lists it hosted. The cpan-testers mailing list was submitting more posts in one day than any other list submitted in a month (in a year in some cases). Robert and Ask, very reasonably, asked if the testers could throttle their submissions down to 5k report posts a day, and set a deadline of 1st March 2010 to switch off the mailing list.

David Golden quickly took on the task to envisage a project plan, and work began in earnest in December 2009. With less than 3 months to the cut-off date, there was a lot of work to do. David concentrated on the Metabase, with Barbie working on ensuring that the current cpanstats database and related websites could move to the Metabase style of reports. Despite a lot of hard work from a lot of people, we unfortunately missed the 1st March deadline. Having throttled report submissions to a more manageable level, and although not complete, the target for HTTP submissions was in sight, Robert and Ask were very understanding and agreed to keep us going a little while longer.

Throughout March and April a small group of beta testers were asked to fire their submissions at the new system. It ironed out many wrinkles and resulted in a better understanding of what we wanted to achieve. The first attempts at retrieving the reports from the Metabase into the cpanstats database began in April, and again highlighted further wrinkles that needed to be addressed. After a month of hard testing and refinement, we finally had working code that went from report submission by a tester, storage into the Metabase, retrieval into the cpanstats database and finally presentation on the CPAN Testers family of websites.

During June the process was silently switched from testing to live, allowing reports to be fed through into the live websites. Due to the ease with which the new style reporting fit into the existing system, the switch largely went unnoticed by the CPAN testers community as well as the Perl community. A considerable success.

The CPAN Testers eco-system is now considerably larger than those early days of simply submitting handwritten reports by email to a mailing list, and the work to get here has featured a cast of thousands. Specifically for CPAN Testers 2.0, the following people have contributed code, ideas and effort to the project over the past six months:

  • Andreas König
  • Apocalypse
  • Ask Bjørn Hansen
  • Barbie
  • Chris Williams
  • Dan Collins
  • David Cantrell
  • David Golden
  • Florian Ragwitz
  • H.Merijn Brand
  • Jon Allen
  • Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯
  • Léon Brocard
  • MW487
  • Nigel Horne
  • Ricardo Signes
  • Richard Dawe
  • Robert Spier
  • Serguei Trouchelle
  • Shlomi Fish
  • Slaven Rezić

Barbie and David would like to thank everyone for their involvement. Without these guys CPAN Testers 2.0 would not have been possible. Thanks to everyone, we can now look forward to another 10 years and more of CPAN Testers.

CPAN Testers now holds over 7.5 million test reports covering nearly 11 years worth of testing Perl distributions. There have been over 1,000 testers in that time, and every single one has helped the CPAN Testers project to be the largest single community supported testing system of any programming language. For a full list of everyone who has contributed, visit the CPAN Testers Leaderboard. A huge thank you to everyone.

With the Metabase now online and live, we can now announce an absolute deadline to close the mailing list. This is currently set as 31st August 2010. After this date all submissions via email will be rejected, and testers will be encouraged to upgrade their testing tools to take advantage of the new HTTP submission system. Many of the high volume testers have already moved to the new system, and we expect nearly everyone else to move in the next month. We will be tailing the SMTP submissions to catch those who haven't switched, such as some of the more infrequent testers, and warn them of the deadline.

More work is planned for CPAN Testers, from further validation and administration of reports, to providing more functionality for alternative analysis and search capabilities. Please check the CPAN Testers Blog for our regular updates.

If you'd like to become a CPAN Tester, please check the CPAN Testers Wiki for details about setting up a smoke testing environment, and join the cpan-testers-discuss mailing list where many of the key members of the project can offer help and advice.

You can find out more about CPAN Testers at two forthcoming conferences. David Golden will be presenting "Free QA! What FOSS can Learn from CPAN Testers" at OSCON and Barbie will be presenting "CPAN Testers 2.0 : I love it when a plan comes together" at YAPC::Europe.

CPAN Testers is sponsored by Birmingham Perl Mongers, and supported by the Perl community.

You can now download the full and complete Press Release from the CPAN Testers Blog. If you have access to further IT news reporting services, please feel free to submit the Press Release to them. Please let us know if you are successful it getting it published.

Cross-posted from the CPAN Testers Blog

Perl 6 Design Minutes for 30 June 2010

Posted by chromatic on 2010.07.03 3:13 (#40433)
0 Comments
User Journal

The Perl 6 design team met by phone on 30 June 2010. Allison, Patrick, and chromatic attended.

Allison:

  • working on Parrot packages for Debian experimental
  • seems like a good idea to do that before the 2.6 supported release
  • there was also a request for Rakudo packages
  • not sure if I'm the best person to do it

Patrick:

  • I'm sure we should package Rakudo Star

Allison:

  • Debian had a packager for those, but I haven't looked at the packages
  • this'd be an early run of what we'll do with Rakudo Star

Patrick:

  • we're not quite ready for packaging that yet
  • maybe a couple of weeks
  • finished the List and Iterator types for the #30 release
  • adjusted Rakudo's Associative and Positional roles
  • much cleaner implementation now
  • that'll require a few small spec changes
  • redid Rakudo's container types
  • more robust
  • preparing for autovivification of hashes and arrays
  • expect to finish those in the next couple of days
  • there was no container model previously; the code was consequently crufty
  • lots of cleanup of incorrect assumptions
  • Rakudo lists are now properly lazy
  • comment syntax fixed
  • ROADMAP updated
  • fixed the meaning of Nil; it's defined, not undefined
  • added the sink prefix (?)
  • fixed setting of $!
  • started fixing bugs and closing tickets on Monday, did 15 or 20
  • mostly already fixed in the previous couple of weeks
  • looking at the implementation of the series operator
  • spec is self-contradictory or ambiguous or both
  • waiting for Larry's clarification
  • fixed a bug in $*ARGFILES
  • had a nice contribution of that implementation last week
  • that behavior works on any set of files, not just those on the command line
  • working on autoviv
  • have some regex backtracking bugs to fix
  • will work on closures after that
  • put together three new YAPC presentations
  • the Rakudo Star presentation will become a video cast or a blog post or both

c:

  • worked on a slew of Parrot optimizations for Rakudo
  • have a few more to go
  • might have to create a Rakudo branch temporarily
  • will try to help merge the new GC
  • working on a metamodel for Parrot objects, informed by Perl 6 and Moose