Minor Issue with Perl 6 Install on CentOS 6

I had a little hiccup while installing Perl 6 on a CentOS system, and thought I'd leave the details here in case it happens to anyone else.

[Update: This has already been fixed by one of the Perl 6 devs, who isn't able to login here to comment. Panda installs without needing lsb_release. So my kludge is no longer needed.]

I used rakudobrew, and installed rakudo with moar just fine. But "rakudobrew build-panda" failed with "Unable to execute 'lsb_release -a 2> /dev/null'". That lsb_release program wasn't installed on this system, but yum said I could get it from the package redhat-lsb-core. Unfortunately, when I tried to install that, it came up with a list of dozens of dependencies to go with it, including a lot of X stuff like ghostscript and libGL, even some sound packages.

Fun with Catalyst and Heroku

For my first experiments with heroku I decided to adapt an existing Catalyst application…

From Sydney PM "EVANGELIZING PERL"

Stuart Cooper gave a talk at this last month's Sydney PM meeting. His talk was "analog" in that he gave it without slides from hand written notes with the purpose of provoking a guided discussion. The outcome was rather successful with people offering thoughts and experiences, along with references to websites and books. It was very productive and enjoyable.

He typed up and published his notes on the Sydney.PM emai llist, which are posted below with hyperlinks added for reference.

EVANGELIZING PERL
Talk by Stuart Cooper for Sydney.pm meeting, July 2015

1) Perl advocacy?
Not advocacy - evangelism - spread the word.
In the early 1990s Linux had some powerful Evangelists;
Linus himself, Jon 'Maddog' Hall etc and even one of the
world's top supermodels - Linux Evangelista.

Your target audience for your evangelism is your Linux-using co-workers.
They might be Ruby guys, DevOps guys, sysadmins, Java programmers,
any group of intelligent Linux users.

P6SGI: Perl 6 Web Service Gateway Interface

So, I have been meaning to start a Perl 6 blog for a couple of months. At that point, though, this site was having issues and I have this perverse desire to write blog software every time I think about blogging and so things got put off for a bit. I am now starting this here and I want to get write off and start with what I think is my most important Perl 6 contribution thus far and one I want to get your feedback on: P6SGI!

