Frozen Perl 2011: ‎Perl Marketing and Evangelism‎

This is the first of two talks by oZ.

He likes Perl a lot, in the last few years there has been a fundamental change in Perl. Things like the modern Perl movement, chromatic's Modern Perl book, Moose, Catalyst and DBIx::Class changed how we can use Perl.

Even with all that Perl has an image problem.

What are the Perl companies we trot out: LiveJournal, Ticketmaster, Amazon and SixApart.

He noted that some of them are moving on to other languages for their new development and that some have written Perl in such a way that makes one not want to ever use Perl again.

Nick then presented some of the research he was done. Looking at sites like LangPop, doing searches in sites like Craigslist and sending out a survey to the many people and groups he knows.

He had lots of interesting quotes and such that I didn't put in my notes. I'm hoping he'll put the slides up on the Frozen Perl site. Looks of data to look at and ponder.

Dancer FOSDEM fuel, first report

Friday and Saturday have been very productive days for Dancer. We wanted to write up this blog post yesterday night but we were waaaaay too tired for that. Instead, you get it this morning while we're sitting at a great Perl 6 talk by Gabor Szabo.

Friday we met up. I tried to wait for Franck at the train station and got lost... several times. He found me in the end and we went to our hotel room with his co-workers. Sukria and Dams arrived later. It was very exciting to meet the guys I've been working closely with for a while and haven't even met in person yet. Free software sure is nuts! :)

We couldn't fix the internet at the hotel (one cable, no wireless) so we spent a lot of time on discussions about important things. While we do not like bureaucracy, some things had to be sorted out and talked about. Here is a short list of things we've settled:

What's New in WebGUI 8.0 #3: Upgrade System

Following The Path

If you installed WebGUI 0.9.0 back in August of 2001 (the first public release), you've had a stable upgrade path through WebGUI 7.10.8 (January 2011) and beyond. Plainblack.com has been through every upgrade for the last 10 years, a shining bastion to our upgradability.

A WebGUI 7.10 user would not even recognize a WebGUI 6.0 database, much less the database used by the 1.x series, but slowly, gradually, our upgrade system brought new features to every WebGUI site that wanted them.

The Ancient Way

Our old upgrade system was quite simple:

docs/upgrade_2.9.0-3.0.0.pl
docs/upgrade_3.0.0-3.0.1.sql
docs/upgrade_3.0.0-3.0.1.pl

Our upgrade.pl script would check for docs/upgrade_*, compare version numbers, and then execute the .sql and .pl scripts in order until there were no more upgrades left.

Dist::Zilla::Plugin::MetaResourcesFromGit

The CPAN META specification includes support for "resource" links to homepage, bug tracker, mail list, source code repository, and so on. These will appear on search.cpan.org if you ship a META.json with your distribution.

Dist::Zilla's MetaResources plugin allows you to set these links in the distribution config, but I wanted something a little more automagical. This can be done because I've set up my GitHub repositories with consistent naming and layout.

So my new plugin, Dist::Zilla::Plugin::MetaResourcesFromGit, is a drop-in replacement for the standard MetaResources plugin. It automatically generates four resource links based on the name of the distribution and the remote git repository settings. Simply use the plugin in your dist.ini file:

[MetaResourcesFromGit]

The default links are equivalent to:

Frozen Perl 2011: Perl and Arduino

Robert Blackwell gave a good intro to the world of Arduino and Perl.

It was mostly how one would work with Arduinos's and the Perl interface to them.

There is a variety of vendors, arduinos and extensions that let you do all sorts of fun things.

It's probably the first open source hardware that is widely available and accessible.

Very cool and interesting stuff.

The New #email Epistles

<rjbs> I need to add the _raw and _str variants for everything, so not having them will always be wrong, or at least a mystery
<confound> This is a great mystery. But I am speaking of MIME and delimiters.
<rjbs> Email: the E is for Ephesians?
<confound> Therefore, since we are surrounded by such a great cloud of RFCs, let us throw off every feature that hinders and the proprietary extensions that so easily entangle.
<rjbs> confound: Where were you when I divided the tokens from the whitespace?
<aristotle> confound++ # ephesians
<rjbs> thus marking the first time anyone on IRC was ++'d for Ephesians
<rjbs> Encode always; lookahead without ceasing; in everything, be strict, for this is Postel's will for you.
<confound> Then he will say to those on his left, "Depart from me, you who are marked as spam, into the limitless bitbucket prepared for penis enhancement and chain forwards. For I was using mutt and you sent me a Word document, I sent you mail and you greylisted me, I wrote to the list and you vacation autoreplied, I made an announcement and you clicked 'reply all'."

Vienna.pm TechSocialMeet today

