Around Christmas 2009 I took over Aspect.pm, a first-generation implementation of Aspect-Oriented Programming for Perl based on Hook::Lexwrap
Over the last year and a half I've expanded functionality, cut back dependencies to a minimum, optimised the hell out of it, and written a ton of documentation and a comprehensive test suite.
This second-generation implementation has now reached about as far as I can take it without resorting to exotic XS code to replace some of the exotic Perl code. So after a final 2 week sprint to smooth off some ugly corners, in the next few days I'll finally be releasing version 1.00 of Aspect.pm.
I'll be talking more later about some of the more interesting things you can do with Aspect-Oriented Programming. What I'll also be trying to do is focus on actual useful things, and avoiding as many as possible of the utterly batshit insane things that Aspect.pm lets you do.
A couple of weeks ago a ran into a real life situation where Perl 6 was able to greatly simplify my life. I was in the process of importing some Canadian postal codes from a PDF document where the data was presented like this:
Each postal code, or postal code range, was tied to a zone. To store this to a database, I wanted to expand out each of these ranges to capture each value. Causing the first line to be represented as:
A0A => D13
A0B => D13
A0C => D13
... some more ...
A0R => D13
Using the Perl 5.12 range operator (..) I thought I could use easily accomplish this goal.
Thanks, everyone who was interested in App::PipeFilter. Your interest motivated me to clean it up and send the very first release to PAUSE. It'll be on CPAN once your favorite mirror catches up. Check out the snazzy documentation, which consumed most of my time since my last announcement.
So I've read and very carefully considered the words of Douglas Bowman and his decision to leave Google and much of this was about Google's use of A/B testing ... Google's extensive use of A/B testing. Google engineers clearly valued function over form. He complains about a situation where 41 shades of blue were tested for optimum response (see page 3) and makes it clear that he felt constrained. No matter what he did, how simply he did it, he had to "prove" it worked. He simply wanted to build something beautiful and not worry about extreme micromanagement of every aspect.
I can understand that. Many times I want to just "make stuff happen", secure in the knowledge that I know what I'm doing. I look at how foolishly code is implemented and I think "what our customers really want is X!". And A/B testing shows me, over and over again, that I'm wrong. It's humbling. It's humiliating. And if you really care about being the most effective you can be, you'll love it, but only if your pride can handle being proved wrong on a regular basis.
I've uploaded a new version of autodia to PAUSE and it should be available on CPAN shortly.
Highlights of this release are :
* added Mason handler provided by Peter Franke
* new ASP Handler provided by Dalton Mackie
* improved tests (and made some tests author_only)
* A bunch of minor fixes and barely noticable improvements
FPW2011 will be held in "Cité des Sciences et de l'Industrie" Paris,
France on the 24th and 25th of June.
This will be the 8th conferences organized by the French Mongueurs de Perl.
This event will gather Perl's users from all levels, from the beginner to the expert.
This will be an occasion to meet several famous french Mongers.
Share the informations to your colleagues, to your friends, to your HR department,
if you think they can be interested. We hope to welcome you at the Cité des Sciences.
Tonight I added support for multiline JSON input to all the
App::PipeFilter tools.
This is great for data sources that are beyond one's control, such as
those found on the web. But I haven't found one to use as an example,
so you get this instead:
---
from: perlironman
text: "Rocco Caputo (rcaputo): App::PipeFilters - JSON in the Shell http://bit.ly/mGgnOX"
See what I did there with
JSON::Path expressions?
The jpath filter can extract fields from deep within JSON objects (but
jcut will be faster for simple JSON objects).
A major milestone in WebGUI 8 development was reached this week: A dry-run of the WebGUI 8 upgrade was successfully run against the plainblack.com database. This means the only thing remaining
from releasing an alpha 8.0.0 is updating all the custom code on
http://plainblack.com and http://webgui.org. As always, plainblack.com and webgui.org will
be the first sites running the latest bleeding-edge version of WebGUI (unless
one of you wants to beat me to the punch).
This month, I also gave a presentation to Madison.PM about building
applications in WebGUI 8, a quick introduction to Assets and an overview of
the most important changes to how they work. The slides are available at
http://preaction.github.com/ and the code samples are linked
at the end.
On an unrelated topic, I really enjoyed using S5 to build my slides, SHJS to highlight the code inside, and Github Pages to host the whole thing. I plan on doing the same
for all my presentations: They look good, readable without a special
program, editable without a special program, anyone can fork and update my
presentations, and they're served by a nice, fast, free host.
Mark Rogaski, the author of Set::FA has kindly given me co-maint, so I can make some changes.
This post really concerns Set::FA::Element, which is what I'm using for the unreleased Graph::Easy::Marpa::Lexer module. The latter module is working (at home) on simple graphs.
Firstly, I'd like to add a method to return what's captured. This simplest patch is to change line 102 from:
my $regex = qr{$rule}; # precompile regex
to:
my $regex = qr{($rule)}; # precompile regex
I.e. To add capturing parentheses, and a method called match() to return the value. Since match($string) sets what matched, you can even fool the DFA via this method...
Because there is not currently any such capability, I'd like to think this doesn't affect too many users, if anyone. But if this does concern you, please comment this post.
You may also be familiar with Ethan Schoonover’s excellent Solarized color palette. If not, go take a quick look; there’s some really nice design and attention to detail over there.
Putting these two things together: I’ve assembled two color schemes from the Solarized palette and submitted them to Mark, and then pestered Graham Barr a bit, and now you can select solarized-dark and solarized-light from the syntax highlighting drop-down menu.
They're a small set of UNIX command line tools for working with structured data. In particular, JSON objects, one per line. They're compatible with many UNIX command line tools like sort and uniq. From the README:
Today I finished my first twitter app. My main point in posting this entry is to talk about how wonderful is Perl, and in particular how fancy is Net::Twitter. If you already know these things you can safely stop reading now.
My completed application is two programs each of which appear to be 67 lines long. In addition to providing a feed into Twitter I also threw in a CGI component, just for giggles.
It's essentially an insertion sort into time itself. A timer is created for each numeric value to sort, and the order in which they occur determines the outcome.
I've been struggling for a while with the issues of deploying Perl applications in enterprise setups for in house Perl applications. So I rolled a couple of RPM spec files for 5.12.3 and 5.14.0 with the eventual goal of being able to deploy Perl applications on RPM based distributions (Fedora and Centos) without needing the system perl binaries to run the app.
I built a couple of RPMs and ran PerlBench on them, 5.14.0 has some nice results:
I dubbed my effort 'fredperl' for lack of a better name. If you run Centos or Fedora and have been banging your head against maintenance issues with your app because you are using the system perl binary, I'd love your feedback on my initial effort here:
I'm looking forward to installing the new version in the next few days! (why not now, you might ask: because I sort of broke my left ring finger while doing some shadow boxing with my son, which makes typing a bit complicated)
I've been trying to find time to work on parrot-handler, a parrot management tool in the spirit of perlbrew and rvm, for several months now. It's written in Perl 5, and could be very useful indeed. I've just been so busy ...
Well, okay. I've been busy playing World of Warcraft, dabbling with languages that are not based on Parrot, and messing about with my laptop. Oh, and doing work stuff. Still, that's kind of busy.
But there are some Parrot things that I'd like to do, and a working parrot-handler could make those things easier. I think maybe a little less WoW and a little more code tonight.