Drop perl 5.8 support in GitPrep 2.0

I decide to drop the support of perl v5.8 in GitPrep 2.0 today.

This is because I want to use latest Mojlicious, which requires perl 5.10.1+.

and because mojo-legacy project stop at 2014.

https://github.com/jamadam/mojo-legacy

GitPrep have basic authentication bug in CGI access.
This is maybe old Mojolicious bug.

Perl 5.8 user can continue to use GitPrep 1.xx or install newly perl by using perlbrew.

http://perlbrew.pl/

This is a little pain but I believe this decision is good.

Announce: Rakudo Perl 6 compiler, Release #97 (2016.03)

On behalf of the Rakudo development team, I'm very happy to announce the March 2016 release of Rakudo Perl 6 #97. Rakudo is an implementation of Perl 6 on the Moar Virtual Machine[^1].

This release implements the 6.c version of the Perl 6 specifications. It includes bugfixes and optimizations on top of the 2015.12 release of Rakudo, but no new features.

Upcoming releases in 2016 will include new functionality that is not part of the 6.c specification, available with a lexically scoped pragma. Our goal is to insure that anything that is tested as part of the 6.c specification will continue to work unchanged. There may be incremental spec releases this year as well.

The tarball for this release is available from http://rakudo.org/downloads/rakudo/.

Please note: This announcement is not for the Rakudo Star distribution[^2] --- it's announcing a new release of the compiler only. For the latest Rakudo Star release, see http://rakudo.org/downloads/star/.

Perl 6: The Next Node.js, Done Right

If you've been a programmer for more than a couple of years, then you remember when Node.js first appeared. Some folks were raging about how insanely fast their ecosystem was growing, while others confusedly shrugged, wondering why anyone would want to use a language made for scripting browsers for server side work.

I can easily dismiss Node's large ecosystem of reinvented wheels, but the underlying point of why it got popular is valid: the fewer languages you need for an app, the fewer (or less experienced) programmers you have to hire, the cheaper it is to make your app. The self-proclaimed "HTML programmer" who was copy-pasting JS snippets from blogs and forums, now of all a sudden became a full-stack Web developer. But is using a made-for-browsers language for all-purpose work the right approach?

Introduction to Marpa book in progress

My latest blog post is the introduction to my Marpa Book, currently in progress. The book will be a theory monograph, so it's kind of stuffy, but it's a good summary of Marpa's features. It also discusses the implications of these features for applications.

Super Easy SSL Certs for Mojolicious Apps

I’m assuming that by now you’ve probably heard of Let’s Encrypt. If you haven’t, they are a brand new Certificate Authority that issues SSL certificates for free via an automated system!

There has to be a catch right? Well kinda, but it’s a small one. The certificate is only valid for 90 days. They mention two reasons for this in a blog post: to encourage automation and to contain the damage of a compromised cert.

If you need to renew every 90 days, you don’t want to be doing that by hand right? By encouraging automation, they can effectively force you to investigate how to make security easier for yourself over the long term. You may have read the famous Ten Immutable Laws Of Security but the related Ten Immutable Laws of Security Administration tells us in Law #2 that

Security only works if the secure way also happens to be the easy way

Once you have automated your SSL cert generation then the easy way will be the standard way.

PRC 2016 - First Three Months

As last year I was unable to post every month about the Pull Request Challenge assignments, I decided that this year I would try to post updates every three months.

So, for the first month, I got WebInject. The PR was not huge. Just a contribution to add a README file to the distribution. As the author did not want to update the README and the POD, the PR was changed in order to generate the README from the POD. This PR was then merged. Yay, first month complete.

Spek - test oriented web framework

Recently keep playing with TDD and swat I have created a small web framework based on Kelp and swat.

The essential features of this framework named Spek are:

More refactoring adventures

So lucky for me a client decided to pay me to refactor some of their very old code. Refactoring can be fun, but if you have a 20 year old business critical codebase where the team has forgotten or don't know how stuff works and it absolutely has to not break, then you have some challenges and quite a lot of potential for loss of face.

This particular job was to refactor a single large, excessively complex subroutine into something that was testable and that a relatively naive programmer could reason about. And there were no tests.

tl;dr: this blog post is relatively involved, but scroll down to the bottom to see some neat abuse of git as a data analysis assistant.

Stupid perldoc-search trick

Perl's copious documentation is one of the things that keeps me using it. But this is not an unalloyed benefit; actually finding something, unless you have a pretty good idea where to start looking, can be like finding the proverbial needle in a haystack.

Fortunately, we have Joshua ben Jore's perldoc-search, which will find anything you can specify as a regular expression, and that Perl itself can find.

Unfortunately, this can sometimes be a bit too much. I generally have several Perl kits unpacked in my home directory (well, subdirectories of it). Since by default file-find does a File::Find::find on @INC, and since by default @INC contains my current directory, then if I issue a file-find in my home directory, the entire tree gets searched, and every unpacked kit can produce a hit.

It turns out there is a surely-unsupported but nonintrusive way to exclude the current directory from the search. Instead of running perldoc-search directly, run it as

perl -T -S perldoc-search

Regex /m modifier bug in Perl 5.8.8 and older

