Kegler spam

Kegler apparently has a script to auto-spam this site with content from his blog, explicitly ignores replies here, and flouts the policy on front-page posts. Is there a chance we can automatically reject his abuse?

p2 progress

I announced that I want to parse 50% of the perl5 syntax within this summer with p2. I think this goal is doable.

The last weeks since YAPC I spent most of my p2 time integrating libuv as external "aio" module. This implements asynchronous non-blocking IO and rudimentary cross-platform process support. libuv is essentially the node.js backend library, and MoarVM stated its goal to switch from apr to libuv also.

I needed libuv before the p5 syntax to check the ability to do fast and easy library bindings with lots of callbacks, and without a FFI yet. This gives me now the feeling how the FFI should be implemented, and if the current post-XS API is good enough or lacks some API support from core. As it turned out only some class (=type)/OO features needed to be added to the public potion API, the p2 backend. Everything else went smooth. I also fixed some more core bugs on my way.

Fennec V2.x - Testing made better

Fennec is a testing framework on top of Test::Builder, one that reduces boilerplate, and solves many of the limitations of vanilla Test::More. It addresses issues such as forking during tests, breaking tests into smaller parts, test-group isolation (state leaks), and mocking. With Fennec in your unit tests, testing becomes a much more enjoyable experience.

A while back I needed to create a presentation for promoting Fennec. That presentation can be found here and covers most of what makes Fennec so great. It even includes a javascript debugger-emulator that shows the order of execution, and the parallelization provided by Fennec. Most examples in this presentation can be found in both vanilla Fennec, and Fennec::Declare, which uses Devel::Declare to provide nice sugary syntax.

These are the key features of Fennec

Concurrency
Predictability
Better Mocking
State Management
RSPEC and Workflows
Customizability
Supports OOP better
No need to manage test count
fork() just works in fennec tests

Fennec also does the work of tying together several popular test modules reducing your boilerplate code.

Roles in p5-MOP

Support for roles has now been added to the p5-mop-redux project. I ported the example that I used a few times in talks and in previous p5-mop attempts. I like this example because it shows a number of features and styles of roles, such as; required methods, roles composing into roles, interface roles and finally multiple roles composing into a class.

Over the years I have written a number of implementations of roles, it started with Class::Trait back in 2004, followed by a couple of attempts in the Pugs project, then came Moose::Role and most recently in the old p5-mop project - and I never really liked how any of them turned out. The implementations always felt overly complex and never seemed to gel in my head completely. Since I am really striving to keep things simple with this version of the MOP I decided to avoid the crazy bootstrapping gymnastics and start with the simplest hack possible (then clean it up in the bootstrap).

Perl 5 Porters Weekly: July 1-7, 2013

Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list.

Topics this week include:

  • Use of bare << to mean <<"" is deprecated
  • Perl 5.18 and Regexp::Grammars
  • key/value hash slices summary
  • postfix dereference syntax
  • Things that have been deprecated for a long time
  • Talk about deprecation...

A Look At My Utility Library

I am creating a utility module and will be posting about it on my blog.

Parsing Ada Lovelace

[ This is cross-posted from the Ocean of Awareness blog . ]

The application