For those that need instant gratification, here is a P6SGI application:

    # Perl 6
    sub app(%env) { 
        (200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World!' ]) 
    }

Using Unicode in Emacs for Perl 6

I use vi/vim for quick edits and remote work, but I do most of my programming (and other work) in emacs. To enter Unicode characters in emacs, you run the "insert-char" command, which by default is tied to "C-x 8 [Enter]", then type in the hex code for the character or its name.

Typing at least 5 characters to get one got old very fast, now that there are some Unicode characters that can be used as Perl 6 operators. So I wrote a lisp function which asks for a single character and looks it up in an alist (kinda similar to a Perl hash). That way I can enter any Unicode character I've put in the alist by hitting two keys: one key to run the function, then whatever key I assigned to that character. Here's the lisp, which I put in my .emacs file:

Job::Machine integration

Integrating Job::Machine into Djet.

Dancer2::Plugin::Auth::Extensible Presentation

Andrew Beverly is going to talk about https://metacpan.org/pod/Dancer2::Plugin::Auth::Extensible at the Perl Dancer Conference.

This talk will give an overview of what's now possible with very little code, including user registration, password resets and the management of user details.

CPAN PRC: July is Data::Dump

For July, the CPAN Pull Request Challenge assigned me Data::Dump. Better than the pull request itself, this assignment was great to know Data::Dump, as I have never see it before.

For the PR, I tried to read user complains, and one suggestion was to keep UTF-8 intact when dumping to a stream that is utf-8 aware. I created a basic PR, so illustrate a possible solution. Unfortunately, as on most of the previous months, I did not receive any feedback yet. But the pull request is there, ready for comments or to be merged.

Simple Game in Perl 6

Here's a little game which was a sub-game in the 1980's Commodore 64 game Legend of Blacksilver. It's a simple gambling game where you are dealt five cards in a row from a standard 52-card deck. The cards are then turned up one at a time. After each card is turned up, you have to guess whether the next card will be higher or lower in rank than the last one. Aces are high, and you lose all ties. If you guess all four right, you win.

[Update: There's a serious bug in this version, as pointed out by Brad in the comments, but I'm leaving it in the original so the comments make sense, since I'm writing these for learning purposes. A fixed version can be found at my GitLab account.]

Schedule for Swiss Perl Workshop 2015 ready

We are happy to announce the schedule for the Swiss Perl Workshop 2015.

We will have the Perl 6 Hackathon starting on Thursday August, 27th, Talks on Friday, August, 28th and Workshops and Talks on Saturday, 29th.

Since so many people are contributing to this years' program, it is difficult to highlight any events.

Feel free to listen to the talks you are interested in

  • War stories: programming in the field of medieval history‎‎
  • QA with Larry Wall‎
  • ‎Parallelism, Concurrency, and Asynchrony in Perl 6‎
  • ‎How to create CRUD database webapp in 40 minutes?‎
  • ‎Whatever, or How I Stopped Worrying and Fell in Love with Perl 6 Operators‎
  • ‎Normal Form Grapheme‎
  • ‎API Design‎
  • ‎Pearls from the contest‎
  • ‎OAuth2 and Mojolicious‎
  • ‎The Cool Subset of MAIN‎
  • Processing toki pona with Perl‎
  • ‎Introducing Replay
  • ‎Web::Machine - Simpl{e,y} HTTP‎
  • ‎Genetic Algorithms in Perl

or join the workshops

  • Kickstart your Perl 6 development
  • CallBackery Hands On‎
  • Perl 6 hands on
  • Hands-on code coverage tutorial

or come to meet us and do some socializing.

We have stil a place for you to join us, please register at perl-workshop.ch.

Perl5 to Java compiler is 1 month old, and we have a hackathon

We are having a hackathon at work, and Bosko, John and I have hacked together a working Perl script that executes in a Java environment (HBase).

Nóirín Plunkett

I'm sad to report that Nóirín Plunkett has passed away. Many in the Perl community knew them as a speaker and participant at YAPC::NA 2012 in Madison, Wisconsin, and YAPC::EU 2012 in Frankfurt, Germany, as well as other conferences including Open Source Bridge, OSCON, and ApacheConf.

Nóirín was passionate about open source, open documentation, and open community. In addition to their leadership within the Apache Software Foundation and the Ada Initiative, they were also a contributor to Perl v5.14. Most importantly, they were a friend and advocate to many in the open source and tech communities.

Getting Started

I started programming in Perl in about 1995, a few years before design started on Perl 6. Over the years, I've taken a look at Perl 6 from time to time, but never got hooked. Sometimes it appeared too hard to get a working system running -- assuming you could at all. Other times the language looked so foreign that I wasn't sure what the point was: if it didn't even look like Perl, then it might as well be a different language, so why not go learn a different language that was ready?

Well, that finally changed this summer. The impetus was an interview with Larry Wall wherein, with his unique style, he talked about the language (and a variety of other things) in ways that intrigued me and made me want to see what he'd created. Hearing that a real release of Perl 6 was no more than several months away, and that a working compiler could be installed with a few commands, hooked me the rest of the way.

Making Alien::Base more reliable

The Alien::Base (AB) team has done a number of things over the past year with AB to make the installing packages more reliable. For AB based Alien developers who have created their own Alien::Libfoo this is great because they get the benefit of more reliable installs when users upgrade their version of AB without having to release a new version of Alien::Libfoo. Though largely backward compatible with version 0.005 (or perhaps further), modern versions of AB have also been given a few interface enhancements that require changes in Alien::Libfoo in order to benefit. So if you are an AB based Alien developer, please consider a couple of simple changes that you can make to make your distribution more reliable.

Use %c instead of %pconfigure.

Masking Images with Imager

Sometimes you want to do something fancy with images in a completely automated way.  So for example, maybe you want to turn the image on the left into the image on the right:

image

It turns out this is a pretty simple process using Imager.

Step 1 - Create a blank image.

use Imager;
my $tile = Imager->new(xsize => 450, ysize => 450, channels => 4);

Step 2 - Create a mask. This is just a PNG file that is black where you want transparency, and white or transparent where you want things to show through. In my case I created this mask.

image

Step 3 - Use combine your mask with the image you want to mask.

my $mask = Imager->new(file => 'mask.png');
my $craftsman = Imager->new(file => ‘craftsman.png’);
$tile->compose(src => $craftsman, mask => $mask);

Step 4 - For extra flare, add a bevel. 

image

my $bevel = Imager->new(file => ‘bevel.png’);
$tile->compose(src => $bevel, opacity => 0.8);

Note: Technically, the bevel is being created in some extra software like Photoshop or Gimp, and we’re just applying it here.

Step 5 - Save the file.

$tile->write(file => ‘tile.png’);

image

As you can see, it’s pretty easy to do some pretty cool effects in Imager. Enjoy.

[From my blog.]

Perl::ToPerl6 released to CPAN

$ perlmogrify my-script.pl
$ more my-script.pl.pl6

Perl::ToPerl6 is now available on CPAN. This is the final name for the previously-mentioned Perl::Mogrify tool, with the goal of being able to transliterate (not translate, subtle distinction there) working Perl5 code into compilable Perl6.

Please ignore most of the documentation aside from the README file, as this application is heavily cribbed (read: mostly copied) from L (Thanks Jeffrey.) This tool is meant mostly for module authors, so please don't expect (yet!) a production-quality idiomatic Perl6 translation - We're still not sure what "idiomatic" Perl6 will look like.

Most of my effort has gone into changing operators because that's not easily done in search-and-replace (Keep in mind '.' -> '~', '=~' -> '~~', '->' -> '.') and whitespace is now significant in more places than you'd suspect based on a casual overview. Basically I'm trying to fix most of the simple stuff that would trip people up if they're porting modules by hand.

YAPC::EU - over 200 participants

YAPC::EU Granada has just passed 200 confirmed participants already passing two previous YAPC::EUs and there is still more than a month to go.

YAPC::NA in Salt Lake City gained more than 100 additional participants in the last 30 days, but they used a PR firm. I wonder if YAPC::EU will also get another 100 people. I try to log the numbers for future reference, but I am not sure how to help the organizers reaching more people.

The list of talks is certainly interesting and there are also the courses (and I hope my course will attract a number of people who would just want to learn AngularJS and as a side effect I can show them Perl as well.

Convert::Binary::C anyone?

I'm interested in getting Convert::Binary::C into a properly maintained state once again. It has a pod test that is failing (which should be an author or release test) and a regex deprecation warning in 5.22 that will likely render it uninstallable without patching in a future version of Perl. It's a really great module, and doesn't need a lot of changes just a few simple fixes. I've attempted to contact the author via rt, email and twitter. I'd be happy to adopt the module and resolve non-contentious bugs this module has collected. I believe I have a pretty good record on past adoptions, but I'd also be happy for someone else to do it, my goal is only to get a couple of pretty simple bug fixes into the module. If I don't hear from anyone I will try to adopt via the modules list.

edit: The original author has uploaded a new version with these (and a number of other) issues resolved!

A hackable text editor for the 21st Century

A hackable text editor for the 21st Century

[From my blog.]

Getting modern with logging via Log4perl

From last night's Sydney PM, my talk on Log4perl. In retrospect I should have named it "Logging: Not the fun kind with chainsaws and axes, but the boring kind with grep and less". Check it out:

Also worth sharing, from much discussion about the recent fad for "dashboards", is the perl Dancer based towncrier from the nice people at FastMail.fm. See their live usage of it here.

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.