Month: December 2008

Cool vim plugin of the day: surround.vim

December 8, 2008 Tools No comments

The always amazing Peteris Krumins is starting a series of blog postings on cool plugins for vim, starting with [this post about surround.vim](http://www.catonmat.net/blog/vim-plugins-surround-vim/).
Just reading the article about the “old way” to do what surround.vim does was informative, showing me vim tricks I didn’t know.
Seriously, anyone who reads Mechanix should have [Peteris’ blog](http://www.catonmat.net/) in her syndication reader.

Microsoft will support CPAN authors with free access to Windows machines

December 7, 2008 CPAN, Windows 1 comment

[Adam Kennedy’s announcement](http://use.perl.org/~Alias/journal/38036) tells the long story, but the short version is this: Microsoft will be providing every CPAN author with free access to a centrally-hosted virtual machine environment containing every major version of Windows.
It will be interesting to see how this plays out. Will CPAN authors use the resources from Microsoft to make sure that our modules work on Windows? I know that I’m especially interested because I want [ack](http://search.cpan.org/dist/ack/) to be transparently cross-platform. Anything I can do to help get ack out on Windows boxen, to help Windows programmers know that the command-line can be better than an IDE, is a win.
This is pretty big, and I’m glad to see Microsoft providing this service. I’m especially thankful for Adam putting what I’m sure was a huge number of hours making this happen. I’m glad we have him on our side.

Moving forward with Git and Perl

December 7, 2008 CPAN, Perl 5 4 comments

*By Nadim Khemir*
Perl is very often used as glue to quickly put together a functionality
by using already existing components. This is a great use of Perl.
Still, I believe that we made a mistake, a few years ago, when we
kept being the glue instead for also becoming part of the componnents;
this is one of the main reason Python took off, developers learned
Python, an otherwise excellent language, to control and integrate
into their favorite applications while Perl was still on the outside.
I wish Perl was an intrinsic part of more applications.
Among the applications that have Perl bindings, [Git](http://git.or.cz/)
is a very interesting one. There is a lot of interest for Git in
the Perl community. This is partly due to Perl 5’s source code going
over to Git.
[Pages](http://www.perlfoundation.org/perl5/index.cgi?git)
like [this](http://www.perlfoundation.org/perl5/index.cgi?perl_git_repositories)
on the [Perl 5 wiki](http://www.perlfoundation.org/perl5) tell us
that “Like Perl, Git has lots of flexbility, TIMTOWTDI” this matches
The way most Perl developers think and may be why a lot of Perl
developers are switching to Git. Git is easy to learn. Simple
things are simple and complicated things possible. Rings a bell?
There are many Perl developers involved in Git. Randal Schwartz
even made [a presentation on git](http://www.youtube.com/watch?v=8dhZ9BXQgc4),
and we’ve seen
[articles here on Mechanix](http://perlbuzz.com/mechanix/2008/09/git-is-my-hero.html).
And there are multiple modules on CPAN to handle Git-related
functionality. The Git community itself has a Git.pm module that
is part of the Git distribution. Git.pm needed some love and I am
taking over its maintenance. My hope is to help the Git community and the Perl community as well.
## What’s in it for the Git and Perl community?
* Involvement of the Perl community in the Perl component distributed with Git
* A closer cooperation.
* Making Perl developer aware of version control systems.
* Unify, if wished for, the multiple Git modules of CPAN (other are under
construction but not on CPAN yet), this would be better for maintenance and
for the users.
* Not directly related but a wish, a CPAN with better versioning strategy.
* What _you_ need (but you have to tell us. I’ll be happy to get input from
the Perl community, at nkh@cpan.org, in the form of comments, and patches)
Jakub Narebski has written an [RFC for the Perl
bindings](http://www.spinics.net/lists/git/msg86056.html) for the
Perl bindings. This is an excellent stating point.
*[Nadim Khemir](http://search.cpan.org/~nkh) is a technical manager and architect at
Ericsson Mobile Platform in Sweden. His favorite subjects are
process automation and build systems. He can be contacted
at nkh@cpan.org and is often seen on #perl-qa.*

Lightning talks from outside the echo chamber

December 5, 2008 Uncategorized 1 comment

I’m already tired of the hoohah about “Perl 5 is dead” and the hand-wringing and the useless flapping about what we should do. I’m more interested in what is going on in Perl that none of us have heard of yet.
If I didn’t have family and book obligations, I’d gladly take two days off and an 18-hour round trip to Omaha, Nebraska to check out the lightning talks presented by the University of Nebraska at Omaha on Tuesday. [Robert Fulkerson](http://www.cs.unomaha.edu/faculty/people/fulkerson.html) [posted to the Omaha.pm list](http://mail.pm.org/pipermail/omaha-pm/2008-December/001955.html):
> The Fall 2008 UNO CSCI 2850 (Programming on the Internet) class
> invites you to an evening of lightning talks on Perl programming,
> the Firefox web browser and other (mostly) web-related topics.
>
> Lightning Talks are no longer than 5 minutes and can be about
> anything: a new idea, an evaluation, an observation, a story, a
> complaint, an explanation, a suggestion, a report of success or
> failure, a call to action, a description of a technique, technology,
> or a lament.
>
> Usually we split the talks over two nights, but this semester it’s going to be one, big solid night of talks.
>
> Where: Peter Kiewit Institute, Room 252 ( http://tinyurl.com/5g83cb )
> When: Tuesday, December 9th, 2008
> Time: 6:00 PM until 8:30 PM
>
> Topics
>
> * Writing a Greasemonkey script for FireFox to make BlackBoard tolerable
> * Obfuscating Perl
> * Connecting Perl to databases
> * Net::SSH::Expect
> * Using BioPerl for sequence analysis
> * Perl Google APIs
> * Acid Test 3
> * Gossamer Forum
> * Perl vs. Python
> * Index a website starting with a single page
> * Dictionary attack using Perl
> * iTunes playlist extractor: C++ vs. Perl
> * Regex Creator
> * Regex Coach
> * History of Perl
> * Software Pirating Debate (Spore, SecuROM)
> * Perl 6 vs. Perl 5
> * Rapid Exploit Development using Perl
> * SSH on iPod Touch
> * Regex usage in Perl vs. C
> * Ubuntu with Conky
> * Perl-XML: XML Made Easy with Perl!
> * Perl Module – GD::SecurityImage
> * Gmail:Checker module
> * Improving Perl program efficiency/performance
> * Subversion Tortoise client search
> * Perl PayPal APIs
> * JQuery UI
> * Talking to LCD projectors using Perl
“Talking to LCD projectors using Perl”? “Rapid Exploit Development using Perl”? “Perl 6 vs. Perl 5” by someone who (I assume) is not part of the core group? Someone get this on tape and YouTube ’em, willya?
I would *love* to be there. (Plus, then I could go get some [Valentino’s](http://www.valentinos.com/) pizza).

Database access in Perl 6 is coming along nicely

December 5, 2008 Perl 6, Rakudo 21 comments

[Simon Cozens](http://simon-cozens.org/) just [posted to the Perl 6 internals list](http://www.nntp.perl.org/group/perl.perl6.internals/2008/12/msg49626.html):
> I just ran this code, which worked with the expected results:
>
> use DBDI;
> my $conn = DBDI::DriverManager.getConnection(
> “dbdi:SQLite3:test.db”, “”, “”);
> my $stm = $conn.createStatement();
> my $rs = $stm.executeUpdate(“CREATE TABLE foo (bar, baz)”);
> my $stm = $conn.prepareStatement(
> “INSERT INTO foo (bar, baz) VALUES (?, ?)”);
> $stm.setColumn(1, 123);
> $stm.setColumn(2, “Thingy”);
> $stm.executeUpdate();
>
> Merry Christmas,
> Simon
I love the smell of progress in the morning.

There is no “best” in software

December 1, 2008 CPAN, Opinion 4 comments

Dave Rolsky wrote a [fantastic article](http://blog.urth.org/2008/12/the-many-axes-of-software-development.html) on the many different criteria on which you can choose your software to use. For example:
> # Easy to integrate – Some libraries are designed to be integrated with other modules (Catalyst), some want you to embrace their world (Jifty).
> # Complete – Some libraries come with a complete solution (Jifty) and some require you to put together a bunch of pieces into a whole (Catalyst).
Which is better? The answer, of course, is “it depends.” Is the project for in-house use, or will it be distributed? Is it a one-off, where the base install will do most of what you want? Or are you likely to want to extend beyond those constraints?
Most importantly, Dave points out:
> I’d like to see people state their priorities up front, and explain why it’s important for the work they do. Often this gets left out of the discussion. Without this information, we often end up just talking past each other.
The extension of that is that many people may not even have thought about what their priorities are. Consider how often you’ll see a question, such as at Stack Overflow, that asks [“What’s the fastest way to do X?”](http://www.google.com/search?q=site%3Astackoverflow.com+fastest+way) Most of the time, the querist hasn’t even thought about that “fastest” part; it’s just assumed. (For that matter, that’s like assuming that the most important part of a new job is how much it pays, but that’s a topic for [another blog](http://theworkinggeek.com/).)
Make sure you know what your priorities are. Question your assumptions. Your project will thank you for it.