FLOSS Weekly Interview on Pinto

My FLOSS Weekly interview on Pinto is now online here:

http://twit.tv/show/floss-weekly/246

Big thanks to Randal Schwartz and Aaron Newcomb for having me on the show!

Encouraging bloggers to use the 'extended' feature

This is a collection of ideas for how we can encourage bloggers using blogs.perl.org to split their posts into an abstract and body. Attempts at education have largely failed, so I think we should try something else.

App::Midgen, Take two

First I would like to say a big Thank You for all the critiques I received, here and in the channels.

App::Midgen

Food for thought, if we update our Modules, don't we want our users to use the current version, so should we not by default do the same with others Modules. Thus we always show the current version number, regardless.

Now able to show dual-life modules current version number.

Lets start with the changes and inspiration.

  • Switched to using MetaCPAN-API due to a write issue with CPAN, neilb++

  • Switched to using Perl-PrereqScanner to do most of the grunt work as pointed out by Mithaldu++ daxim++

  • spelling, re-factor option names, inspired by mauke++

    • --format change output format
  • changed default output, no extra processing, only distribution version for modules without a version number mst++

if I missed anybody, sorry

And some new features.

Add command line option to show dual-line module versions as well.

midgen --dual_life

Add ability to read/write options from ~/.midgenrc

Back in the #!perl groove ...

I've taken a lot of time off from the work force (and even more from the community). I have been occupying my time with pursuing other ventures (my other brand), but now I find myself actively desiring to write code.

So i began by refreshing and slightly expanding the "jeffa/unlocalhost" brand and ensuring all was available and secured. Next I grabbed the small amount of old code from my CPAN repository and rebuilt each distribution using Module::Starter. Not only did i upload each distribution to github, i also set up Jenkins on my server and set up a job for each one. Each Jenkins job clones a read-only copy, builds the make file, runs the tests (and creates JUnit output for Jenkins) and builds a tardist upon success.

Awesome. Not a bad first step if i do say so myself. And in the process of setting this up i was already able to correct some Pod::Coverage infractions. Next step will be to write proper tests for each of these distros but i am not going to spend too much more time on them. If others wish to fix bugs or otherwise enhance the code they now have a much cooler way to submit patches.

Bigger fish to fry ahead ... >:)

Gtk3::WebKit on Ubuntu

After some really fantastic help & support from potyl I got Gtk3::WebKit to pass it's installation tests on Ubuntu 12.04 (precise, LTS).

Given that this requires one step that cpan/cpanm won't deal with out of the box, in the interests of documenting for the interwebs ...

Dependencies ... at least on Ubuntu 12.04:

aptitude install xvfb libgirepository1.0-dev pkg-config libgtk-3-dev libglib2.0-dev libglib2.0-0 gir1.2-webkit-3.0

Gtk3::WebKit isn't intended to run "headless", which might be one response to the comments on Web Scraping with Perl & PhantomJS about why you'd want to use PhantomJS instead.

However, having been enlighted by potyl, you CAN run it sorta pseudo headless, by using framebuffer display. And thus, no X server is required.

But this is the bit that's going to throw cpanm and naive installs off. Here's the voodoo that you do:

xvfb-run --server-args="-screen 0 1024x768x24" cpanm Gtk3::WebKit

or, if you're doing it old school

Comparing Apples and Oranges - rubygems vs cpan part 2

In part 1 I looked at numbers, now I want to look at uploading and the uploads themselves.

