It is an oldie / But it is still a goodie / Coy is on github

schwern on 2009-05-25T09:01:57

Some of you young whipper snappers might not even know about Coy. This is the module that introduced Damian Conway to the Perl community as the super genius he his. It's a module that generates haiku based on error messages.

#!/usr/bin/perl -w

use Coy;

open my $fh, "<", "doesnotexist" or die "Can't open file: $!";


----- Eshun departs near the village. A pair of woodpeckers nesting. Bankei. -----

Eshun's commentary... Can't open file: No such file or directory

("/Users/schwern/tmp/test.plx Speaks": line 5.)


The American idea of a haiku is that its a 5/7/5 syllable arrangement. So it must have a big dictionary of words and how many syllables they contain, right? Wrong! It has code to figure out how many syllables a word contains. It can also hyphenate them, pluralize them and has a basic understanding of what words and concepts go together sensibly. That's what makes it a Damian module. You should read his original presentation on it if nothing else than to see presentation grand master Damian using Comic Sans! But really because the whole thing is in haiku.

What also makes it a Damian module is it hasn't been touched since 1999. It contains a broken version of Lingua::EN::Inflect which overlays the separated CPAN version. All that clever hyphenating code has never been documented or released or tested. It needs love.

I asked Damian about it. He offered it to me. I can't even keep up with my own stuff so I declined... then I thought better and took it. Its on github now. I've removed the busted Lingua::EN::Inflect, write some basic tests and will re-release once I get PAUSE perms fro Damian. Lingua::EN::Hyphenate should be split out into its own release, if anyone is feeling their oats please take it.

This module is way too awesome to let die.


Welcome to the club ...

kid51 on 2009-05-26T03:09:21

... of maintainers of DCONWAY modules.

Re:Welcome to the club ...

schwern on 2009-05-26T05:23:23

The tabs, the taaabs! Oh god, so many tabs!