Well Not Really Much Today

Well it is another planning day here in the Moose-pen

In my last post I did manage to get the change of name-space 'DAD' to 'Driver' done rather easily, thanks test suite, but I did leave an question open to me once I made the change. Have I the right name-space for my 'SQL' driver.

My plan so far was that I expected a DBI handle (DBI::db) was going to be passed into my Driver as some point. So would it not be better to call this driver 'Driver::DBI' than what I was originally thinking 'Driver::SQL'

Taking one step back I also want to make a 'Driver::Mongo' as well so I think the name-space change to DBI dose make sense. Now before I do that I want to take a closer look at DBI and its DBSs.

I did a quick count of all the DBDs out there and there are the numbers I came up with

  1. 60
  2. 42 and
  3. 2

AWS CodeBuild

I've been playing with Amazon's CodeBuild for Bedrock's CI/CD pipeline.

Some gotchas but CodeBuild is cool.


http://openbedrock.blogspot.com/2017/03/aws-codebuild-howto.html

Metric Time in Tau Station

If you've been following our progress with Tau Station, you know we're creating a science fiction universe in Perl for people to enjoy. As of this writing, the time in Tau Station is 194.10/51:647 GCT.

"GCT" stands for "Galactic Coordinated Time" and that's a variant of metric time. As a software developer, I wish we had that in the real world, but alas, we don't.

The GCT time listed above is roughly 194 years and 10 days after the "Catastrophe" (an apocalyptic event that effectively serves as our "epoch"). There are 100 days in a year, 100 "segments" in a day (14.4 minutes each) and 1000 units in a segment (.864 seconds each).

I love the fact that figuring out the display time for GCT is this simple:

my $days = sprintf "%9.5f" => $seconds_since_catastrophe / $second_in_a_day;
$days =~ m{^(?<year>\d+)(?<day>\d\d)\.(?<segment>\d\d)(?<unit>\d\d\d)}a;
my $gct = "$+{year}.$+{day}/$+{segment}:$+{unit} GCT";

Perl 5 Porters Mailing List Summary: March 6th-12th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

Fail the Moose Test

It is start something new day here in the Moose-Pen

Today I wanted to start writing up my first Database::Accessor::Driver, so I quickly came up with this

Perl6::Tidy initial release

Perl6::Tidy has been released to GitHub, not on the ecosystem yet. The driver program is 3 lines, mostly passing options to the tidier. Which is 6 lines, doing the real grunt work.

It doesn't do much yet, but it's pure Perl 6.

Raspberry Pi becoming more prevalent?

The last half-year or so, I've been hacking on different Integrated Circuits, various small hardware, learning how to wrap specific C software (while ensuring the code remains within the Perl license) in order to bring the Raspberry Pi toward the realm of reasonable Perl programming.

I have written numerous pieces of software to allow this. The first was WiringPi::API. This is the core wrapper that allows you to use the wiringPi library right from your Perl scripts.

I pushed this further with RPi::WiringPi, which is an object oriented wrapper for WiringPi::API, but performs important benefits; it registers pins so you can't re-use them by 'accident', and it does an auto-cleanup (ie. it resets everything back to non-dangerous state) on failure. It also allows you to pull in other RPi-type objects and use them directly.

With the different ICs, hardware, etc that the RPI:: scope encompasses, I've finally run into a situation where I can't effectively ensure the quality of it all.

My First Articles

It's my first articles in blogs.perl.org

Nail that Moose

Well it back to the Moose-Pen for me.

Seems I have kinda drifted far from my original intent of all this blogging get a useable version of my Database::Accessor module out on CPAN. Though the last little while has been a very good learning experience for me it is time I get back on track to make sure I get a version out by Christmas.

In my first round of Moose-Pen post I gave a good example of how test driven development really does work well. The very short cycle of write a small test for requirement, write a little code, pass the test, reactor the code if needed and rerun test, it you pass out start the cycle again.

I also spend a good deal of time getting into Dist::Zilla and in this round of coding I am going to see how add in a little Dist::Zilla and Pod::Weaver to start along with my test driven development works out.

Dancer2 0.205000 improves application speed, deprecates request->dispatch_path

Dancer2 0.205000 is on it’s way to CPAN, and brings with it a number of bug fixes, documentation improvements, and enhancements. The changes with the most potential impact to your existing applications include:

[Off topic] PHP syntax is (version && context) dependent

PHP accepts or rejects certain syntax depending on the context.

Let's hope you never have to deal with things like this.

Shire Calendar Update

I have recently adopted modules Date::Tolkien::Shire and DateTime::Fiction::JRRTolkien::Shire.

The releases to date have been relatively minor fixes, but the development releases of a couple days ago are more significant, to the extent that I thought users of these modules should get a "heads up."

  • Common code and data have been factored out into Date::Tolkien::Shire::Data. This module also provides time formatting, allowing the implementation of a strftime() method in both the original modules.
  • The direct conversion of dates between Gregorian and Shire in both modules has been replaced by calculations in terms of Rata Die days. Regression tests have been provided (in xt/author/regression.t) to try to ensure that this did not break anything.
  • DateTime::Fiction::JRRTolkien::Shire has been provided with most of the DateTime interface. The known missing pieces are:
    • Duration and date arithmetic. I hope to add this in a subsequent release.
    • format_cldr(). I am not sure whether this will be added or not; at the moment the implementation path is unclear to me.
    • era(), which is marked as deprecated in the DateTime code.

