No Moose Change

Another test postette here in the Moos-Pen today.

To finish off the '30_where_basic.t' test case I decided to add one more test; the function from hell;
(abs((People.salary + .05) * 1.5))*People.overtime+(abs(People.salary+.05) *2)*People.doubletime)
I diligently set that test up and then when I ran it I got

# Expected SQL--> SELECT people.first_name, people.last_name, people.user_id FROM 
people WHERE ((abs(people.salary + ?) * ?) * people.overtime) + ((abs(people.salary + ?) * ?) * people.doubletime) != ?

# Generated SQL-> SELECT people.first_name First, people.last_name Last, people.user_id "User ID" FROM 
people WHERE ((abs(people.salary + ?) * ?) * people.overtime) + ((abs(people.salary + ?) * ?) * people.doubletime) != ?
the conditional part was correct but I was getting the elements left over from my last test. Opps!

Perl 5 Porters Mailing List Summary: October 10th-15th

Hey everyone,

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

Enjoy!

graphql-perl - Mojolicious::Plugin::GraphQL - Mojolicious GraphQL endpoint

Having made a Dancer 2 plugin to easily make GraphQL endpoints, it only seemed fair to make a Mojolicious plugin to do the same thing. That has just been released to CPAN. There is also a sample applet for Mojolicious::Lite.

Sample code from the applet:

6lang Naming Proposal is Good

I think 6lang naming proposal is Good

6lang: The Naming Discussion Update

I'm Perl programmer, not Perl 6 programmer. People seem to think Perl 6 is successor of Current Perl at first time.

It is strange that Version Number is contained in Language Name. We should admit this idea is wrong.

Perl 5 vs Perl 6 never produce any values. Many misleading occur and it damage Marketing of both Perl 5 and Perl 6.

Both children are damaged for a long time.

In Perl 6

Perl 6 is new language, has new paradigm, features, for example Parallel processing.

But Perl name call in our heart that it is traditional and plain old. Perl is King of script language Backward Compatible. Perl 6 is never so.

New Things need New Name. If old name is used, the value of new things is hard to see from normal people.

In Perl 5

Perl 5 wait to upgrade Perl 7. Ruby became Ruby 2, Python became Python 3, PHP became PHP 7. But Perl is Perl 5 for a long time.

Reset is needed from both perspective of Perl 5 and Perl 6.

Perl 7.0 and 6lang 7.0

If both language start to walk at each way, it is good.

How about Announcement of Perl 7.0 and 6lang 7.0.

Little Moose Bug

It is quick fix postette day here in the Moose-Pen

Yesterday I left off with one fail in my '30_where_basic.t' test case

# Expected SQL--> SELECT people.first_name First, people.last_name Last,
 people.user_id "User ID"
# Generated SQL-> SELECT people.first_name, people.last_name, people.user_id 
FROM people
my alias on these Elements

proper planing (CP part IV)

After part one (main idea), two (prototypes) and three (sane boundaries of responsibility), I head toward the big picture. How does a project head coordinates planning under a "complete programming" (c) (tm) methodology.

There are many more details about planning in CP I left out for now, because it is already a lot to think about. In the next part I will write about the role of software tests in CP.

Announcing meta::hack v2

It's that time of year again. The core MetaCPAN hackers are going to be hacking on MetaCPAN next month. We are still looking for some sponsors. Read the full post.

Perl 5 Porters Mailing List Summary: October 2nd-9th

Hey everyone,

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

Enjoy!

Moose Works Harder

Its move along day here in the Moose-Pen

Today I managed to get the time to create '25_exe_array.t' which tests DBI execute array and it went quite well. No real story on that one just with my new 'Test::Utils::sql_param_ok' function I was able to quickly expand it out from just 3 tests to 6 in a few minutes.

I then moved on to '30_where_basic.t' where the idea was to test the basic parts of a 'condition', The basic parts being simple single level predicates mixing elements, functions and expressions.

After creating some 64 tests and giving it a few goes to get rid of the usual typos I ended up with 24 fails out of the 64 and all of them where much like this example;

