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.

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.

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
)

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.

Perl less buggy than Python?

The numbers would seem to suggest it:

Strawberry Perl 5.26.1.1 and 5.24.3.1 released

Strawberry Perl 5.26.1.1 and 5.24.3.1 are available at http://strawberryperl.com

More details in Release Notes:
http://strawberryperl.com/release-notes/5.26.1.1-64bit.html
http://strawberryperl.com/release-notes/5.26.1.1-32bit.html
http://strawberryperl.com/release-notes/5.24.3.1-64bit.html
http://strawberryperl.com/release-notes/5.24.3.1-32bit.html

I would like to thank our sponsor Enlightened Perl Organisation for resources provided to our project.

Call for Lightning Talks -- London Perl Workshop

The London Perl Workshop is on Saturday 25th November, and as is traditional, the day will end with Lightning Talks, compèred by the inimitable Léon Brocard. In previous years things have been pretty fluid, with talks being accepted on the day. This year the deadline for Lightning Talk submissions is Monday 6th November, and we'll let prospective speakers know by Friday 10th.

If you've something to say, but not enough for 20 minutes, why not submit a 5 minute lightning talk?

Not sure how? Read on...

More Generic Moose

It is putter about some more day here in the Moose-Pen

I was puttering about today with my tests and I discovered something funny on some implications of SQL and it is to do with that 'AS' when playing with 'alias'. Now I knew it was an optional 'key-word' according to the SQL standard what I did not know is a number of DBs will syntax error when an optional key-word is used. So this SQL
SELECT sys_users.last_name AS last FROM people AS sys_users

is correct to standard there are a number of DBs out there that only this will work

SELECT sys_users.last_name last FROM people sys_users

That makes the above one almost 100% universal that I can tell. I originally wanted that 'AS' in there to make the generated SQL much more readable but I have come to realize that '99.9995%' of the time the end user Database::Accessor will never care what the end SQL is just that it works.

Perl 5 Porters Mailing List Summary: September 25th - October 1st

Hey everyone,

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

Enjoy!

Dancer Survey 2017

On behalf of the Dancer Core Team, I would like to announce the availability of the Perl Dancer 2017 Survey. As Dancer 2 has become stable and matured, the Core Team is sometimes left to wonder what our community wants from us next, as it is the greatest deciding factor in focusing our efforts. What better way to answer that question than to survey you, our users, for what you like, don’t like, and what you want to see?

And so we would like to ask you to share your thoughts and feelings about Dancer2, the infrastructure, and its community. Whether you are a new user or a former user, you have a lot to contribute to this survey and we would like to hear from you. What you liked about Dancer, what you do not, and what areas you feel that Dancer could improve upon. We encourage you to take the time to help us chart the roadmap for Dancer.

How to do Bit Operation Correctly in Perl? One Answer is SPVM.

How to do Bit Operation Correctly in Perl? One Answer is SPVM.

Perl don't have type system in Language because Perl is completly dynamic type language.

If you use SPVM, you can use byte, short, int, long, float, double type as same as Java.

my $num : int = 0x1234;

And you can do Bit Operation easily.

$num & 0x0F;

Perl Big Problem is numeric operation

Perl Big Problem is numeric and binary operation.

So Perl itself can't support latest technology, such as AI, Machine Learning, Big Data, statistics, IoT, Binary data operation, image, movie.

Python try and study this technology positively. But Perl is always late.

Problem is not language. Problem is Infrastructure and will and action to do it fast.

I try to create Infrastructure at first.

Very Short Moose

Its fix a but post-ette here in the Moose-Pen.

Yesterday I left off with this error;

Can't locate object method "alias" via package "Database::Accessor::Param" GitHub\database-accessor-driver-dbi\lib/Database/Accessor/Driver/DBI.pm line 412.
So today I figure I better fix it. For once in the Perl world the problem and error message are quite clear. Seem I never did add in the 'Database::Accessor::Roles::Alias' into the ' Database::Accessor::Param' class so that is very easy to fix up.

package 
           Database::Accessor::Param;
        use Moose;
        extends 'Database::Accessor::Base';
++        with qw(Database::Accessor::Roles::Alias');
        has value => (
Just add it in an on the retest I bingo;
… ok 9 - 2 Fields and 2 parama retrieve SQL correct

ok 10 - 2 Fields and 2 parama retrieve params correct

So a real sort post-ette for today.

IMG_7113a.jpg

Not-Perl: Career Advice for Programmers

Quite a few of you will have picked up one of my Perl Careers booklets when I've seen you at conferences. I've started keeping a long-form blog of Career Advice for Programmers here: Code for More.

YAML::PP Grant Report August/September 2017

For the last two months I have been working over 100 hours on YAML::PP, a project I started in January.

It aims to parse YAML 1.2.

I got the confirmation for the TPF grant application at the end of August, but I already started to log my work in August, so I'll include this work here.

Some of the things listed here aren't yet in the latest release 0.004, so you might want to check out the code on github.

First I'd like to give a short introduction why there is a need for a new YAML framework.

6lang: The Naming Discussion Update

Read this article on 6lang.Party

When a couple months ago I rekindled the naming debate—the discussion on whether "Perl 6" should be renamed—I didn't expect anything more than a collective groan. That wasn't the case and today, I figured, I'd post a progress report and list the salient happenings, all the way to my currently being the proud owner of 6lang.party domain name.

The "Rakudo" Language

The "new" name I mentioned in my original post was Rakudo. As many quickly pointed out, it wasn't the greatest of names because it was the name of an implementation. Yes, I agree, but originally I thought few, if any, would be on board with a new name, or extended name, and Rakudo was basically the only name people already were using, so it stood out as something that could be "hijacked."

The Blog Post Fallout

Moose Never Stops Testing

Its new test day again in the Moose-Pen

Well starting with the 20_fields.t test case today and this is really just this so far;

Perl5 to Java compiler - symbol tables, typeglobs, and call stack

Perlito5 is an implementation of the Perl5 language that runs in the Java / JVM platform.

As part of the work for porting the core Perl modules, we had to implement better support for Perl symbol tables, typeglobs, and call stack.

The call stack (the caller() function) now works "natively", decoding the internal Java stack trace. This means that there is no logging overhead for calling Perl subs, and no additional work needs to be done to support Perl stack traces in JVM threads.

Symbol tables (like %::) and typeglobs also work like in Perl, even if the internal data structures are actually flattened into a java HashMap. The symbol table / typeglob / filehandle emulation doesn't add any overhead for normal hash variable access.

With these changes, the core module lib/Symbol.pm now works without modifications.

Perl 5 Porters Mailing List Summary: September 18th-24th

Hey everyone,

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

Enjoy!

Easy C/C++ Binding using SPVM

I introduce Easy C/C++ Binding using SPVM . In Perl, C/C++ binding is very very hard work. If you use SPVM, the work become very easy.

If You don't yet know SPVM itself, See SPVM Document at first.

SPVM Module:

# lib/SPVM/MyMathNative.spvm
package MyMathNative {
  
  # Sub Declaration
  sub sum ($nums : int[]) : native int;
}

C Source File:

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.