Yesterday I merrily finished off all the changes where I swapped out die for confess and the changes where I updated the error messages to the same standard. I then happily check in Accessor.pm and was looking forward to a quick testing post for today. happily finished and checked the lot in. Then tried to run my test suite an got;
t/00_load.t ................. 1/1
# Failed test 'use Database::Accessor;'
# at t/00_load.t line 7.
# Tried to use 'Database::Accessor'.
# Error: syntax error at /home/scolesj/database-accessor/lib/Database/Accessor.pm line 627, near "if"
# syntax error at /home/scolesj/database-accessor/lib/Database/Accessor.pm line 718, near "if"
opps obviously I did not run any tests before I checked in and pushed my code to github.
I came to my first ever Perl Conference to run a booth, which is quite the intimidating task, as I am but a humble Perl newbie.
I was representing RPerl, Will Braswell's Perl 5 compiler, and did my best to try and explain its purpose to the intrigued visitors. In case you missed the booth, I'll do a quick recap. RPerl can do two things: first, it can optimize the speed of normal Perl 5 apps to over 400 times in some tests; and second, RPerl can protect the intellectual property and source code of your software.
Between the conference days, I helped Will set up a Linux VM that would run a live demo of the compiler, and we were able to show it on the last day. This live RPerl demo included physics simulation algorithms running in both slow interpreted mode and fast compiled mode.
The conference was a great opportunity to meet several prominent members of the international Perl community, such as Mark Keating, Wendy Van Dijk, Jeff Goff, etc. I enjoyed my first experience at The Perl Conference, and I look forward to more in the future!
As we can only accommodate at most 30 participants, we've set up a page on MeetUp, where you can register to attend. If you don't have a MeetUp presence, the MeetUp page has instructions for emailing the organizers directly so you can have your name added to the attendance list. Note that, although the MeetUp page is mostly in German, the class will be entirely in English. :-)
Thanks again to Frankfurt Perl Mongers, who are sponsoring my entire tour, to Berlin Perl Mongers, who are the local organizers, and to Strato AG, who are helping with the organization and also providing the training venue.
If you have input containing lots of Unicode diacritics, and you need to process them into equivalent ASCII characters, there are several options on CPAN. My module Unicode::Diacritic::Strip offers a slow and reliable method involving the use of Unicode::UCD, and a fast method involving a tr/// operator.
Today I was examining user logs for a web application, and I noticed that the fast method had completely failed on input "Jalālu'd Dīn Muḥammad Rūmī" because it had failed to catch the middle h character. Looking at the Unicode characters I found a whole block of Latin characters which I'd omitted. I've now added them to the application for version 0.11
As I am a little lazy today and I didn't have time to work on this project last night, there was a Godzilla film festival on last night, it just a quick postette today.
I went though all the Database::Accessor code today and cleaned up at least the format of my die calls.
Looking about at a number of other applications I figure I might as well go with the semi-standard CME or 'Class', 'Method', 'Error' style.
Lets take this first example the Die that one could run into and that is found in the BUILD sub of Database::Accessor when it call out to the '_loadDADClassesFromDir' sub;
opendir( DIR, $path ) or die "Unable to open $path: $!";
Not one of my better error messages so I changed it over to;
I use ETL::Yertl a lot. Despite its present unpolished state, it contains some important, easy-to-use tools that I need to get my work done. For example, this week I got an e-mail from Slaven (a CPAN tester and a tireless reporter of CPAN issues found by testing) saying that some records were missing from one the APIs on CPAN Testers: The fast-matrix had 3300 records for the "forks" distribution version 0.36, but the matrix had only 300 records. The utilities in ETL::Yertl made it easy to find and manipulate the data I needed to diagnose this problem.
Mojolicious has a new logo. New shirts, stickers, and other swag coming soon.
The Nordic Perl Workshop and MojoConf are the same thing. They had to share the #npw2018 tag with National Payroll Week going on at the same time in the UK.
I released a preview copy of my secret project to write a Mojo Web Client book in three months to deliver at this conference. I got really, really close. I expect it to be available through PerlSchool at the end of September.
Mojolicious 8 adds several things. Even more Promises, Roles, secure user-agents, and many other things I had to adjust in my Mojo Web Client book.
Joel Berger gave his Mojolicious Gardening talk about how to go from a Lite app to a full Mojo app. It's a lot less work than you think and you don't have to do it all at once.
Dylan Hardisonn is rewriting Bugzilla in Mojolicious. Bugzilla has a feature that allows people to apply a limited number of votes to issues. Scarcity allows the important issues to float to the top.
We had a lively discussion about what syntax edge cases we'd like to go away.
Salve Nilsen thinks every Perl programmer should have a Perl sticker on their laptop as a conversation starter.
If you hang out at Hackeriet you are expected to drink Club-Mate (informal advertising slug "You'll get used to it", maybe apocryphal)
All the tech companies seem to be hiring. Sebastian says SUSE has lots of jobs.
Kronberg Satellite Services was a sponsor, but we didn't get any free satellites or telescopes. They were quite generous despite that.
Disclaimer: this looks like an advertisement, but it's not. I just want to spread the word about really cute Perl goodies. I won't get any money from that.
Do you know amigurumi? It's stuffed crocheted creatures.
A few weeks ago, a free software enthousiast, DoomyFlo asked on Mastodon what kind of FLOSS-related stuff she could crochet. I suggested the Perl onion and the camel and the result is awesome!
Well not really error day more like lets have a look at the errors I spit out and attempt to standardize them, but that is too long for a catch title.
First thing to do was have a look at how my Accessor.pm and from a review I see that I only use 'die'. I found it in about 22 spots in the code. The good thing is I don;t have a mixture of croak, die and croak
carp and confess. The bad thing is I wad never very consistent with my die messages;
Most are just simple strings such as
Attempt to use create with no_create flag on!
The \$container Hash-Ref cannot be empty
Thanks to the generous sponsorship of the Frankfurt Perl Mongers,
next week I will be doing a lightning tour through Germany.
On Monday September 10th, I'll be kicking off in Frankfurt, talking about functional programming in Perl all day, and in the evening about my latest Perl modules and the epic three-year saga of how they came to be.
On Wednesday 12th, I travel to Dresden, where I'll be explaining how to have
fun with dead languages.
And on Thursday 13th and Friday 14th, I'll be in Berlin, giving an evening talk (topic yet to be announced) as well as a full day class on the best new features added to Perl in the past decade.
All these events are absolutely free (thanks again to Frankfurt.pm!) and open to
anyone interested in Perl, in multiparadigm programming, in necrolinguistics, or
just in having a good geeky time.
What would happen if we took the edges cases out of the Perl syntax? We were talking about this over lunch at the Nordic Perl Workshop. I wondered what would happen if we could make a grammar that other things that aren't perl could statically parse? This experiment doesn't care about backward compatibility. We end up with a slightly smaller
Part of the problem is that Perl code can run during the compilation and that can change the way that the parser works. What if that could still happen but the syntax would be the same?
The other huge problem is the availability of CPAN. Which features' disappearance would break CPAN beyond the point where people didn't want to use Perl? Not all of CPAN is important, and how hard would it be to fix these edge case syntax items?
It seems I am getting close to finishing off Database::Accessor and Driver::DBI. I have a very complete test suite for both and an extensive practical test suite for Driver::DBI and all three are running at 100% pass. I should be happy.
Well I am not. The practical testing did show me one major API change that I should make.
If one of the main advantages of Database::Accessor is that it can protect the data in your DB from injection attacks and from backdoor queries that can find things out about your Data or even change it.
It is serves to reason that anyone who is going to try and do this sort of malfeasance at the code level really wouldn't bother to use Datadate::Accessor. Given that the calling format for Database::Accessor is;
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.
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
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.