I was thinking of continuing on with the gum-shoe motif in my post but once it funny twice is dull and three times is just annoying so I will just dive into the real work for today. Looking at the test suite of Driver::DBI and fixing what has broke since I changes up the API all these many days ago.
I ran the full suite and the only one that failed was 't/40_joins.t' and it dies with about 300 lines of of waring and fails. Fortuntely 90% of them where;
Use of uninitialized value in hash element at ./Database/Accessor/Driver/DBI.pm line 325
so better get that one first to make my debugging a little easier on the eyes;
What I traced it back to was this input hash for a static link
At TPC in Glasgow I held twotalks (slides and Video stored or linked on my domain as linked on conference site) about my module Perl6::Math::Matrix. To me the most interesting parts of this talk were musings about how to write a good API in and for Perl 6. And since I already got from the audience a lot of good suggestion(, which are all implemented by now [by the critic or me]), I will write here also a series of posts about this topic and maybe get some inspirations more.
According to the Wikipedia, "The Mission Accomplished" speech was a televised address by United States President George W. Bush on the aircraft carrier USS Abraham Lincoln on May 1, 2003.
My journey so far has been very satisfying. I have had some low times in between but I kept it going. To do this for such a long time consistently, you have to have a real motivation. All credit goes to one man, Neil Bowers, whose contributions inspired me to take this challenge. Every time my PR gets accepted and merged, it gives me immense pleasure that I can't describe in words. Not all my PR were technical. I still remember one PR which was simply adding a space to a line in the code to make it presentable on metacpan.org The response from the author was "Such a perfectionist!". I have compiled some very encouraging responses which I will publish soon.
Its not the end of a story but the beginning of one here in the Moose-Pen today.
When we last saw our hero he was deep into the lair of the dreaded API change gang, Fending off invalidated tests cases left right and center until there was only one left!!
The much to be feared! Test case 't/58_parenthes.t'.
The first error was;
not ok 11 - OR added to last gather condition predicate
It's said that there are two great unsolved problems in computer science: naming, cache invalidation, and off-by-one errors.
If you have a text file and you need to point to particular lines of the file, you may be familiar with the off-by-one errors problem. That's where Text::LineNumber by Jurgen Wiegert comes to the rescue. With this module you no longer need to think about calculating line numbers, but can just hand off the work to the module.
SIMPLE is an experimental attempt to integrate end user scripting into Perl applications. It actually stands for Simple Integrated Modular Programming Language Experiment. The idea is that an application one develops might allow an end-user to run scripts they have made, in a custom language targeting the application's operations. Sounds silly? A script parsing utility written in another scripting language? I do a lot of silly stuff.
Some time ago, I attempted to use a Raspberry pi for robotic and other IO applications. To save time and allow for flexibility, I had developed piGears, a
scripting tool that could handle the GPIO and also have some basic flow control as well as support for I2C devices. It had been useful for my experiments with electronics, but was a rather niche utility.
Well this post will look very similar to one I did a few days ago. Fixing tests that where invalidated by extending the API to stop users from entering dynamic attributes with elements that are not in the elements array.
The first nasty one I ran into was on '31_elements.t' where I got this fail;
Can't locate object method "_lookup_name" via package "Database::Accessor::Function" …
I was getting the error because all of the attributes in elements of the test $da are 'functions' or other classes;
After a few chats at this year's The Perl Conference in Glasgow, and realising that the chosen date for London Perl Workshop 2018 will clash with freenode #live, we decided it would be a good idea to bump the workshop date from Saturday 3rd November to a week later on Saturday 10th November.
However, after speaking to the venue (the usual place of The University of Westminster) this won't be possible due to their prior commitments. So we have decided to push the date back to the "usual" one of the last weekend in November - Saturday 24th.
Having checked a couple of sources the 24th will not clash and this leaves the other potential dates free for people to attend workshops happening then, namely the 3rd November for freenode #live and the 17th November for Barcelona Perl & Friends.
We hope this doesn't affect the plans of anyone who was going to come, and after a straw poll during the first day of lightning talks at TPCiG it seems that bumping the date by a couple of weeks will be of more benefit to those who wanted to attend but wouldn't have been able to (or were going to favour freenode #live).
namespace::clean (along with its cousins namespace::autoclean and namespace::sweep) allows to "forget" imported functions, only making them available for the current package. This is neat.
After looking at the inside of namespace::clean, I thought I could do an inside-out version that would erase imports that come after and not before it. A prototype turned out surprisingly easy to implement.
I was lucky enough to attend TPC 2018 (my first perl conference), mostly because it was in Glasgow, my home town. This was a very busy week, the conference started on the first day of school (ever for my kids!) so I was late every day :P I met a lot of great people, some all too briefly, and learned a lot of interesting things through conversation, unrelated to the talks below.
Here are some of the talks I really enjoyed (in no particular order) and would recommend watching when the individual videos are up (at which point I'll update the links below).
So I have made a decision to drop the new feature of checking dynamic adds as they come in. Fortunately I did this in a branch so all I really have to do is drop that branch from my repo and carry on where I left off.
Now before I do that I did have some good ideas while I was working with this branch which I plan to keep.
The first bit of code I am going to keep is the 'get_element_by_lookup' changes. I found this sub more useful than '_get_element_by_name' as the latter incorporates both the name and the view in the lookup. The code for ' get_element_by_lookup' was just not the addition to the 'elements' attribute it also included a new attribute on the 'elements'.
Now I did notice while I was playing within the branch I found another back-door in the system. I did have this;
"A Haskell challenge"
is my most recent blog post. Michael Arntzenius pointed out that Haskell's native parsers have trouble with its list comprehension syntax, and wondered if Marpa could do better. It can.
On the second day of my newbie adventures in Glasgow, I had the pleasure to talk to Larry Wall, who stopped by our table and told me about the time he was a booth babe himself. That conference is really full of surprises.
We used this day to deliver new fliers, give more information about RPerl, and especially the different possibilities for programmers to try it, through Cloudforfree.org, rperl.org and our new packages.rperl.org installation files. Mahrez is working from day one with Will Braswell to get us a demo on a VM, and they’re making good progress.
Thank you Chris Jack for the photo below, I'm officially part of the TPC photo album! This is when Wendy convinced me to give a thirty-second commercial during the Lightning Talks. I presented our booth, the compiler, and told everyone to come have a look. I look like I know what I'm talking about, right? Well... my heart was racing, I was mostly scared of saying something stupid.. Very intense 30 seconds, glad I did it!
I still remember the blog A year of CPAN uploads by Barbie published on 22nd March 2015. In his blog, he mentioned my name and my intention to break his record. At that point in time, I was at 150 odd days old. I was no where near the Barbie's record number. However I had made up my mind, no matter what I will go past his magic number. One day not only I crossed the magic number 370 but I reached 1000 days mark.
On 23rd July 2017, I blogged about it. In response to my blog, I received appreciation from many greats like Larry Wall, Dave Cross, Shlomi Fish, Lee Johnson and Steve Bertnand. One comment by Larry Wall is still fresh to my mind as below:
My great re-factoing did not really work as well as expected. I has a suspicion, when I started working on the re-factoring, that I would have trouble with the 'parenthesis' check. I though the problem would crop us when adding two or more conditions on separate 'adds' where I open the parenthesis on the fist on and close it on the last.
Fortunately I had a test case, '43_dynamic_conditions.t ', that tests this situation exactly;
Occasionally I find myself running some random Perl script from a Github gist or dealing with some code from a colleague that doesn't have proper dependency management (yet). It's a bit painful to
Belated Happy Independence Day to all my fellow Indian friends.
Last month, August 2018, was really busy for me, personally and professionally. My 9 years old daughter had summer break from school. So lots of action all the time together with the nearly 2 years old twins. Best part of August was attending The Perl Conference in Glasgow with the entire family. My first Perl Conference ever and it didn't disappoint me. We, as a family, got to explore the city of Glasgow and Edinburgh. Already looking forward to the next one at Riga. There was another highlight last month was that I completed one year of daily CPAN uploads and went past Barbie's record of 370 days. As of today, 1st September 2018, I have completed 377 days.
Lets get into details as below:
Pull Request
Git Commits
Pull Request Challenge
Perl Blog
PerlWeekly Newsletter
Adopt CPAN Module
Pull Request
Last month, I submitted 51 PR as compared to 41 PR in the month of July 2018.