Well since I was in Olten anyway for the SWP I might as well take in the Perl6 workshop. I initialy signed up to do some install testing on windows 64 which according to the many rumors I have herd it would be a nightmare wrapped up in a nice bow.
So after arriving a little later than expected and seeing the good old familiar faces I grabbed a seat and began to play.
The first stop was getting started page on Perl6.org and within a few mins of poking about I found the Rakudo page followed the link there to the MSI page clicked the button and bingo-bango-bongo of and ready with Perl6.
Well so much for Perl6 being hard to install.
Well next I tackled a few simple scripts the normal 'hello world' type scripts and a few other ones and of course this gets very boring very quickly unless your idea of a good time is trying our regex but that is more like my nightmare.
I've uploaded some more slides, this time from my YAPC::NA masterclass, on how to prepare for and survive a technical interview. They are somewhat Perl-related, but most of the content should be as applicable for non-Perl interviews too.
Cluster SSH, or its OSX incarnation CsshX are great tool to quickly connect to a collection of machines and issue interactive commands in parallel. You just configure them with a collection of machines called 'clusters', set your .ssh/config correctly for all those boxes and voila, you are now in the matrix.
The problem arise when you run your stuff on Amazon's AWS on EC2 dynamic instances. It's impossible to know at a given time which instances are effectively running, and it makes your cssh (or CsshX) configuration useless.
The good news is, Amazon provides an API to access and manage EC2 instances. The even better new is there's a Perl package to access that programmatically. So..
Lets put EC2 API Access and Cluster SSH together: ec2-cssh
Calling for all talks! The Pittsburgh Perl Workshop has already received some great talks - and we're looking for a few more! Having already confirmed that Larry Wall will be attending this year's workshop to discuss the release of Perl 6 - the organizers are looking to include two tracks of great talks!
Talk submissions will continue to be accepted through Friday, August 28th. Visit pghpw.org/ppw2015 for more details and to submit your talk!
PPW will be held in downtown Pittsburgh on October 9–11 2015.
Only seven days left (and six to the start of the Perl 6 Hackathon).
Now, we need you, even in case your are not attending.
Larry Wall will answer your questions in a Q&A session on Friday at 10:50 hrs CEST.
Please ask everything you ever wanted to know about Perl and the "Perl universe" and send your questions to spw@perl-workshop.ch or add your comments to this blog post.
SWAT is simple DSL to create a smoke tests for any web application in easy and fast way. Recently I have created some tests for well known perl web framework Dancer. This tests might be used by Dancer developers as simple smoke tests suite could be run at any CI platform.
So I was looking for a script to convert that had a regex, to play with some of the new regex stuff. I picked one that I thought was laughably simple and small, and I'm glad I did, because it still took a while to convert.
I presented this talk last night at Sydney PM to a crowd of 12 enthusiastic mongers. Thanks to Catalyst-IT for hosting us, and for shouting free pizza and drinks!
We got stuck for a while explaining to people what mix-ins and roles are... thankfully this is a slide pack so you dont have to endure the endless attempts to find useful metaphors. Also my typo of Role::Tony seemed to endlessly amuse, so I have left that in place.
Probably, the first Perl blog post that I read this year — or even the first thing I read this year ;) — was "Managing SQL Data with Yertl" by Doug Bell about a nice ETL freamework that he wrote. The framework comes with a set of command-line tools that let you extract, munge and move data between different SQL databases.
As I was struggling at that time with getting some reports running against an old OLTP database, which I was very reluctant to touch, I thought of writing a tool extract, let's say, the last quarter of data, re-model the schema and move the data to HANA DB, which exposes MDX interface. A simple extract-load task can be easily implemented by chaning two ysql processes:
If you are using File::Slurp, you should possibly reconsider. Basically, there are three reasons to do so;
It is wrong in a lot of cases.
File::Slurp predates IO layers, and as such doesn't take them into account well. A few years ago, after some complaints, an attempt was done to make it handle encodings. This was nothing short of being wrong.
The best known bug in this area is #83126, which means that :encoding() layers are always interpreted as :utf8. This not only means that UTF-8 encoded text is not validated (which can be a security risk), but also that files in other encodings (such as UTF-16) will be read as UTF-8, which surely will give an incorrect result.
Likewise it's not handling :crlf correctly, in particular explicitly asking for :crlf will always disable it, even on Windows.
Basically, it's doing all binmodes wrong except the one you shouldn't be using anyway (:utf8), and you should pretty much always be using a binmode, so there's no way to win really.
The organisers of the Swiss Perl Workshop would like to inform you that they are freeing some hotel rooms by tomorrow, Wednesday 19 August, 18 CET.
The rooms are in the hotels Amaris and Oltnerhof, both within 5 minutes on foot from the venue.
Reservations were made for the duration of the workshop, Perl 6 hackathon included (Wednesday 26 August - Sunday 30 August)
Today I've finally updated the Perlito compiler ChangeLog, this covers a little more than a year of commits.
The most significant update was the new Perlito5-to-Java backend, which is work-in-progress. It covers a lot of ground, but there is a lot more.
There were also some interesting new Perlito5-to-Javascript features, such as regex /e modifier, and file operators support in nodejs.
The Perl6 backends have not been updated, but things still work.
While reviewing the README-perlito6 file, I've found some interesting stuff that I haven't touched in a while - here is a piece of generated code that goes through 3 different languages:
Perl hackers have now, as of today the 16th August 2015,
been uploading Perl modules onto CPAN
via PAUSE
for 20 years.
Andreas König, who did that first upload, is still releasing to CPAN,
and as I write this his most recent upload
is the same module that was first released to CPAN.
Can you believe CPAN has been around for 20 years today? Two decades is a long time! Yet, I cannot imagine my workday without it.
My contributions to the CPAN Day celebration:
Helios 2.83 is a minor release of the Helios distributed job processing framework. It contains official SQLite support for the first time, better schema DDL for Oracle databases, and some cleanup of some files with mixed-format line endings.
Helios::Logger::HiRes 1.00 is the first stable release of a plugin module
providing enhanced logging features to the Helios framework, including
sub-second timestamp precision (provided by Perl's Time::HiRes) and a
command line log searching tool.
Thank you to everyone who contributes to CPAN, both package contributors and those that maintain CPAN itself. Happy CPAN Day everyone!
Let's say you have a glob pattern with shell-style wildcards from a config file or user input, where ? matches any character and * matches any string (0 or more characters). You want to convert it to a regex, maybe because you just want to match it (and Perl already supports regexes) or because you want to embed it as part of a bigger regex.
You might start with a naive replacement:
s/\?/./g; # ? -> .
s/\*/.*/g; # * -> .*
Unfortunately this is broken: It leaves all other characters untouched, including those that have a special meaning in regexes, such as (, +, |, etc.
If you've got one or more distributions on CPAN,
then on CPAN Day you could go through them and see if there are
any ideas you've had which aren't listed in the issue tracker
(typically RT or github issues).
If you don't have any distributions on CPAN,
then you could go through the modules that you regularly use
and see if there are any issues you could raise.
I'll expand a bit on what I mean, and why it might be a
good use of your time.
Are you sitting at home thinking "I've got all this free time, I really want to make use of it playing around with bitstrings using pack and unpack" ?
Your search is over! I need your help!
For some time now I have been chipping away at enhancements for Net::DHCP. Recently I have begun adding tests using packet captures from the real world. Naturally this has created a laundry list of possible enhancements including DHCP options which need special attention to make sense of.
That and the tangled web of quirky clients which require dhcp options to be in certain (non-numeric) order - for no logical reason.