Aristotle's Friends' Journals http://use.perl.org/~Aristotle/journal/friends/ Aristotle's Friends' use Perl Journals en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:04:08+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 Aristotle's Friends' Journals http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~Aristotle/journal/friends/ Finally, some Test::Builder2 examples! http://use.perl.org/~schwern/journal/40528?from=rss <p>For my PDX.pm presentation tonight on <a href="http://github.com/schwern/test-more/tree/Test-Builder2">Test::Builder2</a> I threw together some quick examples of some of its killer features, in particular demonstrating changing how Test::Builder2 behaves using method modifiers and applying object roles.</p><p>First, demonstrating end-of-assert actions, there's <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/DieOnFail.pm">die on fail</a> but even cooler is <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/DebugOnFail.pm">DEBUG on fail</a>! That's right, run your test in the debugger and have it automatically set a breakpoint on a failure. How cool is that?</p><p>I'm sure somebody with better debugger foo than I can make it even cooler and stop at the top of the assert stack rather than inside DebugOnFail.</p><p>The second is reimplementing <a href="http://search.cpan.org/perldoc?Test::NoWarnings">Test::NoWarnings</a> safely. <a href="http://github.com/schwern/test-more/blob/Test-Builder2/examples/TB2/lib/TB2/NoWarnings.pm">TB2::NoWarnings</a> demonstrates hooking into the start and end of the test as well as safely altering the number of tests planned by trapping the call to set_plan.</p><p>You can safely use them all together, though its a crap shoot if DebugOnFail or DieOnFail will trigger first.</p><p>While roles and method modifiers are relatively new to the Perl community, using them in lieu of designing my own event system for TB2 has two great advantages. First, I didn't have to design and debug my own event system.<nobr> <wbr></nobr>:) Second, rather than having to learn the quirks of a one-off system, you learn the quirks of Mo[uo]se and then can apply that knowledge all over the place.</p><p>There's <a href="http://github.com/schwern/test-more/issues/labels/Test-Builder2">a pile of stuff to be done in TB2</a>, a lot of them are fairly small and self contained. Have a look. Patches welcome.</p> schwern 2010-09-09T08:33:42+00:00 journal Test::Builder2 at 10k Feet http://use.perl.org/~schwern/journal/40527?from=rss <p>Here's a diagram of the "flow" of assert results through Test::Builder version 1.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| foo.t |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp;.-------------.&nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp;.----------------.<br>&nbsp; &nbsp; &nbsp;| Test::More&nbsp; |&lt;---------&gt;| Test::Whatever |<br>&nbsp; &nbsp; &nbsp;'-------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;.---------------.&nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '----&gt;| Test::Builder |&lt;----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TAP |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.---------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::Harness |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'</tt></p></div> </blockquote><p>You write foo.t using Test::More and Test::Whatever. These both<br>use the same Test::Builder object. It spits out TAP which<br>Test::Harness converts into something human readable.</p><p>The big problem there is Test::Builder is monolithic. There's no<br>further breakdown of responsibilities. It only spits out TAP, and<br>only one version of TAP.</p><p>Here's what Test::Builder2 looks like:</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.-------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.----------------| foo.t |-------------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '-------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.------------.&nbsp; &nbsp; &nbsp;.----------------.&nbsp; &nbsp; &nbsp;.------------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::More |&nbsp; &nbsp; &nbsp;| Test::Whatever |&nbsp; &nbsp; &nbsp;| Test::NotUpdated |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '------------'&nbsp; &nbsp; &nbsp;'----------------'&nbsp; &nbsp; &nbsp;'------------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.----------------.&nbsp; &nbsp; &nbsp; &nbsp;.---------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------&gt;| Test::Builder2 |&lt;------| Test::Builder |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'----------------'&nbsp; &nbsp; &nbsp; &nbsp;'---------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.--------------.&nbsp; &nbsp;<nobr> <wbr></nobr>.-------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TB2::History |&lt;---| TB2::Result |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'--------------'&nbsp; &nbsp; '-------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.--------------------------.&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp;.---------------------.<br>&nbsp; &nbsp; | TB2::Formatter::TAP::v13 |&lt;-----'------&gt;| TB2::Formatter::GUI |<br>&nbsp; &nbsp; '--------------------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp;<nobr> <wbr></nobr>.-------------------------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; | TB2::Formatter::Streamer::TAP |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; '-------------------------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TAP |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.---------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----------------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Test::Harness |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Pretty Pictures |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '---------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----------------'</tt></p></div> </blockquote><p>It starts out the same, foo.t uses a bunch of test modules<br>including Test::More and Test::Whatever using the same Test::Builder2<br>object, but it also uses Test::NotUpdated which is still using<br>Test::Builder. That's ok because Test::Builder has been rewritten in<br>terms of Test::Builder2 (more on that below).</p><p>Test::Builder2, rather than being a monolith, produces a<br>Test::Builder2::Result object for each assert run. This gets stored<br>in a Test::Builder2::History object for possible later use. It also<br>gets handed to a Test::Builder2::Formatter object, the default is<br>Test::Builder2::TAP::v13 which produces TAP version 13. This is fed<br>to a Streamer that prints it to STDOUT and STDERR which is read by<br>Test::Harness and made human readable.</p><p>Because Test::Builder2 is not monolithic, you can swap out parts. For<br>example, instead of outputting TAP it could instead hand results to a<br>formatter that produced a simple GUI representation, maybe a green<br>bar, or something that hooks into a larger GUI. Or maybe one that<br>produces JUnit XML.</p><p>Here's how Test::Builder and Test::Builder2 Relate.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.-----.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-----.<br>&nbsp; &nbsp; &nbsp; &nbsp; | TB2 |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| TB1 |<br>&nbsp; &nbsp; &nbsp; &nbsp; '-----'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-----'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.-------------.&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.--------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.-------------.<br>&nbsp; &nbsp; | TB2::Result |-------&gt;| TB2::History |&lt;--------| TB2::Result |<br>&nbsp; &nbsp; '-------------'&nbsp; &nbsp; &nbsp; &nbsp; '--------------'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.----------------.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'-------------&gt;| TB2::Formatter |&lt;--------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '----------------'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.--------.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Output |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '--------'</tt></p></div> </blockquote><p>Test::Builder and Test::Builder2 coordinate their actions by sharing<br>the same History and Formatter objects. If you call TB1-&gt;ok() it<br>produces a Result object which it hands to the History singleton and<br>the Formatter singleton. If you call TB2-&gt;ok() it produces a Result<br>object which it hands to the same History and Formatter objects.</p><p>This allows most of the Test::Builder code to remain the same while<br>still coordinating with Test::Builder2. It also allows radically<br>different builders to be made without Test::Builder2 dictating how<br>they're to work.</p><p>The downside is that roles applied to Test::Builder2 will not effect<br>Test::Builder. Because of this, Test::Builder may become more closely<br>coupled with Test::Builder2 in the future.</p><p>Diagrams by <a href="http://search.cpan.org/dist/App-Asciio">App::Asciio</a>.</p> schwern 2010-09-09T08:15:22+00:00 journal A month of Test::Builder2 http://use.perl.org/~schwern/journal/40517?from=rss <p>I've had <a href="http://www.perlfoundation.org/test_builder_2">a grant open for Test::Builder2</a> for, oh god over two years now. Since I started it, Perl 6 has had a release! I think its the second oldest running dev grant.</p><p>I've cleared the decks of other responsibilities and can dedicate September to, if not finishing, then at least releasing something people can poke at. First alpha release was supposed to be "two weeks after the start" ha ha ha! oh god. The design has evolved and simplified greatly in the intervening two years, but its time to get something the hell out the door. At least a <a href="http://github.com/schwern/test-more/tree/Test-Builder2">Test::Builder2</a> Star if you will.</p><p>There's critical components missing. There's no diagnostics, YAML or otherwise. The issues with nested asserts are still congealing. Plans are not enforced. Result objects are in the middle of being remodeled... again. But Test::Builder is using what parts of Test::Builder2 are usable. Multiple output formats and streams work. Asserts can be nested in the common, simple cases without having to fiddle with $Level. And you can hook into various events.</p><p>Step one is I'm going to seal up what's there, write docs where they're missing, and release something.</p><p>A release before October or the grant dies.</p> schwern 2010-08-28T04:08:39+00:00 journal Flore Louise Apolline Bruhat-Souche http://use.perl.org/~BooK/journal/40510?from=rss <p>On Thursday, August 19, 2010 at 9:30, Flore Louise Apolline Bruhat-Souche was born. She weighs 3.02 kg and measures 48 cm. </p><p> Word already spread through IRC (#perlfr and #yapc mostly) and via email and telephone. </p><p> The mother is fine, the father is slightly tired and the <a href="http://use.perl.org/~BooK/journal/33509">big sister</a> is happy. </p><p> There is <a href="http://flore.bruhat-souche.net/">one photo online</a>. </p> BooK 2010-08-20T22:17:07+00:00 journal Will parrot be the last one standing? http://use.perl.org/~nicholas/journal/40509?from=rss <p>I'm a bit behind the times here, but I read today that one of the two remaining developers of IronRuby has left Microsoft:</p><blockquote><div><p>Overall, I see a serious lack of commitment to IronRuby, and dynamic language on<nobr> <wbr></nobr>.NET in general. At the time of my leaving Tomas and myself were the only Microsoft employees working on IronRuby.</p></div></blockquote><p> <a href="http://blog.jimmy.schementi.com/2010/08/start-spreading-news-future-of-jimmy.html">http://blog.jimmy.schementi.com/2010/08/start-spreading-news-future-of-jimmy.ht<nobr>m<wbr></nobr> l</a>*</p><p>So if Microsoft's interest in dynamic languages is wilting, and Oracle's litigation scares everyone away from Java, will that leave <a href="http://parrot.org/">Parrot</a> as the last one standing?</p><p> <small>* yep, that's a formatting bug. I assume that it's not worth reporting while the site's future is unclear.</small> </p> nicholas 2010-08-20T09:37:19+00:00 journal Alien::SVN - new release, new management http://use.perl.org/~schwern/journal/40503?from=rss <p>Those of you still stuck using Subversion will be happy to find <a href="http://search.cpan.org/~mlanier/Alien-SVN-1.6.12.0/">a new release of Alien::SVN</a>. It drags it forward to 1.6.12, doesn't do much else.</p><p>Also, Alien::SVN has finally found a new manager! From out of the blue comes <a href="http://search.cpan.org/~mlanier/">Matthew Lanier</a> with a patch and the will and a PAUSE ID. He'll be taking care of things from now on. Its his first CPAN module, be gentle. Godspeed, Matthew.</p> schwern 2010-08-18T22:33:29+00:00 journal Test::Builder2::Design http://use.perl.org/~schwern/journal/40487?from=rss <p>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 <a href="http://github.com/schwern/test-more/blob/Test-Builder2/lib/Test/Builder2/Design.pod">Test::Builder2::Design</a> document.</p><p>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.</p> schwern 2010-08-10T02:31:05+00:00 journal Method::Signatures returns! 5.12, func() and fast! http://use.perl.org/~schwern/journal/40474?from=rss <p>Chip submitted a minor performance patch to Method::Signatures today. That drove me to push out <a href="http://github.com/schwern/method-signatures/blob/v20100730/Changes">a new release</a> making it friendly to 5.12 and adding func() for non methods!</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func hello(:$greeting = "Hello",<nobr> <wbr></nobr>:$place = "World") {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "$greeting, $place!\n";<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p> &nbsp; &nbsp; &nbsp; &nbsp; hello( place =&gt; "Earth" );</p><p>For those who don't know, one of the neato features of <a href="http://search.cpan.org/perldoc?Method::Signatures">Method::Signatures</a> is that it can <a href="http://search.cpan.org/~mschwern/Method-Signatures-20090620/lib/Method/Signatures.pm#Aliased_references">alias references</a> to make working with references less of a trial:</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func popn(\@array, $howmany) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return splice @array, -$howmany;<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p> &nbsp; &nbsp; &nbsp; &nbsp; my @stuff = (1,2,3,4,5);<br> &nbsp; &nbsp; &nbsp; &nbsp; my @last_three = popn(\@stuff, 3); # 3,4,5<br> &nbsp; &nbsp; &nbsp; &nbsp; print @last_three;</p><p>It does this with the amazing <a href="http://search.cpan.org/perldoc?Data::Alias">Data::Alias</a> 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.</p><p>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.</p><p> &nbsp; &nbsp; &nbsp; &nbsp; use perl5i::2;<br> &nbsp; &nbsp; &nbsp; &nbsp; use Method::Signatures;</p><p> &nbsp; &nbsp; &nbsp; &nbsp; func echo($message is ro) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; say $message;<br> &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>Just make sure you load MS after perl5i. The last one loaded wins.</p><p>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.</p><p>Here's comparing an empty signature: <code>method foo() {}</code>.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rate&nbsp; &nbsp; MMS&nbsp; &nbsp; &nbsp;MS&nbsp; &nbsp; Std<br>MMS&nbsp; &nbsp; 3207/s&nbsp; &nbsp; &nbsp;--&nbsp; -100%&nbsp; -100%<br>MS&nbsp; 1498875/s 46644%&nbsp; &nbsp; &nbsp;--&nbsp; &nbsp; -1%<br>Std 1508351/s 46940%&nbsp; &nbsp; &nbsp;1%&nbsp; &nbsp; &nbsp;--</tt></p></div> </blockquote><p>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!</p><p>To be clear, that's the speed of calling a method, not compiling them.</p><p>Here's one comparing a simple signature that requires a check, so MS can't optimize it away: <code>method foo($arg!) { return $arg + 1 }</code> That's a required positional argument.</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rate&nbsp; &nbsp; MMS&nbsp; &nbsp; &nbsp;MS&nbsp; &nbsp; Std<br>MMS&nbsp; &nbsp; 2928/s&nbsp; &nbsp; &nbsp;--&nbsp; -100%&nbsp; -100%<br>MS&nbsp; &nbsp;983127/s 33481%&nbsp; &nbsp; &nbsp;--&nbsp; &nbsp; -2%<br>Std 1005357/s 34240%&nbsp; &nbsp; &nbsp;2%&nbsp; &nbsp; &nbsp;--</tt></p></div> </blockquote><p>3000 method calls instead of a million.</p><p>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.</p> schwern 2010-07-31T00:49:55+00:00 journal Perl 6 Is The Language Your Language Could Smell Like http://use.perl.org/~schwern/journal/40472?from=rss <p><a href="http://www.youtube.com/watch?v=owGykVbfgUE">Hello programmers</a>. 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 <a href="http://rakudo.org/announce/rakudo-star/2010.07">Rakudo Star</a> then Perl 6 is the language your code could be written in!</p><p><a href="http://github.com/rakudo/star/downloads">Now Microsoft scented!</a></p> schwern 2010-07-29T19:24:09+00:00 journal Some you win, some you loose http://use.perl.org/~nicholas/journal/40467?from=rss <p>So, my attempt to avoid <a href="http://www.lightbluetouchpaper.org/2010/01/26/how-online-card-security-fails/">3D Secure</a> was successful, but seems to have had the unintended side effect that I <a href="http://conferences.yapceurope.org/ye2010/news/616">sold my soul for 3 days</a>.</p><p>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.<nobr> <wbr></nobr>:-)</p><p>See you all at <a href="http://conferences.yapceurope.org/ye2010/">YAPC::Europe</a> next week. Right now, there's <a href="http://conferences.yapceurope.org/ye2010/news/617">another free ticket up for grabs</a>, thanks to <a href="http://www.shadowcat.co.uk/">Shadowcat</a>.</p> nicholas 2010-07-28T19:50:24+00:00 journal The mod_perl debugger you've always wanted http://use.perl.org/~jjore/journal/40458?from=rss <p>"The mod_perl debugger you've always wanted" is on my new blog at: <a href="http://bit.ly/agzWSU">http://bit.ly/agzWSU</a></p> jjore 2010-07-22T17:53:07+00:00 journal "def" or "func"? http://use.perl.org/~schwern/journal/40444?from=rss <p>perl5i 2.3.0_01 now has <a href="http://twitter.com/perl5i/status/18391811333">basic methods and subroutine signatures</a> with code basically lifted straight from <a href="http://search.cpan.org/dist/Method-Signatures-Simple">Method::Signatures::Simple</a>. <a href="http://search.cpan.org/dist/MooseX-Declare">MooseX::Declare</a> got me addicted, now I want them everywhere.</p><blockquote><div><p> <tt>use perl5i::2;<br> &nbsp; <br>def add($this, $that) {<br>&nbsp; &nbsp; return $this + $that;<br>}<br> &nbsp; <br>method new($class: %args) {<br>&nbsp; &nbsp; return bless \%args, $class;<br>}<br> &nbsp; <br>my $echo = def($arg) { return $arg };</tt></p></div> </blockquote><p>Its alpha for two reasons. First, I don't have time right now to really thoroughly test it, but I really want it.</p><p>Second, overriding "sub" is hard. <a href="http://search.cpan.org/dist/signatures">Its been done</a> 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.</p><p>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.</p> schwern 2010-07-13T00:06:57+00:00 journal Unicode in Perl, FTW (&#1071; &#1086;&#1095;&#1077;&#1085;&#1100; &#1088;&#1072; http://use.perl.org/~jjore/journal/40438?from=rss <p>Hi,<br>This blog post is actually at <a href="http://blogs.perl.org/users/josh_ben_jore/2010/07/unicode-in-perl-ftw.html">http://blogs.perl.org/users/josh_ben_jore/2010/07/unicode-in-perl-ftw.html</a>.</p> jjore 2010-07-07T06:01:11+00:00 journal Under the covers of perldoc http://use.perl.org/~jjore/journal/40437?from=rss <p>Hi, I posted to my new blog at blogs.perl.org:</p><p><a href="http://blogs.perl.org/users/josh_ben_jore/2010/07/under-the-covers-of-perldoc.html">http://blogs.perl.org/users/josh_ben_jore/2010/07/under-the-covers-of-perldoc.h<nobr>t<wbr></nobr> ml</a></p> jjore 2010-07-07T05:44:28+00:00 journal Announcing CPAN Testers 2.0 http://use.perl.org/~barbie/journal/40435?from=rss <p>After 6 months of development work, following 2 years worth of design and preparation, CPAN Testers 2.0 is finally live.</p><p>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.</p><p>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.</p><p>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&#8217;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.</p><p>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.</p><p>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.</p><p>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.</p><p>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.</p><p>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:</p><ul> <li>Andreas K&ouml;nig</li><li>Apocalypse</li><li>Ask Bj&oslash;rn Hansen</li><li>Barbie</li><li>Chris Williams</li><li>Dan Collins</li><li>David Cantrell</li><li>David Golden</li><li>Florian Ragwitz</li><li>H.Merijn Brand</li><li>Jon Allen</li><li>Lars D&#618;&#7431;&#7428;&#7435;&#7439;&#7457; &#36842;&#25289;&#26031;</li><li>L&eacute;on Brocard</li><li>MW487</li><li>Nigel Horne</li><li>Ricardo Signes</li><li>Richard Dawe</li><li>Robert Spier</li><li>Serguei Trouchelle</li><li>Shlomi Fish</li><li>Slaven Rezi&#263;</li></ul><p>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.</p><p> <a href="http://www.cpantesters.org/">CPAN Testers</a> 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 <a href="http://stats.cpantesters.org/testers.html">CPAN Testers Leaderboard</a>. A huge thank you to everyone.</p><p>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.</p><p>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 <a href="http://blog.cpantesters.org/">CPAN Testers Blog</a> for our regular updates.</p><p>If you'd like to become a CPAN Tester, please check the <a href="http://wiki.cpantesters.org/">CPAN Testers Wiki</a> for details about setting up a smoke testing environment, and join the <a href="http://lists.perl.org/list/cpan-testers-discuss.html">cpan-testers-discuss mailing list</a> where many of the key members of the project can offer help and advice.</p><p>You can find out more about CPAN Testers at two forthcoming conferences. David Golden will be presenting <a href="http://www.oscon.com/oscon2010/public/schedule/detail/13759">"Free QA! What FOSS can Learn from CPAN Testers"</a> at OSCON and Barbie will be presenting <a href="http://conferences.yapceurope.org/ye2010/talk/2891">"CPAN Testers 2.0 : I love it when a plan comes together"</a> at YAPC::Europe.</p><p>CPAN Testers is sponsored by Birmingham Perl Mongers, and supported by the Perl community.</p><p>You can now <a href="http://blog.cpantesters.org/press-release-ct20-20100705.pdf">download the full and complete Press Release</a> 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.</p><p>Cross-posted from the <a href="http://blog.cpantesters.org/diary/83">CPAN Testers Blog</a> </p> barbie 2010-07-05T09:50:22+00:00 journal Perl 6 Design Minutes for 30 June 2010 http://use.perl.org/~chromatic/journal/40433?from=rss <p>The Perl 6 design team met by phone on 30 June 2010. Allison, Patrick, and chromatic attended.</p><p> <strong>Allison:</strong> </p><ul> <li>working on Parrot packages for Debian experimental</li><li>seems like a good idea to do that before the 2.6 supported release</li><li>there was also a request for Rakudo packages</li><li>not sure if I'm the best person to do it</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>I'm sure we should package Rakudo Star</li></ul><p> <strong>Allison:</strong> </p><ul> <li>Debian had a packager for those, but I haven't looked at the packages</li><li>this'd be an early run of what we'll do with Rakudo Star</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>we're not quite ready for packaging that yet</li><li>maybe a couple of weeks</li><li>finished the <code>List</code> and <code>Iterator</code> types for the #30 release</li><li>adjusted Rakudo's <code>Associative</code> and <code>Positional</code> roles</li><li>much cleaner implementation now</li><li>that'll require a few small spec changes</li><li>redid Rakudo's container types</li><li>more robust</li><li>preparing for autovivification of hashes and arrays</li><li>expect to finish those in the next couple of days</li><li>there was no container model previously; the code was consequently crufty</li><li>lots of cleanup of incorrect assumptions</li><li>Rakudo lists are now properly lazy</li><li>comment syntax fixed</li><li>ROADMAP updated</li><li>fixed the meaning of <code>Nil</code>; it's defined, not undefined</li><li>added the sink prefix (?)</li><li>fixed setting of <code>$!</code> </li><li>started fixing bugs and closing tickets on Monday, did 15 or 20</li><li>mostly already fixed in the previous couple of weeks</li><li>looking at the implementation of the series operator</li><li>spec is self-contradictory or ambiguous or both</li><li>waiting for Larry's clarification</li><li>fixed a bug in <code>$*ARGFILES</code> </li><li>had a nice contribution of that implementation last week</li><li>that behavior works on any set of files, not just those on the command line</li><li>working on autoviv</li><li>have some regex backtracking bugs to fix</li><li>will work on closures after that</li><li>put together three new YAPC presentations</li><li>the Rakudo Star presentation will become a video cast or a blog post or both</li></ul><p> <strong>c:</strong> </p><ul> <li>worked on a slew of Parrot optimizations for Rakudo</li><li>have a few more to go</li><li>might have to create a Rakudo branch temporarily</li><li>will try to help merge the new GC</li><li>working on a metamodel for Parrot objects, informed by Perl 6 and Moose</li></ul> chromatic 2010-07-03T08:13:30+00:00 journal Modern Perl: The (Draft) Book http://use.perl.org/~chromatic/journal/40423?from=rss <p>This took longer than I expected, but <a href="http://www.modernperlbooks.com/mt/2010/06/modern-perl-the-book-the-draft.html">the draft of the Modern Perl book is available for review</a>. I'm especially interested in hearing from people who don't consider themselves expert Perl 5 programmers. The goal of the book is to explain how Perl 5 works (and how to write Perl 5 effectively) to help novices become adepts.</p> chromatic 2010-06-28T23:43:33+00:00 journal Where The Hell Is Test::Builder2? http://use.perl.org/~schwern/journal/40421?from=rss <p>My progress and communication about the Test::Builder2 grant has been nothing short of appalling. There is a sort of herky-jerky progress where I figure out a design problem, push the code forward, then remember a use-case that throws a wrench in the whole design and the whole thing comes to a screeching halt again.</p><p>At the QA hackathon we elegantly solved the problem of things like <a href="ahref=">die-on-fail and Test::NoWarnings</a> but then ran afoul of things like Test::Warn and Test::Exception which runs tests inside of tests but those aren't actually part of the test stack.</p><p>Confused? I'll post more about it another time. Point is, TB2 continues to move forward, its just that there's long periods of rumination between sprints of development. And I get distracted by other projects. At this rate I'll be collecting Social Security before I collect the second half of the grant. I really want TB2 to happen, but something decisive has to be done. I work best with hard deadlines, so the plan is to clear a month for working mostly on TB2. A lot of the wibbling is trying to come up with the most elegant solution, but I usually have a less than elegant way to solve it and move forward. If its between an elegant TB2 that doesn't exist and a less elegant TB2 that does, well, go with the one that exists. With the way my schedule is looking, that will probably be mid-August to mid-September. If that doesn't produce an alpha, then I'll kill the grant.</p><p>That doesn't mean TPF gets nothing for your money. Chunks of TB2 can be harvested to improve TB1. Specifically, the TB2 formatting and history objects. The TB2 formatter makes the guts of TB1 cleaner, and it also allows it to produce something other than TAP. Used together, history and formatter allows non-Test::Builder based test frameworks to work together with Test::Builder providing even more flexibility. This is <a href="http://github.com/schwern/test-more/blob/Test-Builder2/lib/Test/Builder.pm">already done in the TB2 branch</a>.</p><p>Looking at the grant deliverables, most of it is done:</p><blockquote><div><p> <tt>* Split up global shared Test resources into individual objects<br>&nbsp; &nbsp; * The test counter<br>&nbsp; &nbsp; * The output filehandles<br>&nbsp; &nbsp; * The plan<br> &nbsp; <br>* Allow hooks for global beginning and end of test functions.<br>&nbsp; &nbsp; * Ensure multiple hooks "stack"<br>&nbsp; &nbsp; * die on fail<br>&nbsp; &nbsp; * debug on fail<br> &nbsp; <br>* Hooks for global beginning and end of test actions<br>&nbsp; &nbsp; * Example: A safer Test::NoWarnings<br>&nbsp; &nbsp; * Example: Don't cleanup temp files on failure so they can be debugged<br> &nbsp; <br>* Allow for test output other than TAP<br> &nbsp; <br>* Allow another Test::Builder-like module to work in the same process<br>&nbsp; as Test::Builder (for example, sharing the counter).<br> &nbsp; <br>* Rewrite Test::Builder in terms of Test::Builder2.</tt></p></div> </blockquote><p>Here's what's not complete:</p><blockquote><div><p> <tt>* Split up localizable behaviors into objects<br> &nbsp; <br>* Allow individual test modules to locally override Test::Builder2 behaviors<br> &nbsp; <br>* Allow test modules to globally override Test::Builder2 behaviors<br>&nbsp; &nbsp; * How the plan works</tt></p></div> </blockquote><p>Since I'm not writing to the letter of the law, <a href="http://github.com/schwern/test-more/issues/labels/Test-Builder2">there's more than that to be done before release</a>, but the project does move.</p> schwern 2010-06-27T19:16:09+00:00 journal The Post-YAPC Plan http://use.perl.org/~schwern/journal/40420?from=rss <p>I spent most of YAPC::NA mildly sick, sleep deprived and writing talks. Each of those things alone isn't so bad, but put all together meant I had time and energy enough to do my talks, discuss with people after, and that's about it. As a result, I was kind of dead in the head most of the time and didn't do a whole lot of interaction with people. I didn't feel like I got the most out of the one opportunity a year I get to hang out with huge gobs of Perl folk.</p><p>One of the things which I wanted to do at YAPC was get <a href="http://gitpan.integra.net/">gitpan</a> restarted. It can run right now, but the code is a mess and needs to be babied. It needs a rewrite. That rewrite was supposed to happen at YAPC but see above. I'm doing that now, using MooseX::Declare, perl5i and Path::Class just to mess around with them seriously. Also log4perl, which I'm finally learning a decade late. Its fun, far more pleasant than knocking it together without, once you learn to cope with Moose's idiosyncrasies. Better to learn the quirks of one complete system than nine incomplete ones.</p><p>That's what's absorbing my time right now. After that I want to add subroutine signatures to perl5i and the <a href="http://piratepad.net/ULub7Vjsgn">&#252;ber file and directory objects</a>. They were supposed to be in, at least as a prototype, by YAPC but that didn't work out. Using MooseX::Declare, Path::Class and perl5i together has me drooling for them.</p><p>Will Coleda, representing the TPF, found me at YAPC and mercifully did not break my legs. We hashed out a plan to make a last stab at Test::Builder2 before calling the grant done. That's not going to happen until August, I'll post about that later.</p><p>Oh, and I have a talk to do at OSCON about how <a href="http://www.oscon.com/oscon2010/public/schedule/detail/14113">the world is going to end in 2038</a> assuming <a href="http://www.youtube.com/watch?v=ZW2qxFkcLM0">2012 doesn't claim the prize first</a>. And a two part <a href="http://opensourcebridge.org/proposals/420">Git tutorial for Drupal programmers</a> that I'm developing into a commercial class. And two paid clients to keep happy.</p><p>One thing I *don't* have to worry about is MakeMaker. Gird your loins, MakeMaker has provisionally been handed off to Matt Trout. Maybe I need to worry about it more...</p> schwern 2010-06-27T18:34:30+00:00 journal Perl 6 Design Minutes for 16 June 2010 http://use.perl.org/~chromatic/journal/40419?from=rss <p>The Perl 6 design team met by phone on 16 June 2010. Larry, Allison, Patrick, Will, and chromatic attended.</p><p> <strong>Larry:</strong> </p><ul> <li>documented <code>TOP</code> (again), and explained how parsing is initiated and how it actually works</li><li>series operator (<code>...</code>) now picks a monotonic function when using single characters as endpoints</li><li>STD can now catch duplicates involving <code>proto</code>s as well as <code>only</code>s</li><li>STD no longer advises removal of parens on spaceless <code>sub()</code> declaration</li><li>mostly advised sorear and pmichaud</li><li>Stefan is finishing the boostrap of the STD parser</li><li>also working on adding a parallel NFA and DFA engine</li><li>no, he doesn't want to generate all the states in advance</li><li>it works faster lazily</li></ul><p> <strong>Allison:</strong> </p><ul> <li>working on chroot environments with something more secure than chroot</li><li>relevant to building Parrot packages</li><li>looking at some bugs for Will</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>Rakudo developers decided not to make extra special effort to make a June release of Rakudo Star</li><li>the calendar works against us</li><li>the new date for the release is July 29</li><li>we're I comfortable with hitting that target</li><li>we won't be happy with the results of moving heaven and earth to release in June</li><li>there are lots of advantages</li><li>one disadvantage is not having Rakudo Star at YAPC::NA</li><li>one big advantage is using the supported Parrot 2.6 release as the basis</li><li>I'll write a post outlining the plan in the next couple of days</li><li>otherwise working on lists and interators in Perl 6 and Rakudo</li><li>after deciding to make iterators immutable, Larry and I realized that solves many problems</li><li>everything works out as plain as day after that</li><li>very happy with that design</li><li>the incorrect assumptions of the old model were pervasive</li><li>replacing the old pieces is taking a while, which is no surprise</li><li>this approach feels right though</li><li>the new branch does things no previous version could do</li><li>slices work much better, for example</li><li>metaoperators work properly</li><li>map is lazy</li><li>slurpy arguments in lists are lazy by default</li><li>no weird binding or action at a distance problems</li><li>plenty of changes to <code>Associative</code> and <code>Positional</code> roles</li><li>those are now super clean and may be lazy</li><li>more features work</li><li>~30 failing tests (not test files, just tests) now, ~500 last night</li><li>most of the current failures are minor</li><li>will try to merge the branch before the release</li><li>replacing lots of ugly code with fewer lines of elegant code</li><li>Jonathan and others have worked on lots of other pieces</li><li>adding plenty of new features</li><li>looking forward to tomorrow's release</li></ul><p> <strong>c:</strong> </p><ul> <li>editing the Rakudo book</li><li>moving the Rakudo release date may let us have a printed book available about the same time</li><li>depends on how much there is left to write</li></ul> chromatic 2010-06-26T17:07:30+00:00 journal Perl 6 Design Minutes for 09 June 2010 http://use.perl.org/~chromatic/journal/40415?from=rss <p>The Perl 6 design team met by phone on 09 June 2010. Larry, Allison, Patrick, and chromatic attended.</p><p> <strong>Larry:</strong> </p><ul> <li>not much spec change this week</li><li>figured out a syntax for a regex block to return more than one cursor</li><li>based on <code>gather</code>/<code>take</code> </li><li>in STD hacking, continued to assist Stefan O'Rear in getting STD bootstrapped via viv</li><li>now that it's bootstrapped, we're refactoring things that make sense now</li><li>we're now starting to move bits of Cursor code from Perl 5 into Perl 6</li><li>refactoring the grammar for sanity of design</li><li>started upgrading STD to normal Perl 6 syntax where it previously catered to <code>gimme5</code>'s limitations</li><li>for example, switched STD's old<nobr> <wbr></nobr><code>.&lt;_from&gt;</code> and<nobr> <wbr></nobr><code>.&lt;_pos&gt;</code> hash lookups to using<nobr> <wbr></nobr><code>.from</code> and<nobr> <wbr></nobr><code>.pos</code> accessors</li><li>started the prep work for moving <code>EXPR</code> out of <code>STD</code> to make it generally available to any grammar wanting operator precedence</li><li>in STD parsing, made Perl 5 <code>$&lt;</code> detection have a longer token to avoid confusion with match variables</li><li>STD no longer attempts two-terms detection on <code>infix_circumfix_meta_operator</code> </li><li>STD now parses <code>&gt;&gt;R~&lt;&lt;</code> correctly, or at least dwimmily</li><li>STD doesn't complain about P5isms in <code>printf</code> formats like <code>"%{$count}s"</code> </li><li>STD was parsing<nobr> <wbr></nobr><code>/m</code> and<nobr> <wbr></nobr><code>/s</code> with the opposite semantics</li><li> <code>termish</code> now localizes <code>$*MULTINESS</code> in its scope so that inner declarations aren't accidentally multified</li><li>STD now carps about <code>package Foo;</code> as a Perl 5 construct</li></ul><p> <strong>Allison:</strong> </p><ul> <li>talked to Chris Shiflett, a PHP developer, on someone from the PHP community to sit on the Parrot board</li><li>will be in the US for a few weeks</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>working on list simplification</li><li>had a couple of breakthrough ideas on Monday</li><li>working on the implementation now</li><li>worked out inversion lists for character class matching in regexes</li><li>will make them faster, especially with long ranges of character classes</li><li>fixed a half-dozen tickets in RT</li><li>fixed Rakudo hash constructors</li><li>fixed an intermittent bug with colon-pair signatures</li><li>two possible parses exist in STD, but we removed an unneeded one in Rakudo</li><li>fixed a bug with Parrot's <code>exit</code> opcode</li><li>NQP and PAST needed an update not to cheat with PASM constants</li><li>I fixed that too</li><li>Vasily added multisub and multimethod support to NQP, that was a big plus</li><li>fixed the <code>**</code> quantifier in regexes to understand surrounding whitespace</li><li>regex engine tried to match beyond the end of a string, so I added guards for that</li><li>will work on lists furiously before the next release</li><li>I don't think it'll take long</li><li>closures are next, hope to have those in place by the weekend</li></ul><p> <strong>c:</strong> </p><ul> <li>released a new version of Pod::PseudoPod::LaTeX to support the various books in progress</li></ul> chromatic 2010-06-24T12:24:33+00:00 journal Perl 6 Design Minutes for 02 June 2010 http://use.perl.org/~chromatic/journal/40410?from=rss <p>The Perl 6 design team met by phone on 02 June 2010. Larry, Allison, Patrick, Will, and chromatic attended.</p><p> <strong>Larry:</strong> </p><ul> <li>mostly, I supported sorear in bootstrapping STD to use <code>viv</code> instead of <code>gimme5</code> </li><li>his stage 2 and stage 3 now output identical Perl 5 versions of STD</li><li>produces a huge amount of warnings</li><li>appears to require Perl 5.12 at the moment</li><li>working on both of those</li><li>S03 refines hyper dwimminess to be more like APL, with modular semantics</li><li>S02 refines <code>Blob</code>s to simply be immutable <code>Buf</code>s, with similar generic characteristics</li><li>S02 now describes native <code>blob</code> types</li><li>implemented post-declaration checks for <code>BEGIN</code> and <code>use</code>, since those can't wait for end of file</li><li>STD no longer loses existing bindings when we go to a sublanguage</li><li>STD now uses <code>$*GOAL</code> variable only as informative, never as a "stopper"</li><li>instead, we create a <code>&lt;stopper&gt;</code> rule for <code>$*GOAL</code> if necessary</li><li>can check for that only, instead of that or <code>$*GOAL</code> </li><li>answering lots of questions on how STD and <code>viv</code> work besides that</li></ul><p> <strong>Allison:</strong> </p><ul> <li>did a lot of research on graph color algorithms for register usage algorithms</li><li>will finish my finals on Monday</li></ul><p> <strong>Will:</strong> </p><ul> <li>trying to herd the discussion of dynop libraries</li><li>a recent branch to close an old ticket broke a lot of assumptions</li><li>some bugs have become more visible because of these changes</li><li>hope to get that cleaned up this week</li></ul><p> <strong>Allison:</strong> </p><ul> <li>I liked your suggestion of bringing back the <code>getstderr</code> and related opcodes</li></ul><p> <strong>Will:</strong> </p><ul> <li>trying to resurrect Partcl</li><li>stuck on a TT #389 closing issue</li><li>not sure how to fix that, the way things are now</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>working on the iterator and list design</li><li>brainstorming the implementation</li><li>will implement somethine one way or another this week</li><li>people keep implementing workarounds for the current system</li><li>they'll bite us eventually</li><li>Moritz and I worked on making the regex engine returning real Perl 6 objects</li><li>that mostly works</li><li>exposes some places where lists don't work exactly right</li><li>the workarounds there made me replan the list and iterator implementation</li><li>answered some questions online</li><li>Jonathan added a better backtrace algorithm for Rakudo</li><li>reports Perl 6 source lines instead of PIR lines</li><li>I'll review his code</li><li>think I can borrow it for NQP for all HLLs</li><li>Jonathan reports that it was a lot easier in NQP than PIR</li></ul><p> <strong>c:</strong> </p><ul> <li>trying to answer a few Parrot design questions</li><li>looking at the continuation of design from Perl 1 - 4 to Perl 5 and Perl 6</li><li>hope to have coding time soon</li></ul> chromatic 2010-06-22T01:12:29+00:00 journal Perl 6 Design Minutes for 26 May 2010 http://use.perl.org/~chromatic/journal/40408?from=rss <p>The Perl 6 design team met by phone on 26 May 2010. Larry, Allison, Patrick, Will, and chromatic attended.</p><p> <strong>Larry:</strong> </p><ul> <li><nobr> <wbr></nobr><code>:()</code> syntax is now always signature</li><li>we now use <code>foofix:[...]</code> as the general op form instead of <code>foofix:(...)</code> </li><li>refactored the sematics of<nobr> <wbr></nobr><code>:nth</code> and<nobr> <wbr></nobr><code>:x</code> </li><li><nobr> <wbr></nobr><code>:nth()</code> now only ever takes a monotonically increasing list</li><li>S03 now explains how "not-raising" works on <code>!=</code> and <code>ne</code> </li><li>it now basically matches the intuitions of an English speaker via HOP definition of negate metaop</li><li>STD sometimes didn't require semi between statements</li><li>statement modifiers are expression terminators but not valid statement terminators</li><li>an unexpected statement modifier word like <code>if</code> could terminate one statement and start another</li><li>fixed up backslashes in character classes to allow <code>\s</code> etc and reject <code>\u</code> etc</li><li>STD was accidentally using the same lexpad for different multis</li><li>Cursor now treats<nobr> <wbr></nobr><code>:()</code> on name extension as a signature always, never as a categorical</li><li>we shouldn't introduce the stopper for circumfix until we're in the circumfix, or we can't use the same char on both ends</li><li>placeholder messages error messages are now much more informative and correct</li><li>we now disallow use of placeholder after same variable has been used as a non-placeholder, even for an outer reference</li><li>renamed add_macro (which it doesn't) to add_categorical (which it does)</li><li>participating frequently in discussions on semantics both on irc and p6l</li><li>working closely with sorear++ as he brings viv closer to bootstrapping, yay!</li><li>soon can bootstrap past gimme5</li></ul><p> <strong>Allison:</strong> </p><ul> <li>worked on Pynie this week in my limited spare time</li><li>one goal is to generate the parser directly from the Python grammar</li><li>wrote a small, lightweight PEG parser which generates a match tree from the Python 3 grammar</li><li>can generate a lexer directly</li><li>right now it creates a parse tree</li><li>looks similar to the match nodes of NQP-rx</li><li>dumps out a tree to the PIR parser</li><li>working on PaFo elections for next year, but trying to delegate those</li><li>will have more time after June 7</li></ul><p> <strong>Will:</strong> </p><ul> <li>working on Perl 6 advent tests</li><li>many more people are doing more work than me</li><li>liasing with Rakudo folks for any important Parrot bugs before the Rakudo Star release</li><li>my current direction there is "don't break anything"</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>sorear added hash flattening to NQP</li><li>lots of work on closures in PAST and NQP</li><li>they properly clone</li><li>fixes some lexical problems</li><li>need to get that to work in Rakudo</li><li>that's tougher; Rakudo has to wrap Parrot subs</li><li>wrapper object needs cloning as well, along with its attributes</li><li>we'll add a new PAST node type to help</li><li>that node understands contexts</li><li>essentially a way to add void context optimizations to your AST</li><li>that solves many problems in Rakudo beyond closures</li><li>added a setting into NQP along with its test suite</li><li>not automatically loaded, but available</li><li>contains standard hash and array methods</li><li>Parrot's ops2c project uses those</li><li>other people can update and enhance that setting as necessary</li><li>NQP also has the ability to parse type names</li><li>NQP doesn't do anything with them yet</li><li>eventually they'll allow the use of multis</li><li>cleaning up some NQP bugs regarding lexicals and package storage of subs</li><li>Bruce Keeler enabled variable interpolations in regexes</li><li>working on some refactorings to simplify that approach</li><li>works in NQP and Rakudo now</li><li>that's a feature we've never had before</li><li>Rakudo's REPL now works better, thanks to sorear</li><li>HLLCompiler now written more in NQP as part of that</li><li>NQP now can do <code>eval</code> </li><li>NQP remembers lexicals in interactive mode now</li><li>adding that to Rakudo is more complex</li><li>working on that</li><li>pleased with the progress on #perl6</li></ul><p> <strong>c:</strong> </p><ul> <li>reviewing long term plans for GC and Lorito</li><li>should have more time free soon</li></ul> chromatic 2010-06-20T19:40:02+00:00 journal Perl 6 Design Minutes for 19 May 2010 http://use.perl.org/~chromatic/journal/40401?from=rss <p>The Perl 6 design team met by phone on 19 May 2010. Larry, Will, and chromatic attended. Patrick added his notes later.</p><p> <strong>Larry:</strong> </p><ul> <li>S03 makes more explicit that doctrine that <code>~~</code> topicalizes, and removes smartmatch table fossils that automatically fall out from that</li><li>S05 renames 'accent' to 'mark' for better Unicode conformance</li><li><nobr> <wbr></nobr><code>:a</code> and<nobr> <wbr></nobr><code>:aa</code> changed to<nobr> <wbr></nobr><code>:m</code> and<nobr> <wbr></nobr><code>:mm</code> </li><li>S05 disrequires retroactive semantics on<nobr> <wbr></nobr><code>:samecase</code> and<nobr> <wbr></nobr><code>:samemark</code> </li><li>the method form must now explicitly add case or mark modifiers to the pattern</li><li>regularized <code>mm//</code> to <code>ms//</code> to avoid confusion with new<nobr> <wbr></nobr><code>:m</code> ignoremark option</li><li>STD now does a bit better at diagnosing bogus <code>??!!</code> constructs of various sorts</li><li>STD now correctly adds operators to symbol tables as subs</li><li> <code>CORE.setting</code> now has protos of all the operators so they can be recognized as subs too</li><li>Cursor now canonicalize operator names in the symbol table</li><li>btw, not quite like specced</li><li>STD now reads user's mind on '<code>Str $toto</code>' to intuit missing declarator</li><li>STD now properly diagnoses a typename between routine declarator and sub name</li></ul><p> <strong>Will:</strong> </p><ul> <li>working on code for Carl Masak, trying to get his poker code example running on Rakudo</li><li>both fun and frustrating</li><li>some stuff doesn't quite work yet</li><li>going through the Advent examples</li><li>adding them to spectests</li><li>make sure we won't regress on such public examples</li><li>other people are helping with that now</li></ul><p> <strong>c:</strong> </p><ul> <li>will get back to editing the Rakudo book soon</li><li>hope to have it in print by YAPC, but no guarantee</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>fixed closures in NQP, as a precursor for fixing them in Rakudo</li><li>worked with sorear on REPL in Rakudo and PCT in general</li><li>ported the NQP "standard library" done by japhb++, bacek++, and many others into the nqp-rx repository and made it part of the standard build sequence for nqp and Parrot</li><li>decided we need a new "context sensitive" node type in PAST, will be used to create proper closures and to handle sink context</li><li>worked with bacek on adding better multimethod support to PAST and nqp-rx</li><li>discovered a problem with lexical subs in NQP being automatically entered into the package namespace (and some existing code relying on this behavior)</li><li>did some initial fixes to at least get things entered properly, but a complete fix may require a deprecation cycle</li><li>plan to review others' patches this week</li><li>plan to fix REPL, closures, and sink context in Rakudo (since those are currently large pain points)</li><li>plan to work on loops and iterators after that</li></ul> chromatic 2010-06-16T21:38:09+00:00 journal Perl 6 Design Minutes for 12 May 2010 http://use.perl.org/~chromatic/journal/40400?from=rss <p>The Perl 6 design team met by phone on 12 May 2010. Larry, Allison, Patrick, and Will attended.</p><p> <strong>Larry:</strong> </p><ul> <li>clarified usage of brackets around infixes</li><li>added various 128-bit types to the spec; we might make them arbitrarily extensible via role</li><li>at least LLVM could support this, even to non-powers-of-two sizes</li><li>modernized the paleolithic grammatical category description in S02</li><li>STD now uses double-quote rules for interpolating <code>@foo[]</code> into regex</li><li>STD now gives better message on <code>1__3</code> </li><li>added the specced 128-bit types to CORE.setting</li><li>added <code>minmax</code> function to CORE.setting</li><li>implemented <code>circumfix:&#171;X Y&#187;</code> as grammar derivation</li><li>currently only allows a <code> &gt;&gt; inside</code></li><li>now also recognizes <code>foofix:("\x[face]")</code> and <code>foofix:("\c[YOUR CHARACTER HERE]")</code> without actually evaluating</li><li>playing with factoring <code>yaml</code> out of <code>gimme5</code>, since <code>viv</code> is not likely to go that route.</li><li>mostly just answered a lot of questions on irc</li><li>egged people on about concurrency issues</li></ul><p> <strong>Patrick:</strong> </p><ul> <li>thought on handling closures properly</li><li>have a solution, just need some time to implement</li><li>discussion on changes to CodeString</li><li>work on compiler toolkit to avoid CodeString, using StringBuilder instead where possible, in PCT, NQP, and rakudo. Pretty easy, no downstream projects block on a deprecation issue</li><li>after that, lists</li><li>also been answering questions on interactive mode (REPL) for rakudo et al. (the issue with losing lexicals)</li></ul><p> <strong>Allison:</strong> </p><ul> <li>resolved the git conversation pretty well (for Parrot's repo migration)</li><li>worked on a pure PEG parser (following the paper), straight PIR, single day; now self-parsing. Interesting project, is lightweight. currently has memoization, but that might not be right for us because of backtracking. With some more effort, could probably handle EBNF form (useful for python)</li><li>could be setup for developer status for Debian which will improve our packaging status for Debian and Ubuntu</li></ul><p> <strong>Will:</strong> </p><ul> <li>Parrot CodeString performance improvements</li><li>we're definitely faster in branch, but some feedback from pmichaud should help us clean up the API a bit as well, look for those to hit trunk in the next few days</li><li>Parrot makefile deps cleanup</li></ul> chromatic 2010-06-16T01:47:02+00:00 journal Late to the party, but I brought bottles http://use.perl.org/~BinGOs/journal/40397?from=rss <p>Published over at <a href="http://blogs.perl.org/users/bingos/2010/06/late-to-the-party-but-i-brought-bottles.html">blogs.perl.org</a> </p> BinGOs 2010-06-15T12:07:25+00:00 journal Smokebrew - It is like perlbrew but different http://use.perl.org/~BinGOs/journal/40386?from=rss <p>Published over at <a href="http://blogs.perl.org/users/bingos/2010/06/smokebrew---it-is-like-perlbrew-but-different.html">blogs.perl.org</a> </p> BinGOs 2010-06-08T14:50:38+00:00 journal BCVI 3.0 Hits CPAN http://use.perl.org/~grantm/journal/40379?from=rss <p>My big news today is that Version 3.0 of bcvi is now available on CPAN. If you have no idea what bcvi is then you'll be pleased to know I've written <a href="http://sshmenu.sourceforge.net/articles/bcvi/">this article</a> to answer all your questions - it even has pictures!</p><p>Way back in 2007 I knocked up a proof-of-concept implementation of a somewhat crazy idea. I used it for a while and found it useful so I <a href="http://www.perlmonks.org/index.pl?node_id=611462">shared it on PerlMonks</a> to see if other people found it useful too. That was version 1.0.</p><p>Over time I fleshed out the core to make something more robust, more secure and more useful. But I never released it publically because it always seemed like the sort of tool that would be most useful to a person who hacked it into a form that suited them. I really had no idea how to release and maintain a tool that was meant to be hacked. So I kept it to myself and continued to find it useful. That was version 2.0.</p><p>Eventually I realised that what I needed was a solid core of infrastructure code and a plugin API that would allow people to hack the core without editing the script itself. Quite why it took me so long to realise this, I couldn't say. After all it's exactly what I did with <a href="http://sshmenu.sourceforge.net/">SSHMenu</a> and that has worked out very well.</p><p>The problem was that I didn't have a solid core of infrastructure code. What I had was a proof-of-concept script that had some of the rough edges knocked off and some new shiny bits bolted on. So earlier this year I set about rewriting bcvi in a more extensible way. Then to prove the new plugin API, I wrote a few simple plugins. Now it seems to be in a stable enough form for me to call it version 3.0.</p><p>And so <a href="http://search.cpan.org/dist/App-BCVI/">it's released</a>. There's even some documentation for the plugin API. It'll be interesting to what, if anything, people make of it.</p><p> <small>Cross posted from <a href="http://grantmclean.vox.com/library/post/bcvi-30-hits-cpan.html">my blog</a>.</small></p> grantm 2010-06-03T21:08:19+00:00 journal JVM's -XX:-DontCompileHugeMethods &amp; dynamic languages http://use.perl.org/~jjore/journal/40367?from=rss <p>In <a href="http://nerds-central.blogspot.com/2009/09/tuning-jvm-for-unusual-uses-have-some.html">http://nerds-central.blogspot.com/2009/09/tuning-jvm-for-unusual-uses-have-some<nobr>.<wbr></nobr> html</a> which I just picked out of reddit.com's front page I notice there's an ordinary 8K bytecode size limit for JVM heuristics.</p><p>Allegedly adding -XX:-DontCompileHugeMethods to the command line eliminates this limit.</p><p>In "current" versions of JVM which don't have the very new invokedynamic bytecode operation and languages implemented on top of the JVM like JRuby, I assume their implementation does all the dynamism as ordinary code. I assume then this means the bytecode sizes are artificially inflated and then possibly just missing out on this nice optimization.</p><p>Allegedly, this is one of those heuristics that moved Java from the "slow" category to "faster than C++".</p><p>Last year I found that MRI Ruby-1.9 and JRuby were equivalently fast as Perl 5 but now I wonder if the JRuby implementation I was using was missing out and possibly could go even *faster*.</p><p>FWIW, MRI Ruby-1.8 is 1/10 the speed of Perl 5.</p> jjore 2010-05-26T22:02:34+00:00 journal Birmingham.pm Technical Meeting - Wednesday 26th May 2010 http://use.perl.org/~barbie/journal/40364?from=rss <code> Event:&nbsp;&nbsp;&nbsp;Birmingham.pm Technical Meeting<br> Date:&nbsp;&nbsp;&nbsp;&nbsp;Wednesday 26th May 2010<br> Times:&nbsp;&nbsp;&nbsp;from 7pm onwards (see below)<br> Venue:&nbsp;&nbsp;&nbsp;The Victoria, 48 John Bright Street, Birmingham, B1 1BN.<br> Details:&nbsp;<a href="http://birmingham.pm.org/tech/next">http://birmingham.pm.org/tech/next</a> <br> </code> <p> <b>Talks:</b> </p><ul> <li>Accelerated web development with Catalyst [Richard Wallman]</li><li>CPAN Testers 2.0 - "I love it when a plan comes together" [Barbie]</li></ul><p> <b>Details</b> </p><p>This month we welcome a returning guest speaker, Richard Wallman, who will be taking a look at how Catalyst has eased the development lifcycle of websites, from his own experiences. In addition I'll be looking at the progress of the CPAN Testers 2.0, and looking at some of the near future plans for CPAN Testers.</p><p>As per usual, this month's technical meeting will be upstairs at The Victoria. The pub is on the corner of John Bright Street and Beak Street, between the old entrance to the Alexandra Theatre and the backstage entrance. If in doubt, the main entrance to the Theatre is on the inner ring road, near the Pagoda roundabout. The pub is on the road immediately behind the main entrance. See the map link on the website if you're stuck.</p><p>As always entry is free, with no knowledge of Perl required. We'd be delighted to have you along, so feel free to invite family, friends and colleagues<nobr> <wbr></nobr>;)</p><p>Some of us should be at the venue from about 7.00pm, usually in the backroom downstairs. Order food as you get there, and we'll aim to begin talks at about 8pm. I expect talks to finish by 9.30pm, with plenty of time for discussion in the bar downstairs.</p><p> <b>Venue &amp; Directions:</b> </p><p> The Victoria, 48 John Bright Street, Birmingham, B1 1BN<br> - <a href="http://www.pubs247.co.uk/pubPages/pub.asp?id=24358&amp;from=&amp;promotion=">Pub Details</a> <br> - <a href="http://birmingham.pm.org/images/upload/victoria.jpg">Picture</a> <br> - <a href="http://www.google.co.uk/maps?hl=en&amp;client=firefox-a&amp;q=the+victoria+pub&amp;near=Birmingham&amp;radius=0.0&amp;cd=1&amp;cid=52482921,-1893619,7492755984503563963&amp;li=lmd&amp;z=14&amp;t=m">Google Map</a></p><p>The venue is approximately 5-10 minutes walk from New Street station, and about the same from the city centre. On street car parking is available see full details and directions on the <a href="http://birmingham.pm.org/tech/next">website</a>.</p><p> <b>Times:</b> </p><p>These are the rough times for the evening:</p><ul> <li>food available until 9.00pm</li><li>talks: 8.00-10.00pm</li><li>pub closes: 11.00pm</li></ul><p>Please note that beer will be consumed during all the above sessions<nobr> <wbr></nobr>;)</p> barbie 2010-05-24T19:26:06+00:00 journal