Well was all ready to move onto the final documentation and distzila stage of Database::Accessor and then I ran into a few little tings when I reran the full test suite.
First there was this annoying warning;
Use of uninitialized value $error_package in string eq at \GitHub\database-accessor\lib/Database/Accessor/Roles/AllErrors.pm line 59.
a simple fix really just this;
my $on ="";
-- if ($error_package eq "Database::Accessor::Element"){
++ if (($error_package) and ($error_package eq "Database::Accessor::Element")){
$on = " Possible missing/invalid key in or near:\n"
. Dumper($Database::Accessor::Types::LAST);
}
I have been making a lot of changes to Graphics::ColorNames lately. The module has gone too long without any maintenance, and suffered from feature bloat.
Some notable changes that are already on CPAN:
A switch to semantic versioning, e.g. v3.3.3.
Some color schemes (Netscape, HTML, Windows) have been moved to separate modules.
The Netscape and HTML schemes have been deprecated in favor of the WWW scheme.
The X scheme has been updated to the latest X-Windows colors (which includes the CSS/WWW colors).
Roadmap for the future
I am planning on making the following changes:
Removing autoloaded method names for colors.
Removing the (deprecated) tied interface, but putting that in a separate module
Moving the color schemes into the Graphics::ColorNames::Schemes namespace, but provide an option to use the old namespace.
Every year since 2009, the Perl 6 community publishes a Perl 6
advent calendar, in the form of blog posts on perl6advent.wordpress.com.
To keep up this great tradition, we need 24 blog posts, and volunteers who
write them. If you want to contribute a blog post about anything related to
Perl 6, please add your name (and potentially also a topic already) to
the schedule, and if you don't yet have a login on the advent blog, please
tell Zoffix or someone on
#perl6 IRC chat your email
address so that they can send you an invitation to Wordpress for the site.
Perl 6 advent blog posts should be finished the day before they are due, and published on midnight (UTC) of the due date as publishing date.
I finally found a way (well not a good one) to generate an even better error message to my end users. You are of course quite familiar with this type of message;
Database::Accessor add_condition Error:
The following Attribute is required: (Element->name)
With constructor hash:
{
'operator' => '=',
'left' => {
'view' => 'People',
'name' => 'last_name'
},
'right' => {
'left' => {
'name' => 'salary'
},
'right' => {
'expressionx' => '*'
},
'function' => 'LEFT'
},
'close_parentheses' => 0,
'condition' => 'AND',
'open_parentheses' => 1
}
Very hard to find out that it is the 'expressionx' that is giving us grief. With the changes I have just completed I now get
If you write any software package, you have to document it. This simple truth drives more than few developers into despair. But there is also a way to craft good documentation and make the writing of it a useful part of the development. This is the closing part about authoring a Perl 6 module and Math::Matrix in particular (part: one, two, three, and four).
Its never stop improving day here in the Moose-Pen
As I was cleaning things up today I found yet another little improvement I can do to my error messages. Right now when I have deeply buried bad item such as the 'names' in this $in_hash
After a long, long time, Dancer::Plugin::reCAPTCHA has been updated. Most important in this release is that it now supports reCAPTCHA v2. Earlier versions only supported the v1 API, which is no longer usable. This required some minor changes to the module's API. Please see the POD for details.
Thanks to Shawn Sorichetti and Mohammad S Anwar for their contributions, without which this release would not have been.
These days, I have been using other means for fooling bots (which in part explains why this has taken so long to update). I will try to cover this in a future blog post.
Dist::Zilla is a great tool... but its main weakness is nearly its main advantage...
In My Opinion, Dist::Zilla Plugins are what makes my dzil workflow so great....
but on the other side, installing all the plugins and their dependencies is painful and can be very slow...
It's acceptable to install all these packages that are going to let you save time while developing and releasing your distro.... but contributors and Travis CI should not be slowed down by requiring the installation of these extra packages...
By tweaking the dist.ini of my distro by using a combo of GatherDir + Run::AfterBuild plugins, I could reduced the travis build time for a single Perl version from more than 4 minutes to about 30 seconds...
When smoking with Perl versions from 5.14 to 5.28 the total build time was reduced from 32 min to 5 min.
Here's another update about the grant for revitalizing blogs.perl.org. I'll start with an overview of what I wanted to achieve in the beginning, and where we got from there.
When I started this process, I looked at the "mainstream" PearlBee version as a basis for the new blogs.perl.org, and also the previous grant work that had be done. They each had different issues, in my view. The former was pretty much unfinished and barely usable, and the latter was way too big in number of features and requirements. I aimed for something small and stable, with just what was needed.
Just a few quick things here in the Moose-Pen today. I want to make sure that my '_one_error' sub will return the same style of results no matter from where it is called and I want to make sure the 'DA_ALL_ERRORS' $ENV var is respected.
I did the $ENV first at that was a little tickly; I made this change in Accessor.pm
Version 0.01 of JSON::Transform is now on CPAN. It lets you express transformations of JSON-able data (i.e. data that is only hashes, arrays, simple scalars plus booleans) concisely and declaratively, without writing any other code.
Locations within the data structure are expressed using JSON Pointer (RFC 6901), and there are both user and automatically-system-set variables available that can be interpolated to make such locations be computed.
What is this for?
Ben Bullock poses an excellent question in the comments: "What kind of jobs would we use this for?". My answer is that this provides another tool for separating out a common class of concerns, to reshape data. This is part of my ambition to eliminate a lot of code that people routinely write. By porting this module to other languages, that will make my libraries more widely usable.
I remember the first time when I participated the Hacktoberfest challenge in the year 2015, I was so excited competing with other hackers. Although I only had to submit 4 Pull Request to get specially designed free T-shirt but I went ahead and submitted 45 Pull Request in that month. I was very pleased to receive my first T-shirt. I still wear it occassionally with pride. I continued participating the challenge every year ever since but never beat that first year record of 45 Pull Request.
Year 2016: 12 Pull Request
Year 2017: 40 Pull Request
This year 2018, has been special to me in many ways. Therefore I wanted to go out and break the record. Also this is the last year for Pull Request Challenge, I wanted to make it memorable. Thanks to all the people who have supported me all the way and accepted my Pull Request. I feel honored to see so many encouraging messages from the "Whos Who" of Perl Community.
With all the support and encouragement, I have gone past the 100 Pull Request mark and there are still 10 odds days left in the month. At this rate, I am hoping to go over 150 Pull Request. Fingers crossed. Acceptance rate is little over 50%, which is not bad.
The Lab::Measurement software stack is a feature-rich solution for measurement automation and instrument control, which is both lightweight and highly portable to different operating systems. It is actively used by an increasing number of research groups, mostly for experiments in mesoscopic physics, but recently also in particle physics and quantum optics. In many cases it has completely replaced proprietary tools like LabView or Matlab!
The paper also covers the ongoing port of the stack to modern Perl techniques which lead to a considerable improvement of maintainability and extensibility.
Its hold your head in shame smarty pants day here in the Moose pen.
So here I am with a little 'mea culpa' for yesterday post. I had what you would call a real newbie flaw to to that I should of caught right away.
Now it was not in the re-factoring or the implantation of the re-factoring that was all ok my problem was assuming that the coercion of my objects was not happening on a new. Of course it was so when I hit the test where I had an coercion error on new on a coerced object I was getting a double fail that would wash out my original fail.
I have just completed the marathon of submitting Pull Request as a part of Hacktoberfest Challenge 2018. For those, who don't know what I am talking about. Hacktoberfest Challenge is an annual event organised by Digital Ocean where you are encouraged to submit at least 5 PR to any distributions hosted on GitHub. In return you get specially designed T-shirt deliver to you anywhere in the world for FREE. It was first started in the year 2014. How did I get started? I was introduced to the challenge first by one of the blogs by Neil Bowers in the year 2015. Ever since, I haven't missed once. I am really addicted to it, to say the least.
I wanted to share with you a new experimental project which could allow you to mock file tests also known as -X.
All started while we initiate a larger discussion about testing, and decided to give a size to our unit tests. Using sizes like the ones used for t-shirt: Small, Medium, Large...
The definition for each size might differ and evolve.
But at one point we were considering that a small test should not have any interactions with the file system....
So how could you test such a function, without any interactions of the filesystem...