A Day Without Perl

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 map/grep/sort dead end

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.

Lies Programmers Tell Themselves

Lies Programmers Tell Themselves

[From my blog.]

March round started

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.

I hope this round will be successful.

One for the Road

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

Perl::QA Hackathon in Lyon - Day 4

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.

map/grep is not a real iterator?

I always thought map/grep(and many functions in List::MoreUtils) is the way to functional program in perl5. but a small test tell me it's wrong:

test1: perl -e" do{print if $_ %1000 == 0} for(1..100_000_000);" #run successfully

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.

Please point out if any mistakes.

Adopting Acme::CPANAuthors::Booking

Because one can never have enough Acme modules...

Perl on Vacation

Well day two way out here very very far from anything and with my good old 34k line and my wife wants to watch the sunset over the Atlantic. Well I told here that is not going to happen here as the sun only rises over the ocean you will have to wait till our trip to B.C. in a few years.

I did tell here she could get up to watch the sunrise. Great what time is that. Well not having my copy of 'ADMIRALTY Sailing Directions' handy, and no GPS and really no Internet or phone connection or even T.V. All I had was a tide table from 6 years ago but at least I did have the lat and long from the table (well at least a close approximation)

47°01'45.1"N 60°23'52.5"W

and in my lap top I have perl and a little module I loaded about a year ago. 'Astro::Sunrise' so I think I was saved.

Open Access: Second Thoughts

I have always been a proponent of Open Access scholarship. The days where dissemination of scholarship cost a significant amount of money are over. However, I am having some second thoughts. Most of these lie in the fact that, while I like open access, I like academic freedom even more. It is this juncture that bothers me the most.

Open Access began mostly in the sciences as a reaction to the fact that science publishers were continuing to mark-up the amount it cost to purchase journals without thinking of the stagnating and declining library budgets. This has lead to a confrontation between libraries and publishers in the sciences. The outcome of this continuing debate is two forms of Open Access called “Green”, preferred by libraries and university administrators, and “Gold”, preferred by the UK government and publishers. A good discussion of the pros and cons can be found here.

A Simple dist.ini for Dist::Zilla

This is day 3 of the Perl-QA Hackathon in Lyon, France, and I decided it was time to fix some issues with the older dist.ini I was using. Erik Colson asked about my dist.ini, so I thought I should explain it here, along with comments.

Perl Help :(

Dear Perl expert i Want To know How this Script Work Please
_____________________________________________________________________

#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket::INET;

# in /admin/config.php
# // handle special requests
# if (!isset($no_auth) && isset($_REQUEST['handler'])) {
# $module = isset($_REQUEST['module']) ? $_REQUEST['module'] : '';
# $file = isset($_REQUEST['file']) ? $_REQUEST['file'] : '';
# fileRequestHandler($_REQUEST['handler'], $module, $file);
# exit();
# }


# in /admin/library/view.functions.php
# case 'api':
# if (isset($_REQUEST['function']) && function_exists($_REQUEST['function'])) {
# $function = $_REQUEST['function'];
# $args = isset($_REQUEST['args'])?$_REQUEST['args']:'';
#
# //currently works for one arg functions, eventually need to clean this up to except more args
# $result = $function($args);
# $jr = json_encode($result);
# } else {
# $jr = json_encode(null);
# }
# header("Content-type: application/json");
# echo $jr;
# break;


$| = 1;

Meeting Perl while on Vacation

Well bandwidth is still a problem for me these days (can you even remember 56k dial-up) so just a short post.

Well on the road today I met Perl at least 3 times and I wasn't even on line.

Well first we passed a semi hauling a load of cars and I looked up and saw a sticker on it saying powered by CargoTel. Well some of you may not know, well most maybe, that the CargoTel network for car delivery logistics is 100% Perl.

Well stopping at a very remote site in the afternoon I saw a sign that said 'As Seen On 'Tripadvisor.com' again another site that uses a good deal of Perl at least the last time I checked.

Finally stopping at the B+B this evening I noticed a sticker on the front door was from our good friend to the perl world 'Booking.com'

So I guess for a dead of dieing computer language we are not doing to-bad if we can penetrate into what can only be called a rather remote part of N.A.

My new buildbot

I've added some buildbot instances on various architectures to my new buildbot at http://perl514.cpanel.net/build/. I needed about a day to set it up.

Tested projects are so far: perl5, rakudo, nqp, parrot and p2.

The buildslaves are currently: centos5 (old system), cygwin, cygwin64, darwin (my macbook air), debian (fresh), mingw32 (strawberry), ppc (an old powerbook)

And soon: mingw64 (python refuses mingw64, demands msvc), freebsd, openbsd, solaris10 (intel 64bit)

All the slaves initiate the connection to the bot on some private tcp port, so they can all stay behind my firewall. Most of them are some vm's on my devbox, and I start/stop them at random.

The setup included installing python 2.7, setuptools, and then easy_install buildbot-slave. The configuration is a bit tricky, but it's python code, not just some data format, and not jenkins.

Test::More - New Maintainer, Also stop version checking!

This post is to announce two things:

1) I am the new maintainer for Test::More. Schwern and I got together this morning to move it to a github organization, Test-More, at https://github.com/orgs/Test-More/. We are working on getting the repository into a decent state. You will need to update your links, repo remotes, etc. https://github.com/Test-More/test-more/