Uploading to rubygems is very simple, I don't know or use ruby, but just from looking at the frontpage I'm pretty confident that it would be pretty quick and easy : 1/2 of the main content of the page is a quickstart guide in 3 simple steps. Neat! (I'm sure there is more to writing a good gem, but that definately leaves you feeling confident to give it a go).

Uploading to cpan via PAUSE is something I do a couple of times a week without really thinking about it, that doesn't mean it's easy, it's pretty much muscle memory after a decade of doing it.

However, from the perspective of somebody outside the "echo chamber" (as I most certainly was when I looked at the rubygems site), it's very different when you arrive at the cpan.org site.

XML-Grammar-Screenplay: Alternative Format for Hollywood Screenplays

A short time after I posted a message about XML-Grammar-Screenplay to a Perl forum, a Perl enthusiast sent me a message reading like that:

I would think that a proper screenplay grammar would be useful (I've thought of writing one myself). Though I've looked through your screenplay examples, I can't see any of them, anywhere, which is actually rendered in correct screenplay format (example), nor anything which appears to directly support the special directives often found in screenplays, such as sluglines. Am I missing something?

(Poor) Directions for formatting a screenplay are here. That really doesn't cover the *extremely* rigid formatting rules involved (a reader can often toss a script with bad margins and get paid for it anyway).

Screenplay-Text looks something like this:

Notes from a Newbie 12: Create and View Comments

Notes from a Newbie document the creation and deployment of yardbirdfanclub.org with Perl Catalyst on shared hosting. They are intended for a Perl Catalyst Newbie who would like to study the creation and deployment of a simple Perl Catalyst application.

PDL 2.006 released!

On behalf of the PDL Porters, and especially our tireless leader Chris Marshall, I am very happy to share the news that PDL 2.006 has been released, I’m reposting the announcement here, find the full message including release notes on the mailing list. It even includes my first contributions to the PDL core :-) Enjoy!


The PDL development team is pleased to announce the official release of PDL-2.006 and an updated draft of the PDL Book to accompany its release.

Of specific note:

  • PDL VERSION numbers now use single decimal format. This will be the standard going forward.

  • PDL now has three graphics options that build on all supported PDL platforms (thanks to work by Craig DeForest and David Mertens and a host of others):

    and

    • PDL::Graphics::Simple a basic 2-D graphics layer that can use many of the existing PDL graphics modules with a uniform syntax.
  • ASPerl build issues have been resolved thanks to relentless testing, verification and fixes by Rob/sisyphus and other win32 PDL users.

As always, go to http://pdl.perl.org for information about all things PDL and how to get PDL for your platform.

Enjoy!

Chris Marshall

PDL-2.006 Release Manager

Idea: perl community homepage

One of my problems related to Perl is that I'm not aware of a lot of things going on in the perl world, and there isn't a single place I can go to try and keep up. I suspect I'm not the only one. This post outlines an idea for a "perl community home page", where you could go to "keep up". I've whipped up a prototype, which is just a static page with a mashup of various feeds and static data.

Comparing Apples and Oranges - rubygems vs cpan part 1

So I noticed that CPAN is no longer king of the hill when it comes to sheer number of packages - rubygems took that title mid 2011 (when exactly depends on whether you include dev version and backpan which it lacks).

Rubygems had previously claimed the title based on dodgy numbers, but by the start of 2012 there really wasn't any doubt - that's a hell of a lot of uploaded code.

At first I was a little downhearted and disappointed, luckily I remembered a well timed piece by chromatic_x on why these sort of charts don't matter.

I looked into rubygems a bit to see just what was behind the massive explosion (admittedly still a bit in denial and looking for a smoking gun to explain), and found that it's a very very different kettle of fish.

That's a good thing for both ruby and perl - there's a lot that can be learnt from comparing and finding (and stealing, something both ruby and perl communities are both happy to do) good ideas.

What if languages were free?

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

In 1980, George Copeland wrote an article titled "What if Mass Storage were Free?". Costs of mass storage were showing signs that they might fall dramatically. Copeland, as a thought exercise, took this trend to its extreme. Among other things, he predicted that deletion would become unnecessary, and in fact, undesirable.

Copeland's thought experiment has proved prophetic. For many purposes, mass storage is treated as if it were free. For example, you probably retrieved this blog post from a server provided to me at no charge, in the hope that I might write and upload something interesting.

Until now languages were high-cost efforts. Worse, language projects ran a high risk of disappointment, up to and including total failure. I believe those days are coming to an end.

Small languages, shaped to the problem domain

Project notes: Prius hacking.

1: Reversing camera switch. - That is, a switch to lie to the display unit, telling it we are reversing, so the reversing camera displays without the car actually moving backward.

1.1: Disassemble dash to be able to get at the display unit’s wiring. DONE.

1.2: Put a connector inline to the existing wiring. Should hold wires securely, have no visible changes to the car when external things aren’t connected.

1.2.1: Decide upon, and buy connector: DONE. Have gone with a Molex Mini-Fit Jr, 20-pin. This is the same connector as ATX power supplies (without the extra 4-pin connector), so are reasonably easy to find in general-commercial-availablity.

1.2.2: Figure out how to connect the connector, in the car, without major disasembly, or melting bits of the car.

1.2.3: Do so, at least for 12 V (accessory or always-on?) and REV. Other lines can come later.

My Catincan funded cpan(1) fastest mirror enhancement

I've completed the cpan(1) fastest mirror enhancement I described in Perl in Catincan, an open source crowd funding proposal. I wanted to test this new crowd-funding system on something small. Everything worked out and "Perl" is the first project to have a fully funded feature implemented. There were some bumps because I was the first, but once I sent in my bank details, I had the money in a day. The code stuff is done, and once CPAN.pm releases a few things in my pull request, cpan(1) will have the new feature.

I specifically choose to work on my cpan script because it's part of core Perl, and I'd like to see other people who contribute directly to core try out some of their own features under "Perl". For those who aren't a contributor, I'm also interested in what you'd pay and how much you'd pay for a feature to be improved, implemented or whatever. Maybe you'd only pay $10, but maybe 1,000 other people would pay $10 too.

I'm also thinking of what I'd like to try next. I have a list of things I'd like to do, but I don't have any idea of the things that many other people would like me to do.

Pinto on FLOSS Weekly next Wednesday

I'll be doing a live webcast about Pinto with Randal Schwartz for FLOSS Weekly. Tune in to http://live.twit.tv next Wednesday, March 27 at 08:30 (Pacific Time) to the see the show. Your can send in your questions in real-time via the #twitlive channel on irc.twit.tv.

Pinto is a robust tool for creating custom CPAN-like repositories of Perl modules. You can fill your repository with any combination of private and public modules, and then build/test/install them using the standard tools (e.g. cpan, cpanm, cpanp). Since you control the repository, you'll get exactly the same modules every time. Pinto also has some novel tools for tracking and managing changes, so you can upgrade modules with confidence and control.

Just follow the raptor tracks!

The Milwaukee Perl Mongers just held their second meeting and had another great turnout. JT from the MadMongers came to visit and presented two fantastic talks.

To help everyone know where to go when they arrived last night, we laid down some raptor tracks to follow :)

