London Perl Workshop: Platinum Sponsor Booking.com

The London Perl Workshop was on Saturday, and it was awesome! If you missed it, or you'd like to reminisce, our Twitter feed has pictures through out the day. Hopefully there will be some write ups posted soon.

As well as getting the talk videos live and actioning your feedback (please fill in your survey, it really helps!) we want to say a massive thank you to everyone who made the day such a success. The attendees, the speakers, the venue and our sponsors - without any one of you it wouldn't have been the same, and in particular we'd like to thank our Platinum Sponsor Booking.com for their support.

Booking.com is a large Perl shop with some of the greatest developers and as a company they sponsor almost all Perl events around the globe to support the Perl community.

Perl Weekly Challenge 030: Sunday Christmas and Series with sum 12

Sunday Christmas

Write a script to list dates for Sunday Christmas between 2019 and 2100. For example, 25 Dec 2022 is Sunday.

I used the core module Time::Piece to check the dates.

It’s easy to create a string representing Christmas: just concatenate the year with '-12-25'. The module’s strptime method can be used to create an object if we provide a format of the input string, in this case it’s '%Y-%m-%d'. The object’s method day_of_week now tells us what day the object represents, 0 corresponds to Sunday, which is the day we’re interested in.

Get your 36c3 ticket NOW!

Unten in Deutsch. (German version below.)

It’s that time of the year again! The 36th Chaos Communication Congress (36c3) is coming to Leipzig in Germany. From December 27 to December 30 my hometown will hold the yearly convention of the Chaos Communication Club. It’s the largest hacker conference in Europe and also covers topics like politics, science, making and art.

Vouchers for receiving a ticket through any CCC-related community are being distributed right now. Reach out immediately to your nearest CCC Erfa, hackerspace or similar community to get a ticket smoothly! For the more adventurous there will be public presales on November 8, November 10, November 21. Although the queuing system is sophisticated these are usually sold out in seconds.

Paws XII (High Noon Dog)

In my last post I was just getting the last parts of my new 'Satus' attribute in place having only one more part to create and that is a new 'trait' in '/lib/Paws/API.pm'

I was thinking af starting by coping the present package;


package Paws::API::Attribute::Trait::NameInRequest;
  use Moose::Role;
  use Moose::Util;
  Moose::Util::meta_attribute_alias('NameInRequest');
  has request_name => (is => 'ro', isa => 'Str');

and just changing the 'Request' for 'Response'. However looking at the role I see it is also adding a 'request_name' attribute, which I do not need, this trait is used very specially in the code the name of AWS call.

London Perl Workshop: Gold Sponsor Eligo

The London Perl Workshop is today! If you can make it, hopefully you have already planned your journey there - please remember we're at a new venue this year. If you're thinking about your journey home, after the event we are going for after drinks, with food provided by our sponsors at the Running Horse in Aldgate. We'd like to thank our last gold sponsor Eligo for their continued support of London Perl events.

Eligo are a niche boutique recruitment consultancy with a team of dedicated Perl Consultants. We live and breathe our markets. In fact we like to think we are as passionate about the sector as those who work within it. If you want proof of it stop by and meet Rick Deller one of our Senior Perl Consultants at LPW today.

Why forward compatibility is important when trying to add a new grammar to Perl

There is a lot of discussion about adding a new grammar to Perl.

Most of the time, because the issues are not shared, my opinion is a minority in that place.

When you try to add a new grammar to Perl, it is goot to think why forward compatibility is important.

What is forward compatibility?

you've heard of the term backward compatibility, but many people don't yet hear the term forward compatibility.

Forward compatibility means that new features in Perl are compatible with older versions of Perl.

This means that forward-compatible features can work with the latest grammar with the help of modules, even if the Perl is the old Perl 5.8.7.

If the new grammar has forward compatibility, you can use the grammar in the most CPAN module

I have subroutine signature 2019 In the article, I wrote about forward compatibility.

Change offers amazing opportunites

The Camelia mascot of the language now known as Raku is a brightly coloured metaphor for the transition from Perl 6 to it's new identity. My hope is that having emerged from it's cocoon, Raku will flap it's wings and fly skyward, boldy seeking new adventures.

I congratulate the team for making this decision, specifically Elizabeth Mattijsen for being so bold as to propose the change request that triggered the end game. No doubt other people where involved that I am not familiar with, they deserve generous praise and recognition too.

