Put up or Shutup, part 1: Starting somewhere

My ranting and raving from the previous post, which I expected to only receive shun, flame and troll turned out to have a positive side effect: being told to actually do something about the things I was complaining about. So instead of disappearing into /dev/null or somewhere equally as stupid, and despite my own inabilities to do them all, the least I can do is something which is greater than being a clown on the internet.

The things I bitched about boil down to a few key bits:
  • Usability and experience on Perl related websites need significant improvement
  • Monitoring the effectiveness of the usability and reach along and iterating changes on the websites to improve usability for new comers and regular users
  • A greater effort to aggregate and supply high quality recordings of talks and screen casts.

Firefox/Chrome/Safari - Beautiful Examples of Objects

You may not have heard of Ralph Johnson and Joe Armstong, but they've been programming longer than most of us have, including OO programming longer than most of us have. It's fair to say that after you've been doing something a while, you tend to form opinions about it. Mssrs. Johnson and Armstrong have opinions and this interview with Ralph Johnson and Joe Armstrong is full of said opinions. It's brilliant. There's a great bit from Joe Armstrong where he explains what he thinks "OO" should be about. Though he doesn't use the Web browser as an example, I will. But first, it's important to quote him at length.

Albany.pm - Capdist, NY Perl Mongers meeting

There will be a Albany, NY Perl Mongers meeting the last week of July 2010 to get things rolling again after a very long hiatus. Sign up on the mailing list, or stop by on irc (irc.perl.org / #albany.pm) to find out more details!

Callbacks done, weird 64bit libffi issue?

The week has been frustrating, funny, yet ultimately fruitful.

Research, enhancing C function signatures

I had callbacks to Perl almost working at the start of the week, but couldn't seem to get variables updated 'in place'. The example function I was using to test callbacks, the C standard qsort, takes as its arguments a pointer to an array, the number of items in the array, the size in bytes of one item, and a reference to a function which will be passed two items from the array at a time and decide how to sort them. It returns void, and the original array ends up sorted.

I had the arguments passing to Perl and returning all right, but couldn't see how to update the array itself, so I spent a long time reading the C source for Python's ctypes to try and figure where or how it did so. I learned a lot, about Python internals in general and about its ctypes implementation.

The "M" word is the wrong word.

If you are offended, angered or feel I am mistaken, I welcome dialogue on this topic. No doubt what I will say might piss someone off.

BETA - An Example (of Failure)

The BETA project started in 1976, briefly escaped into the real world and was quickly beaten to death only to have its corpse revived in academia. It's one of quite a few languages which seems destined to never catch on. It's kind of a shame as it's an interesting language, but I'm certainly in no position to change this and, in any event, am not certain I would want to.

Yesterday I posted an example of OO in BETA. Prior to that, I posted an interesting quote from the BETA researchers. In the quote, they talked about how BETA was for modelling and they didn't like inheritance for code reuse. BETA is all about modelling things properly. They talk about this a lot.

Yet Another Perl 6 Logo

I recently saw Sebastian Riedel's designs for Perl logos, which I like quite a lot, and it reminded me of some of my own ideas in this area.

When the Camelia logo came out I created a few designs for a variation on the butterfly logo based on twin infinities. I don't really have the skill to render them as artistically or as polished as I would wish but the basic idea was something like the following:

Perl6_inifinities_01.jpg

Or with the lower half smaller to emphasise the butterfly shape:

Perl6_inifinities_02.jpg

Or with rotation:

Perl6_inifinities_03.jpg

If you like this idea and have some artistic flair maybe you could create some more colourful and or polished variations on this theme.

iCPAN: CPAN on your iPhone

When I've got a few minutes here and there, I like to browse the CPAN for new, interesting modules. I wanted a way to do this quickly and easily on my iPhone, without needing to get online to do it. This app did not exist, so @ioncache and I set about creating it. iCPAN has been available in the Apple app store for about 4 weeks now and we're currently working on updates for the next version. (Our lightning talk slides have now been posted as well.)

iCPAN works on your iPhone, iPod and even your iPad. Our initial release of the app allows you to:

  • search CPAN documentation by module name
  • bookmark your favourite modules
  • view your recent searches
  • browse the docs offline


The next release will add the following:

  • Example code snippets in docs will be formatted via PerlTidy
  • These codes snippets will also feature syntax highlighting

one liner history command counter

Wondering what commands you use the most, try this one liner:

$ history | perl -ne 'END { map {print ++$i.": $_\n";} splice(@{[sort {$h{$b}<=>$h{$a}} (keys %h)]},0,5); } m/\s+\d+\s+(.*)/; $h{$1}++;'

In one of the servers I use I got:

1: ls
2: fg
3: cd ..
4: sudo tail -f /var/log/httpd/error_log
5: cd


Well, I actually added:

alias j=jobs
alias vl='sudo tail -f /var/log/httpd/error_log'


To my .bashrc after this.

BETA - An Example

I've kept meaning to post an example of how the BETA programming language handles inheritance and now I have a touch of time to do so. It may seem very strange to you, but one you see what's going on, it actually makes sense.

CPAN Testers 2.0 and the metabase-relayd

So CPAN Testers 2.0 was announced and further here.

Big kudos to all concerned

When I met David Golden and Ricardo Signes at the Birmingham QA Hackathon in 2009 and discussions were happening about Metabase and how submissions would be made to it, I'd expressed concern about the weight of the dependencies that would be required to make Metabase submissions.

I came up with the idea of a Metabase relay server, something that would act as an intermediate between smokers and the Metabase. The smokers would use an very lightweight transport to submit reports to the relay, which would then forward the requests on to the Metabase server.

And that was as far as it went until the beta testing of Metabase started. I wrote Test::Reporter::Transport::Socket which would be installed on the smoker. This takes as options the address of a relay server and the TCP port to connect to. The data is passed using Storable's nfreeze function and unfrozen at the relay.

Gambling

Just when thought this proxy/web-filter was as dumb as it could get: Screen shot 2010-07-13 at 09.02.32.png

Perl-Critic in Depth


Jeff Thalhammer will be back to speak about Perl-Critic again on July 27nd at 7pm, at the office of LookSmart.

As any Perl developer will tell you, There's More Than One Way To Do It. But over time, we all learn that Some Ways Are Better Than Others.

Perl-Critic is a static source code analyzer based on Damian Conway's book Perl Best Practices. In this presentation, you'll learn how to use Perl-Critic to improve the quality and maintainability of your code. We'll cover the perlcritic command-line tool and the Test::Perl::Critic module, as well as tips for policy selection and incorporating Perl-Critic into your development culture. We'll also demonstrate how to extend Perl-Critic with your own custom policies.

Perl-Critic - http://perlcritic.com/

Jeff Thalhammer's CPAN page - http://search.cpan.org/~thaljef/

Announcement posted via App::PM::Announce

RSVP at Meetup - http://www.meetup.com/San-Francisco-Perl-Mongers/calendar/14082571/

Combinatory Substitution

Not sure if the title is understandable. But I will give an example. Consider a word (well, invented one): noogoo. Now, consider you want to do all possible combinations substituting oo with aa, that is, generate naagoo and noogaa.

The solution I am using, that was idea of my friend Luciano, is as follows:

    $word = "noogoo";
    push @where, pos($word)-2 while $word =~ /oo/g;
    for my $i (@where) {
        my $other = $word;
        substr($other,$i, 2, "aa");
        push @words, $o if $o ne $word;
    }

Any better or more efficient idea?

Perl Authors Night at OSCON 2010

From brian d foy's post:

During OSCON, you can meet several Perl book authors for a panel discussion, questions and answers, and socializing at Powell's Technical Books on Tuesday, July 20 at 7 pm. Bring your Perl books to get them signed by your favorite authors. Confirmed authors include:

  • chromatic (Modern Perl, Perl Testing: A Developer's Notebook, Perl Hacks, Extreme Programming Pocket Guide)
  • brian d foy (Effective Perl Programming, Learning Perl, Intermediate Perl, Mastering Perl)
  • Joshua McAdams (Effective Perl Programming)
  • Curtis "Ovid" Poe (Perl Hacks)
  • Randal Schwartz (Programming perl (1st edition), Learning Perl, Intermediate Perl, Perls of Wisdom)
  • Peter Scott (Perl Medic, Perl Debugged, Perl Fundamentals (DVD))

Powell's Technical Books is at 33 Northwest Park Avenue in Portland. You can take the MAX Green line (for free) from the Convention Center to NW 5th St and NW Couch St, then walk 4 blocks west to the store. There are other Powell's location, so ensure you are going to the Technical Books location.

First Edition

Being a bookish type I am always on the lookout for new stock. One thing to avoid in a bookshop is probably the computer shelf, although I always do check it out. Good job too! On a recent trip into our more remote rural areas I came across a little gem.

Larry Wall & Randal L. Schwartz. PROGRAMMING PERL. January 1991 1st printing

The very first edition of the book was on the shelf in front of my eyes sandwiched between a Win95 book and some other item of even less consequence. A taller format than the current O'Reilly books, it is complete with a 16pp 'Quick Reference Guide' , and came as a Nutshell Handbook in the 'Unix Programming' series.

Unlike the other first editions that I might be searching for, and which can often be worth a small fortune, this item has little monetary value, but is worth a lot to me just to have on the shelf (at home of course).

HTML::FormHandler, KiokuDB, and Continuity

I saw some article about HTML::FormHandler, and decided I'd give it a try. I'm probably not really using it as intended... and I'm also not pushing this confluence of tech nearly as far as it can go.

#!/usr/bin/perl

use strict;
use MooseX::Declare;
use KiokuDB;
use Continuity;

First we just pull in some libraries. We'll use MooseX::Declare for fun :) . Now let's make a lovely base class for our forms, to set up some good defaults an an updater.

Philosophical notes on Dancer, the Perl 5 web framework

Even though I had to let go of web programming for a while now, Dancer is still my favorite framework. Bad attitudes do not exist in Dancer, we don't trash anyone and we're not just polite and respectful towards each other (and by "each other" I'm definitely including all developers _and_ users), but we're also very attentive to one another.

That is how we're able to continue with the project successfully even when one or two core developers are very busy (which happens at times) - as with me right now or Sukria in the past. We're still able to push in new features, serious fixes or even major overhauls when needed.

For example, Dancer has pushed new pure-regex syntax (deprecating the regex path wrapper function we had before) and even provide plugins (w00t! plugins!) and we'll be adding websockets support (omg omg omg *drool*) as well!

Switching from B:: to BETA examples in my roles talk

In my my roles talk I have a long section on the B:: modules but that is so confusing to folks (as one might expect from multiple inheritance (MI) and B:: modules) that I decided to rip it out. I've replaced it with an example from the BETA programming language (all CAPS in BETA is from them, not me).

While this example is fascinating, I realised that I no longer had a damning indictment of multiple inheritance. I'm hoping that I won't need it and people will follow what's going on, but I'm now unsure and I have less time for revising this talk. However, in the process of thinking and researching about this, I discovered something interesting.

Introducing Facebook::Graph

I've published a new module to CPAN this week called Facebook::Graph, which allows you to interact with Facebook to query data, publish content, and more using the new Graph API that they released at the F8 conference at the end of April. I want to take a few minutes to introduce you to the module.

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.