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;
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.
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...
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.
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.
I am pleased to announce that Enlightened Perl Organisation (EPO) has kindly extended the support of Strawberry Perl project by sponsoring our build server for another 12 months. I would like to thank Mark Keating for arranging the funding.
If you are also considering supporting Strawberry Perl project you can do it indirectly by becoming EPO member or via donating EPO.
https://metacpan.org/pod/Data::Edit::Xml provides a Perl centric means of editing data held in Xml format. Thus:
my $a = Data::Edit::Xml::new("
");
say STDERR -p $a;
gives:
To cut out
c
under
b
but not under
d
:
$a x= sub {--$_ if $_ <= [qw(c b a)]};
say STDERR -p $a;
gives:
Its extend API a little more Day here in the Moose-Pen
Since I was playing about with the API by adding in 'default_condition' for conditions I figured I might as well do the same for condition 'operator'. In my little abstract world the 'operator' is what I use to compare the 'left' and 'right' parts of a predicate.
I had the honor to give a talk at Barcelona.pm Meetup. Perl community rocks as everybody knows; my new friends welcomed me and my family. We felt home, learned new things, enjoyed the nice dinner and it became the most memorable night in Barcelona.
SPVM array operation is 6x faster than Perl 5.26 now. If JIT is implemented, array operation maybe 20x faster than Perl 5.26. This is planed in one year.
SPVM provide you,
-You can write Fast culculation without XS
-You can bind C library without XS
-You can write C language inline without Inline::C
XS is very complex and difficult. SPVM improve usability of C binding and inline significantly.
SPVM communicate with Perl. You can call SPVM subroutine from Perl. SPVM is not single lauguage. You can call SPVM subroutine from Perl very easy.
Just a quick postette here today. I was thinking that it might be a good idea if I expanded my Database::Accessor API a little and give the end user the option of specifying a different 'default' condition that the present 'AND'.
Rakudo.js now passes roughly of 56%+ roast test files.
I'm currently working on fixing up the remaining ones.
Getting some of them to work is requiring fairly deep changes.
For example native values need to be passed specially and maybe boxed in the called sub/method rather than boxed on the side of the callers. As that causes wide spread changes it can cause some rather annoying debugging when something is not exactly right and compiling the setting explodes :)
I had a talk at TPC::EU (link to slides).
As part of an electron+react demo for the talk I started working on a JSX slang for Perl 6 (https://github.com/pmurias/p6-jsx/blob/master/01-basic.t).
BTW. slangs already work on rakudo.js :)
In other news the --source-map option in rakudo.js and nqp.js now puts in line and file numbers in our backtraces.
As previously mentioned, one principle of Complete Programming is the separation of concerns you normally handle simultaneously. In part two I discuss some further consequences of that and how we use version control in CP.
I've just got this CPAN Testers report which says that my module Compress::Huffman had an error due to $minkey not being set to any value on line 176. Tracing this back, it seems to be due to the use of the word 'inf' on line 166, then this being not converted to infinity but to zero for some reason, and $minkey never getting set.
I don't remember where I got the idea to use 'inf' for infinity, but I'm switching over to the method given here of using 9**9**9 instead.
Incidentally, for those interested in the Huffman algorithm, $minkey here is the least probable key, and its probability is $min, which is set to the value of infinity at the start so that every key will have a lower value than it.
So I was all set to for today's post to move from playing with Database::Accessor and start playing with Driver::DBI again but just as I was finishing off the tests which I did not want to bore you with I got this:
I saw a lot of confusion with what should be passed to the native trait when working on binding a C function from a library using NativeCall.
One important thing to remember is Perl 6 trait are solved at compile time. This is important because every value passed to a trait take their compile time value.
use NativeCall;
my $foo = "a";
sub foo is native($foo) {*}
This will fail to compile since native does not take Any has a valid type. Even if $foo can be checked as being a Str, its compile time type is Any. Easy to check with a BEGIN block.
During my last post I mentioned the method of Complete Programming, which started as my knee jerk reaction to the insanities of waterfall and XP. I'm not really big on manifestos but writing down things helps to think clearly and so you might also benefit from thinking about one important principle in CP.
While observing a recent split in a large open source community, I did some self-reflection and thought about the state of the Rakudo community that I am a part of. It involved learning of its huggable past; thinking of its undulating present; as well as looking for its brighter future.
This article is the outcome. It contains notes to myself on how to be a better human, but I hope they'll have wider appeal and can improve communities I am a part of.
Part I: Digging a Hole
A lot of organizational metaphors involve the act of climbing. You start at the base of a hill or a ladder and you start climbing. The higher you get, the more knowledge, power, and resources you attain. There's a problem with that metaphor: you're facing the backs of the people who came before you and they're not really paying attention to you.