Moose Fixes Test

It fix a test postette day here at the Moose-Pen

Felling a little better today as the mind is a little less foggy, that might change back on October 17 th though? Today I am going to fix the first of the bugs I ran into yesterday ;

Not a HASH reference at ,,,\t\lib/Database/Accessor/Driver/Test.pm line 13
# Looks like your test exited with 255 just after 6.
The first thing I did was look back at my API and see how I define a $container and it can be Hash-Ref or a Class or an Array-Ref of Hash-refs and Classes and I looked at my failing test. In this test I am using an array_ref;

Perl Event Roppongi.pm #1 at 2018/9/14

Perl Event Roppongi.pm is opened at #1 2018/9/14

I get some pictures.

See all pictures Roppongi.pm Pictures

Perl6::Math::Matrix (Part 3: when to use MMD)

In this guide about what to consider when writing a Perl 6 module I want after part I and part II turn to Perl 6's great power of signatures and how to use MMD (multi method dispatch) the right way.

LOGOesque extension to Language::SIMPLE - Feature creep diverts attention.

In an attempt to standardise vector graphical operations in GUIDeFATE (the world's simplest GUI designer) across different back-ends and keep things simple, a little diversion was needed. For a standard vector drawing one might use the computationally cumbersome SVG format directly and draw that on the widget. The problem is that one needs to be able to manipulate the graphics easily and AFTER deployment. I needed to script the creation of the drawing. Now lots of applications use a script language of their own, e.g. gnuplot, matlab, Kalgebra, R etc, so clearly this is a useful functionality on its own. What would be also useful is a portable scripting platform. This platform could serve my purpose, but being modular, could be easily repurposed for other applications.

Moose-Pen is Back

Moose-Pen is Back

Sorry I missed a few days it seem that when you have walking pneumonia it can turn into creeping pneumonia very easily. Who knew? I will have to start my year of daily posts again I guess I should be satisfied with 297 consecutive days.

Just a postette for for today and as usual it is just a quick all-up test post. For Database::Accessor it has been a while since I did a full pull on the repo and I got

 6 files changed, 160 insertions(+), 39 deletions(-)
So maybe expecting a few problems there and on my first run I get

Simplify Subroutine Signatures

Do you need simple subroutine signatures?

signatures default behavior is simple.

It is simple alias.

# $foo, $bar
sub foo ($foo, $bar) { ... }
sub foo {
  my ($foo, $bar) = @_;
}
# $foo, @bar
sub foo ($foo, @bar) { ... }
sub foo {
  my ($foo, @bar) = @_;
}

Image::PNG::Libpng now on Strawberry Perl

I recently received a bug report about installing Image::PNG::Libpng on Strawberry Perl. It was failing to install due to using the wrong C compiler.

Up to version 0.44 of the module, I'd been checking for the presence of libpng using Devel::CheckLib, however somehow or another that didn't seem to be working and I'd gone back to using my own module to detect the library.

Although this improvised detecting module was getting its information about the compiler flags and library flags from Config, I'd omitted to use the information about what the C compiler might be. Once I changed my module to get its information on the C compiler from $Config::Config{cc}, it worked on Strawberry Perl too.

So now you can use Lego::FromPNG, FuseBead::FromPNG, and some other modules on Strawberry Perl.

SQL::Translator::Parser::OpenAPI - generate a relational database from an OpenAPI schema

Version 0.04 of SQL::Translator::Parser::OpenAPI has just been uploaded to CPAN. You can give it an OpenAPI 2 spec and it will generate a relational database from it. How is that useful?

Normally when you want to make an information service, you'll start by manually making a database, or writing the API code, possibly writing tests along the way, and then writing an OpenAPI spec after that - see this excellent article by Jan Henning Thorsen for more on using OpenAPI with Perl.

With this module, you can start by writing a spec, and letting code generate a lot of the infrastructure. This has a number of advantages:

  • it's quicker
  • it's easier
  • it's more reliable - let solved problems stay solved rather than reinvent the wheel!
  • it lets you keep an eye on the big picture

The distribution uses for its tests, as well as one that tests that many-to-many relationships are correctly generated, a couple of specs written by others:

Perl6::Math::Matrix (Part 2: Converter)

In this series of articles I reflect and expand on a talk I gave this year in Glasgow were I spoke about writing Perl 6 modules in general and my module in particular. Part I was about data types I used or wanted to use, because my approach is it to think first about data structures and built later the code around that. It is also crucial because this module basically provides the user with a new data type. (You might want to reread it - I expanded it to twice the size after publishing it.)

How to install Perl Net::RawIP module on Windows Server

Hi Sergey,all
I trying to install perl Net::RawIP module on Windows Server 2012 R2 without success :-(
I also installed latest perl version for windows machine (5.28.0).

Could you help me?

Thanks and regards,
Marco Rottino
mrottino@gmail.com

Behind The Desk - Running The RPerl Booth at YAPC Europe AKA TPC Glasgow 2018

I came to my first ever Perl Conference to run a booth, which is quite the intimidating task, as I am but a humble Perl newbie.

I was representing RPerl, Will Braswell's Perl 5 compiler, and did my best to try and explain its purpose to the intrigued visitors. In case you missed the booth, I'll do a quick recap. RPerl can do two things: first, it can optimize the speed of normal Perl 5 apps to over 400 times in some tests; and second, RPerl can protect the intellectual property and source code of your software.

Between the conference days, I helped Will set up a Linux VM that would run a live demo of the compiler, and we were able to show it on the last day. This live RPerl demo included physics simulation algorithms running in both slow interpreted mode and fast compiled mode.

39501233_463740027436473_8967423377929142272_n.jpg
The conference was a great opportunity to meet several prominent members of the international Perl community, such as Mark Keating, Wendy Van Dijk, Jeff Goff, etc. I enjoyed my first experience at The Perl Conference, and I look forward to more in the future!

New class in Berlin...this Friday

Further information on my German speaking tour...

In addition to the talk I will be giving this Thursday evening,
we will now also offer a free full-day training class in Berlin.

Specifically, we will be running my popular Technical Presentation class
from 9:30 to 17:00 at Helmholtzstraße 2-9, 10587 Berlin.

As we can only accommodate at most 30 participants, we've set up a page on MeetUp,
where you can register to attend. If you don't have a MeetUp presence, the MeetUp page
has instructions for emailing the organizers directly so you can have your name added to the attendance list. Note that, although the MeetUp page is mostly in German, the class will be entirely in English. :-)

Thanks again to Frankfurt Perl Mongers, who are sponsoring my entire tour,
to Berlin Perl Mongers, who are the local organizers, and to Strato AG, who are helping with the organization and also providing the training venue.

Stripping diacritics from input

If you have input containing lots of Unicode diacritics, and you need to process them into equivalent ASCII characters, there are several options on CPAN. My module Unicode::Diacritic::Strip offers a slow and reliable method involving the use of Unicode::UCD, and a fast method involving a tr/// operator.

Today I was examining user logs for a web application, and I noticed that the fast method had completely failed on input "Jalālu'd Dīn Muḥammad Rūmī" because it had failed to catch the middle h character. Looking at the Unicode characters I found a whole block of Latin characters which I'd omitted. I've now added them to the application for version 0.11

Everyday ETL With Yertl

I use ETL::Yertl a lot. Despite its present unpolished state, it contains some important, easy-to-use tools that I need to get my work done. For example, this week I got an e-mail from Slaven (a CPAN tester and a tireless reporter of CPAN issues found by testing) saying that some records were missing from one the APIs on CPAN Testers: The fast-matrix had 3300 records for the "forks" distribution version 0.36, but the matrix had only 300 records. The utilities in ETL::Yertl made it easy to find and manipulate the data I needed to diagnose this problem.

Nordic Perl Workshop 2018 Highlights

mojo_logo.png

  • Mojolicious has a new logo. New shirts, stickers, and other swag coming soon.
  • The Nordic Perl Workshop and MojoConf are the same thing. They had to share the #npw2018 tag with National Payroll Week going on at the same time in the UK.
  • I released a preview copy of my secret project to write a Mojo Web Client book in three months to deliver at this conference. I got really, really close. I expect it to be available through PerlSchool at the end of September.
  • Mojolicious 8 adds several things. Even more Promises, Roles, secure user-agents, and many other things I had to adjust in my Mojo Web Client book.
  • Joel Berger gave his Mojolicious Gardening talk about how to go from a Lite app to a full Mojo app. It's a lot less work than you think and you don't have to do it all at once.
  • Joel Berger wants you to write an article for the Mojolicious Advent Calendar (2017 version). Look at the articles already there and send a pull request.
  • Dylan Hardisonn is rewriting Bugzilla in Mojolicious. Bugzilla has a feature that allows people to apply a limited number of votes to issues. Scarcity allows the important issues to float to the top.
  • We had a lively discussion about what syntax edge cases we'd like to go away.
  • Salve Nilsen thinks every Perl programmer should have a Perl sticker on their laptop as a conversation starter.
  • If you hang out at Hackeriet you are expected to drink Club-Mate (informal advertising slug "You'll get used to it", maybe apocryphal)
  • All the tech companies seem to be hiring. Sebastian says SUSE has lots of jobs.
  • Kronberg Satellite Services was a sponsor, but we didn't get any free satellites or telescopes. They were quite generous despite that.

Some cute Perl amigurumis

Disclaimer: this looks like an advertisement, but it's not. I just want to spread the word about really cute Perl goodies. I won't get any money from that.

Do you know amigurumi? It's stuffed crocheted creatures.

A few weeks ago, a free software enthousiast, DoomyFlo asked on Mastodon what kind of FLOSS-related stuff she could crochet. I suggested the Perl onion and the camel and the result is awesome!

Here's the onion: amigurumi Perl onion

Here's the camel: amigurumi Perl camel

The amigurumis are hand-made and 100% cute 🙂

You can order those amigurumi on https://www.doomyflocrochet.com/ (here's direct links to the onion and the camel).

World Tour of Germany

Thanks to the generous sponsorship of the Frankfurt Perl Mongers, next week I will be doing a lightning tour through Germany.

On Monday September 10th, I'll be kicking off in Frankfurt, talking about functional programming in Perl all day, and in the evening about my latest Perl modules and the epic three-year saga of how they came to be.

On Tuesday 11th, I'll be in Erlangen at Friedrich-Alexander-Universität, speaking about Transparadigm programming.

On Wednesday 12th, I travel to Dresden, where I'll be explaining how to have fun with dead languages.

And on Thursday 13th and Friday 14th, I'll be in Berlin, giving an evening talk (topic yet to be announced) as well as a full day class on the best new features added to Perl in the past decade.

All these events are absolutely free (thanks again to Frankfurt.pm!) and open to anyone interested in Perl, in multiparadigm programming, in necrolinguistics, or just in having a good geeky time.

Pull Request - Mission Accomplished

According to the Wikipedia, "The Mission Accomplished" speech was a televised address by United States President George W. Bush on the aircraft carrier USS Abraham Lincoln on May 1, 2003.

My journey so far has been very satisfying. I have had some low times in between but I kept it going. To do this for such a long time consistently, you have to have a real motivation. All credit goes to one man, Neil Bowers, whose contributions inspired me to take this challenge. Every time my PR gets accepted and merged, it gives me immense pleasure that I can't describe in words. Not all my PR were technical. I still remember one PR which was simply adding a space to a line in the code to make it presentable on metacpan.org The response from the author was "Such a perfectionist!". I have compiled some very encouraging responses which I will publish soon.

Which edges cases could perl shed to make it easier to parse?

Bjørvika panoramic view

What would happen if we took the edges cases out of the Perl syntax? We were talking about this over lunch at the Nordic Perl Workshop. I wondered what would happen if we could make a grammar that other things that aren't perl could statically parse? This experiment doesn't care about backward compatibility. We end up with a slightly smaller

Part of the problem is that Perl code can run during the compilation and that can change the way that the parser works. What if that could still happen but the syntax would be the same?

The other huge problem is the availability of CPAN. Which features' disappearance would break CPAN beyond the point where people didn't want to use Perl? Not all of CPAN is important, and how hard would it be to fix these edge case syntax items?

Language::SIMPLE - The Portable Integrated Scripting System

Introducing SIMPLE

SIMPLE is an experimental attempt to integrate end user scripting into Perl applications. It actually stands for Simple Integrated Modular Programming Language Experiment. The idea is that an application one develops might allow an end-user to run scripts they have made, in a custom language targeting the application's operations. Sounds silly? A script parsing utility written in another scripting language? I do a lot of silly stuff.

Some time ago, IpiGears1.jpg attempted to use a Raspberry pi for robotic and other IO applications. To save time and allow for flexibility, I had developed piGears, a scripting tool that could handle the GPIO and also have some basic flow control as well as support for I2C devices. It had been useful for my experiments with electronics, but was a rather niche utility.

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.