So I really like to validate email addresses using Email::Valid. But yesterday, I got a bug report. Some system was sending emails to another system with addresses containing a space right after the @. That other system was totally unable to deal with those.
"But I do email address validation" I thought. "Not just with a stupid regular expression like .+\@.+, but with Email::Valid". So I added a test to our suite and sure enough, that new test failed.
Lesson learned: Read the documentation of the modules you use.
Just to give people an update on where I am after the spill and subsequent events at YAPC:
First of all, I need *AGAIN* to give my thanks to:
@Amal1a_ (Amalia) (and everyone else at Evozon for supporting me)
@renatolrr - (Renato) YAPC Coordinator, gofer and frequent bedside supporter during the last 3 weeks of hell
@Makova65 - (Manu) Another bedside confidante and inadvertent Andalusian Spanish tutor
@jjmerelo - (JJ Merelo) Another coordinator, gofer and @YEF director, I think.
And those that I can't find on Twitter - Maribel, Victor, Pablo, Paloma and Jose. Pretty much everyone responsible for YAPC::EU 2015, probably.
I can't thank you enough, you made my last 3 weeks bearable, I'm not sure what I would've done if I were just staring at off-yellow hospital walls for 3 weeks. I *SHALL* return to Granada, and Manu, I *will* take you up on your offer.
[This is the first post in a new, probably long-ass, series. I do not promise that the next post in the series will be next week. Just that I will eventually finish it, someday. Unless I get hit by a bus.]
The topic arose at $work recently: what do the cool kids use for dates these days? Our sysadmin was looking for a simple way to get “tomorrow.” Of course, the cool kids are theoretically using DateTime, right? So, how do we get “tomorrow” out of DateTime? The answer came back in our chat room:
Datetime->now->add(days=>1)
Well, okay ... that would work. But it’s not exactly what I’d call “easy.”
We immediately reached our minimum of $1,701; now our goal is to reach $20K in the next 9 days. We can do it... WITH YOUR HELP!
STEP 1: Make a generous pledge.
STEP 2: Get your friends to match your pledge.
STEP 3: Get your boss to double your pledge.
STEP 4: Go back and increase your pledge.
STEP 5: PERL WILL BE THE FASTEST LANGUAGE EVER.
Thanks so much for your continued support of RPerl!
I just tried to add perl 5.22 to the list of perl I run my tests on, but it seem Travis-CI does not support perl 5.22 yet.
This reminded me that it would be nice if I could configure Travis-CI to use a flag such as 'latest_production' that will always use the latest version of perl available in Travis-CI so when the finally add 5.22 the "latest_production" will automatically pick up that version.
It would be also great to have 'blead' that would use blead perl for testing.
I've been working on a Bayesian spam filter, but it keeps running out of memory, so I moved to something else for a while. The new concurrency stuff looks really interesting, but I don't understand it well yet. As a project, I came up with the idea of a password cracker, which would check a crypt-style hash against a word list. (This probably isn't a CPU-intensive enough task to be worth threading, but it was simple.) Here's the code, with details below:
To be fair, Martin Fowler's explanation (as usual) of fluent interfaces does a much better job of explaining them, but a key point is that setters have a return value. For many fluent interfaces, the setters set a value and actually return a new instance of a different object for you to call methods on. Thus, the examples in Wikipedia don't always meet the criteria of a fluent interface, but I added a Perl 6 version that closely modeled the PHP version (but more concisely, and with much better type safety). I sidestepped the entire fluent interface debate.
The
Perl Maven
site was just recently updated to use
Bootstrap 3
(I know, just in time before version 4 is released.) and it got some new navigation tools:
The language links were moved to the right-hand side.
Articles that belong to any of the series linked from the front page show a Prev and a Next button.
On the left-hand side they will show the list of all the articles that belong to this series.
The name cperl stands for a perl with classes, types, compiler support, or just a company-friendly perl, but currently it's only a better 5.22 based variant without classes.
Currently it is about 1.5x faster than perl5.22 overall, >2x faster then 5.14 and uses the least amount of memory measured since 5.6, i.e. less than 5.10 and 5.6.2, which were the previous leaders. While perl5.22 uses the most memory yet measured.
So my last couple of posts have brought up some grousing from people who do not like PSGI in Perl 5. I am sorry to say that some of this grousing against P6SGI has made some assumptions based on PSGI and not based on P6SGI. I am now going to try to dispel some of these myths.
In the last week, as a result of YAPC::EU::2015, the main website for the `Portuguese Perl Mongers' (a free translation of the association name) has been rewritten by Nuno "smash" Carvalho, in Perl 6, to generate (static) web content. It still has its perks, but it mostly working.
In order to not be just waiting for Nuno's work, I've been writing some articles on Perl 5 and Perl 6 (in Portuguese, sorry folks). Any way, I invite you to go and peek there. Mostly if you can understand Portuguese (I think half the population would know Portuguese or Spanish, so, it might be enough) you can understand these small posts.