An exploration of trie regexp matching

David Leadbeater will give a talk at YAPC::Europe 2012 described as

The RE2 regular expression engine uses a data structure called a trie to match regexps. However perl itself can use this data structure under certain circumstances. We'll investigate Perl's behaviour, apply some insane optimisations and compare with RE2 (via re::engine::RE2).

YAPC::NA 2012 Survey now closes Saturday

Due to server issues last night, a number of people were unable to submit their surveys. As such I have now reset the deadline to midnight on Saturday, so you have an extra day to complete your surveys and evaluations.

Unfortunately, the backup process ran last night and filled up the disk, as I hadn't gotten around to archiving the backups from past few weeks on to the main backup server. Many apologies for any inconvenience caused.

Rest assured, the automatic backup update has now moved higher up my priority list :)

An Excuse to Get Outside (Team Building via RC Helicopter)

Last month I was lucky enough to attend YAPC::NA in Madison, WI. Among the many spectacular talks, impressive people, and events there was a raffle that took place for conference attendees. With all proceeds going to the Perl Foundation, I contributed $100 and threw my raffle tickets in to two buckets: lunch with Larry Wall and some ThinkGeek swag.

Unfortunately, I didn't get to dine with the great one, but at one of the evening events I did win the ThinkGeek grand prize: a remote controlled outdoor helicopter (picture at right).

Now, at the time, I was slightly underwhelmed. My first thought was, "Wow! I won! Wait .. I won? How am I going to get this thing home?" My second thought was, "What the heck am I going to do with a remote controlled helicopter!?"

Windows in Prima

Windows are the main element in any Prima application. Windows belong to the Prima hierarchy, but at this time we are interested on windows simply being windows.

Prima offers two basic types of windows: the MainWindow and the Window. The main difference is that destroying a MainWindow will destroy the application, causing the closing of any related windows, dialogs, while closing a Window does not destroy the application.

The creation of both types of window requires some minimal setting. Many others can be used to get the look and feel and the behavior intended.

The settings are of two types:

  • Parameters indicate properties of the new window, as size, the text to be shown on top, the menu to be shown, color of the canvas, status of windows as e.g. maximized or minimized, border colors, and so on
  • Events indicate the way the window would react on events. The one almost always present is the paint event, which shows the operations that are performed when the window is created and then painted

Dancer 2 : official status

Damien Krotkine and SawyerX will give a talk at YAPC::Europe 2012 described as

This Talk will explain what Dancer 2 is, where we (the core team) are, what's left to do to be able to release it.

It'll include a demo, and some technical explanations, as well as a list of what external coder can do to help.

This talk is done by a member of Dancer core team.

Lacuna Expanse Goes Open Source

The Lacuna Expanse is a massively multiplayer empire builder game written in Perl. Long ago we open sourced the iPhone and web clients for the game, today I'm pleased to announce that we're open sourcing the server as well.

Some of you may be asking, "Why would you do that?" and "Does this mean you're shutting down the server?"

No we're not shutting down our server! As long as it's at least paying for itself, we'll continue to host the server and all related infrastructure forever.

Finding Unused Subroutines

Posting this here to help me remember this.

I have to do a bit of work cleaning up some old code and I wrote this quick shell script to find possibly unused subroutines.

Object Oriented Learning of Prima

Object orientation is a great benefit for programming but also a key for learning.

Prima offers a very large set of objects to the needs of development. As the human brain can group together a quite limited number of objects (four to seven depending on individuals), having a large number of objects can make the whole stuff unmanageable. That is the reason that makes our brain starting with one topic, then a first level of some different groups of things, and then puts at the bottom of each one, the objects that can be a kind of that. This is the way we can manage large sets of objects, buy putting them in a hierarchy. This way the mind works inspired the pyramid principle by B. Minto, as a way to produce documents while validating the ideas.

So, to get off of the numerosity that affects Prima as any other real world tool, we have to depict what type of objects we have, at first.

Log::Message::Structured + Message::Passing + ElasticSearch

Damien Krotkine will give a talk at YAPC::Europe 2012 described as

Message::Passing is a new Log interoperability and aggregation framework, by Tomas Doran. He's doing a proper introductory presentation of it.

This talk is a more practical presentation of how to create meaningful log messages with Log::Message::Structured, how to send them to Message::Passing and how to configure Message::Passing. It will also show 2 frontend, one small Dancer application using MongoDB, and an ElasticSearch frontend.

YAPC::NA 2012 Survey Closes Friday

The YAPC::NA 2012 Survey closes on Friday. If you have not already done so please go fill out the survey. It will help next year’s organizers plan a better conference. Check your email, you got an invitation with a code to fill out the survey. Fill it out now!

[From the YAPC::NA Blog.]

YAPC::NA 2012 Survey closes Friday

The Conference Surveys for YAPC::NA 2012 will close this Friday. Of the 447 listed attendees, we've had 110 responses to the main conference survey, 404 talk evaluations and 7 course evaluations. All this is great, but it would be even greater to see even more responses.

If you attended the YAPC::NA conference in Madison last month, and haven't already completed the surveys, please check your email for your personal keycode, and take a few minutes to complete the survey. It really does help to improve the event every year.

In addition, please take a few minutes to complete talk evaluations for those that you attended. The speakers put a lot of work into their presentations, preparing slides, researching their subject matter and working up the confidence to stand up in front of people who they don't know. Getting feedback those listening can really help them to improve their presentation skills for future events.

Hello, world.

I am not quite sure what to say. I'm a novice at perl, but a long time programmer.

Just taking my first steps in the community.

I am a Myers-Briggs INTJ (per here).

Dancer + WebSocket + AnyEvent + Twiggy

Damien Krotkine will give a talk at YAPC::Europe 2012 described as

This in *not* a talk about doing a hello world in Dancer, as there are plenty of it. This is a real-life example of using Dancer to address a problem in an elegant and powerful way

At $job, we have cpan mirrors. We want them to stay a bit behind the real CPAN for stability, but we have a tool to update modules from the real CPAN to our mirrors. Cool.

I wanted to have a web interface to trigger it, and monitor the injection. This problem is not a typical one (blog, wiki, CRUD, etc). Here we have a long running operation that shall happen only one at a time, that generates logs to be displayed, with states that need keeping. In this regard, it's interesting to see how Dancer is versatile enough to address these situations with ease.

This talk details how I did that, the technology I used, and the full source code (which is quite short). I used Dancer + WebSocket + AnyEvent + Twiggy + some other stuff.

This talk doesn't require any particular knowledge beyond basic Perl, and very basic web server understanding.

MooseX::Singleton is slow

cross-posted from dams blog

MooseX::Singleton is slow

Just a quick note : if you plan to use MooseX::Singleton, beware ! It is easy to use and it implements properly what it claims, however it is quite slow.

If my profilings are corrects, each call to ->instance() calls meta(), get_metaclass_by_name() one time, and blessed() two times.

So for now I'll avoid it and implement a simplified version using something similar to this :

A brief introduction to Prima

Prima is a graphical toolkit actually developed and maintained by Dmitry Karasik, now at version 1.34. If offers a large set of feature that makes it a good choice for anyone looking for an event driven environment.

Prima basic concept is that of building an application as a process of creating windows, adding any needed menus, childs, images, properties, and relationships and then starting the whole.

The basic use directives to use Prima are:

use Prima;
use Prima::Application;
use Prima::ComboBox;

and so on or using the qw syntax:

use Prima qw (Application ComboBox);

When we have available the modules we could start creating a window that will be the main window of our application.

Introducing Class::ConfigHash

A while ago I saw a post by Ovid on boxing hashes for configuration in Dancer. The idea seemed pretty neat, and I found myself doing something similar in some work for Net-A-Porter, so I wrote a generalized implementation (although the underlying mechanism is different). From the synopsis:

Yandex.Direct: our successful anti-modern Perl

Oleg Komarov will give a talk at YAPC::Europe 2012 described as

Yandex is the leading internet company in Russia, operating the most popular search engine and the most visited website. Yandex.Direct is a system for the placement of text-based advertising. Yandex.Direct web interface is a mature Perl project with lots of users and data, a big codebase and a large team.

We always have lots of new features to implement, maintenance problems to solve and legacy code to refactor.
We'd like to give a brief talk on how we do it. Using Perl, of course.

OT: Reset/Use Another Netflix Streaming Server

To reset/use another Netflix streaming server, disconnect your Internet service for 5 minutes (as in "turn off your cable/DSL modem"). Once you reconnect your Internet service, Netflix acts as if you had never connected to Netflix before so it assigns you a fresh server. This does not guarantee that you will switch servers, but it has been found agreeable to my practice.

I wish Netflix would publicize this tactic.

So apparently this is creepy

Responding to RT #78146 (and a recent CPAN rating) I am pulling the library off CPAN.

However, I would like to elicit some comments here, especially from members of the discussed gender (that is, if they want to expose themselves). I admit, having never worked or lived in America/Europe/anywhere abroad really, I am pretty oblivious to the politics of the whole thing. Were this done in my country, I would expect no such ballyhoo. Something related to religion, however, ...

On the one hand, the information gathered is publicly available. In fact, most people's names indicate gender pretty clearly. Also, isn't nationality something that can also be the basis of discrimination (for which there are plenty Acme-CPANAuthors dists)?

On the other hand, I never asked for permission for the authors to be listed. But then I was also not asked for permission when included in a couple of other Acme-CPANAuthors dists.

Nevertheless, I understand the good intention of those who requested the library to be pulled.

How Not To Highlight Women In Perl

Here's the short version: gender anonymity is protection, and in a male-dominated community many women prioritize safety. A machine parsible list of female CPAN authors threatens their anonymity even if they're not on it.

Here's the even shorter version: highlighting gender is advanced and should not be done lightly.

A module was recently uploaded to CPAN whose aim was to provide a big list of female CPAN authors. I believe the author had good intentions, or at least nothing more than "I was curious", and has been quite puzzled at the reaction that it's creepy and the requests for it to be deleted. Fortunately, he voluntarily removed the module when asked. Unfortunately, because the community is not well versed in gender politics, this sort of thing is likely to happen again. Here's an opportunity to talk about it so it doesn't.

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.