YAPC::Brasil 2012 Starts Tomorrow

The 2012 edition of the YAPC::Brasil will start tomorrow. We will have lots of good subjects being presented covering different areas as big data, open data, data journalism, Perl hacking and bioinformatics. There are already representants from 4 local Perl Mongers groups and from 10 different countries, including Brazil. Check the website for more informations.

Perl Success Story - Managing PHP apps with Perl

WebPub helps install and manage popular web apps. We currently are doing WordPress, Drupal, MODX and phpBB. While the web UI is in PHP (decided before I came onboard) the backend is all Perl.

Some of the major components being used are: Mojolicious, Moose, DBIx::Class and Gearman.
Mojolicious provides the REST interface for the PHP front end and will be used in the near future by at least one other company we are working with. That company will write their client in Ruby.
Moose is used heavily for meta method creation, mapping various before / after 'method' to validation and DB update_or_create and the installer system loads the appropriate role (each app has its own role for things that are app specific - an install of Drupal needs more fixup than WP) at runtime.
DBIx::Class - no explaination needed
Gearman - actual interaction with remote systems happens from workers.

Please Publish Perl Events on the LWN.net Calendar

As I read last week's LWN.net's Announcement Page (LWN.net is a news site for open-source-related news, formerly standing for "Linux Weekly News"), I noticed that there were few if any Perl events featured in its upcoming events calendar. However, these events appear in the Perl Weekly, and there are many upcoming Python events featured in LWN.net.

So, please, if you are organising a Perl-related event (or any other major open-source event), make sure you put it on the LWN.net calendar.

My IPW afterthoughts

This will be just partially about the just ended Italian Perl Workshop in Bologna, because frankly most of the talks I did not not understand, even if I would like to improve my Italian. So why even bother being one of a hand full not Italian?

Building Your First App with MongoDB and Perl at MongoDB Boston

I'll be speaking on October 24th at MongoDB Boston 2012, taking place at the lovely Marriot Courtyard Tremont/Downtown.

Conference registration is a mere $100 ($30 for students). There are three tracks, covering everything from beginner topics presented by 10gen staff to advanced, detailed MongoDB presentations by industry leaders. Here's the abstract for my talk:

This talk introduces the features of MongoDB by demonstrating how one can build a simple library application. The talk will cover the basics of MongoDB's document model, query language, and API. In addition, we will learn how to use MongoDB within a typical web application framework.

If you're in Boston and you've never used MongoDB before, or are thinking of trying it out, I'd highly recommend stopping by. The demo application for the talk is written with Mojolicious::Lite and will soon be available on GitHub for you to experiment with.

(Crossposted from my blog here.)

A configurable HTML parser, part 2

[ I have succumbed to the sirens of static blogging. This is cross-posted from the new home of the Ocean of Awareness blog. ]

My last post introduced Marpa::R2::HTML, a configurable HTML parser. By editing a configuration file, the user can change the variant of HTML being parsed. The changes allowed are very wide ranging. The previous post started with simple changes -- the ability to specify the contents of new tags, and the context in which they can appear.

In this post the changes get more aggressive. I change the contents of an existing HTML element -- and not just any element, but one of the HTML's three "structural" elements. Marpa::R2::HTML allows the configuration file to change the contents of all pre-existing elements, with the exception of the highest level of the three structural elements: the <html> element itself.

Can text appear directly in an HTML body?

More Ocaml and Unicode

I was wondering how you would do string encoding translation in Camomile (the Ocaml Unicode library). Why would you want to do this? Well, for instance, if you get a UTF-16 encoded string and you need to use PCRE on it, which only takes UTF-8 input. This means that you need to translate your string downward so you can match against it.

As Camomile uses functors extensively, you need to know how they work so you can follow the code example below. However, it is fairly straight forward once you get your head around it (it took me a while to figure this out which is why I am putting this here).

open CamomileLibraryDefault
open Camomile

module UTF8Decode = Camomile.CharEncoding.Make(UTF8)

let _ =
  try
    let changed = UTF8Decode.decode Camomile.CharEncoding.utf8 "神奈川大学" in 
      UTF8.validate changed;
      print_endline "yes!";
      exit 0
  with 
      | UTF8.Malformed_code ->
          print_endline "no!";
          exit 1

Korean Perl Workshop on October 20

Just in case you happen to be in the area, the Korean Perl Workshop will take place on October 20, 2012 in Seoul, Korea.

(They also have a nice banner to the Perl Weekly)

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.