This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. On the first day I demonstrated how to weave procedural C code into your Perl code. Today I will show how to get data across the boundary between Perl and C.
I am not going two write up another POD tutorial as there are tons of those about what today's post-ette
is about what happened when you start writing up your POD.
What I always like to do in the POD process is start writing it at about the very same time when I am coding things up and fill in most of the banks as I go along. Others are of the do it at the beginning and others are wait for the end. So I guess I take the middle ground.
I released a new simple module/application WebService::Fake and wrote about it in my main blog. I'd love to read any feedback providing any insight, negative included of course (provided they're honest and polite).
And oh! I really hope to see Learning Perl 6 spring to life! I opted for the "early versions" pledge because I'm too curious to see what it will be...
A small group of us got together for a 4 day hackathon (17th to 21st of Nov 2016) in Chicargo, with the goal of switching https://metacpan.org over to the new https://fastapi.metacpan.org/v1/. This has been a massive project, upgrading our core backend from Elasticsearch 0.20.2 to 2.4.0. The project has taken over 2 and a half years to get to where we are now.
Oh, I should point out, day 2, we achieved our goal - after that we then fixed issues, added more features and made plans!
For MetaCPAN I take on a sysadmin style role, even though my in day job I'm manager / code reviewer mostly.
I had already set up Elasticsearch 2.4.0 on a cluster (we had the old version on a single node before!) and at Meta::Hack reviewed the configuration with Brad (seems I mostly got it right!).
Last week, I attended meta::hack, the MetaCPAN hackathon in Chicago. I'm the maintainer for CPAN Testers, the central database for CPAN users to send in test reports on CPAN distributions and one of MetaCPAN's data sources. I asked to join them so I could improve how MetaCPAN consumes CPAN Testers data, and ensure the stability and reliability of that consumption.
Here's a detailed log of what I was able to accomplish, and information on the new development of CPAN Testers.
It is discovery of silly mistakes day here in the Dist-pen.
Over the past few posts I have been running down a persnickety bug in my Database::Accessor system. I had first seen it while expanding and cleaning up my test cases and I thought at first I fixed it with a simple 'lib' statement and a slight change to my embedded classes. As I dug down into my test cases the bug came up again I reverted that embedded class change and added in a kludged that so at least my test cases all passed. I wasn't satisfied with this and did some more hacking and found my 'fix' was not I had a real bug, which I fixed in the end.
Today I found the root cause of my bug, I went back to play on my Windows box today and before I did a pull of my fixed code I did a quick diff and found this
I don't post as much as I would like to as all my free time is spent working on Tau Station, so I thought I should remind folks that I'm still alive, still hacking on Perl, and still writing obscure technical humor:
Late last evening I sent a development version of a Perl module to PAUSE. This module had had a bunch of work on it since the last release, including a change in the way timegm() and timelocal() were called.
The CPAN testers worked on it overnight, and this morning I had a brand-new shiny RT ticket in my inbox. Slaven Rezic (to give credit where it is due) had noticed and correctly diagnosed the problem. I fixed it, and tonight the CPAN testers are chewing on a new and hopefully better test release.
I credit Slaven, but credit is due to everyone in the testing infrastructure, because this is far from the first time they have pulled my fat out of the fire. Where else but Perl could this have happened?
There's a problem that I've seen on every team I've worked with that uses git. Because at Tau Station we're fairly merciless about technical debt--which makes the code base pretty sweet to work with--we take all technical debt issues seriously on the theory that once we launch, it may be too late to clean up (a silly idea in theory, but a prevalent one in practice).
The following technical debt issue is actually causing us a problem, though it's more of a process problem than a technical one:
Wow! We have 272 branches? Most of those are are long merged or abandoned. We've discovered that there are a couple of them which got overlooked (I'm tempted to blame github's poor PM tooling, but it's a lousy craftsman who blames his tools). We tried asking devs to find all of their remote branches and review them and delete them, but that turned out to be a rather daunting task and they're still missing branches.
Now, with a simple Perl script, we have a solution.
A long long time ago I've set up a web site called Perl TV where I used to collect Perl-related videos. It is now on the move and soon it will be integrated in the recently created Code And Talk site.
That's where you can find videos from Open Source related conferences.
This time however, instead of just having a site with videos, I've also create blasters. Each blaster is a newsletter in which you'll get curated, topic-specific videos.
Once I got though that problem I had with my last post, I quickly went through the last set of tests updating mostly the includes and the lib call and finally got the result above.
This is the second in a series of articles, which we're writing to celebrate meta::hack, our first MetaCPAN hackathon, which is currently (Nov 17th through 21st) taking place in Chicago.
This hackathon was by invitation only, since it had a very specific goal: completing migration of the live service to MetaCPAN v1 (which includes a major Elasticsearch upgrade, from 0.20 to 2.4, or nearly 70 stable releases forward). Once that's done, any remaining time will be spent fixing bugs, and discussing what comes next. The attendees are Olaf Alders (founder of MetaCPAN), Mickey Nasriachi, Leo Lapworth, Tom Sibley, Joel Berger, Doug Bell, Brad Lhotsky and Zach Dykstra. Matt Trout is contributing remotely.
This post is brought to you by cPanel, a platinum sponsor for meta::hack.
cPanel are a well-known user and supporter of Perl,
and we're very grateful for their support. More about cPanel at the end of this article.
This week, I released a new version of Beam::Emitter. A lot has changed since the first releases, so here's some details on all the new features.
Beam::Emitter is a role for turning your classes into event emitters. Being an event emitter allows other classes to subscribe to important events from your object. Subscribers can use these events to perform additional tasks, transform your object's data, or otherwise extend and enhance your class. Beam::Emitter makes your class extensible by allowing you to provide specific places for custom code to run.
Since the 1.000 release last year, Beam::Emitter has gotten quite a few new features and bug fixes to make it easier to use and safer for your code.
You ever have one of those days. Your code just does not want to come together and gives you know end of grief. Well today was one of those days for me.
I left off yesterday with what I though was a solution for my problems with 't/30_view.t', by moving my 'Database::Accessor::Roles::DAD' out of Accessor.pm and into its own file. Seem I still had a problem as in the 'Database::Accessor::DAD::Test' I still had a 'use Database::Accessor;' present.
Now that was setting up a circular call to Accessor.pm, as well it was never my intention for some-one to use a DAD directly only as a call from Database::Accessor. In the next test case 't/31_elements.t' I got
RETRIEVE No Database::Accessor::Driver loaded for Data::Test Maybe you have to install a Database::Accessor::DAD::?? for it? at...
# Looks like your test exited with 2 just after 1.
Preamble: CPAN is great. This post in no way should be treated as Sparrow VS CPAN attempt. Sparrow is just an alternative method
to distribute your scripts. Ok, let's go.