Welcome to Perl 5 Porters Weekly, a summary of the email traffic on the perl-5-porters email list. Sorry I'm running a bit behind this week; there was really a tremendous volume of email this week, mostly about Ricardo's changes to smartmatch and the given/when syntax. Since that's the case, I'm going to put all of the non-smartmatch mail first, and a good sampling of the discussion around smartmatch at the end.
The other day I was working on a library which needed to have a small list of dependencies and guaranteed to run on Perl versions 5.10 and above. In order to keep the dependencies minimal I decided to code a singleton() method like this:
sub instance {
my $class = shift;
state $self = $class->new(@_);
return $self;
}
Just to get me right. This is not a complain to Moo*X::Singleton modules. The snippet above is very primitive, does not provide a separate initialization and has no way of clearing an instance. But sometimes this simplicity might do its job.
[ blogs.perl.org has been a wonderful home, but I have finally given in to the lure of static blogging. This is cross-posted from
the new home of the Ocean of Awareness blog. ]
Marpa::R2
is now beta.
Marpa is a new parsing algorithm,
based on decades of prior art.
It is a practical and efficient solution
targeted at all parsing problems that are too
complex for regular expressions.
This is a pretty simple idea - a boss thread assigns work to a pool of worker threads who do nothing until some work enters their queue. This way the boss can fill a queue very quickly and you have multiple back end processes that can consume that queue.
I'm using threading and not an async thing because some of the work I'll be assigning to threads are long-polling operations. The workers will hit some REST API route on some other application, and some of those routes take up to 30 seconds to complete or have dependencies or followup work. Rather than block and spin in an async call, for my tasks, its easier to have a queue of work and workers that execute them.
There are no dates for the YAPC::Europe 2013 announced yet but assuming a year contains 52 weeks and the conference is planned to happen in August, let's roughly estimate there are about 50 weeks before the conference. We'll just hot fix the numbering as soon as the dates are known.
So what's new about the conference. Believe me or not, we are not sitting and waiting for the end of June to start doing conference preparations :-) We've got intensive discussions in the mailing list to set up the roles among the organisers, launched internal wiki pages and made a brief research of some minor details.
In the following few weeks we will closely look at every of our seven venues that we have in mind. Just to list them:
Barring some sort of formal definitions, the C code determines the
language (pretty much what happened to trigger this whole thread)
rather than the language determining the parser, and that just seems
wrong.
WRT Perl 5, I’m afraid that horse is not only out of the barn, but has
wandered off the ranch, joined a wild herd, and sired several foals.
I (raiph) have switched to selected highlights rather than an exhaustive summary and changed some other things. I'd appreciate comments from both #perl6 regulars and those who are just reading these reports saying whether or not these changes are an improvement over last week's report. (Alternatively gmail raiph.mellor.)
diakopter said "should Perl 6 encode to NFD on I/O output? or leave in NFC + exploded NFG appendices?" which led to dialog about encodings and pragmas.
I have already made some progress with the grant (and this post is part
of it), and sent a log for Alan Haggai to post as a grant update.
That put aside, I'd now like to publicise some of the new distributions
I have uploaded to CPAN, as I had some ideas for new ones, and am also
contemplating making enough uploads to have 100 CPAN distributions or more:
I've been lurking here for months - there are some serious experts that blog here, along with a few absolute newbies. I figured my experience level didn't matter. I could have blogged elsewhere too....But...
I'll admit that part of the reason I chose to write my blog here is due to the recent amount of posts I've seen over Sexual Harrassment and what it means to be a Member of a Community that has standards. The more voices in a community speak out, the more the community *is* those voices.
I won't post anything else about it - this isn't 'my community' in that I don't attend conferences, I don't go to meet ups or anything like this, I have a Perl Monks account but never log (every question I need to ask has already been asked!) I guess I'm making it my community by actively voicing my concern and opinion, and it would be nice to talk about perl problems with people who actually know perl!
I’ve uploaded a new version of the GreaseMonkey script I introduced in my last entry (to let you use search.cpan.org for searching but with links to MetaCPAN in the search results).
This version is updated for GreaseMonkey 1.0, and also includes a small link at the top right of a search results page which links to the same search on MetaCPAN:
var query = document.querySelector('input[type=text]').value;
if (query) {
document.querySelector('.t4 small').insertAdjacentHTML('beforeend',' <a id="goto-metacpan">→ MetaCPAN</a>');
var link = document.getElementById('goto-metacpan');
var href = 'https://metacpan.org/search?q=' + encodeURIComponent(query);
link.href = href.replace(/%20/g,'+');
link.style.setProperty('float','right');
link.style.setProperty('padding-right','.4em');
link.style.setProperty('color','inherit');
}
Hi everyone. It has been about 13 years since I last used Perl CGI. Recently, though, I was going through my old books and found an old Osborne Perl Reference guide and thought "Hey! I would mind having a brush up with Perl". Like the market place, I moved from Perl CGI to Classic ASP and then to .Net. One has to earn a living doesn't one? But I used to enjoy Perl. Thing is, I have just configured IIS 7 on a Windows 7 machine (running 32 bit version of Active Perl) and I am getting odd behaviour. I can open my browser, type in my local host website url (http://localhost/MyWebsite/Something.pl) and the request is picked up by the web server and returned. Problem is the the browser things its a download, prompts me to Run or Save. If I select Run it runs the script in a command window. This happens in all browsers so it must be an IIS issue. I have been through everything in IIS laboriously one setting at a time but can't see why this is happening. Does any of y'all have any idea why this might be happening? Cheers. Ray.
The day at the venue began at 7 a.m. and it was already very hot at that time. We did the final preparations at the registration desk and we made coffee. Then a lot of stuff was delivered: water, apple spritzer. We opened the doors at 9:30 a.m. and about 350 people came to the registration desk. They all get their name badges, their wifi credentials and a conference bag (thanks to Webfusion to sponsor the bags!) with the proceedings.
All people had to sign for the wifi credentials so the people had to wait in a queue a few minutes... But I think it worked quite well, because we started only 5 minutes late. At 10:35 Max opened YAPC::Europe 2012. After the opening session the host of next years' YAPC::Europe was announced: Kiev. Congratulations to the Kiev guys. We really look forward to next year!
There had been severalpostsrecentlyaboutdisgusting sexist idiotic behavior on PerlMonks. Most people know my opinion on these issues very well, but I don't think that's good enough. I think we need to actually bring it up and discuss it. I want to thank all the people who wrote about it and specifically Joe McMahon who both spoke of it on blogs.perl.org and on Perlmonks here. No, this is not to be taken lightly. And no, I will not shut up about this. And yes, my post is probably gonna be long. I'm sorry, but I need to put it out there.
I use perl, at home, at work, and I've been using it for over a decade. I recently switched job titles and had to relearn The Web outside of the old CGI forms that I used to know back in the crusty old days of web 1.0.
Handrolled mysql connections and 50k lines of code aren't good practice anymore - not that they ever were, but it was at least accepted and common practice. I've started using MongoDB as well, and its collection of documents metaphor makes a lot of sense when you can pair JSON and perl data types so easily.
Yeah, another emotional bla and even lengthy - but might be insightful and its not tiring, promise.
Yesterday listened to Schwerns talk on youtube and it triggered some memories of things I wanted talk about over and over again but mostly kept quit. I mean my talk about Perl articles in Wikipedia some years ago that was largely motivated by the dysfunctional community there and how prevent this in Perl realm - but the actual talk was mainly about Perl, presenting Perl, writing wiki texts and how to get along inside Wikipedia.
I feel as a part of the community. I feel welcome in most forums, irc channels, conferences, perl monger meetings.
Sometimes I see or hear things that make me and others feel a bit uncomfortable.
This has been discussed also here and here.
Let me make one thing clear: I wouldn't use the term "offended" here. Offense is something more personal for me. Maybe it's just a linguistic thing. I can't be offended by such a comic, and I won't be shocked and start to cry or anything. Feeling uncomfortable is the best I can describe it as a non native english speaker.
Creating your own language has been A Big Deal (tm).
What if you could create a simple language in hours or minutes?
There's been a serious obstacle up to now.
No practical parser "just parsed" BNF.
With
Marpa,
that restriction is lifted.
In this post, I will describe
a small, sample
Marpa
domain-specific language (DSL).
In designing it I am inspired by
Mark Dominus's description
of the
"Worse is Better" philosophy,
and its implementation in the form of
Blosxom.
This DSL is feature-poor,
but short, simple and extensible.
I've been working on a project for a client that is being hosted on dotCloud. And as part of the process I have spent a good deal of time familiarizing myself with this PaaS provider. My experiences thus far have been quite positive. I've found dotCloud to be highly receptive to working with Perl developers, and they seem to value building a relationship with the Perl community.
A few weeks ago I gave a presentation to Thousand Oaks Perl Mongers, and last night another presentation to Los Angeles Perl Mongers discussing using dotCloud with Perl. There were a few simple examples based on Mojolicious.
The Libre Office Impress slides along with a working example are on Github. Another working example, the Perl Regex Tester also has a public Github repo.
The presentation's slides (which were reviewed by dotCloud for accuracy) are viewable on slideshare.
It always starts out as something simple and innocent and then the Internet ruins it.
So I am giving a data mining talk at Ohio LinuxFest 2012 and surprise, surprise there is going to be a nice helping of Perl. So I am on the internet doing research looking for some simple scrapers and collectors to mention in my talk. I always prefer to give multiple examples for any problem since programming does not have a one size fits all model. To make a long story short I found a bunch of different social media scapers. The problem I found with most of them was the same. Things like this Ruby example:
another Ruby example (the comment is from the original source):
The Python ones I found were a little more deceptive. Here is what I found on the surface:
So I see BeautifulSoup included and I am thinking that must be like HTML::Parser right? Wrong. Instead I find these: