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.
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
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).
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...
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.
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
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.
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.
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.
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.
I added a new session storage backend for Dancer2 today. Dancer2::Session::CHI is on its way to your local CPAN mirror. If you are currently using CHI in your Dancer2 applications, this will let you use CHI as your backing datastore for storage data. Please see the pod for details.
Contact me with any issues you may have, or file them on the github bugtracker.
Version 0.03 of XML::Invisible is now on CPAN. This lets you write parsers that produce XML-like Abstract Syntax Trees (AST), or actual XML documents, without writing any code. Why did I write it?
Parsing: a tiny introduction
Parsing is turning a text input, into semantically valuable output. It is often broken into the stages of lexing (turning the initial text into tokens - errors detected if invalid tokens given), parsing (structuring those tokens into ASTs - errors if structure wrong), later processing (doing something with the AST).
There are a number of ways of writing parsers generally. The most maintainable way is using as much of a declarative style as possible, usually by writing a grammar. There are various options in Perl, including Marpa, Parse::RecDescent, and Pegex. For each of these, you have to write a grammar (obviously), and write some code to handle the text inputs and parsing results.
I left off yesterday with a little re factoring to do. I had essentially the same code for handling construction errors in Accessor.pm and in Types.pm. In any other object orientated language I ever worked with this would be rather a pain to fix. Even in plain perl one would have a few problems getting things just right.
Fortunately I am using Moose.
The great thing about Moose a Role can consume another Role. So all I needed to do was suck out all the code I need from the 'around BUILDARGS' call in Accessor.pm and then place it in a separate role class 'Database::Accessor::Roles::AllErrors', create a function to call and then adapt it to run 'inline'.
By 'inline' I mean call the function as if it was an exposed function in some other module. That means I do not this the normal 'shift' at the start of a sub to get the calling instance.
I have updated my "Parsing: a Timeline" to version 3.1. You can see the official announcement on my blog, or "cheat" by going straight to the new timeline.
The timeline is a painless introduction to a fascinating and important story which is scattered among one of the most forbidding literatures in computer science. Previous versions have been, by far, the most popular of my writings.
A third of Timeline 3.1 is new, added since the 3.0 version. Much of the new material is adapted from previous blog posts, both old and recent. Other material is completely new. The sections that are not new with 3.1 has been carefully reviewed and heavily revised.
Between Christmas and new year (Dec 27-30) Leipzig, Germany will hold the largest hacker conference in Europe: the 35th Chaos Communication Congress. Do you consider going to 35c3?
Tickets are sold only in presale. Phase I is reserved to inhabitants of the CCC universe (this doesn't require membership to any organization–CCC e.V. [registered society] members only get a lower price) and in phase II anyone has a chance to get a ticket in the ticket shop.
Last year at the 34c3 I met some Perl people by chance and we agreed to meet this year again and to form an assembly (explanation and list of them from last year). Those are areas shaped by a special interest groups and can be anything from a simple desk up to buildings in the exhibition hall. Do we want to form an assembly (probably a pair of desks for a start)?
I was all ready to wrap up my 'new' constructor errors when I figured I better see what I get when I do something like this;
$da->reset_conditions();
$da->add_condition( {
right => { value => 'test' },
operator => '=',
},);
which will fail as I have no 'left' on that 'condition' and that is what I got.
Attribute (left) is required at D:\GitHub\database-accessor\lib/Database/Accessor/Types.pm line 119 Looks like your test exited with 255 just after 16.
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.