A Day In The Life Of YAPC::Asia Tokyo Preparation

As I've written in my previous post, we've been making visits to our potential YAPC::Asia Tokyo 2011 (Oct 13-15) sponsors for the last few weeks. After today, we only have *one* more visit that we need to make our potential sponsors for YAPC::Asia. Here's a picture from today's visit.

( Tickets are on sale!! )

As you can see, we have last year's YAPC::Asia Tokyo pamphlet, and we're discussing how this sponsor (who shall remain nameless for now) can make the most out of their presence at YAPC::Asia Tokyo.

It's always a nice idea to bring stuff (novelties, pamphlets, time-schedules) from previous YAPCs, as not all potential sponsors share the same image of how a YAPC sponsor ought to help / take advantage of the event.

Urgent Help Required regarding biological perl script

Dear Sir / Madam


My name is Bharat yadav and I am a researcher in Punjab Agricultural University - Ludhiana.
I am facing a problem regarding perl.
I know this will consume your time... but your favor and expertize helps me a lot

I need a perl script which let us know the location of the coordinates of 384 well array.
We do have 2 types of plates one is 384 well plate and second 96 well.
The dimensions of 384 well plate having 24 columns (1,2,3...24) and 16 rows (A,B,C...P)
Where as 96 well plate has 12 columns (1,2,3..12) and 8 rows (A,B,C..H)

these 384 well plates contains 4 different types of samples which were transferred into four 96 well plate.

Padre 0.88 - Internals refactoring completed!

Padre 0.88 has just been released.

Update: This is not the actual release announcement, just a couple of big changes that I think deserve some coverage in depth.

This is an immense release for the Padre team, the changes file entry alone is 140 lines.

Most importantly, this release completes the refactoring work on a number of internal subsystems.

Padre's threading architecture Padre::Task has been returned to full maturity after a long period of instability following the landing of the second generation Padre::TaskManager implementation.

Fixing the last thread leak bugs allows the reintroduction of our "slave mastering" technique, where we spawn a clean "master" thread as early as possible during startup, and then spawn background worker slave threads off this master thread rather than off the foreground thread. For a typical Padre instance, slave mastering results in a reduction of 15meg of RAM per thread (and there is further improvements to be gained in this area by requiring less of Wx to be loaded at startup).

Binary search versus hash lookup

A long time ago I had a very silly conversation with a developer where we both agreed that we weren't too concerned about algorithms and data structure memorization because, hey, we could look them up, right? We don't need to use that fancy-pants computer sciency stuff in our jobs because we've never needed to. Of course, that's like saying because you've never had a driver's license, a driver's license is useless. When you don't have a car, you naturally tend to look at problems and solutions without considering the options a car may provide you.

That's why I've been brushing up on my comp-sci lately. I've been working through a bunch of sorting algorithms (insertion sort, merge sort, and quick sort) to better understand their characteristics when I started to think about how I might find if an item is in a list. If it's a large list, I typically use a hash. Most of the time this is fine, but I wanted to understand better what I could do.

How to add JSONP support to a web service

I needed to do this yesterday, so that a developer could work on a project on his own machine while accessing some REST services I developed on an intranet server. Cross-domain requests are prohibited by the same origin policy security that govern client-side Javascript programs. JSONP gets around this by sending back a Javascript function which encloses the JSON data, rather than just the JSON data. This is known as a callback and is used like this:

         { "param" : "abc" },
         function(json) { 
             alert("Fetched " + json.field1 + ", " + json.field2); 

So I needed to modify the web services to handle this. Turns out this was really easy:

use CGI; 
use JSON; 
my $c = CGI->new; 

# Get the callback function name 
my $callback = $c->param('callback');i

if ($callback) { 
    print 'Access-Control-Allow-Origin: *';
    print 'Access-Control-Allow-Methods: GET'; 
    print "Content-type: application/javascript\n\n";
} else { 
    # Header for access via browser, curl, etc. 
    print "Content-type: application/json\n\n"; 

# Fake up some sample data 
my %json; 
$json{'IP'} = $ENV{REMOTE_ADDR}; 
$json{'useragent'} = $ENV{HTTP_USER_AGENT}; 
$json{'list'} = [ 'a', 'b', 'c', 'd', 'e' ]; 

# Convert %json to a scalar containing a JSON formatted string
my $json = to_json(\%json, {pretty=>'1'}); 

if ($callback) { 
    print $callback . '(' . $json . ');'; 
} else { 
    print $json,"\n"; 

The Making of Mojocasts

szabgab, who has quite a few screencasts, asked me to explain how I made the mojocasts.

Creating them has been quite the learning curve. My initial inspiration was Vimcasts, and although I don't have the hip accent, I figured I could put something interesting together for...something. It didn't take to long to settle on Perl and my preferred source of Perl unicorns, Mojolicious.

A Vimcast has a very cool, down-to-earth presentation; the music, the tone of voice, and the presentation as a whole tell the viewer, "Yeah, Vim is just that cool, and if you learn this, you'll be that cool as well". Presentation is vital: the Apple logo on most of my devices state as much.

My first module: Data::Compare::Plugins::Set::Object

I wrote Data::Compare::Plugins::Set::Object (blech, what a mouthful) a couple months into my job at GSI. At the time I wasn't sure what if any their policy was on open source releases, so I was careful to do it on the side and assign copyright to myself. I still haven't found an explicit policy beyond my manager's "just use your best judgment" statement. Maybe that's for the best.

DBIx::Class::Schema::Critic and parameterized roles

I originally started DBIx::Class::Schema::Critic as a code sample for a job application, but I thought it was worth releasing and continued independent development. Inspired by Perl::Critic, it's a package for comparing relational database schemas against a collection of best practice policies using the DBIx::Class Object/Relational Mapper.

At mst's behest I converted it from the Moose object system to his more lightweight Moo. But now that I've accumulated a few policy modules I'd like to refactor their commonalities out into roles.

Trouble is that Moo doesn't have an equivalent to Moose's MooseX::Role::Parameterized, and I can definitely see use for that in creating a bunch of similar roles for each DBIx::Class object a policy applies to.

So what to do? Can/should I port parameterized roles to Moo, while avoiding the overhead of a meta-object protocol like Moose's Class::MOP (which Moo explicitly rejects)? Or just make a bunch of more-or-less identical roles that differ only in name and attribute content, accepting the repetition as the price of minimalism?

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.