2) Test::More 1.5 is suspended indefinitely. Regular Test::More will eventually reach the point where it will hit version 1.5.0, at this point the version will collide with the 1.5 experiment. There is probably *A LOT* of code out there that does version checking to see if it is running the 1.5 experimental code. This needs to be changed to check for capabilities instead using can(), for example Test::Builder->can("history"). Altering a programs behavior based on Test::More version is not appropriate.

We have split the repo into Test::More and Test::Builder2. We are working on moving all issues for Test::Builder2 and Test::More1.5 into the correct repo. That repo is https://github.com/Test-More/TB2

After things settle I will create a new blog post with a plan for future work on the Test::More/Test::Builder/Test::Simple ecosystem.

perldoc -l for modules without pod

perldoc -l Carton prints the path to Carton.pm so I can write

vim $(perldoc -l Carton)

if I want to open it in vim.

perldoc -l Carton::CLI print
No documentation found for "Carton::CLI".

even though there is a Carton::CLI module

wouldn't it be nice it also printed the path to the module, even if it did not have pod in it?

Alternatively, can you recommend another way to access the source code of an installed module?

Well it is worth the wait?

Well being out here in off-line land I took some time to work on formating some YAML files for my ongoing AD&D game. Well I was ok until I had to parse some things. Usually I just lay with my good old online YAML parser but I was finding it a bit trying what with the slow speed and late hour.

Then I remembered that some time ago I had used such a thing with Padre and sure enough after about 5 mins searching on Map of CPAN I ran into Padre::Plugin::YAML So I decided to give it a whirl and here is the results.

Well it seems I must of been missing a few of the compassionates it required as it took a good few hours to install but it did go-smootly. Seems it was not the size of the packages that took forever it was installing and compiling and the stuff the requirements required. Sigh!

Writing about Perl

Hello,

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.

Perl::QA Hackathon in Lyon - Day 3

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.

What goes around, comes around

A thousand years ago, Viking raiders poured out of the frozen North to terrify and oppress my poor Celtic ancestors. But now it's our turn! That's right: once again, I'm returning to Oslo to spread mayhem, fear, and Perl (and not necessarily in that order!)

On Monday 24 March, I'm running a public class on behalf of Oslo.pm at Redpill-Linpro. I'll be teaching my Perl Masterclass, exploring advanced programming techniques for more experienced Perl programmers. I'm really pleased, because I don't often get the chance to offer my top-shelf class to the general public. We still have seats left, and you can sign up today.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.