I can not imagine that there are any mission-critical uses of these modules, but interested parties should probably take a look at the revisions, and let me know if anything untoward turns up.

Tom Wyant

Dist::Zilla Its a Wrap VI

Last one I promis in the Dist-Pen

The go of my Dist::Zilla~Pod::Weaver round up.

Dist::Zilla Gets More Legal

Went back to law school in this post. Has a look at three section plugs ins [Legal::Complicated], [Legal::Supplemented] and
[LegalWithAddendum] all of wich let you tweak your leagize the way you want.

Dist::Zilla Gets Used

I had a look at the [ Requires ] section plugin today which is good on two fronts;
  1. you should list your deps someplace in your POD and
  2. it will find out all mods that are used so you can find ones that you many not require

Dist::Zilla Needs Support The first

Looking at the [Support] in this post and found that it was quite extensive so only covered its default functionality.

Dist::Zilla Needs Support The Second

A closer look at the [Support] section plug-in in this post. Took out some parts I did not like and added in bits and costom content to my likeing.

That moment when your auto-scaling, self-healing servers and...



That moment when your auto-scaling, self-healing servers and continuously integrated and continuously deployed codebase all start working together seamlessly and flawlessly. 

If none of that made any sense to you, then just understand this: 

muhahahahah! *rubs hands together while laughing maniacally*

[From my blog.]

Perl Developer Survey 2017

We’re doing a survey for the entire Perl community to find out some specifics and peculiarities about Perl and more importantly, about Perl developers. The survey itself is meant to gather some perspective regarding how developers are using Perl, where are they using it and how Perl is used with other technologies. This is basically a State of Perl in 2017 survey.

The survey will be open from the 7th of March to the 14h of April.

Please share it within your local Perl communities, every answer counts and makes this survey more relevant. The results will be available for the entire community to see, we will publish them the following week after the end of the survey. The data acquired through this project will show just how Perl is used and how the developer community is presenting itself at this point in time. It has 31 questions and it covers personal programming preferences, employment facts, geographical criteria, community events, tech stack data and more.

This is a great opportunity to capture the state of Perl as a language and as a community.

Join us to paint the picture of Perl in 2017!

Fill in the survey here!

Don’t forget to share!

Originally published on Builtinperl.com

A happy mod_perl story

10:26 < kd> me:  "how do I integrate the REST API with our psgi/mod_perl abomination?"
10:26 < kd> colleague:  "aah I've been wanting to do that for a while, do you really need it?"
10:26 < kd> me:  "yeah it would be good"
10:26 < kd> [waits two days]
10:26 < kd> colleague:  "here, have a code review"
10:29 < kd> meanwhile it gave me the opportunity to prototype an important thing via a semi-abomination that would never be acceptable in production.  So 1. We got a feature we really needed, and ensures the longevity of the platform, and 2.  I got to do the important thing of  getting my thing wrong on the first try.

Dist::Zilla Its a Wrap V


Another non creative day here in the Dist-pen


Well another ten to do. Getting close to the end! This is the spot where I start my series of going over most of the available Section plugins.


Dist::Zilla Ready and Available

The first post of many looking at the various section plug-ins that are left over. The [Avaliability] plug-in is one works closely with Dist::Zilla and I also left you hanging with a problem I was having.

Dist::Zilla Flash Bugs

Well still suck in the [Availabillity] plug-in but I did find a bug which I patched locally and got the plug-in to work correctly for me. I think that is the second bug, well maybe 1.5 bug I have found since I started playing with Dist::Zilla.

Dist::Zilla Report Bugs

Well in post I am no longer finding bugs but I did look at the [Bugs] plug in so at least in my next POD I will have a blurb on reporting bugs.

Perl 5 Porters Mailing List Summary: February 27th - March 5th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.

Enjoy!

Camel Doctor version 0.1.0

I am happy to announce the initial release as an independent application of Camel Doctor - a simple HTML user interface for the default Perl debugger implemented as a Qt 5 executable. The debugger output is displayed together with the corresponding syntax highlighted source by a small formatting script. Syntax highlighting is achieved using Syntax::Highlight::Engine::Kate CPAN module by Hans Jeuken and Gábor Szabó. Camel Doctor is an implementation of an idea proposed by Valcho Nedelchev and provoked by the scarcity of graphical interfaces for the Perl debugger. Camel Doctor was started as a part of Perl Executing Browser in 2014.

As usual, any ideas and feedback are quite welcome!

Make your CPAN module static installable

CPAN modules are normally distributed with Makefile.PL or Build.PL, so that people can install them by

> perl Makefile.PL
> make
> make test
> make install

This makes CPAN modules installable without any CPAN clients help unlike other programing language ecosystem (such as ruby(gem), node(npm)).

On the other hand, today, people mostly use CPAN clients (such as CPAN.pm, cpanm) to install CPAN modules. And it seems that when CPAN modules are not "complicated", CPAN clients easily expect how to build/test/install them even without executing Makefile.PL or Build.PL.

Now we have the concept Static Install. That is, if CPAN modules are not "complicated" and set x_static_install 1 in their META.json, then we may install them statically.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.