More pictures from the event can be seen on our Meetup site.

If you're curious about Perl and in the greater Milwaukee area, please join us!

Finally turning on to DBIx::Class

It's a snow day and time to play. I have a cow orker who prefers to write all the business logic in SQL because he hasn't moved on from what he learnt in the 80's. Nice guy, but I suspect he has a hearing deficiency because he never listens to what I have to say (or he's got a nasty case of NIH). Yesterday, he happened to be getting on my last nerve, but that no longer matters for I will have sweet, sweet Revenge.

Today I started playing with dbic.

Better reporting for your test suite

It's very poorly documented, but Test::Class::Moose also has reporting built in.

Here's how diag() all test classes from slowest to fastest, with time information:

GraphViz2 and the dread MusicBrainz db

Hi All

OK. After a bit of pain I've set up an empty database for the
MusicBrainz database.

In particular, where they say 'sudo cpan Carton' you probably want 'cpanm Carton'.

This exercise was because, astonishingly, one of the users of my module GraphViz2 had doubts about it handling 149 tables spread over 4 schema.

The version of dbi.schema.pl shipped with GraphViz2 V 2.07 needed a patch to handle multiple schema, but after fixing that, you can view the SVG in all its ghastly glory.

Firstly, set up you env vars thusly:
env | grep DBI
DBI_PASS=musicbrainz
DBI_DSN=dbi:Pg:dbname=musicbrainz_db
DBI_SCHEMA=musicbrainz,cover_art_archive,report,statistics
DBI_USER=musicbrainz

Then the command is:
dbi.schema.pl svg musicbrainz.svg > musicbrainz.log

Further, you can download this set of files:
o musicbrainz.svg (size: 257,156 bytes)
o musicbrainz.log (output of dbi.schema.pl, containing the DOT file)
o dbi.schema.pl (patched)
o tables.log (the list of 149 tables as output by Pg's psql)
here.

I'll release a new GraphViz2 shortly.

The Interpreter Design Pattern

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

The influential Design Patterns book lays out 23 patterns for programming. One of them, the Interpreter Pattern, is rarely used. Steve Yegge puts it a bit more strikingly -- he says that the book contains 22 patterns and a practical joke.

That sounds (and in fact is) negative, but elsewhere Yegge says that "[t]ragically, the only [Go4] pattern that can help code get smaller (Interpreter) is utterly ignored by programmers". (The Design Patterns book has four authors, and is often called the Gang of Four book, or Go4.)

In fact, under various names and definitions, the Interpreter Pattern and its close relatives and/or identical twins are widely cited, much argued and highly praised [1].

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.