My personal involvement in Raku/Perl6 is literally zero. So I make this post as a person for whom Perl 5 continues to be a delight for personal projects, and sadly declining professionally.

Reading through the public comments there are a lot of strong feelings - some of them hurt feelings. Humans are fundamentally emotional creatures, and the grief associated with strong disappointment follows the same path to acceptance no matter how rational a person fancies themselves.

Paws XI - III (back we go)

I finally had a response to my question from this post about adding a new attribute '_status' to the auto-generated classes that Paws creates;

I'd try to avoid leaking HTTP details to the user by default. It's true that for this API call the HTTP Status is relevant to the caller, so exposing it seems legit. I'd try to limit the scope of exposing the HTTP return status by adding an attribute role like https://github.com/pplu/aws-sdk-perl/blob/master/lib/Paws/API.pm#L1 that signal the response to object routines to copy the HTTP Status over to an attribute.

Ok now to translate that to something that the non-Paw dev can understand.

Don't do that! It is not a good idea to expose too much of the response from AWS. However, this is a legitimate use case so an 'attribute role' to expose the status.

Perlyglot

Our small team really enjoys organizing the mostly-annual DC-Baltimore Perl Workshop, and we're working on it again for 2020 (NOTE: CFP IS OPEN!!! http://bit.ly/dcbpw2020-cfp). We get a lot out of it, both technically and socially.

One aspect of the joy comes embracing ALL sorts of technology, from Arduinos to rockets, from compilers to web apps. So with the recent update in the Perl-Family languages of Perl 6 → Raku ... we took this as a fun time to update our own name!

We shall be henceforth known as the DC-Baltimore Perlyglot Workshop! Coming to you live on April 18-19 at Johns Hopkins University, just north of Baltimore, MD. I sure hope you'll join us :)

Be there or be :onion:!

Cor - A proposal for core Perl OO

I've been working with Sawyer X and Stevan Little to try to bring OO into the Perl core. Most of this work is based on Stevan's work, with me trying to add a final "polish" layer to make it clean and still feel like Perl.

It's being called "Cor" to distinguish it from current OO systems.

This is an example:

You can read the full description of Cor here.

Feel free to comment on the proposal here or on the gist.

Perl Weekly Challenge 30: Sunday Christmas and Triplets

