Teaching Perl with Comedy

While testing some code for an forum answer i made a stupid mistake. It was late, I didn't thought of it, why in the world should I name the Module "Test" and wonder then why it behaves unexpected (I do know why! - some newb might not). But the more glorious idea is that we all have such moments and hide them carefully. Why not pile the xp up and make a Perl course out of it by showing what can go wrong and maybe even write it like a comedy? I saw even a motion picture in my mind about someone ranting how bad Perl is while making such moves.

Tuts are hard work, I know because i wrote some. To set up all the traps that a screwball comedy comes out of it that actually works dramaturgically should be even harder. But maybe someone runs with the idea.

Meetup.com Event for The Perl Foundation Community Symposium

Meetup.com Event for The Perl Foundation Community Symposium

[From the YAPC::NA Blog.]

What package provides gdlib-config in your distribution?

I just tried to install GD from CPAN. It complained that gdlib-config is missing and that I should install libgd.
After some search I found out that in Ubuntu gdlib-config is provided by libgd2-xpm-dev and not by libgd.

So I am sending a patch to Lincol Stein to have a better error message, but it would be nice if I could included the names of the correct packages from other Linux distributions.

Hence the question.

What package provides gdlib-config in your distribution?

Activities in Frankfurt for you and your partners

Just because you're coming to a conference doesn't mean your loved ones must stay back home. And if they do come with you, the fact that you're at the conference doesn't mean they have to stay at the hotel.

We've put together some activities in and around Frankfurt on the wiki

My blogs.perl.org profile image is now some other dude

I just filed a bug about my profile image being replaced by that of some other user on the site. I wonder if anyone else had had this issue.

Bugfix in Name Input

Perlybook.org is now available in version 0.13.
Continue enjoying all the Docs from CPAN in your Ebook-Reader of choice.

This fixes a bug, concerning some input like e.g. Log::Log4perl.
Because MetaCPAN's autocompletion was used to match user-input to something valid, you always got an ebook about Tie::Log4perl (which is autocomplete-suggestion number one in this case) - so this is fixed now and you will get the book you want.

The downside of this is that the input allows no more typos and is case sensitive too! But that's not a big issue if you use a browser with JS enabled... JQuery will fill up the form correctly with a bit of your help.

Secondly a minor bug is fixed so that you should be able to download your ebook of choice directly from you Kindle Reader if you have some WLAN around. I would like to hear some feedback about this on github or as comments here in the blog. Because on my Kindle Reader (there is no model name written on this thing, I don't even know which model it is) I can now download (which I couldn't before) but - very strange - I can't open the book... would like to hear if others have the same issue.

Thanks

Introducing trash-u (File::Trash::Undoable)

Python has trash-cli, Bash has rmv, now Perl has trash-u (from File::Trash::Undoable, which in turns wraps File::Trash::FreeDesktop).

To trash your files:

% trash-u foo.tmp *.bak

To see the contents of your trash:

% trash-u --list-contents

To empty your trash:

% trash-u --empty

Unlike trash-cli (and like rmv), trash-u supports undo (called rollback in rmv). And unlike rmv, trash-u supports redo. Multiple undo/redo is supported. It's also worth noting that rmv currently does not support per-filesystem trash (everything goes to $HOME, which might cause heavy copying between devices).

To undo your last action:

% trash-u --undo

And to redo:

% trash-u --redo

To see your actions history:

% trash-u --history

To discard history (forget undo/redo information):

% trash-u --clear-history

trash-u also supports dry-run mode to show what's going to be deleted:

% trash-u foo.tmp *.bak --dry-run --verbose

Some notes:

Prefixing the Ruby Slippers, and the Bigfoot Maneuver

Glinda cover