Abstract Syntax Forests (ASF's) are my most recent project. I am adding ASF's to my Marpa parser. Marpa has long supported ambiguous parsing, and allowed users to iterate through, and examine, all the parses of an ambiguous parse. This was enough for most applications.

Even applications which avoid ambiguity benefit from better ways to detect and locate it. And there are applications that require the ability to select among and manipulate very large sets of ambiguous parses. Prominent among these is Natural Language Processing (NLP). This post will introduce an experiment. Marpa in fact seems to have some potential for NLP.

Writing an efficient ASF in not a simple matter. The naive implementation is to generate complete set of fully expanded abstract syntax trees (AST's). This approach consumes resources that can become exponential in the size of the input. Translation: the naive implementation quickly becomes unuseably slow. Marpa optimizes by aggressively identifying identical subtrees of the AST's. Especially in highly ambiguous parses, many subtrees are identical, and this optimization is often a big win.

Someone made this super cool video of all the devs working on...



Someone made this super cool video of all the devs working on the Lacuna Expanse source code tree through-out history.

[From my blog.]

The state of SOAP::Lite - here comes 1.0

I'm about to do something. I'm going to release SOAP::Lite 1.0. And it may break on your implementation. But it may also just work. I've been struggling with how to approach refactoring the monster Makefile.PL, so I've decided to gut it and replace it with something simple. The test suite is robust, so if it does break on your usage, you probably know how to install the needed dependencies, and it will be no big deal.

Things will get a bit bumpy here, but I appreciate your patience. And patches. The new official SOAP::Lite source code repository is at https://github.com/redhotpenguin/soaplite

I had considered requiring every module, but I'd have to rename it to SOAP::Heavy, and that seemed to be a questionable approach.

UAV::Pilot v0.4 Released, Now Supports Video

UAV::Pilot, a Perl library for controlling the Parrot AR.Drone, has released version 0.4.

The big change for this update is streaming video to a file. Display in real-time is not yet
implemented--that's coming in 0.5.

There are also some API changes in how event loops are initialized to make the naming more consistent. There will probably be another API change in the video handling in 0.5. Once I do a complete release, API changes will have a proper deprecation plan, but for right now I think it's fine to change things willy-nilly.

[Via my blog]

Encapsulating Responsibility in Methods

From time to time I find myself needing to explain what OO programming is. I've written that Objects are Experts, but as usual, there's a deeper lesson to be learned here.

Imagine that you've hired a new barista (espresso bartender) and you're teaching him how to make a latté. You explain

  • how to pull the grounds and start the espresso brewing
  • how to steam the milk and get a good foam
  • pouring the milk into a cup
  • pouring the espresso through the milk (and maybe making a nifty pattern on top)

You explain this over and over. That's procedural programming. Finally, one day you can walk in and just ask for latté. You don't have to tell your new barista how to do it, you just ask. Congratulations: your barista is now an object.

Common reasons a module won't install

Hi All,

Everyone knows how frustrating it can be to try and fail to install a Perl module. I'm writing an article that will help people troubleshoot the common causes of a module not installing. I've made a list below but have I missed any common installation issues that you've experienced?

  • Unmet Perl dependency (cannot find module in @INC)
  • Unmet C library dependency
  • Perl version not high enough
  • Wrong permissions
  • Broken module
  • Incompatible Operating System
  • Perl not compiled with the right flags
  • Incorrect environment variables

Thanks in advance

A NuoDB Driver for Perl

Even though newer scripting languages are now in vogue, Perl is still the workhorse of the internet. The job market for Perl developers is going strong and Perl has a long history of use in major web sites such as Ticketmaster, Booking.com and The New York Times. Perl is well suited for database processing tasks due to the mature, unified DBI database interface and the numerous database-related modules, templating solutions and ORM frameworks available from the CPAN repository.

NuoDB provides a truly scalable, cloud database that is SQL-compatible at the same time. By connecting to NuoDB, legacy database applications can continue to run and scale into the cloud era while taking advantage of automatic redundancy and easier management.

Read more here

On the relationship between p5-MOP and Moe

I was asked on twitter recently what impact my restarting the p5-MOP project will have on Moe. My response was basically that my time would be split between the two projects, so momentum would probably slow. But that's actually not true, my time right now is completely focused on p5-MOP, and Moe is kind of on the back burner (for me at least, the other contributors need not wait for me).

But this question got me thinking, specifically thinking about the relationship between these two projects.

I realize now that when I started the p5-MOP project I was lacking some very crucial knowledge and experience. I had spent the last 7 years just building features on top of a language, and really had no experience building them inside of a language. I can see now that my approach reflected that lack of knowledge and experience, and that it ultimately lead to the issues that suffocated that project.

Recruiters suck, and why I became one.

Because we take confidentiality very seriously, all of the names (except mine and my wife's) have been changed, along with the countries. Also, my wife handles most of the recruiting side. I'm a freelance consultant/trainer, so no, I'm not giving up programming.

Nisar (not his real name) lives in Unknownistan (not his real country) and was extremely concerned about the climate in the country he was seeking work in. We were confused. He was willing to accept just about any programming job for any pay rate. With his desperation to get out of his third-world country, why would he really care about the weather?

The answer, it turns out, was rather simple, though surprising to Western ears: if Nisar couldn't find a place to live with heating, he was worried about being able to handle the winter.

YAPC Conference Surveys Update

Last night I managed to get all the talk and tutorial feedback emails out to the speakers from YAPC::NA 2013. If you were a speaker at the event, and haven't received an email from me, first check your spam filters, and then contact me, and I can resend yours.

This year we had 351 talk evaluation responses, 29 course evaluation responses and 121 conference survey responses.

Perl 5 Porters Weekly: June 24-30, 2013

Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list.

Topics this week include:

  • Idly musing about vtables for hashes
  • Raison d'être of op_ppaddr
  • Building real CPAN dists in core perl
  • postfix dereference syntax
  • experimental: linux abstract domain sockets
  • the mystery of undef upstreams
  • Perl 5.18 and Regexp::Grammars
  • What does "deprecated" mean?
  • RFC: Any objections to preserving spaces in prototypes
  • Removing old utilities
  • podcheck and long lines

Pre-Modern Perl VS Post-Modern Perl: Redux

I seem to have started a whole controversy. I feel like I should be blushing: all this attention is probably assigning far more importance to my opinions than I deserve.

First, a recap: There were a couple of blog posts about pre-modern Perl.  Then I responded with a bit of a defense of post-modern Perl.  This engendered a lot of comments; certainly more comments than I’ve ever had on any of my other blog posts (in fact, more than twice as many as the previous record-holders).  Then the author of the post that initiated the discussion made a fuller response.

Perl Mongers Meetings via Google Hangout

This past Thursday we tried something new at Toronto.pm We decided to try having our in-person meeting also available online via Google Hangout. So far all feedback has been positive and it allowed us to have a meeting of 15 people rather than just the 10 who made the trip to our usual location. We had participants from as far as Texas and Alberta as well as some local mongers who weren't able to make it to the location but were still interested in the topic being presented.

We're going to make a few tweaks to the setup in the actual meeting room in order to let the online participants better hear the questions asked in the room and vice versa, but moving forward it looks like we're going to stick with this format and likely publicize the hangouts so that just anyone can check in and participate. At least one of our lightning talks in our coming September meeting will be from a remote participant, which seems like a great way to get access to more speakers than the usual suspects who attend our meetings in person.

If you've toyed with the idea of broadcasting your meetings, this may also be a good solution for your local monger group.

How to load a Wx::Bitmap from a Variable

You know the good feeling when you find a solution for a problem after it hounted you many months or even years. I had such a moment today when i finally found (with the help of the excellent Mark Dootson++ of course ) a way to load icons from a set a data and not from a file. Now I can have a complete set of default configs inside a Module so Kephra can boot fully featured no matter what. Yes the Kephra rewrite is alive. I just reorganized the branches and the development model. It runs now under mac and we have full (more?) utf safety. The internal models are still in flux and I plan to drop Moo. Next stop will be the creation of a customized status bar that will be able to have coloured always right aligned labels, icons, fitting context menu and more. Like I always wanted it to be. A new dawn :).

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.