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.
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.
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
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.
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.
Because one can never have enough Acme modules...
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.
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.
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.
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;
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.
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.
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 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 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!
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.
(The Hebrew text will be followed by an English one).
I've just released Test::Class::Moose version 0.50. The major feature you'll notice are the Test and Tests attributes. They're included to make it easier to migrate from Test::Class.
sub this_is_a_test : Test {
pass 'we have a single test';
}
sub another_test_method : Tests { # like "no_plan"
# a bunch of tests
}
sub yet_another_test_method : Tests(7) { # sets plan to 7 tests
...
}
One thing I ave found when doing a little research for this post was the very large number of perl tutrials out there and how many where well over 10 years old some as old as 15.
Well still stuck here in limited access land so I had a quick look around and found this site
So in about 10 mins of reading I now know where to send anyone who asks me where to go for good tutorials.
There is also a good chance if you want to help out as there is a long list of sites to still look at and I am 108% sure that GABOR would be more than happy for the help.
One thing that really grabbed my attention in this site is it is just not a simple list of tutorials it is a vetted list and it is very well vetted. Just check out the reject page and you will see the reviews really through job at evaluating a site you just say a site is bad you have to prove it.
So what's DOPE? No, not DOPE, DOAP... what's DOAP?
Here's what Wikipedia has to say...
DOAP (Description of a Project) is an RDF Schema and XML vocabulary to describe software projects, in particular free and open source software.
It was created and initially developed by Edd Dumbill to convey semantic information associated with open source software projects.
It is currently used in the Mozilla Foundation's project page and in several other software repositories, notably the Python Package Index.
Dr. Rosenthal's classic "How Few Copies" examines in detail just how few of copies you might need to preserve your digital data. (The context is Lots Of Copies Keep Stuff Safe, which you need to know about if you care about digital preservation.)
If preservation (and backup is part of preservation) is one of your interests, Dr. Rosenthal's blog is just a generally good blog to read.
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.