In my last post I talked about partial parsing of Perl using my new parsing algorithm, Marpa. This post explains how I do it. For those interested, the code for the example in my last post can be found in t/curly2.t in Marpa::R2 2.015_001 (a developer's version). For convenience, I've also pulled t/curly2.t out as a Github gist.

Introducing the problem

This technique will work for languages other than Perl. In fact, this technique could be used to look for several different target languages at once, for example, when searching a database of emails that might include code segments in Perl, HTML, C, etc.

For clarity, I will often refer to the Perl and C programs being sought as targets in text as "code segments". In the context of this blog post, a string is only considered to be a valid "code segment" if it is also a valid and complete program.

New coding style?

Some of my cPanel colleagues came up with a new coding style. They are standing.

carpal_tunnel.jpg

First it was Phil King standing in his office, after first attempts with a big ball failed and his back still hurts sometimes. Now Nick Jackson (on the picture) joined him, and others announced to follow.

This desk is called geek desk and has a motor and remote control attached.

Start times for the conference

We don't have the schedule for the talks yet. To help you plan your travels, here is the rough plan into which the talks will fit:

Monday 20th, 9am to 10:30 registration
10:30 start of the conference, keynote
19pm - Social event at Depot 1899

Tuesday 21st, 10am start of the conference day 2
17:30 - end of last talk of day 2

Wednesday 22nd, 10am of the conference day 3
17:00 - end of last talk of day 3

We'll publish the more exact times once the schedule gets more solid and we've checked with the venue on the lunch times.

List of Perl modules comparison articles

Just created a wiki page at the Perl 5 Wiki, mainly to catalog the great work that Neil Bowers has done. Hopefully it can be helpful for module shoppers. The page should probably be linked from elsewhere.

Perl Social Event, Tuesday August 7th, Downtown Chicago

The Perl Foundation is having a Community Advocacy kick-off event in Chicago on August 7th.  It’s going to be a fun, social event with talk about community. A “symposium” (check out the dictionary definition).  It will be in a nice Irish pub with room for 72 people in a private upstairs area.   Food and drink will be available, possibly some sponsored.

Contact Yaakov Sloman <yaakov@perlfoundation.org> with your questions.

As we have more details we’ll keep you informed.

[From the YAPC::NA Blog.]

Alien::Base Perl Foundation Grant Report Month 5

After another busy month outside of the Perl world, I have gotten a little more time in the last week to work on Alien::Base. I must especially thank fellow WindyCity.pm member David Mertens for working with me on some of the Mac problems involved.

N.B. I also want to thank him for PDL::Graphics::Prima, which made the rest of my $work easier this month! If you need interactive plotting, give it a look! Also Chicagoans, WindyCity.pm is tomorrow, topic: Dancer.

catchable by gimmicks

The Kephra rewrite is doing very well, expect some great revelations even for Wx programming in genereal. But today i just want to rant about bibucket, which hosts my hg repo for most of my projects. I mean i like mercurial better then git, or should I say liked. the more I learn about the raw awesome power of git the more I find it perlish. But surprisingly what bit me just today is that bitbucket doesn't have this nice graphs. I just underestimated how motivating they can be.

(Some lessons in) optimizing Org::Parser

Here's what I have been using in my ~/.bashrc for the past few months:


echo "UPCOMING TODOS:"
list-org-todos --due-in 7 --group-by-tags ~/o/todo.org
echo "UPCOMING ANNIVERSARIES:"
list-org-anniversaries --has-tags '[remind_anniv]' --due-in 14 --max-overdue 7 ~/o/addressbook.org

list-org-todos and list-org-anniversaries come with App-OrgUtils, which in turn uses Org::Parser.

Use the latest ISBN data without upgrading the module

I've made Business::ISBN much more fresh, and allowed users to freshen it themselves without installing a new version.

A long time ago, I created the Business::ISBN to help me cleanse a publisher's database. That is, to help them cleanse the Excel workbook that they were using as their database. About 10% of their ISBN's were wrong in the file, and this little bit of Perl identified the problem (while an intern took those titles and looked them up online and corrected them in Excel). I think this was my second CPAN distribution.

To check an ISBN, there are several things to look at. The last digit is a checksum. If that doesn't check out, something else is wrong. The group code, the publisher code, or the book code might be wrong. These things move around slightly though.

Back to Windows

Hi mst! I joined the club.

On Saturday I gave up trying to fix WiFI on debian for my ASUS Zenbook laptop. WiFi works fine on all accesspoints. All but one, my home WiFi. It worked for months in my previous home. Something happened.

First I got around with USB tethering via my phone and the phone wifi. Last week even this failed. Because I have such a new laptop I need a new linux kernel. To support closing and re-opening the lid. I hacked wakeup, but suspend still gets the battery hot, I guess the GPU is still running. linux kernel 3.3 needed some patches, 3.4 works fine out of the box. But NetworkManager not. I suspect it is the new avahi demon, which was added to support link-local connections if everything else fails. But my link-local route has metric 1000. I cannot change nor delete it.

Popular ebooks on perlybook.org in week 29/2012

Here are the most popular ebooks from Jul 16 2012 to Jul 22 2012:

Release
  1. Dancer
  2. DBI
  3. AnyEvent-RFXCOM
  4. Prima
  5. libnet
  6. perl
  7. Net-Server
  8. Mojolicious
  9. CGI.pm
  10. What

Partial parsing and error reporting

"One of the secrets to mathematical problem solving is that one needs to place a high value on partial progress, as being a crucial stepping stone to fully solving the problem." -- Terence Tao

Once an error is found, a traditional parser is pretty much lost. This is true for even state of the art compilers and interpreters. One small typo results in many screens of useless diagnostics. If you're an old hand, you scroll back over these, knowing that, for the better quality compilers, the first few lines often have something to do with the real problem. With Marpa, we can do better than this.

No Accepted Perl 6 Talks at YAPC::EU 2012?

The YAPC::EU blog says "Our final voting round ends on Friday." So, Friday has gone by, does that mean that all talks that have not been accepted now have been rejected?

And if so, are we really not going to have a single talk on Perl 6? I know that some good speakers (and I don't mean me :-) have submitted talks on Perl 6, and I'd be rather disappointed if they all got rejected.

Can anybody tell me what's going on?

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.