Well not much moose in the moose-pen again. Like I said in my last post I am getting nearer to that programmer nightmare (at least for me) of documenting and packaging up my project to get it ready for CPAN. But there is still a little Moose left.
One of the neat things about test driven development is all the bugs one find and squish long before you code ever gets out there, today is a good example.
I decided to add in a few more features to my Accessor, (yes I know scope creep) namely I want it to be hard to do a update or delete without having either a static or dynamic condition set.
We turned up in Cluj via Wizz Air to probably one of the best pre YAPC parties ever located on three levels on the rooftop of Evozon’s plush city centre offices. We were well supplied with excellent wine, snacks and the local Ursus beer and had many interesting conversations with old friends.
I started on some test driven prototyping and proof of concept coding. This gave me a firm idea of how I was going to work things out when I started the real programming.
I started to play in the Moose-pen creating a real name-space ans sticking withing tanking my PoC code and creating the first run at Accessor.pm and did some planning and introduced a few neat Moose concepts.
For first sight nothing. We eval code and then catch exception if it is and pass error into sub. But we forget that when arguments are passed into subroutine they are aliased into @_ NOT COPIED (Maybe we forgot that because of it is not documented here ) but, thanks, documented here
The array @_ is a local array, but its elements are aliases for the actual scalar parameters.
So @_ contain aliases. What does that matter? Look please at this small example:
Dancer2 0.203000 is on its way to a CPAN mirror near you. This version brings some important security improvements and bugfixes:
It is considered good security practice to change a session ID whenever any change in privilege level occurs (such as logging into an app). Not only is this a good practice, but it is a requirement of some established security standards. To account for this, a new method, change_session_id() was added to make it easy for developers to issue a new session ID on privilege change.
At some point in the not-too-distant future, session drivers will be required to implement a _change_id() method to support this. In the meantime, Dancer2 will perform the operation for session drivers that lack this method.
Thanks to Ctrl O and InfoSaaS for sponsoring SysPete’s work on this important functionality!
Well today in the Moose-pen I do not have very much moose to look at as I am getting close to finishing off the Accessor.pm at least code wise, hey I even started to write up the POD for it so the end game is near.
So for today cleanup I noticed that in an earlier post I planed this
Seems I did both the static and dynamic tests in the same 30~39 range should. Well that is nothing much just a bunch of code movement out of the 30 range and into the 40 so I am not going to bore you with that here.
Deconfusion note: if you're just a regular Perl 6 user, you likely use
and only ever heard of Rakudo Star, which is a distribution that includes
the Rakudo Perl 6 Compiler, some modules, and the docs. This post details a release
of that compileronly,which gets released more often than Rakudo Star.
So please don't think there's a new release, if Star is all you use.
Part I: Humans Make Errors
Today is the third Saturday of the month, which is an awesome day! It's when
the Rakudo Perl 6 Compiler sees its monthly release. I was at the helm today,
so I chugged along through the Rakudo release
guide
and the NQP release
guide,
whose release is part of the process as well.
We're All Green To Go
As I was nearing the end of the process, the first hint of a problem surfaced
when a user joined the #perl6-dev IRC channel:
Well, while keep writing a sparrowdo tutorial the tool keep growing too. Let me introduce something new
and excited about sparrowdo automation - how one can easily create a higher level entities using so called
sparrowdo modules.
Sparrowdo modules ...
So far we have talked about some sparrowdo primitives. They are light, they are small and they
relate to a small specific tasks, under the hood they are just sparrow plugins with parameters -
sparrowdo tasks.
I am happy to announce the release of version 0.2 of Perl Executing Browser (PEB) - our minimalistic HTML GUI for Perl desktop applications similar to Electron and NW.js.
Despite its low version number, PEB is already used in a small, specialized EpiDoc XML application called Epigraphista and is proving its usability.
PEB also contains an HTML interface for the default Perl debugger. The debugger output is displayed together with the syntax highlighted source code of the debugged script and its modules. Syntax highlighting is achieved using Syntax::Highlight::Engine::Kate CPAN module by Hans Jeuken and Gábor Szabó.
I will be glad to read any comments, suggestions or feedback.
I've just released a new Log::Any trial release. This release improves performance immensely when there are no log output adapters configured. This release also now returns the formatted log string from logging methods, allowing the log message to be used by a die or warn call.
Because of these changes, there is a very small chance of an incompatibility: Log::Any logging methods used to return whatever the configured adapter returned (this was undocumented and was not a feature). Now they always return the formatted log message.
Earlier this year I added some commands to the ntheory module, inspired by Pari/GP and Mathematica, to split numbers into digits and put them together again. Of course this isn't terribly exciting by itself since Perl has split and join, but with optional bases it gets more interesting.
I recently took a look at the various modules that do base conversion (at least 9 modules, plus various standalone subroutines). Each has slightly different features and interfaces, and the performance at the extremes differs by over 10,000x. I've made some internal changes to ntheory based on my tests, which should show up in the next release.
Add: This is for Perl 5. Perl6 has native support for base conversions for bases 2-36 and seamless Bigint support. It Just Works. For larger bases or alternate encodings, bbkr's TinyID module can be used.
Well looks like clean up day again on the old Moose-Pen. Well I hate to say it but 90% of today's post is on types again as my cleanup found a little problem with my 33_conditions.t test case. I know it was running fine yesterday but that changed when I discovered that I had commented out a good hunk of my tests before I though I was finished.
So looking back I did say I no longer needed the from hash-ref on my coerce of ArrayRefofConditions it seems I did not notice that I had commented out the test for a single hash coercion so I added that back in and my test failed. So I had to add in the 'from 'HashRef', via' for my various collection attributes.
Now I also forgot that that I will want users to be able to enter an Array Ref of values on my various dynamic attributes so looking at conditions I would like to do this;
I was going to hold off on announcing my new WiringPi::API distribution until my larger project that depends on it is done, but since it's CPAN day, well...
The module wraps the majority of documented and undocumented functions in wiringPi.
wiringPi is a set of C libraries that allow you to muck with a Raspberry Pi, it's GPIO pins and other things.
You can import the C functions directly keeping their original names as is:
Scott McWhirter helped a ton with the transitions (as well as with some general cleanup).
Most of the modern browsers now support ECMAScript 6 so I feel it makes sense to target it.
When targeting old ones that don't we can use polyfills and compilers from ECMAScript 6 to 5.
After doing most of the obvious and promising nqp-js optimizations I'm focusing again on getting rakudo.js to work.
Before that I'm cleaning up the nqp-js code base to remove hacks that might shoot us in the back while working on rakudo.js