It’s 2016, but the CPAN Pull Request Challenge continues. Motivated by my 100% in 2015, I subscribed to the second year, as well. Unfortunately, I didn’t have time to blog about my January PR, but it would have been more about Git than Perl, anyway.

My March assignment was Plack::Middleware::ReverseProxyPath. I noticed the module had several testers’ failures, and looking at the matrix I noticed Perl 5.8.8 was all red in both Linux and Darwin, so I decided to have a look at that.

Random contributors are great

One morning I wake up and see a pull request from a person I don't know on a project I haven't touched in years. Yup, it's a random contributor!

German Perl Workshop 2016

The meeting first night was in a large beer bar in the centre of Nuremberg.
We went back to the Best Western to find a certain exPumpkin already resident in the bar.
Despite several of the well named Bitburgers we managed to arrive at the
conference venue on time the following morning. Since my knowledge of German was
limited to a C grade 'O' Level last century my review talks will be mostly
limited to English talks. Apologies in advance to those giving German talks
(not unreasonable considering the country). Hopefully other blog posts will
cover these.

Masak spoke about the dialectic between planning (like physics) and chaos (like
biology) in software development.

http://masak.org/carl/gpw-2016-domain-modeling/talk.pdf

Tobias gave a good beginners guide to Perl 6 in German and I was able to follow
most of the slides since I knew more Perl 6 than German and even learnt a thing
or two.

chat2.pl just got real

20 years ago, I really wanted the chat2.pl domain name, to commemorate the one piece of code I ever contributed to the core. I even wrote the .pl administrators, and got no response.

Well, guess what I have now! chat2.pl!

Behold the wonder that is:

# XXX hardwired $PF_INET, $SOCK_STREAM, 'tcp'

# but who the heck would change these anyway? (:-)

$pf_inet = 2;

$sock_stream = 1;

$tcp_proto = 6;

Why, SystemV, and later Linux, didn't follow BSD numbers, I'll never know, but the comment was prophetic!

swat helpful info added at swatpm.org

Recently to help users understand how to use swat, I have added some useful info at swatpm site :

  • a detailed hello world example

  • a FAQ page answering to some potential questions about swat


PS the information on swatpm will be updated

Perl 5 Porters Mailing List Summary: March 7th-14th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week. Enjoy!

Inside-out loops

This is a silly post. I am going to show you a contrived example of Perl code that is emulating what 8-bit assembler code does to loop through a 16-bit value. Why?

I have an ongoing researching project involving the Atari 2600 Video Console System, which has a MOS 6502 microcontroller at its heart. Assembler is not my native tongue and it helps to unpack these squirrelly bits into Perl to verify my understanding.

In a larger sense, though, seeing other ways to implement common tasks is salutary. If nothing else, you may appreciate how much lift you get from using higher level languages.

Anyway, the code:

ZipRecruiter is sponsoring the QA Hackathon

We're delighted to announce that ZipRecruiter has decided to sponsor this year's QA Hackathon.

ZipRecruiter.com is a website where job seekers can find jobs all over the world, and employers can list their open positions. Not only will those positions be listed on ZipRecruiter.com, they will be pushed to more than one hundred job boards and social networks. Job seekers get free email alerts with postings that are tailor-made for their skill set and location.

It's never too late to find a bug

For the last five years, the version comparison code in Git::Repository started with this:

my ( $r, $v, @o ) = ( shift, ( grep !ref, @_ )[0], grep ref, @_ );

The above line looks clever (that's probably why I wrote it that way in the first place), but it also has a subtle bug.

Son of MacPorts openssl versus Perl

This post is a follow-up to MacPorts openssl versus Perl. That post told of a problem with a recent MacPorts openssl upgrade, and gave a workaround.

The right thing to do, however, is to use the current openssl. That involves finding all Perl modules that use openssl and re-installing them.

To do this, I wrote a small Perl script that traversed @INC looking for binary files. It spawned the file command to determine whether they were Mach-O files. If they were, otool -L was used to determine whether they actually linked to openssl. The script requires Perl 5.10, but uses only core modules. The file and otool commands come with Mac OS X, at least with OS 10.11 El Capitan. The script itself is available as a GitHub gist.

In my case all I found was Net::SSLeay. So I took my MacPorts openssl back to the current version using the same commands detailed in the previous post to do the downgrade, and then did the following in the cpan client:

cpan> test Net::SSLeay
cpan> # to make sure it passes
cpan> force install Net::SSLeay
cpan> # forced because it is already installed

Strawberry Perl 5.22.1.3 + 5.20.3.3 released

Strawberry Perl 5.22.1.3 and 5.20.3.3 are available at http://strawberryperl.com

Both contain security fixes for CVE-2015-8607 + CVE-2015-8608 + CVE-2016-2381 + the latest openssl.

More details in Release Notes:
http://strawberryperl.com/release-notes/5.22.1.3-64bit.html
http://strawberryperl.com/release-notes/5.22.1.3-32bit.html
http://strawberryperl.com/release-notes/5.20.3.3-64bit.html
http://strawberryperl.com/release-notes/5.20.3.3-32bit.html

I would like to thank our sponsor Enlightened Perl Organisation for resources provided to our project.

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.