Fix a Moose

It fix the API (yet again) day here in the Moose-Pen

So as we all know I have been playing with the extended operators over the last few posts and I just notices something in my code;

I can enter a mixed case operator like this 'BeETween' and things will still work. This is good but I think I left a part out on the Database::Deriver side of things and in Driver ::DBI I do this;

elsif (uc($predicate->operator) eq Database::Accessor::Driver::DBI::SQL::BETWEEN) {
I uc or upper case that operator and if I take it out

--elsif (uc($predicate->operator) eq Database::Accessor::Driver::DBI::SQL::BETWEEN) {
++elsif ($predicate->operato) eq Database::Accessor::Driver::DBI::SQL::BETWEEN) {
I will obvioulsy fail my test

DRYing your Perl 6 tests

Ah, the joys of conference-driven development. DRYing your Perl Tests is now out, probably going to be a series, maybe even a book. It's just a quick take on refactoring test suites in Perl 6. Maybe it goes too far, but at least it goes somewhere. I actually promised this before London Perl Workshop 2017 and made it almost on time.

Perl5 as a first-class script engine in Java - part 2

Perlito5 is an implementation of the Perl5 language that runs in the Java / JVM platform.

jrunscript now works with the "Perl5" language parameter:

$ jrunscript -cp .:perlito5.jar -l Perl5
perl> push @INC, "src5/lib"
1
perl> use Env qw/ HOME /;

perl> say $HOME
/Users/fglock
1
perl>

London Perl Workshop - talk schedule

We're excited, and relieved, to have published the talk schedule for the London Perl Workshop.

Update: A one-page printable version of the schedule is available now.

Moar Update: Matt Trout is ill and won't be there; JJ Allen has stepped in with a talk on GDPR, and I'll give a talk on the PAUSE Operating Model.

Read on for an outline of the schedule, and a summary of the talks and tutorials!

Not Null Moose

Its yet another operator day here in the Moos Pen

Hmm I could just copy and past yesterday's postette here and and in 'NOT' in the correct places to get today's 'Is Not Null' operator postette but I an not going to take the schlock path today.

As I implied it is the turn of the 'Is Not Null' operator today another very easy one for a postette ad I start with the same test as yesterday and just add Not where needed, no need for that here.

As for the Driver::DBI code I could just add in another 'else if' into that _predicate_sql' sub but I think I will take a little different approach and have one 'elsif' that covers both. Here is the patch

PullRequest - Personal Milestone

On 16th Aug 2017, the CPAN day, I blogged about my plan for the day. In that blog, I also mentioned about my personal milestone, finishing maximum number of months in a calendar year with atleast one PR each day. If I look back historical data, in the year 2015, I had 3 such months (Oct:45, Nov:31, Dec:60).

The following year 2016, doesn't look nice, as I could only get in 1 month (Dec: 77).

However, the year 2017, looks much better as compare to previous two years. So far I managed to get in 5 months with at least 1 PR each day ((Jan:63, Jul:32, Aug:42, Oct:40, Nov: 30).

I am hoping to get Dec in as well to make it 6 months in the year 2017 beating my previous best 3 months in the year (2015). The chances are very bright as I will be participating the 24PullRequest challenge next month, which runs from 1st Dec - 24th Dec.

Overall, so far, as of today, I have submitted 605 PullRequests out of those 400 have been accepted and merged.

Perl 5 Porters Mailing List Summary: November 13th-20th

Hey everyone,

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

Enjoy!

grep.metacpan @meta::hack 2017

The MetaCPAN 2017 Hackathon, a.k.a. meta::hack v2, is the second dedicated MetaCPAN hackathon. This year the event was held in Chicago from November 16th to 19th, in server central office.

I would like to give special thanks to all event sponsors:
Booking.com, cPanel, ServerCentral, Kritika without them this would have not been possible.

I took part in this event during the last three days and mainly focused on grep.metacpan.org project, which was created as an experimental project earlier this year during the QA Hackathon in Lyon, France.

That article is just a quick summary of my current participation, much more happened from all other participants, and global progress made is pretty impressive!

Since the original version of grep.metacpan.org, which appeared broken from Day 1 due to the lack of libpcre support from the git version used, many things improved and I hope you could have a smoother experience searching code extract...

First two minor updates on metacpan.org

Null Moose

It is operator carry on day in the Moose-Pen

Just a quick postette on adding in another operator to Driver::DBI. Today I am adding the 'Is Null' operator. First of course a set of tests to add into '32_where_operators.t' along this vain;

Meta::Hack 2

Meta::Hack 2 - 2017

What?

Meta::Hack is about getting the core MetaCPAN team together for a few days to work on improving... well as much as possible! Last year we focused on deploying to a new infrastructure, with new version of Elasticsearch. This year was a much more varied set of things we wanted to achieve.

Why get together?

Whilst Olaf couldn't attend in person, we had him up on the big screen in the ServerCentral (who kindly hosted us and bought us lunch) offices so it was almost as good as him being physically there. Having us together meant we could really support each other as questions arose.. a fun one was tracking down that the string JSON::PP::Boolean, incorrectly identifies as is_bool in JSON::PP - there is a pull request - though that's not released yet. We also found bugs in our own code!

group.jpg

Achieved...

What are you doing on 25th Nov 2017?

Why am I asking this? If you are not aware then I must tell you the much awaited London Perl Workshop is happening next Saturday, 25th Nov 2017. I am looking forward to the event. There are plenty of interesting talks arranged this time. Take a look at the list of talks. If you are planning to attend any particular talk, please register your interest as well. This will help the organiser in scheduling it.

There is one more reason I am excited about the event. I am giving my second talk at London Perl Workshop this year. I feel humbled to see so many people showing interest in my talk. The topic of my talk is "Create tube map in 20 minutes using Map::Tube". I will be taking the audience through various steps in creating a tube map. I promise at the end of talk, everyone in audience would be able create their own little map in no time.

graphql-perl - plugin to make GraphQL "just work" with DBIx::Class

As mentioned in the LPW "trailer" for shiny new toys, I will be giving a talk on graphql-perl. I promised to talk about introspecting a DBIx::Class schema to make a GraphQL interface. This is how!

The API for a "convert plugin" for graphql-perl is simple: implement a to_graphql, and optionally a from_graphql method. The to_graphql returns a hash-ref with three keys:

  • schema
  • root_value
  • resolver

These are all the entities, apart from the specifics of an individual query/request, needed for GraphQL's execute to operate. The Mojolicious and Dancer2 plugins need only to be given which plugin to call, and any necessary arguments (e.g. a DBIx::Class::Schema object) and they can now create a GraphQL endpoint from that.

The newly-released v0.03 of GraphQL::Plugin::Convert::DBIC is the first functioning plugin. It implements generic CRUD for the given DBIC schema: it creates two types of Read (primary key, and "search" on fields), and Create, Update and Delete mutations.

Moose Utils Extend

It extend test helper day here in the Moose-pen.

Yesterday I managed to get the 'Between' operator to work but there was one little thing that was bugging my and that was I had some 40 lines of new code and only three new tests for the possible exception the 'Between' operator might generate. To boot the three new tests where an anti-pattern.

Now there is no problem with having anti-patterns in test code you just end up with many more lines in your than you need and they may be problematic to fix if they ever go wrong. Normally I would not bother to re-factor just three tests but I can see myself making many more 'Exception' tests for the other operators like 'IsNull' or 'In'. Thus, in this case I will fix that.

So given the basic test;

Perl and AI

Following a brain fart, I've had a dig around for AI related stuff in perl. I haven't found much currently active, except an interface library for an Apache project (which looks good). I've found very little in the sentiment analysis sphere. This is what I've found so far:

AI::Categorizer Not touched since 2007
AI::NeuralNet::Simple Not touched since 2005
AI::FANN Not touched since 2009
http://www.lwebzem.com/cgi-bin/courses/course_view.cgi?m=c1_m3_s3.html&uid=web Old!
AI::NeuralNet::BackProp Not touched since 2000
AI::Perceptron Not touched since 2003

And the live one:

AI::MXNet Live!
Interfaces to https://mxnet.incubator.apache.org/


Am I missing anything obvious?

Perl and the Operating System at the London Perl Workshop, 25th of November

One of the strengths of both Perl -- and our talk schedule -- is a diversity of ideas. We see this in the rich depth of Perl libraries on the CPAN, in the large variety of places Perl is deployed, and in the many ways people use Perl to make their lives easier.

eligo.pngThis summary is brought to you by our Platinum Sponsor: Eligo. Eligo are a niche recruitment agency with a team of dedicated Perl Consultants, who specialise in and have experience in recruiting Perl Specialists across a wide range of sectors and roles in the UK and beyond.

Perl and the Operating System

Lacey Powers -- better known as Perl's resident Postgres badass -- gives us a tour of "Debian Tips and Tricks", showing us that Debian is a fantastic platform for running your applications, Perl or otherwise, on. The talk will cover some of her favorite tips and tricks to make your life using and administering Debian easier. Debian goodies, unattended upgrades, molly guard, useful non-Debian project repositories, and many others will be covered.

Perl 5 Porters Mailing List Summary: November 2nd-12th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week and a half.

Enjoy!

More Moose Operations

Its advance my code day here in the Moose-Pen.

Seems I have hit a milestone in the Database::Accessor/Driver::DBI project I have completed all the easy stuff and I am moving over to the more complicated or at least ignored till now parts.

I decided to work on some of the more advance operators found in conditional statements namely 'Between', 'In', 'Not In', 'Like', 'Is Null' and 'Is Not Null'. Now one problem with these six operators is they are very SQLish, epically the 'Like' operator, and despite me trying to come up with a more generic set of operator names just looked too MongoDB specific. I wonder if one of the devlopers of MongoDB had the same problem to solve?

To start off I created a new test case '32_where_operators.t' that is basically a clone of '30_where_basic.t' but I stripped out all the tests and to start I will try this one;

Perl client for NATS Streaming Messaging System

Hello all,

With micro-services and cloud being a buzzwords of the day it's no surprise that a market for messaging systems is pretty busy at the moment.

One such system (NATS and persistent version NATS Streaming) seems to be a leader among relatively new arrivals. If interested please read more on it at its official page nats.io.

There's a lot of clients for original NATS already exist on the market, including one for Perl,
Net::NATS::Client, though without support for recently added NATS Streaming. I did not think that was optimal and wrote one.

The purpose of this blog post is the announcement of new Perl Client for NATS streaming I just uploaded to CPAN and github Net::NATS::Streaming::Client.

From the README.

Net::NATS::Streaming::Client - A Perl client 
for the NATS Streaming messaging system.

Beer and friends from tomorrow evening at the London Perl Workshop

How exciting! The London Perl Workshop is this Saturday, and as you may or may not know, it's not just London's premier Perl event, it's also London's premier social event! It's not to late to register to attend, for free!

Pre-Workshop Drinks

wcn.pngOur generous sponsor WCN are sponsoring a pre-workshop social event, which is a chance to catch up with old friends, make new friends, and hang out drinking beer (or wine, or whatever you want really) around Perl-y people. WCN specialise in providing a cloud-based talent acquisition technology suite and have decades of award-winning recruitment software expertise and an obsession with driving real change in organisations.

The pre-workshop drinks are at the Carpenter's Arms:


From 6:30pm on Friday the 24th

Post-Workshop Drinks

Perl5 as a first-class script engine in Java

Perlito5 is an implementation of the Perl5 language that runs in the Java / JVM platform.

Perl scripts can now be run from inside Java applications using the standard javax.script API:

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.