Vienna.pm TechSocialMeet tonight (19:00) at MetaLab!

The following "presentations" (probably rather free form and informal (at least mine..)) are planned:

  • daxim: Plat_forms
  • daxim: OpenBio-Hackathon im Juli
  • domm: iCal-Aggregier-Web-Projekt (http://kalender.stuwart.at)
  • rho: RDF und AllegroGraph-Plauderei

rafl tried to talk is into streaming the talks, so maybe we'll try to set something up (keep up to date on IRC #Austria.pm)

If you don't trust all those modern technologies, are in/near Vienna & interested in Perl, just drop by in person!

The Beauty of a Perl Quicksort

Yet Another Misleading Title. :)

err...I have to say, (I can't remember the exact time I met this version of quicksort), ever since the Haskell version was born, there were (and still are) various implementations available in various languages. This version of quicksort is a very nature "translation" of what the algorithm is:

function quicksort(list) {
    select a pivot;
    return (quicksort([x|x<pivot]), pivot, quicksort([x|x>pivot]));
}

Today, I met this version again in here (reddit.com). For convenience, let me repost the Lisp code:

(defun quicksort (lis) (if (null lis) nil
  (let* ((x (car lis)) (r (cdr lis)) (fn (lambda (a) (< a x))))
    (append (quicksort (remove-if-not fn r)) (list x)
      (quicksort (remove-if fn r))))))

I wonder if I could reinvent(port, steal, rob, grab...whatever) it to Perl...and this is what I did:

Frozen Perl 2011: ‎Wrapping Installed Subroutines: Wear a Raincoat in Someone Else's Perl

Wrapping installed subroutines

Steven Lembark gave a talk about wrapping installed subroutines.

It was noted on irc that this was the cotinuation/sequal of another talk. The jumping off point is having to work in some code and it has the following at the top of every program/module

use warnings;
$SIG{ WARN } = sub { die };

Now think about what that does...

Yes, you are now screwed.

Especially if you want to do any benchmarking or deal with some other modules.

You can muck about with the symbol table and such but one solution is the Symbol module.

Lembark chose this because it is part of the core/standard libraries (a predication of his talk). It cleans up some of the mess of dealing with globs/symbol table weirdness.

It was noted on irc that Package::Stash is a bit cleaner to use (at least its API is better).

Regardless it was yet more of Lembark showing some of the weird things that you can do (and some times have to do) and why it is better to find a module to give you some distance from that mental mayhem.

As always, he shows off interesting bits of the Perl solution space.

SF.pm February meeting - Learn Python The Hard Way

Zed Shaw will turn the tables on our usual Perl centric meetings by giving us a few lessons in learning Python the hard way. Zed is a well known software developer who is noted for developing the Ruby webserver Mongrel, the successor Mongrel2, the Lua based framework Tir, and autho.me.

Learning Python the Hard Way - http://learnpythonthehardway.org/index

Zed Shaw - http://zedshaw.com/

Announcement posted via App::PM::Announce

RSVP at Meetup - http://www.meetup.com/San-Francisco-Perl-Mongers/events/16408904/

MetaCPAN Status Update

Lots of great stuff is happening with MetaCPAN. Here's a quick (and incomplete) list.

First off, Yanick Champoux has been doing some excellent work to add module up and downvoting to the MetaCPAN API. His work is on Github He has also created a Greasemonkey script to allow module voting to begin on search.cpan.org. We plan on incorporating it into the cpan-mangler as well, so that you can vote on search.cpan.org without needing GreaseMonkey.

Yanick's work will pave the way for module commenting, bookmarking etc. The great thing about this is that we'll be able to collect data on most loved and hated modules/distributions without being tied into any one particular search site or application. This is the sort of data which can make getting an overview of CPAN much easier. Yanick will likely post about his work in greater detail, but it's pretty cool stuff. It could change how you approach your search for new modules.

Lacuna Expanse Status Report

It's officially been 4 months since we launched the Perl based MMO: The Lacuna Expanse, so I wanted to take this opportunity to update you on its progress.

First, thank you. Without you Lacuna wouldn't exist. Many of you are playing it, and many others of you have built modules, techniques, and technologies that we used to build it. So thanks!

Three new jobs were created after launch to help serve the community. One of them was even a Perl job! So Lacuna has already started helping increase the Perl-based economy. This may not matter much to you, but it tickles me.

Today we launched our second server. This one is a tournament server, where the speed is greatly increased, the map is greatly decreased, and there is an end game.

Frozen Perl 2011: Keynote

Keynote = 5 things I hate about Perl

brian d foy gave the keynote this year. He talked about his talk from two years that was sort of based on Better Off by Eric Bende, his reading of Skeptic magazine and what this means regarding Perl.

As part of this he touched on the fashionable memes of why some hates or loves a languages, Perl in particular. Sometimes it's misinformed or ignorant hate or just as a way to validate their choice.

So he was thinking about why there is some much love, or hate, for Perl?

This led into an interview question, "What are 5 things you hate about Perl?"

This shows 3 things: real experience, depth and reach of knowledge, and workarounds used for those things.

This also relaxes the interviewee because it shows it is ok to criticise language being used/talked about.

brian then talked about what he hates about Perl. His list was things like: CPAN, licensing or reusability. He didn't go into any real detail about those.

Dancer FOSDEM mini-hackathon

I am honored to be sponsored by PEG, and I would like to thank them for it.

A team of Dancer core developers (Alexis Sukrieh, Franck Cuny, Damien Krotkine and myself) will be having a mini-hackathon this FOSDEM. This is made possible since we will all be staying together in the same apartment for the duration of the event.

We will focus our efforts on merging Github Pull Requests and closing as many tickets as possible. New features might be worked on, but it is not part of the official plan. We leave room for improvisation. :)