These are some answers to the Week 30 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Spoiler Alert: This weekly challenge deadline is due in a few days from now (October 20, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.

Challenge # 1: Sunday Christmas

Write a script to list dates for Sunday Christmas between 2019 and 2100. For example, 25 Dec 2022 is Sunday.

Christmas on Sunday in Perl 5

I'll be using the Time::Local core module which provides reciprocal functions of the gmtime and localtime built-in functions.

Perl Weekly Challenge 029: Brace expansion and calling a C function

Brace expansion

Write a script to demonstrate brace expansion. For example, the script would take the command line argument Perl {Daily,Weekly,Monthly,Yearly} Challenge and should expand it and print like below:
Perl Daily Challenge
Perl Weekly Challenge
Perl Monthly Challenge
Perl Yearly Challenge

You’ve probably heard about the glob function. It can expand wildcards like * or ?, so you e.g. can easily check what files correspond to p*.p?. But glob can do one more thing for us: brace expansion.

SPVM Example - sum even numbers with precompiling.

I released SPVM 0.0441 today.

Sum even numbers with precompiling

SPVM is Static Perl Virtual Machine. I write an example to sum even numbers with precompiling.

Using precompiling, the source code is output to C source code and it is compiled to machine code. This performance is same as C language in add operation! You are surprised.

use strict;
use warnings;

use FindBin;
use lib "$FindBin::Bin/lib";

use SPVM 'Even';

my $nums = [1, 3, 6, 8, 14];

my $even_sum = Even->even_sum($nums);

print "$even_sum\n";

Data Science and Perl

Our company goes into many other companies and helps them build new Perl systems or fix old ones. Needless to say, we see how many companies work and a typical example is one of our clients I'll call "AlphaCorp." They use lots and lots of Perl. Their primary web site is almost entirely Perl. So when I went in to help them with their A/B testing (amongst other things), I was surprised that they also used a lot of Python. It turns out they had a specific need that Python fills and Perl does not: data science.

Because they hired so many Python developers to work in their data science area, they had more and more Python creeping into non-data science areas. Their Python devs didn't do much Perl and vice versa. Thus, while AlphaCorp said they'd rather not split themselves over multiple programming languages, they really had no choice. And that's a problem for Perl's future.

Perl Weekly Challenge 29: Brace Expansion and Calling C Code

These are some answers to the Week 29 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

Challenge # 1: Brace Expansion

Write a script to demonstrate brace expansion. For example, script would take command line argument Perl {Daily,Weekly,Monthly,Yearly} Challenge and should expand it and print like below:

Perl Daily Challenge
Perl Weekly Challenge
Perl Monthly Challenge
Perl Yearly Challenge

The specification is not very detailed, and we will not attempt to provide a full-fledged templating system, as this already exists. So we will limit our implementation to the following: an initial sentence fragment, followed by a single list of options between curly brackets, followed by a final sentence fragment.

Brace Expansion In Perl 5

Whither Stratopan?

Anyone have information on the current and future status of Stratopan?

Still marked a "Beta", the latest perl version is stuck on 5.27.2, the blog.stratopan and cpan.stratopan http sites error, and the https version redirect back to www.

309 ways to do $A++ in Perl

Here is a list of 309 code examples how to increment variable in Perl.

I think that is it very funny, creative and awful at the same time.

As far as I can see, not all code examples are working and not every one is interesting, but some of the solutions are truly magical.

Here is one example created by Maddingue:

#!/usr/bin/perl

eval((map{s/^./\$/,s/ //g;$_}(split"$/",<<'')[-1])[0]);
     A
    A A        +       +
   A   A       +       +
  AAAAAAA   +++++++ +++++++
 A       A     +       +
A         A    +       +;

print $A;

Here is the full list: https://squareperl.com/en/lots-of-ways-to-increment-variable

WIP Rakudo.js Final Grant Update

THIS IS A WIP REPORT - SOME RELEASE ARE BEING MADE ATM


We have a Dart Pad inspired REPL called 6Pad that allows you to play with Rakudo.js without installing it

Rakudo.js has been released on NPM as rakudo

You can get a prebuilt rakudo.js from npm with a single command


npm install rakudo

I have decided not to upload the rakudo.js tarballs to CPAN (while easily doable if anybody actually want to get it from there it seems nobody would benefit from that as it seems getting it from npm will be just more convenient for everyone).

# We pass our chosen subset of roast tests in headless Chrome using puppeteer

We have a repo with a test runner that bundles up the tests using the parcel bundler and passes them to Chrome

Monthly Report - September

What did I do last month? Let me guess, the short answer would be "I was managing Perl Weekly Challenge". Although it sounds so simple, it is tough task, I must admit. Having said that, I really enjoy it. I get to interact with so many great people and learn from their experience. Above all, when I receive "Thank You" message, that takes away all the pain. I simply love the positive vibes I get from each and every member of the community.

I noticed a trend in "Perl Weekly Challenge", members now trying different languages as well. Python is one such where we have had more than one solutions. If you want to know what others are doing, please do check out the blogs. Also please do follow us @PerlWChallenge, so that you don't miss out any announcements. On top of that, members discuss task as well.

Perl Unicode versions

A spell of hacking around with Unicode got me wondering which version of Unicode shipped with which version of Perl. Here's what I came up with:

Perl version Unicode version
5.7.33.1.1
5.8.03.2.0
5.8.14.0.0
5.8.44.0.1
5.8.74.1.0
5.8.95.1.0
5.9.44.1.0
5.9.55.0.0
5.10.15.1.0
5.11.35.2.0
5.13.76.0.0
5.15.86.1.0
5.17.16.2.0
5.19.56.3.0
5.21.17.0.0
5.23.08.0.0
5.25.39.0.0
5.27.210.0.0
5.29.211.0.0
5.29.912.0.0
5.29.1012.1.0

This table is in order by Perl version (obviously), and lists every time the Unicode version changed as Perl version increased. Unicode version does not increase monotonically with Perl version because Unicode 5.1.0 was retrofitted to Perl 5.8.9, which was actually released after 5.10.0.

The Unicode version numbers come from file lib/unicore/version under the top-level directory in each distribution, where it has been since Perl 5.7.3.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.