Baby Moose Takes Charge

Its get very ambitious day here in the Moose-pen.

As things went just a little to smoothly over the past few post I though it would be a good day to try something that I know is going to cause me grief. In the vain I added this test;

Perl 5 Porters Mailing List Summary: June 12th-19th

Hey everyone,

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

Enjoy!

SPVM is released! Perl maybe become much fast.

I release SPVM.

SPVM

---------------------------------------------------------------------------

SPVM - Fast calculation, GC, static typing, VM with perlish syntax
SPVM(CPAN)

----------------------------------------------------------------------------

Do you know that there are many criticisms against Perl 5 on the Perl 11 blog?

Much of the criticism is about Perl's data structure and performance.

"Perl does not have a good data structure and implementation regarding numbers."

"Perl can not calculate a number using the stack of functions."

"Understanding about virtual machines is lacking in p5p."

I am an engineer who loves Perl 5 and p5p and is using Perl 5 to create a company service.

I want to contribute to reducing the weaknesses of Perl 5, by making modules.

I hope the SPVM will be of help.

Features

Do you need faster Perl? SPVM provides fast calculation to Perl.

Les Journées Perl / French Perl Workshop 2017

Nobody seems to have blogged about Les Journées Perl so I thought I would blog about Les Journées Perl. Or maybe I haven't been paying attention, or it passed by me in a state of crossing timezones?

I was travelling back from the UK office the weekend the workshop happened, so stopped by. I also uploaded a couple of photos to the perl_events Instagram feed. The workshop was held in the Carrefour numérique in the Cité des Sciences et de l'Industrie in Paris - a very interesting space within a very interesting space. Possibly one of the most interesting spaces I've been that has hosted a Perl workshop. Here's a recap of the talks I understood that stuck in my mind, I believe the talks were recorded so may appear online soon. You can find all the talks, with links to slides/etc here.

Another Baby Moose Break

Its still param day here in the Moose-Pen

Carrying on from yesterday's post I, today I added in one more test;

ok($user->update( $utils->connect(),$container),"update with present container");
$user->reset_conditions();
$container = [{address =>'MNO'},
              {address =>'PQR'},
              {address =>'STU'},
              ];
$user->add_condition({left  =>{ name  => 'username',
                                view  => 'user'},
                      right =>{ value => ['Bill','Jane','Joe']}
                    });
ok($user->update( $utils->connect(),$container),"update array on where param");

how to join #yapc chat on irc.perl.org

  • IRC is used A LOT during The Perl Conference
  • To go online instantly in a browser, you can use Mibbit
  • To stay online (to read all messages sent, even the ones sent when you were not around), you can use IRCCloud
  • You can set up your own bouncer too!

Introduction

Last year's The Perl Conference at Orlando was my first one. I had a lot of fun, met with brilliant people and learned numerous things about Perl.

Altoids tin Arduino GPS "return to origin" project, thanks to Perl

Warning! Long read...

This post contains an Arduino Trinket Pro GPS prototype project that only relates to Perl in that all of my knowledge and experience came from my Raspberry Pi Perl work, along with writing C/XS code for several ICs and sensors and making those available as Perl APIs. I'm posting it here due to that relevancy, and because I don't blog anywhere else ;)

To start off, I'll explain a little bit how I got to this path.

I became interested in the Raspberry Pi after a colleague showed me a project he had built with one. I went out, bought a couple and started tinkering. The very first thing I wanted to do was use Perl on it. There were a couple of libraries available, but they seemed convoluted to me, so I wrote my own.

Another reason not to use each()

So I’ve learned my lesson. Do not use each().

Always good to read the blogs…

https://blogs.perl.org/users/rurban/2014/04/do-not-use-each.html

Here’s a fun one that caused perl to go into an infinite loop. I suppose being frugal and not assigning things to variables is not necessarily a good idea.

Baby Moose Break

It playing with update and container day here in the Moose-pen.

Now that I have the 'create' function working so well with execute_array I figured the next logical step would be to do 'update' function but I have one small problem. When I attempt to do this;

$container = [Test::User->new({username=>'Bill',address =>'ABC'}),
              {username=>'Jane',address =>'DEF'},
              Test::User->new({username=>'John',address =>'HIJ'}),
              {username=>'Joe',address =>'KLM'},
              ];
$user->update( $utils->connect(),$container);
I will get this;

Usage: Database::Accessor->update( Class , Hash-Ref||Class, Hash-Ref); The $container parameter must be either a Hash-Ref or a Class at …

20 Years of Perl mongers

It was 20 years ago (almost) that a group of New Yorkers started Perl mongers. I think at the time we were eating something the caterer for The Perl Conference called "California sandwich" that had sprouts and avocado. In 1997, there was a small core of a Perl community that worked on perl, but there was still room for regular user engagement.

