Sophisticated Moose

Today in the Moose-pen I am going to play with the very familiar 33_condtions.t and this time I am going to solve another little API problem I know I am going to run into.

Part of my evil plan is to allow end users to add in conditions on the fly and I have made provision for that with the 'rw' 'conditions' attribute found on my DAD Role. Now I have to fix a minor oversight on my part can change the type on 'conditions' to be the same as the original in Accessors, so I changed this

–    isa     => 'ArrayRefofPredicates',
++    isa     => 'ArrayRefofConditions',
 
What I want to be able to do is allow my end users to do something like this

Perl 5 Porters Mailing List Summary: July 13th-22nd

Hey everyone,

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

Announce: Rakudo Star Perl 6 Compiler Distribution Release 2016.07

Re-posted from http://rakudo.org/2016/07/22/announce-rakudo-star-release-2016-07/
The release was prepared by Steve 'stmuk' Mynott

On behalf of the Rakudo and Perl 6 development teams, I'm pleased to announce the July 2016 release of "Rakudo Star", a useful and usable production distribution of Perl 6. The tarball for the July 2016 release is available from http://rakudo.org/downloads/star/.

This is the third post-Christmas (production) release of Rakudo Star and implements Perl v6.c. It comes with support for the MoarVM backend (all module tests pass on supported platforms).

Please note that this release of Rakudo Star is not fully functional with the JVM backend from the Rakudo compiler. Please use the MoarVM backend only.

Dancer2 0.201000 Released

Dancer 2 0.201000 is on its way to a CPAN mirror near you.

The Dancer Core Developers are sad to announce the retirement of David Golden (xdg) from the core team. Dancer2 was made much better by his many contributions, and we are extremely grateful for all he has done.

We’d also like to announce the addition of Peter Mottram (SysPete) to the core team. SysPete has been working quietly behind the scenes on a number of projects, but has been a valuable member of the core team for some time now, and we are happy to have him aboard.

The core developers would most importantly like to give thanks to our awesome community for the numerous contributions towards this release. You rock!

Late Night Moose

Well in today's Moose-pen I am still going to play about with good old 33_condtions.t , not the tests per-say but the API they are calling. In my last post I fixed the my API call by adding in the 'predicates' param to the 'conditions' param like this

...
 view =>'People' } ],
