Well I was just cleaning up a few things in some very old code this AM and I noticed this
Use Config;
die "chown not available!" unless $Config{"chown"};
and a number of similar lines checking for what I though would be 'core' functions, (like I said this was an old piece of code).
What caught my eye was the 'Config' mod never run into that one before so I had a quick read. I quickly determined that all perl programmers will use this module in onlyu one of three ways
Never have a need for or even look at it or
Use all the time and sleep more soudly because of it or
Have a look at, play with until you corrupt your perl and then never play with again
Recently, with the good work of Ben Morrow, Devel::Callsite now has an optional level parameter similar to perl's builtin caller. With this you can get the OP address up the call stack.
In the next release of Devel::Trepan, OP addresses will be shown in locations, by default if Devel::Callsite is installed. Currently they are shown only after the debugger command set display op on is run.
But this got me thinking about this and identifying the exact position. I've mentioned this topic before in a previous blog post and on PerlMonks.
Given the tree structure nature the Perl program, it should be possible to narrow positions in a line further. For example, one can use words to describe a position within a line. If for example, that an op address is in the second statement of line 10, one might say just that. Or perhaps something like "second function call on line 10".
Going further, one might take B::Concise output and decompile some fragment with a given op address.
I realize this probably has limited appeal, but still I think it cool. Any takers on an package that can take B::Concise output and an perl OP addresss, and narrow within a line where that OP is?
This was my second QA Hackathon, the first being 2012 in Paris. This year, I had a lot of good conversations with various people about MetaCPAN's role in the Perl ecosystem and I pushed a decent amount of code. A lot of it is waiting to be merged, but here's the gist of it.
On the plane on the way over, I did a bunch of cleanup on the API. Mostly style changes, but it makes some of files easier on the eyes. RWSTAUNER was kind enough to fix my failing build after I pushed the code.
When Ovid released TAP::Stream, breaking it out of Test::Class::Moose, it briefly disappeared from MetaCPAN. This reminded me of how annoying it is to find missing modules. So, I added a view to the author pages which will let you paginate through all releases ever uploaded by any author. I think it's quite helpful, even if it's not something that will be used a lot.
This past May, The Perl Foundation awarded a grant to fund development of a couple features in Pinto. Pinto is a robust tool for curating a private repository of CPAN modules, so you can build your application with the right modules every time. This is my fifth progress report on that work.
Anyone who has ever run into my will know I like to tell and hear good stories and I ran across one surprisingly on CPAN today.
Well I blundered upon Morale a rather old bit of code that has been around since the last century that total and as it is rather unremarkable old school, well that is unfair really as it was written well before there was a new school and most new school programmer will still playing with their gameboys, that simply stores a scalar value of 1 to 100 for a uses moral and can also calculate the moral for the group based on the individual user values.
It wasn't the 90 lines of code that caught my attention or the 12 lines of POD it was the 100 or so lines of the story that caught my eye.
Logical Helion, LLC is pleased to announce a new stable release of the Helios distributed job processing system! Helios 2.80 provides several new features to improve the performance and flexibility of the Helios system. A new jobtype system and job queuing extensions enable you to divide your workload in more complex ways. New configuration options allow Helios to dynamically adjust to incoming workloads. New commands ease administration by providing job and service information at the command line, and the new helios_config_* commands allow you to reconfigure services without having to resort to the Helios::Panoptes web interface or SQL commands. There are performance enhancements and bugfixes as well. The full changelog is here.
One of the features of Type::Tiny that differentiates it from Moose's built-in type constraint system is that it allows stand-alone coercions which can then be mixed with type constraints as required. So if you had a Split coercion which split a multi-line string into an arrayref of lines, you could do something like this:
use MyApp::Types qw( ArrayRef Split );
has lines => (
is => 'ro',
isa => ArrayRef + Split,
coerce => 1,
);
I'm back from the Perl QA Hackathon and had a blast. I really appreciated the work that BooK and Laurent did to pull this off. And thanks to Booking.com for hosting us. In fact, we had a wide variety of sponsors and I suggest you check them out if you're looking for a new position.
This version makes method attributes required. There's simply too much benefit for them in tests and making them optional complicated the code too much.
The first thing i wanted to talk about is the map, grep and sort Functions. I think these functions are somewhat special. If someone look at these functions then we can say that these are concepts of a functional programming language.
All three functions take a code block. All three functions then goes through a list and uses that function to do specific thinks. "map" apply's a function to every element and returns a new list. "grep" uses the code block to specify a filter function. And with "sort" you can sort the list however you like it.
When i programmed in Perl i often used these functions. Some people probably hate them because they are hard to read and don't understand them at all. I think if you understood it once it really gets easier to read them, but the excessive use of "symbols" and that you have to read them from down to up still makes them harder to read as they should.
Well back at my desk today and slowly reinstalling DWIM perl and padre after yesterdays lunch disaster so I took the time to snoop about on the enlightened perl or EPO site for a few mins.
Well still not much going on there since the last time I had a look about two years ago at least the send a newbie initiative seems to be humming along.
They still have the same dead link on the 'Join the organisation' on the home page that was there 2 years ago at least the 'Membership' nav tab on the right side goes to the right place now.
You wonder sometimes if anyone really cares anymore about it as most of the info on the site is rather dated (except the send a newbie), the twitter feed has been inactive for two years and there still are still no documents except the original on the Docs page and the wiki has been hijacked by a shady Belorussian trucking firm.
The Grants Committee is in the middle of the March round.
Here is our March schedule. And I expect it will be the same for May, July, and so forth.
March 1st: Call for Proposal
March 14th: Application deadline
March 15th: Applications are posted for public to solicit feedback
March 22-29th: Voting by the Committee
March 31st: Public announcement on the results
As of yesterday, all the applications are available at TPF News. Community feedback is welcomed. And the applicatns were notified that they are expected to watch them annd respond to questions at least until March 29th.
Today's the last day of the Hackathon and it's gotten off to an interesting start: we were locked out of the Booking.com offices (it appears to be accidental), so now we're overflowing the hotel lobby. The organizers have gotten us a small room in the hotel and now we're slowly moving there.
Yesterday I fixed a few issues with Test::Class::Moose and also uploaded a new version of DBIx::Class::EasyFixture, one which allows developers to disable the transactions, if they prefer.
In other news: Test::Class::Moose is NOT for testing Moose-based code: it's for testing. If you code uses Moose, great. If not, great. The name "Moose" is in there simply because it's Moose-based. I realize, in retrospect, that this was a mistake: I shouldn't have coupled the name with the implementation. That being said, there are worse things I could have called it.
test2: perl -e" map{print if $_ %1000 ==0} 1..100_000_000" #out of memory
seems map function create a array to accommodate all data from list. As I know, an iterator is just an cursor to traverse a lists which can be infinite or finite. but the present implementation of map sets feed list a limit to a maximum array, and I think it's wrong.
Well on the way home now and over lunch stop I discovered there was WiFi at the Tim Horten's so I took the opportunity to try and load in 'Padre::Plugin::Autodia' as it seemed like a good quick blog post while I am on the road as I had 'GraphViz' installed already it should go smoothly, right?
Well wrong.
Things started out fine then Padre started to recomile and after a half hour of wizing and whiring if failed.
I tried to start Padre but it never came up it was just dead. Even CPAN from a prompt would not come justs gives me this
so now i did it. I registered to write about Perl. But actually i wonder myself why i did it now, and not earlier. So i want to tell a little bit about myself.
Today, aside from giving an interview which will be published in Norway, I released yet another version of Test::Class::Moose. As of version 0.51, the Sub::Attribute module is required rather than optional. Thus, all the nifty attribute goodness, such as Test, Tests, and Tags should just work, rather than requiring another module to install after your code breaks.