The Moose Did it

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 real problem is this code in my 'Types'

Hacktoberfest 2018 - Memorable Moments

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.

Keep contributing !!!

Lab::Measurement paper published!

Good news: Our article Lab::Measurement—A portable and extensible framework for controlling lab equipment and conducting measurements was accepted for publication by Computer Physics Communications and is available for download!

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.

Happy reading!

Dancer2::Session::CHI released

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.

Thanks! Happy Dancing!

le soleil roi d'orignal

Its another re-factor day here in the Moose-Pen

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.

XML::Invisible - writing parsers without pain or code

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.

"Parsing: a Timeline", version 3.1

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.

Tau Station--A Narrative MMORPG Written in Perl

We've released our first trailer:


Play Tau Station for free and share the video far and wide!

And please don't forget to "like" that video and subscribe to the channel!

Moose Loose Ends Part the XIII

Its discovery day here in the Moose-Pen

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.

Perl[56] on the 35c3

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)?

Why I am writing this blog post:

2018 Dancer Advent Calendar

On behalf of the Dancer Core Team, I am trying to get a 2018 Dancer Advent Calendar organized, and we would like your help and input!

How can you help? It's simple! Are there articles covering some specific area of Dancer or its ecosystem that you would like to know more about? Just reply and let us know what you would like to see.

Do you want to write an article for the advent calendar? Tell us your Dancer success stories, all about a plugin you authored, how your migration from D1 to D2 went... the sky is the limit.

If you have any ideas, please submit them soon to give authors a chance to work on content for the calendar.

My New Homepage

I've not been writing here much because I've been busy building Tau Station--a narrative sci-fi MMORPG. I'm also doing a lot of client work and that keeps me from sharing much here since I tend to take a bit more time when I write entries on this blog.

However, I've taken the time to set up a new homepage for myself. It uses Github pages because it was ridiculously easy to get started. I'm consolidating many of my more popular articles there, and many of the pages have a comments section powered by Disqus.

If you are interested in hiring me or my colleagues at All Around The World, you check out that site or share it with your boss.

Moose Loose Ends Part the XII

Well its fix one break everything day here in the Moose-Pen

I thouhg it was just going to be one of those quick look how well things pass postette days today but I was dead wrong;

I did a check in a a quick push and then ran the full test suite and got

t/20_dad_load.t ............. Attribute (conditions) does not pass the type constraint because: ArrayRefofConditions can not be an empty array ref at /usr/local/lib/perl/5.18.2/Moose/Object.pm line 24
        Moose::Object::new('Database::Accessor', 'HASH(0x2eeb320)') called at t/20_dad_load.t line 15
# Looks like your test exited with 255 before it could output anything.
So many times I just had to kill the run. I am about 99.99756% sure it was this cnage from yeaterday

RPerl at YAPC Europe - Day 3

Final day... and the RPerl live demo works! We can show how fast the compiler runs, and some people even asked if it’s for real. It is! Will and Mahrez did a great job, but they didn’t stop there; RPM installation packages are now available for programmers to try RPerl on their own code. CentOS 7 is currently supported, with more RedHat and Debian operating systems coming up next.

http://rperl.org/get_rperl.html

RPerl is an open source project, meant to benefit the whole community, and even if I don’t really get it, I’m very proud to promote that. I am not a computer programmer myself,
but I am happy to call myself a "Friend of Perl" and also a "Friend of RPerl". You can, too!

I had the great pleasure of talking to Gloria Wall on that last day, after the brilliant interview she gave on day 2. (For those who don't already know, Gloria is the wife of Perl founder Larry Wall.) She told me that not being a programmer doesn’t mean I don’t belong here. Everyone should feel welcome to join in, and bring whoever is interested. I’ll remember that conversation as one of the highlights of this conference. I’m very happy to have been part of it, and I can’t wait until the next one!

received_339660453442015.jpeg

File::Slurp new version

There's a new version of File::Slurp on CPAN.

It looks like a lot of bugs are getting fixed.

Dancer2::Logger::Log4perl released

We’ve been missing a Log4perl plugin for Dancer2 for, well, forever, and this weekend I have released Dancer2::Logger::Log4perl.

This was originally developed by Ryan Larscheidt and Jon Miner at the University of Wisconsin. I have added a minimal test, a little pod, and wrapped a release around it. The rest of this is their work, and I cannot thank them enough for making this happen. Special thanks goes out to Mohammad S Anwar for finding some omissions from my original release earlier this weekend.

There are more tests needed still, but I wanted to get this out in the wild as soon as I could.

If you notice any issues, please report them at https://github.com/cromedome/Dancer2-Logger-Log4perl/issues

Thanks, and happy dancing!

Moose Loose Ends Part the XI

Never say never day here in the Moose-pen

Just when I though I had all the bugs out of my Database::Accessor I found a bunch more while finishing off tests case '42_new_validation.t'.

Most of the bugs where with the 'links' attribute. My test for this attribute are a check to make sure a link has a 'to' is present, and it not undef, and the same for type and then at lease on condition is present.

The first bug was

not ok 19 - type is proper link ; links
and the error it was throwing was;

 'links->type' Constraint: The Link 'undef', is not a valid Accessor Link! Try one of 'LEFT', 'OUTER', 'RIGHT'
and the value in the hash we

     'type' => 'bla',

Rakudo.js update - it has been merged into master (plus 6pad unveiling)

After a round of code review the js branch has been merged into master.
The nqp part has been on master for a long time so the whole js backend is now merged

In other good news 6pad is up (https://perl6.github.io/6pad/).
6pad allows you to compile and run Perl 6 code from the comforts of your own browser.
For now Rakudo.js depends on BigInt support (which mean you should likely use 6pad with Chrome).
BigInt support is being worked on Firefox and all the Chrome derivatives should update their V8s soon.
6pad is still being worked on so it still likely has some bug.
Support for using React to create DOM elements is planned and should come soon.
6pad has support for running your gists so if you write your own spiffy Perl 6 example I'll show it to 6pad users.

Focus of the JS backend will now be on on polishing 6pad and fixing some failing tests.

A Request to Larry Wall to Create a Language Name Alias for Perl 6

Read this article on Rakudo.Party

I (Zoffix Znet) am writing this document to Larry Wall to request the creation of a second name for the "Perl 6" language. This name is not a rename of the language, but is simply an alternative name, an alias. Similar to how TimToady is an alias for Larry Wall.

It's been a year and a half since the time when I first re-opened this issue with a blog post, and in this document, I compiled the argumentation for creation of the alias, the community suggestions for what that alias might look like, along with the observations of discussions on the topic that occured during that time period.

I ask that Larry Wall renders his decision on the alias by November 1, 2018, so we would have the time to create proper informational materials for the 6.d language release, during which time, the name alias would be officially announced, if one is chosen.

Community Alias

Check of the Perl 5 interpreter using a static analyzer

Developers team of the PVS-Studio static code analyzer for C/C++/C#/Java checked the Perl 5 source code and found some errors.

For example, the incorrect using of the ternary operator:

V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '-' operator. toke.c 9494

if (s <= PL_bufend - (is_utf8) ? UTF8SKIP(s) : 1)

All examples are available in the article: Perl 5: How to Hide Errors in Macros.

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.