Well I though I hit the correct fix when Paws does its XML parsing and drops the 'Root' node but I found I have to apply some sort 'trait' to my class rather than an attribute so I am going to start this time with my code for 'RestXMLResponse.pm' first and then work that fix back into boto and the templates.
It’s that time of the year again! The 36th Chaos Communication Congress (36c3) is coming to Leipzig in Germany. From December 27 to December 30 my hometown will hold the yearly convention of the Chaos Communication Club. It’s the largest hacker conference in Europe and also covers topics like politics, science, making and art.
Vouchers for receiving a ticket through any CCC-related community are being distributed right now. Reach out immediately to your nearest CCC Erfa, hackerspace or similar community to get a ticket smoothly! For the more adventurous there will be public presales on November 8, November 10, November 21. Although the queuing system is sophisticated these are usually sold out in seconds.
The London Perl Workshop is today! If you can make it, hopefully you have already planned your journey there - please remember we're at a new venue this year. If you're thinking about your journey home, after the event we are going for after drinks, with food provided by our sponsors at the Running Horse in Aldgate. We'd like to thank our last gold sponsor Eligo for their continued support of London Perl events.
Eligo are a niche boutique recruitment consultancy with a team of dedicated Perl Consultants. We live and breathe our markets. In fact we like to think we are as passionate about the sector as those who work within it. If you want proof of it stop by and meet Rick Deller one of our Senior Perl Consultants at LPW today.
In my last post I got nicely snookered by the S3 call 'GetBucketLocation' which was one of the call that had a 'todo' test.
The XML coming back from ASW is correct
<?xml version="1.0" encoding="UTF-8"?>
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-0301/">
EU
</LocationConstraint>
but no matter what I tried on 'XML::Simple' I could not get it to parse just the way I want though I did get very close with this
The Camelia mascot of the language now known as Raku is a brightly coloured metaphor for the transition from Perl 6 to it's new identity. My hope is that having emerged from it's cocoon, Raku will flap it's wings and fly skyward, boldy seeking new adventures.
I congratulate the team for making this decision, specifically Elizabeth Mattijsen for being so bold as to propose the change request that triggered the end game. No doubt other people where involved that I am not familiar with, they deserve generous praise and recognition too.
My personal involvement in Raku/Perl6 is literally zero. So I make this post as a person for whom Perl 5 continues to be a delight for personal projects, and sadly declining professionally.
Reading through the public comments there are a lot of strong feelings - some of them hurt feelings. Humans are fundamentally emotional creatures, and the grief associated with strong disappointment follows the same path to acceptance no matter how rational a person fancies themselves.
Our small team really enjoys organizing the mostly-annual DC-Baltimore Perl Workshop, and we're working on it again for 2020 (NOTE: CFP IS OPEN!!! http://bit.ly/dcbpw2020-cfp). We get a lot out of it, both technically and socially.
One aspect of the joy comes embracing ALL sorts of technology, from Arduinos to rockets, from compilers to web apps. So with the recent update in the Perl-Family languages of Perl 6 → Raku ... we took this as a fun time to update our own name!
We shall be henceforth known as the DC-Baltimore Perlyglot Workshop! Coming to you live on April 18-19 at Johns Hopkins University, just north of Baltimore, MD. I sure hope you'll join us :)
It's Wednesday today, which must mean it is time to think about the weekend :-) If you are planning to come to the London Perl Workshop on Saturday, you might like to know that we'll be serving tea and coffee at registration from 9:15, with the first talk starting at 9:50. There will also be a mid-morning and mid-afternoon break with tea, coffee and some delicious snacks and all of this is only possible due to the support of our sponsors. Today we're saying thank you to cPanel - we are grateful to have them as a gold sponsor of LPW2019.
First released in 1997, cPanel & WHM is the leading web hosting control panel globally, and is preferred by most hosting service providers. Its users in an ever-growing user base prefer its familiar, feature-full, and simple interface. This interface can be used to build, manage and update a company's their entire online presence, from websites to email addresses.
Well carrying on with my quest to clean up the Paws S3 code I decided while I am waiting for my last batch of changes to be reviewed I decided to review some of the 'TODO' tests.
TODO passed: 6364, 6370, 7896, 10045, 10052, 10137
First a 'TODO' test is a stubbed in test that will most likely fail and if it does it will not effect the final Pass/Fail of test case. It is basically one of these
The first one I am going to play with is 's3-get-bucket-location.response.test.yml which looks like this
---
todo: 'S3 is not stable'
call: GetBucketLocation
service: S3
tests:
- expected: EU
op: eq
path: LocationConstraint
So the first thing I did was chop off that 'todo' line;
---
--todo: 'S3 is not stable'
call: GetBucketLocation
service: S3
…
and then check the content in the '3-get-bucket-location.response';
I've been working with Sawyer X and Stevan Little to try to bring OO into the Perl core. Most of this work is based on Stevan's work, with me trying to add a final "polish" layer to make it clean and still feel like Perl.
It's being called "Cor" to distinguish it from current OO systems.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (October 20, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.
Challenge # 1: Sunday Christmas
Write a script to list dates for Sunday Christmas between 2019 and 2100. For example, 25 Dec 2022 is Sunday.
Christmas on Sunday in Perl 5
I'll be using the Time::Local core module which provides reciprocal functions of the gmtime and localtime built-in functions.
Write a script to demonstrate brace expansion. For example, the script would take the command line argument Perl {Daily,Weekly,Monthly,Yearly} Challenge and should expand it and print like below:
You’ve probably heard about the glob function. It can expand wildcards like * or ?, so you e.g. can easily check what files correspond to p*.p?. But glob can do one more thing for us: brace expansion.
I left off in my last post with all my bits and bods to get the proper structure in my generated perl class from the Json data. Now I have to get the 'status' out of the response and then into my class.
By now I know where to start to look to in the code to apply my changes. I started in Paws::Net::RestXMLResponse' class at its 'process' sub which looks at the response 'status' and takes either the error path (>=300) or the happy path (<300). We are interested in the happy path and that takes us to the 'response_to_object' sub.
First I can see that I have the 'status' very soon in the sub;
I am in favor of this change, because it reflects an ancient wisdom:
"No one sews a patch of unshrunk cloth on an old garment, for the patch will pull away from the garment, making the tear worse. Neither do people pour new wine into old wineskins. If they do, the skins will burst; the wine will run out and the wineskins will be ruined. No, they pour new wine into new wineskins, and both are preserved."
SPVM is Static Perl Virtual Machine. I write an example to sum even numbers with precompiling.
Using precompiling, the source code is output to C source code and it is compiled to machine code. This performance is same as C language in add operation! You are surprised.
Anyone have information on the current and future status of Stratopan?
Still marked a "Beta", the latest perl version is stuck on 5.27.2, the blog.stratopan and cpan.stratopan http sites error, and the https version redirect back to www.
In my last post I was just getting the last parts of my new 'Satus' attribute in place having only one more part to create and that is a new 'trait' in '/lib/Paws/API.pm'
I was thinking af starting by coping the present package;
package Paws::API::Attribute::Trait::NameInRequest;
use Moose::Role;
use Moose::Util;
Moose::Util::meta_attribute_alias('NameInRequest');
has request_name => (is => 'ro', isa => 'Str');
and just changing the 'Request' for 'Response'. However looking at the role I see it is also adding a 'request_name' attribute, which I do not need, this trait is used very specially in the code the name of AWS call.
Happy Friday! If you are coming to the London Perl Workshop tomorrow, or even if you can't make it tomorrow but are in London today, you are welcome to join the pre workshop social this evening from 18:30 at The Draft House, Seething Lane.
The first few rounds will be courtesy of our fantastic sponsors, so today we'd like to thank Pirum for coming on board this year as a gold sponsor!
Pirum is a small dynamic FinTech company established in 2000, which provides Software-as-a-service the top-tier financial institutions in Securities Lending throughout the world.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (October 6, 2019). This blog post offers some solutions to this challenge, please don't read on if you intend to complete the challenge on your own.
Challenge # 1: File Type
Write a script to check the file content without explicitly reading the content. It should accept file name with path as command line argument and print “The file content is binary.” or else “The file content is ascii.” accordingly.