I didn't see this coming. While I was in Amsterdam a couple of weeks ago, Wendy noted that 1997 and 2017 end in the same digit (as does 1967). I don't think we've ever bothered to celebrate an anniversary. I went to check on the date. I registered pm.org on August 22, 1997, which I think makes August 21 the birthday. That was the last day of that conference.

We'll have to do something special guess.

I know that NY.pm will have its anniversary this year, and there my be some other groups. London.pm, when did you start? I think Boston and Seattle was in there very quickly. Who else?

New Sydney PM website and URL

With new cool TLD's available, I purchased perl dot sydney which is the perfect domain for Sydney Perl Mongers.

Our current/old website is dated and tired, so I also spent some time whipping into shape a new website using GH pages. Having GH pages automagically compile markdown files into HTML is very neat. Plus having everything in github so people can PR, and having group access - are both great. But... that Jekyll isn't Perl does make me feel somewhat sold out, even if it's being used implicitly.

Anyway, please take a look and proof read the perl dot sydney website. Send PR's for all my typos and grammatical errors (people in irc.perl.org's #australia have already gone over it)

Also, if you would like to order one of our Tshirts (which help pay for these vanity domains and our meetup page) - check out the details on our Facebook page.

Perl 6 Release Quality Assurance: Full Ecosystem Toaster

Read this article on Perl6.Party

As some recall, Rakudo's 2017.04 release was somewhat of a trainwreck. It was clear the quality assurance of releases needed to be kicked up a notch. So today, I'll talk about what progress we've made in that area.

Define The Problem

A particular problem that plagued the 2017.04 release were big changes and refactors made in the compiler that passed all the 150,000+ stresstests, however still caused issues in some ecosystem modules and users' code.

The upcoming 2017.06 has many, many more big changes:

  • IO::ArgFiles were entirely replaced with the new IO::CatHandle implementation
  • IO::Socket got a refactor and sync sockets no longer use libuv
  • IO::Handle got a refactor with encoding and sync IO no longer uses libuv
  • Sets/Bags/Mixes got optimization polish and op semantics finalizations
  • Proc was refactored to be in terms of Proc::Async

Baby Moose struts his stuff

Well is still container day here in the Moose-pen.

So now that I have the 'execute_array' all fixed up and working I think I will carry on the same past and get the container to work with an array of 'classes'. In that end I created this little class;

package Test::User;
use Moose;
has username => ( is  => 'rw',
               isa => 'Str',);
has address => ( is  => 'rw',
               isa => 'Str',);
1;
Now the next thing I needed to do was make a test out of what I fixed yesterday;

Bailador documentation

The documentation of Bailador was updated. It looks much better now.

The many ways to use Alien

A while back I introduced the alienfile recipe system and we wrote a simple alienfile that provides in a CPAN context the tool xz and the library liblzma. I also went over how to test it with App::af. The week after that I showed how to integrate that alienfile into a fully functioning Alien called Alien::xz and promised to show how to then use that Alien from an XS or FFI module. Today I am going to do that. I am also going to show how to use a tool oriented Alien module. (conveniently, Alien::xz can be used in either library or tool oriented Alien mode). If you are more interested in FFI or tool oriented mode feel free to skip down to the appropriate paragraph.

Writing Declarative Perl

At The Perl Conference in Washington DC, I'll be giving a talk on Modeling a Universe in Perl. For previous versions of this talk, people have asked for more information about how we model complex actions in a (mostly) declarative manner. For example, here's the code for purchasing a clone:

It's the Steps() function which is our declarative code. As you might imagine, there are tons of actions which might require that you be in a particular area, or have credits removed from your wallet, so the Area and Wallet lines can be dropped into any Steps() function anywhere throughout our code. But people want to know how this works. In reality, it's pretty simple.

Yes Baby Moose had a Bug.

Well it is look at another module day here in the Moose-Pen.

So yesterday I ran into this problem;
DBD::DBM::st execute_array failed: 4 bind values supplied but 2 expected [for Statement "INSERT INTO user ( user.address, user.username ) VALUES( ?, ? )"] at …
Which rather peeved me as I tried the same code on two other DBs and the both ran. So it it just me? I took a look at example in the DBI POD;

$dbh->{RaiseError} = 1;        # save having to check each method call
$sth = $dbh->prepare("INSERT INTO staff (first_name, last_name, dept) VALUES(?, ?, ?)");
$sth->bind_param_array(1, [ 'John', 'Mary', 'Tim' ]);
$sth->bind_param_array(2, [ 'Booth', 'Todd', 'Robinson' ]);
$sth->bind_param_array(3, "SALES"); # scalar will be reused for each row
$sth->execute_array( { ArrayTupleStatus => \my @tuple_status } );

SPVM is released!

Scott Wiersdorf on Functional Refactoring with Perl

Perl 5 Porters Mailing List Summary: June 6th-11th

Hey everyone,

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

Enjoy!

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.