Docker based Continuous Integration for perl projects

Here are the steps to getting started

  • Login to Shippable using your GitHub or Bitbucket credentials.
  • Enable the project

On the Shippable landing page, select your subscription from the Subscriptions dropdown. This should be the subscription where you forked the repository. Click on your GitHub/bitbucket name


subs.png

click on the Enable Project button. If you have not enabled any projects on Shippable, you will be directly be taken a page which shows a list of your repositories.


Find the Docker-CI-perl project and click on the Enable button. You will be taken to a page which shows that Status as Not built, towards the right of that table there is a build button. Click on that to start a build.
while the build is running you can on the id ( # column ) to look at the console. Once the build is done you can look at the test results.

Dancer 2017 Survey: Update

We are a week into the Dancer 2017 Survey, and we have received 77 responses to date. The Core Team has received a lot of great feedback from the community so far, and it has already resulted in some exciting new work, the most notable of which being the release of Dancer2::Plugin::Websocket by Yanick.

The Dancer Core would like to thank those of you who have taken the time to respond thus far, and would like to encourage those of you who have yet to respond to take a few minutes and give us your feedback. You can help determine the future of Dancer!

If you are interested in helping with Dancer, but are unsure of where to begin, check out the list of issues on Github. There are a number of issues that are not only tagged as being up-for-grabs, but many are even beginner suitable. If you have any questions, please engage with us on IRC, Github, or our mailing list.

On behalf of the Core Team, thank you, fellow Dancers!
Jason

Perl 6 at the London Perl Workshop - 25 Nov 2017

Been half-following Perl 6 development and wondering whether it's for you? This year's London Perl Workshop (Nov 25th) features:

Perl 6

Simon Proctor gives us "Perl 6: A Whistle Stop Tour", aiming to answer the fundamental questions: is this useful? Could I use this in production? Should I use this in production? Why might I want to?

Granada's JMERELO looks into "Perl 6 as a first language". With its use of Unicode, generosity of operators and their combinations, and the amount of baked-in data structures, Juan argues Perl 6 makes an excellent choice for teaching programming and computational thinking, as well as more experienced developers who want to stretch themselves.

Don't want to just sit on the sidelines? Lance Wicks runs an interactive workshop on Bailador, the Perl 6 web framework, covering everything from rakudobrew up to the deployment and hosting of your first Bailador project. The workshop is designed to be beginner friendly: it doesn't matter if you're new to web development, Perl6 or Bailador, there's something for you.

Attendance at the London Perl Workshop is free of charge thanks to the generosity of our sponsors - you can signup and find out more about the conference here: http://londonperlworkshop.org

Little Moose Error

Its little bird day here in the Moose-Pen

How does that 'The Be Good Tanyas' song go?

And I sing, the littlest birds sing the prettiest songs …
For us Perl types it should be
And I swear, the littlest typos make the ugliest bugs ...
You will remember that I left off yesterday with this little bug;

Expected SQL--> SELECT people.first_name, people.last_name, people.bonus * abs(?) FROM people
# Generated SQL-> SELECT people.first_name, people.last_name, people.bonus * abs(?),1 FROM people
I was getting ',1' tacked onto the end of some of my generated SQL.

This one proved rather frustrating to track down, and it took much more time than one would expect. I suspected it has something to do with the 'function' part of the '_field_sql' code so I started there but despite my best efforts of adding warnings on each line I could not find it.

Fancy a Game of (Code) Golf?

Code golf, for those unaware, is a game designed to let you show off your code-fu by solving problems in the least number of keystrokes. It goes without saying that Perl lends itself well to golfing.

code-golf.io is a new website that lets you write such solutions, have them scored in real-time, and compete with other users on per-hole, per-language, and overall leaderboards.

The project is very young and will grow to have more holes, more languages, and more features over time, but it's also open source, so feel free to help it along. Patches welcome!

So come one, come all, and either add to Perl 6's dominance, or knock Perl 6 off the top spot with your awesome Perl 5 one liners! JavaScript, PHP, Python, and Ruby are also supported for the heathens :-P

Machine learning in Perl, Part3: Deep Convolutional Generative Adversarial network

Hello all,
Quick update on the status of AI::MXNet.
Recently MXNet proper got a cool addition, new imperative PyTorch like interface called Gluon. If interested please read about it at Gluon home page .
I am pleased to announce that Perl (as of AI::MXNet 1.1) is joining a happy family of Lua and Python that are able to express ML ideas with Torch like elegance and fluidity.
Today's code is from Perl examples, and if you would like to understand it deeper please read the details at Gluon DCGAN example .

Iridium Flare End-Of-Life

For twenty years Iridium Communications Inc has provided global communications with a fleet of 66 satellites, plus spares. For most of that time the satellites have had the same design, and a consequence of that design was their ability to produce very bright and predictable flares due to the reflection of the Sun off their Main Mission Antennae. Beginning January 14 2017, though, satellites of the original design are being replaced by a new design that does not flare nearly as often or as brightly.

Perl module Astro::Coord::ECI::TLE::Iridium, part of the Astro-satpass distribution, predicts these flares. It seems to me to be time to start thinking about how to retire this module.

How much is too much Moose Testing

Its test test and test again day here in the Moose-pen

Today I added in over 70+ tests into '20_fields.t' and I went though almost every conflagration of fields, params, expression and functions I could think of even the expression from hell from this post.

I did today's work by the book meaning I did all the tests first then I did the debugging. Now I am not going to dump 450 plus lines of hash key value pairs here as that would really piss a few people off and I might loose a reader of two, as if anyone really reads this anyway.

I will just give you what I ran into today. First there was the same bug as yesterday only this time on 'Functions'

Can't locate object method "alias" via package "Database::Accessor::Function" at D:\GitHub\database-accessor-driver-dbi\lib/Database/Accessor/Driver/DBI.pm line 412.

graphql-perl - Dancer2::Plugin::GraphQL - Dancer2 GraphQL endpoint

The porting of GraphQL to Perl 5 (sponsored by Perl Careers) continues. With v0.12, released 10 Oct, it is possible to run queries and return results. This includes the introspection query built in to GraphQL.

Now there is a Dancer 2 plugin: Dancer2::Plugin::GraphQL. This allows you to make a Dancer2 app that serves GraphQL, and - if configured suitably - serve the superb GraphiQL interface to interactively explore and query your schema, with type-ahead.

There is also a sample Dancer2 app (as revamped by Nick Tonkin). Here is the heart of the code (see it on GitHub):

CPAN6 Is Here

Read this article on Rakudo.Party

If you've been following Rakudo's development since first language release on Christmas, 2015, you might've heard of numerous people working to bring CPAN support to Rakudo Perl 6.

Good news! It's finally here in usable form and you should start using it!

Let's talk about all the moving parts and how to upload your dists to CPAN.

The Moving Parts and Status Report

All of the heavy lifting has been done awhile back, during Perl Toolchain Summit and other times. I wasn't present for it to know the details, but to catch up you could join #perl6-toolchain chat and talk to humans or read the channel log. PAUSE/CPAN support for Perl 6 dists was implemented and zef module installer was trained to check for CPAN dists as well as our GitHub/GitLab-based ecosystem (called "p6c").

Rakudo.js update - passes 64.65% roast test

Recently I have been working mostly on fixing bugs and making rakudo.js pass more roast tests.
While most of the fixed bugs affected one or a couple of tests recently fixing a longstanding closure deserialization bug and porting over a closure hack fixed a whole bunch of tests (as well us uncovered a bunch of easier to fix bug)
Some of the tests require implementing new features. A lot of them are fairly straightforward (like making a integer division by zero raise an exception).
An interesting/tricky one to implement where the native int8 and int16 types.
We emulate them by using a normal js number but for to emulate the overflow we use shifts.
For example for int8 we use:
($store_this_in_an_int8 << 24 >> 24).

I now plan to continue to work on fixing more bugs as there are still loads left (and maybe look into profiling and optimizing stuff as there are bunch of glaring inefficiencies
)

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.