A litle Big Moose forward

It carry on testing developing day here in the Moose-Pen.

I left off yesterday with a new Test::Utils->sql_param_ok sub that is going to save a good deal of coding effort as I move forward once I get all the tests up to the new standard of curse, (one foot forward one and a half steps back)

Today I am going to carry on with alias testing this time I am checking basic field alias. To accomplish this I changed the 'elements' in my $in_hash to ones with field aliases;

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

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!

Better Moose Testing

Its go back and fix day here in the Moose-Pen

In a recent post I mentioned that I went out and read though a number of SQL syntax books to make sure I was doing things correctly in which SQL clauses (Where, Sort, Link) goes where. That go me to thinking was the system I was using to test the SQL on a real DB using standard SQL?

Normally I test with Oracle App Express as it work well on a Windows box and has a nice UI but I just noticed that I have some odd SQL in one of my test cases 15_alias.t;

I was starting with this hash;

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:

Moose-iplicity


The other day I ran across a pattern in our codebase at $work, and I was mightily impressed.  It solved a problem I had run into before, but the solution here was much more elegant than mine, so I’m officially stealing it.  And sharing it with you.

The problem that we’re looking at today is building Moose attributes.  Now, in and of itself, there’s nothing exciting going on there.  Perhaps we might have an attribute whose value comes out of a config file, so we might build it like so:

Opinions Wanted On Changing Vim Syntax Highlighting

Hello fellow Perl (and potentially Vim) users!

There's an open issue on the vim-perl issue tracker about how the current syntax highlighting is inconsistent in how it highlights chained method calls, which currently looks like this:

Moose Back on Track Again

It back to coding here in the Moose-Pen

About a week ago I had this rather obtuse SQL expression;

(abs((people.salary + .05) * 1.5))*people.overtime+(abs(people.salary+.05) *2)*people.doubletime)

for testing parentheses. I figured I might as well re-use that little snippet of code else where as it is valid SQL anywhere you would use a 'field'.

One very odd place to use it would be in a sort if you want to order a list by how much over time and double time a person earned. So I added a new test to my '60_order_by.t' case;

Perl 5 Porters Mailing List Summary: September 11th-17th

Hey everyone,

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

Enjoy!

The Rakudo Book Project

Read this article on Rakudo.Party

When I first joined the Rakudo project, we used to say "there are none right now; check back in a year" whenever someone asked for a book about the language. Today, there's a whole website for picking out a book, and the number of available books seems to multiply every time I look at it.

Still, I feel something is amiss, when I talk to folks on our support chat, when I read blog posts about the language, or when I look at our official language documentation. And it's due to that feeling that I wish to join the Rakudo book-writing club and write a few of my own. I dub it: The Rakudo Book Project.


The Books

The Rakudo Book Project involves 3 main books—The White Book, The Gray Book, and The Black Book—as well as 2 half-books—The Green Book and The Cracked Book.

graphql-perl - MooX::Thunking - Deferred computation attributes

As part of porting GraphQL to Perl (sponsored by Perl Careers), one of my goals is to use the best possible practice in making rigorous code. One way to use this is to imitate the style of the JavaScript reference implementation's use of immutable data structures.

One problem arising is creating objects that have a reference to themselves. If the objects created were mutable, then one would simply create the object, then set the relevant attribute to include the object reference. If the objects are immutable this is not possible. For example:

big Moose Done Tests (for now)

Still stuck in test mode here in the Moose-Pen.

Today I am re-writing the '47_dynamic_gathers.t' test. Looking at the code I cannot really use any of it as my Gather concept moved from two array-refs (gathers,filters) to just a singleton of 'Gather' made up of, elements and condtions.

The test is a little simpler now as all I have to test for is when I add a 'gather' the 'elements' and 'conditions' are correctly passed down from the DA to the DAD and when I add another 'gather' the current one is overridden by the new one;

To start I created two gathers;

Importer::Zim

As a proof-of-concept, Importer::Zim has been released to CPAN. For modules which export symbols and define @EXPORT, @EXPORT_OK and @EXPORT_TAGS, zim can be used as a pragma to import subroutines into the caller package with lexical scope for perl 5.18+.

use zim 'Scalar::Util' => qw(blessed);
use zim 'List::Util' => qw(first sum max any all);

use zim 'Fcntl' => ':flock';
use zim 'Carp';  # imports carp(), confess(), croak()

use zim 'Mango' => 'bson_time' => { -as => 'bson_dt' };

Some of the benefits are:

London Perl Workshop: give a talk

The London Perl Workshop (LPW) takes place this year on Saturday 25th Nov and you are encouraged to submit your talk proposals now (or if you have already, feel free to submit another!).

The informal theme this year is "Perl and friends". We welcome proposals relating to Perl 5, Perl 6, other languages, and supporting technologies.

The hugest feature of Perl 6

If there would be an election for the single greatest Perl 6 feature, many would select the box for grammars and others would root for concurrency/async (as expressed in several articles here and elsewhere). Roles and types might be also strong contenders. Here is why I would pick: none of the above, even I like all of them very much.

Big Moose Tests Back

Well it tests everything again day here in the Moose-Pen

Is been almost two weeks since I started mucking about with Accessor.pm again trying to get my inherited views, parentheses, and conditions all in a row before I pass them down to the DA and now that I have things I think all settled I it time again fro me got go back and re-run the test suite to see if I did not bugger too much up.

This time out I did not fair that bad

Perl 5 Porters Mailing List Summary: September 5th-10th

Hey everyone,

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

Enjoy!

TIL in this Month's Perl 6 Bug SQUASHathon

Read this article on zakame.net/blog

A bit overdue post, but I attended this months's Perl 6 Community Bug Squashathon last weekend and it was fun! I had a great time learning some more Perl 6 while making contributions at the same time. Definitely looking forward to next month's!

Here are a few little bits of Things I've Learned...

Resolving conflicts of interests (CP part III)

After explaining the kinds of prototypes that are used in complete Programming and the way code moves between them, it is time the explain the other motivation behind this concepts, before we see the big picture (project planning) next time.

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.