My module Lingua::EN::ABC converts between American, British and Canadian types of English. I've added a new "spelling-only" option to the module which makes it not convert words unless they are pronounced the same but spelt differently. So before it was changing "aluminum" and "aluminium" and "burned" and "burnt", it now won't do that if the spelling-only option is on. This is to assist in looking up words in a dictionary which doesn't feature both kinds of spelling.
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.
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;
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).
"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.
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;
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
My new blog post is
"Marpa and combinator parsing 2"
. In it, I continue to talk about how to combine Earley and combinator parsing to get the best of both.
This time, I have a trial implementation. I take on parsing of Haskell's significant whitespace, implementing all the examples in the 2010 Language Report and the classic "Gentle Introduction". By the time I'm done this amounts to a substantial subset of Haskell's syntax.
#!/bin/bash
for i in *dat.gz
do gunzip $i
echo uniprot_sprot_archaea.dat | perl -slane '$a=(split /\_/, $_)[2]; $a=~/(\w+).dat/; $b=$1; print "perl screen_complete_proteome_from_uniprot_division.pl \$i >> uniprot_".$b.".fasta"' -- -i=$i
done
I don't know coding. But I need to understand this perl commands. From echo to end of the command, I don't understand. Could someone please explain them?
Today I am working of a separate branch 'trigger_dynamic' as I am trying out a large re-factotring of the code. The switch to the branch and then a pull I have
so some major changes. On my first rung to the test cases I got fairly poor results with 14 test cases failing. The majority of fails were tests I invalidated by my code changes from the past few days;
1/12 Gather view_element Price in not in the elements array! Only elements from that array can be added …
# Looks like your test exited with 2 just after 11.
Type::Tiny is probably best known as a way of having Moose-like type constraints in Moo, but it can be used for so much more. This is the fifth in a series of posts showing other things you can use Type::Tiny for. This article along with the earlier ones in the series can be found on my blog and in the Cool Uses for Perl section of PerlMonks.
What a dull title. Anyway. This was intended to just be an account of my experience at TPCiG, but quickly developed into an tl;dr life story. Sorry about that, everyone. Sorry.
I had dreamed of attending YAPC/TPC ever since I discovered what an amazing community surrounded Perl. This year, I realised that dream.
To begin with "The Perl Conference in Glasgow" was my first ever YAPC. Prior to this, I was only regular to London Perl Workshop. It was the gang at German Perl Workshop that I attended earlier encouraged me to come to YAPC as well. I think it was worth attending
the event. To make it even more fun, I brought my young family with me to explore the city as well.
The first thing I did today was save all my work to github and create a new branch so I can work on that trigger idea I had yesterday.
This time out no need to write a test first my present test cases should be all that I need so I can dive right into the code today;
The fist code change I made was to comment out all the code that relates to the '' call for dynamic attributes, not need for that here. Next I changed the name of the trigger function;
-- sub _check_elements_present {
++ sub _check_dynamic {
Then I added this line to all four dynamic attributes
This is a first. First Perl Conference for me, and first time the RPerl compiler is represented at YAPC, also known as The Perl Conference. We had a table, fliers, chocolates, and a computer! Go team RPerl!!!
You may ask : what the heck is RPerl? Very good question, but please watch your tongue. It’s the Perl compiler, for Perl 5 software (and Perl 6 soon), and it’s the work of Will Braswell, long-time member of the Perl community. Its goal is to make your code run faster. Way faster. And it does.