My third day at the Perl Toolchain Summit was primarily spent in trying
to make the cpancover server and infrastructure into more of a production-ready
system and less of a Devel::Cover playground. The first step in this direction
was supposed to be easy - I made a login for the metacpan group with the idea
that they could regularly rsync the coverage results for backup purposes.
Unfortunately, this lead me down a yak shaving path I wasn't planning on
travelling until later.
When setting up cpancover, I decided to take the easy option and chuck all the
results into a single directory. I made the filesystem ext4 so I wouldn't have
to worry about hitting limits. Unfortunately, the metacpan box doing the rsync
is set up on ext3 and won't support more that 32k subdirectories. So I need to
fix up the way that results are stored. I knew this would come sooner or
later, even if only because I would surely one day get sufficiently tired of
typing ls and immediately regretting it.
This post is to introduce another BNF, namely MarpaX::ESLIF - as the name suggests, it is largely inspired by Marpa::R2's BNF, and aim to extend the later.
externalized data reader in a streaming compatible architecture
unlimited number of sub-grammars
Although it looks like Marpa's BNF, it is not fully backward compatible with it! I invite readers to read the Introduction, that is covering the architecture and the main features, as well as its BNF.
The inner implementation is an XS proxy to a complete C library built on top of Marpa::R2's core engine, namely c-marpaESLIF.
This could have never exist without remarkable Marpa library, copyrighted by Jeffrey, that I applaud here for his fantastic work that deserve a wide audience IMHO.
I'm shortly going to drive back to Switzerland after attending the Perl Toolchain Summit in Lyon. I was mostly here on photo duties, but between taking photos did manage to file a bug against Time::HiRes, which seems to be down to some unexpected behaviour in File::Spec::Unix after testing the RC of 5.26 against our stack.
I also managed to provide a little help to the metacpan developers by getting to the bottom of an issue upgrading the VM for use with vagrant. As usual it was down to "I updated vagrant/virtualbox and it broke" kind of regressions. I'd already spent the last week upgrading our vagrant build scripts at work, so this turned out to be fresh in my mind and therefore reasonably straightforward. You can now build the up to date metacpan dev environment in a few minutes, win!
Well today did start out well and I began work on expanding Driver::DBI a little when I just wanted to check to see if that DBD::DBM driver of mine could do a little more that what I played with in '10_crud_basic.t' and I go it to take this SQL;
SELECT username as name,address, addresses.street FROM users join addresses on users.address = addresses.id
after adding in the 'addresses' table and a few rows. I thought that was a little odd as DBD::DBM is suppose to use DBI::SQL::Nano so to figure out what SHQ driver I was using I added this into some of code;
Note that you don't need to compile a Java file. Perlito5 now compiles the Perl code to JVM bytecode in memory and executes it. Also eval-string is executed as JVM bytecode - there is no interpreter.
Perlito5 is an implementation of the Perl5 language. It is work-in-progress. It provides an impressive coverage of Perl features, but it will not run most existing Perl programs due to platform differences.
We're currently at the Perl Toolchain Summit in Lyon, working hard on improving MetaCPAN. One feature which we went live with yesterday is a view on CPAN module permissions. This means that you can now easily see which modules any CPAN author has permission to upload.
My first day at the Perl Toolchain Summit (PTS) was largely spent coding, or
dealing with pull requests, tickets, and releasing. The second day had far
less of that sort of stuff, and a lot more of the sort of stuff that it's much
harder to do away from the summit.
But it started off with a new pull request from Todd Rinaldo resurrecting a
closed RT ticket. There is a whole class of problems Devel::Cover has to deal
with which stem from the program being exercised changing the environment as it
runs. The most obvious, perhaps, is changing directory, which is also
something I looked at again yesterday. But this time it has to do with
dropping permissions during the run. Todd and I had a discussion about it and,
with the principles in place we'll deal with the technical matters in the
coming days.
The Perl Toolchain Summit (PTS) started yesterday (Thursday 11th May) in Lyon, France. 35 dedicated toolchain developers have assembled for four days of intensive discussions and co-working. Not only does a lot get done in these four days, but we send everyone home with longer todo lists, fired up to keep working on them.
The developers come from around the world, and we're only available to do this with the generous support of all of our sponsors. You've seen individual posts for our Platinum and Gold sponsors, but in this post we'd like to tell you about our other sponsors. If you get the chance, please thank them: all Perl developers benefit from this summit.
So just a quick re-factoring post-ette now that I have the basic CRUD working.
This line of code
my $field = $self->get_element_by_name(sub {$_->name eq $key});
was bugging me a little. You really have to have to be a fairly experienced Perl programmer before this type of call is second nature, or you have to be a real fan of List::Util to have this sort of call in you bag of tricks. So I think I will tone the level of this one down a little.
This means going back into Database::Accessor yet again and this time I will change only Database::Accessor::Roles::Common by first doing this;
In Glob Matching Can Be Simple And Fast Too Russ Cox benchmarked several glob implementations by matching the string a100 against the pattern (a*)nb. (Here exponentiation refers to string repetition, as in 'a' x 100 matched against ('a*' x $n) . 'b' in Perl syntax.) What he found was that some implementations returned results instantly whereas others got extremely slow as soon as n grew past 5, taking seconds, minutes and even hours to finish.
This problem is caused by excessive backtracking. It's possible to implement globbing without nested backtracking (and the linked article explains a simple algorithm to do so), but a naive recursive implementation will suffer from this issue. It affects some shells, FTP servers, and programming languages, including Perl: File::Glob uses code from BSD libc (which is affected, unlike glibc). A patch was written and the next File::Glob release will include a fixed algorithm.
During our first day at the Perl Toolchain Summit (PTS-2017), Aaron Crane and I just released Ref::Util 0.200 and Ref::Util::XS, which constitute the next planned major release of Ref::Util. Yup, it now has Pure-Perl and optional XS. Read on.
This year the Perl QA Hackathon has been rebranded as the Perl Toolchain Summit
on the advice of the marketing team. This is the tenth year that the event has
been held and, after missing the first few due to scheduling conflicts with my
(then young) children's birthdays, I suppose I have now become something of a
regular. This year the event is being held in sunny^W rainy Lyon - a shortish
train and car (thanks Lee) ride for me.
The Perl Toolchain Summit (hereafter PTS) has become the most important Perl
event of the year for me. It's a chance to get together in one room (two
actually) as many of the people as possible who work on the Perl
infrastructure. This is not the perl core, but the entire toolchain that fits
around the core - primarily focussed on CPAN, the archive of Perl modules.
CPAN was one of the first such archives, and the infrastructure around it -
especially with regard to CPAN Testers and the MetaCPAN architecture, is
generally regarded as without peer.
It if put the 'D' in CRUD day here at the Moose-pen.
So yeaterday I fininsed off Retreive/Select after I pulled a few hairs out trying to debug and issues that was not there I thouhg today I wiyld finish of my CRUD subs by doing the _delete sub today.
At least this is the most simple of all four functions as there is not need to iterate over fields or contrainers so the code is just;
In this article I'm going to show you how to specify dependencies for your CPAN distributions: the other Perl and CPAN modules that your distribution relies on. This is the fourth article in a series. The first article gave a general introduction to distribution metadata. The second article introduced the five phases for which dependencies, or prerequisites, can be specified. The third article presented the types, or relationships, that can be specified for each dependency.
This article is brought to you by cPanel, Inc., a Gold sponsor for the Perl Toolchain Summit. cPanel are a well-known user and supporter of Perl, and we're very grateful for their support. More about cPanel at the end of this article.
In April, Google announced that Google Chrome was finally supporting
headless mode,
at least on Linux and Mac OS. Back then, I noted to myself that
this might be a good time to revisit my rough prototype of
WWW::Mechanize::Chrome. According to Git, I had written a first
prototype of it in 2010 which used the old, raw socket protocol. But
time has progressed and the protocol now uses Websockets. My original
approach used AnyEvent, so I quickly replaced my own approach using
AnyEvent::WebSocket::Client, and the HTTP parts with Future::HTTP.