conditions=>[{predicates=>[{left=>{name =>'last_name',
                                   view =>'People'},
...         
to me the above is a little wordy an error prone. The original API call I attempted

Adding profiling support to nqp-js

Currently the focus of the work on the js backend is on making nqp-js emit code that runs at a reasonable speed (so that compiling Rakudo and its setting doesn't take eons and I can iterate on it more easily). Being able to easily profile nqp-js code is very useful for that.

The js profilers I have tried didn't work out so well

  • devtools had trouble with native modules as it runs in
  • running directly inside chrome require webpacking
  • node-inspector didn't support console.profile/console.profileEnd and it's interface locked up while profiling
  • some other ones were bitrotted

berrybrew, the perlbrew for Windows; rewritten and enhanced

For the people who use Windows, I've released berrybrew v1.04.

This software was originally written by David Farrell. While I was writing Test::BrewBuild, I needed some additional features (particularly the --with option for exec, and better PATH management). I wrote a couple of PRs, but they were rejected (not by David, but by the new maintainer). Not long after that, the person who had taken over the project disappeared, so I decided to permanently fork it, and nearly completely rewrite the whole thing.

It does everything the original does, but now includes far more:

[Part 2] A Date With The Bug Queue or Let Me Help You Help Me Help You

Read this article on Perl6.Party

Be sure to read Part I of this series.

As I was tagging tickets in my bug ticket helper app, I was surprised by how often I was tagging tickets with this particular tag:

Needs core member decision

It may have been the most used tag of them all. And so, it made be think about...

PART II: The Experienced Contributor

I will be referring to "core developers," but this generally applies to any person who has great familarity with the project, how it should, does, and will work —The Experienced Contributor. When it comes to bug queues, can this type of people do more than just pick the bug they like the most and fix it?

LESSON 3: Many Tickets Can Be Fixed With A Single Comment

On my date with the bug queue, I found many tickets that looked relatively easy to fix, from a technological point of view, but I couldn't even begin working on them for a simple reason: I didn't know what the correct behaviour should be.

Not a Mousse Moose!

So in my last Moose-pen I ran into problem with my 33_conditions.t test case where it was giving me errors like this

# Compared $data->left # got : Does not exist …
Well after some playing about I saw the errors of my ways. Looking at the Database::Accessor::Condition class I remembered to load that properly I will have to pass in any conditions with the 'predicates' param. So I modified my$$in_hash to this;

Sparrowdo automation. Part 3. Installing system packages.

HI! I continue blogging about sparrowdo - a simple perl6 configuration management tool.

This is what we've learned so far:

Installing packages

Consider out latest example with installing CPAN packages:

Perl 5 Porters Mailing List Summary: July 6th-12th

Hey everyone,

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

A Date With The Bug Queue or Let Me Help You Help Me Help You

Read this article on Perl6.Party

Recently, I decided to undertake a quick little journey down to the Perl 6's Bug Queue. A quest for fame and profit—some easy game to hunt for sport. There's plenty of tickets, so how hard can it be? The quick little journey turned out to be long and large, but I've learned a lot of good lessons in the process.

PART I: The Newbie Contributor

Right away, I hit a snag. Some tickets looked hard. On some, it wasn't clear what the correct goal was. And some looked easy, but I wasn't sure whether I wanted to work on them just yet. While the ticket queue has the tag system, I needed some personal tags. Something special just for me....

The Ticket Trakr

So I wrote a nice little helper app—Ticket Trakr. It fetches all the tickets from the bug queue onto one page and lets me tag each of them with any combination of:

Just A Cute Moose

Well today in the Moose-pen I am still going to have a look at my 33_conditions.t test case. In my last post I got all the little bits working right up to the point when I want the DAD to return or at least crate this string

RETRIEVE-->View-->'People'-->Elements-->'People.first_name',
'People.last_name','People.user_id'-->Condtion->People.user_id=test-->AND-->
People.first_name=John

After sleeping on it and then playing a bit I came to the very wise conclusion to not to test my Accessor in this way. If I take this path then I am opening myself up to going down all sorts of test rabbit holes where there is nothing wrong with my Accessor but a problem in my Tests DAD. So what to do?

Well lets have a look at what I have to test:

  • coercion from a hash to a type works correctly
  • class attribute values passed into the DAD are correct

Thames Valley Perl Mongers

Thames Valley Perl Mongers, aka TVPM, are now having monthly social meetings at various locations in the Thames Valley (in the UK).

Our next meeting is next Monday (18th July) at 8pm, at The Jam Factory in Oxford. We're not going for the jam, but the beers.

Pong in Perl 6 at MadMongers Tonight

Pong in Perl 6 at MadMongers Tonight

[From my blog.]

YAPC::Europe 2016 Call for Speakers Closes July 15th

13615185_1584680458491347_654446141469504407_n.jpg

Hello YAPC-ers,

Deadline seems to be quickly approaching, the Call for Speakers closes July 15th, 2016. But the good news is that you've got plenty of time to submit, prepare your talk && join us in Transylvania,

So come on, share your experience, amaze us with incredible ideas && practices. We want to have our minds blown about what we had never thought could be possible with Perl. We are looking for talks focused on all parts of Perl.

If you’re looking for inspiration, here it comes: hot Perl topics, hot tech topics (not limited to Perl, necessarily), trends & changes, Perl fundamentals, security, networking, testing, devOps, hardware, big data, Internet of Things, crazy hacks && ideas, gadgets && wearables, community talks, marketing or management talks, UI & UX, outreach programs, start-ups or other ideas you might have. Remember, this is YOUR conference!

Best Moose Opening Line Ever

So today in the Moose-Pen I was going to get my 33_conditions.t test case working. New we left off in my last post with this call to Accessor

Sparrowdo automation. Part 2. Dealing with http proxy servers.

This is a next post in Sparrowdo automation series.

The previous one was Installing CPAN packages.

Sometimes having internet restricted by http proxy usage could be a problem.

Recalling our latest post on installing CPAN packages, what if we have a server with http traffic only available under some http proxy server? Then we would fail to install any CPAN packages here, and would have a similar error from cpanm client:

$ cpanm CGI

! Finding CGI on cpanmetadb failed.
--> Working on CGI
Fetching http://www.cpan.org/authors/id/L/LE/LEEJO/CGI-4.31.tar.gz ... FAIL

Ok. Passing http proxy is possible when using sparrowdo. Let's get back to the cpan-package plugin.

Please delete old releases from your CPAN directory

The Perl NOC have informed the PAUSE admins that the CPAN Master is starting to get tight on diskspace. This is only a temporary constraint — at some point there will be a lot more space, but for now we need to free up some space.

A lot of space is being taken up by old releases, long since superseded. Please delete these old releases if you have some, and the NOC will stop being alerted.

Remember: everything you've ever released to CPAN will always be available in your BackPAN author directory. My PAUSE id is NEILB, so my BackPAN directory is:

backpan.perl.org/authors/id/N/NE/NEILB

How to Get a CPAN Module Download URL

Every so often you find yourself requiring the download URL for a CPAN module. You can use the MetaCPAN API to do this quite easily, but depending on your use case, you may not be able to do this in a single query. Well, that's actually not entirely true. Now that we have v1 of the MetaCPAN API deployed, you can test out the shiny new (experimental) download_url endpoint.

Read the full article.

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.