I want to thank everyone who pushed commits and changes into Dancer. I've been very surprised (yet thrilled) at some of the new faces we've been seeing on our IRC channel (#dancer on irc.perl.net) and in our pull requests. While some of these were merged on the spot, others were waiting longer in the queue. This is what we will try to focus on.

The next post will include another issue which will be worked on during the hackathon, which is the Dancer changelog.

If you're arriving at FOSDEM, we have a Perl room and a Perl booth. Feel free to stop by, say hi, catch a few interesting talks and jibber-jabber with us!

Padre 0.80 has been released.

Padre has hit version 0.80. I guess it's not a big deal, but you need to lead with something.

Adam Kennedy is by far the most prolific contributor for this release, clearly there are a few things that need scratching.

It seems though that this release was rolled out just in time for him to injure his wrist skating, not sure if it was roller skating or roller blading, so we may see a slow down from Adam for a while. Time will tell of course:

Show Perl subname in vim statusline

I asked on the vim mailing list how to see the name of Perl's current sub/method in the status line and Alan Young, the author of PPIx::IndexLines has a great suggestion which unfortunately relied on PPI. I'm working with very large modules and PPI ground to a halt for me. As a result, I took his suggestion and worked out the following.

First, make sure that your .vimrc has set laststatus=2 in it. That will ensure that you always get a status line, even if you only have one window (i.e., don't have split windows). Then drop the following into your .vim/ftplugin/perl.vim:

CCAN heads past 50 modules

Several years ago at OSDC::AU I was lucky enough to run into Rusty Russel three breakfasts in a row. He was at the conference to deliver a keynote on why C is awesome and all us scripter types should learn it.

I mentioned that I'd tried a few times to switch to C but I'd found the lack of any kind of CPAN pretty much crushed my soul each time I tried, because I kept wanting to make one because C and Perl are very similar languages (to me at least, compared to things like Python or Java or Haskell).

By the end of the conference he was hooked on the idea, had taken over development of libtap and written 8 or 9 patches for it. A week later we had mailing lists, and a basic design.

Today, CCAN represents what I consider to be the closest cousin of the CPAN.

perl references in a while loop

while (0..25) {

$x++;

$d[$t++]=\$x;

until ($x < 25) {
lable:
print "hello::","\n";

$in = STDIN;

print ${$d[$in]};

goto lable;
}


}

## now this should print 1 when i type 1
## and 2 when I type 2 at
## and 3 when I type 3 instead it types 25
## for 1 to 25 typed in

## plese help

How Perl helps me read

I like to read. Over time, I've become quite a rapid reader - I remember a project at school where you would get a dignoria (star) for writing a book review during the summer holidays... and I had read 26 books.

During my short commute on the tube I like to read something. I used to bring paperback books and magazine on the tube. Before going on a weight-restricted holiday I had bought.a Sony Reader PRS-600 e-book reader.

This was quite neat, fairly small. Not a great screen or battery life and it would only charge on a computer's USB socket, not a generic USB one. There are a wide range of public domain e-books or you can create books with your own content and the useful Calibre e-book management software can scrape news sites.

DateTime and Excel difference

Seems that DateTime module thinks 29.2.1900 didn't exist while Excel 2008 does. Which one is correct ? Well DateTime is OpenSource while Excel is payware. Think payware would be correct ? nope, DateTime is !

So the correct DateTime object for dates starting 1.3.1900 when using values from Excel is :

DateTime->new(year=>1900, month =>1, day => 1)
        ->add(days=>$THEVALUEFROMEXCEL-2)


Excel-- !

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.