Perl 6

Perlbuzz news roundup for 2012-04-09

April 9, 2012 Code craft, Community, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • The Perl Unicode cookbook (perl.com)
  • bdfoy’s got some ideas for code (blogs.perl.org)
  • How @rjbs spent his Perl QA Hackathon (rjbs.manxome.org)
  • The homepage for ack is completely redesigned. Hooray for open source, making up for my lack of design skillz. (betterthangrep.com)
  • Tricks to compiling mod_perl 2 to OS X Lion (blogs.perl.org)
  • Have you seen perl-reversion? (blogs.perl.org)
  • Using WWW::Mechanize and mech-dump to get my scratchy 45s (perlbuzz.com)
  • DBD::Firebird releases v1.0 (firebirdnews.org)
  • Recap of the Perl QA Hackathon (dagolden.com)
  • Reading about what people are working on = happy. (blogs.perl.org)
  • Whatever task you have, it’s probably already on CPAN (blogs.perl.org)
  • The Perl Foundation wants to give you money to work on Perl (news.perlfoundation.org)
  • More niche modules, “incredibly useful for about 5 people on earth”: (github.com)
  • Did you know prove has –shuffle to run tests in random order? Has randomizing tests uncovered bugs for you?
  • MetaCPAN has a new logo (perlnews.org)
  • RT @dukeleto This is a huge step forward in #perl dependency management: “carton bundle” support! (github.com)
  • RT @aaronlerch Some devs think “I’ll just copy and paste this code block.” Now you have two problems. Now you have two problems.
  • Would love to see this Perl::Critic talk (blogs.perl.org)
  • “The Python site talks about the value the reader gets out of Python, while the Perl site talks about Perl” (modernperlbooks.com)
  • How to get ahead in open source: Wear sunscreen. (blog.nerdchic.net)
  • Help Open Source Bridge select session proposals (plus.google.com)
  • MetaCPAN at the QA hackathon (blogs.perl.org)
  • Perl Foundation helps fund critical Perl 5 dev (news.perlfoundation.org)

Perlbuzz news roundup for 2012-03-05

March 5, 2012 Code craft, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2012-01-30

January 30, 2012 Conferences, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2011-11-14

November 14, 2011 Code craft, Conferences, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2011-11-07

November 7, 2011 Code craft, Community, CPAN, Perl 5, Perl 6 2 comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2011-10-17

October 17, 2011 Conferences, CPAN, Perl 5, Perl 6

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Notes from Damian Conway’s sessions at OSCON 2011

September 20, 2011 CPAN, Perl 5, Perl 6 No comments

Here are my notes on two sessions from Damian Conway: The Conway Channel, and (Re)Developing in Perl 6.
My notes are scattershot because it’s awfully hard to watch and listen and take notes in a Damian. I wish he’d post his slides, but I understand why he doesn’t/can’t.

(These notes are extracted from my notes from OSCON 2011. Other topics include API design, PostgreSQL, Jenkins and Cornac.

The Conway Channel

The Conway Channel is Damian Conway’s annual discussion of new tools that he’s created in the past year.

Regexp::Grammars is all sorts of parsing stuff for Perl 5.10 regexes, and it went entirely over my head.

IO::Prompter is an updated version of IO::Prompt which is pretty cool already. It only works Perl with 5.10+. IO::Prompt makes it easy to prompt the user for input, and the new IO::Prompter adds more options and data validation.

# Get a number
my $n = prompt -num 'Enter a number';
# Get a password with asterisks
my $passwd = prompt 'Enter your password', -echo=>'*';
# Menu with nested options
my $selection
= prompt 'Choose wisely...', -menu => {
wealth => [ 'moderate', 'vast', 'incalculable' ],
health => [ 'hale', 'hearty', 'rude' ],
wisdom => [ 'cosmic', 'folk' ],
}, '>';

Data::Show is like Data::Dumper but also shows helpful debug tips like variable names and origin of the statement. It doesn’t try to serialize your output like Data::Dumper does, which is a good thing. Data::Show is now my default data debug tool.

my $person = {
name => 'Quinn',
preferred_games => {
wii => 'Mario Party 8',
board => 'Life: Spongebob Squarepants Edition',
},
aliases => [ 'Shmoo', 'Monkeybutt' ],
greeter => sub { my $name = shift; say "Hello $name" },
};
show $person;
======(  $person  )====================[ 'data-show.pl', line 20 ]======
{
aliases => ["Shmoo", "Monkeybutt"],
greeter => sub { ... },
name => "Quinn",
preferred_games => {
board => "Life: Spongebob Squarepants Edition",
wii => "Mario Party 8",
},
}

Acme::Crap is a joke module that adds a crap function that also lets you use exclamation points to show severity of the error.

use Acme::Crap;
crap    'This broke';
crap!   'This other thing broke';
crap!!  'A third thing broke';
crap!!! 'A four thing broke';
This broke at acme-crap.pl line 10
This other thing broke! at acme-crap.pl line 11
A Third Thing Broke!! at acme-crap.pl line 12
A FOUR THING BROKE!!! at acme-crap.pl line 13

As with most of Damian’s joke modules, you’re not likely to use this in a real program, but to learn from how it works internally. In Acme::Crap’s case, the lesson is in overloading the ! operator.


(Re)Developing Perl 5 Modules in Perl 6

Perl isn’t a programming language. It’s a life support system for CPAN.

Damian ported some of his Perl 5 modules to Perl 6 as a learning exercise.

Acme::Don’t

Makes a block of code not get executed, so it gets syntax checked but not run.

# Usage example
use Acme::Don't;
don't { blah(); blah(); blah();

Perl 6 implementation

module Acme::Don't;
use v6;
sub don't (&) is export {}

Lessons:

  • No homonyms in Perl 6
  • No cargo-cult vestigials
  • Fewer implicit behaviours
  • A little more typing required
  • Still obviously Perlish

IO::Insitu

Modifies files in place.

  • Parameter lists really help
  • Smarter open() helps too
  • Roles let you mix in behviours
  • A lot less typing required
  • Mainly because of better builtins

Smart::Comments

  • Perl 6’s macros kick source filters’ butt
  • Mutate grammar, not source
  • Still room for cleverness
  • No Perl 6 implementation yet has full macro support
  • No Perl 6 implementation yet has STD grammar

Perl 6 is solid enough now. Start thinking about porting modules.

Perlbuzz news roundup for 2011-09-19

September 19, 2011 CPAN, Perl 5, Perl 6, Perl Foundation No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

Perlbuzz news roundup for 2011-07-31

July 31, 2011 Community, Conferences, CPAN, Perl 5, Perl 6, Perl Foundation No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.

  • Hello, World in Place 2: InteractiveDebugger (blogs.perl.org)
  • Giving ack a little bit extra do-what-I-mean (shuttlethread.com)
  • Reducing documentation’s technical debt (blogs.perl.org)
  • YAPC::NA attendees, please respond to survey (blogs.perl.org)
  • File::UStore, a UUID-based file storage abstractor (blogs.perl.org)
  • Protecting against cross-site scripting attacks with Template::AutoFilter (blogs.perl.org)
  • Screencast: How to contribute to a Perl module using vim and Github (szabgab.com)
  • Avoid unwanted bitwise operators with Perl::Critic (szabgab.com)
  • Just discovered rjray’s Perl Module Monday feature: (dereferenced.com)
  • Booking.com donates $10K to support Perl 5 maintenance (news.perlfoundation.org)
  • Expect a flurry of Rakudo releases soon (rakudo.org)
  • cPanel is also sponsoring Perl 5 Maintenance Fund (news.perlfoundation.org)
  • YAPC::NA 2012 gets away from RTFM marketing (perlbuzz.com)
  • About the Perl 5 Core Maintenance Fund (perlfoundation.org)
  • Upgrading from Perl 5.8 to a less-than-newest version (blog.timbunce.org)
  • Using Acme::CPANAuthors::India to link with other authors (blogs.perl.org)
  • YAPC::Asia 2011 call for papers now open (yapcasia.org)
  • YAPC::Asia 2011 and the webapps behind it (blogs.perl.org)
  • Going to OSCON next week? Here are six tips for making the most of it with the least amount of hassle (petdance.com)
  • Portuguese Perl Workshop is Sep 22-23, 2011 (workshop.perl.pt)
  • Tool to move tickets from RT to Github (pythian.com)
  • Now you need LWP::Protocol::https (blogs.perl.org)
  • Perl program to back up Google contacts/calendar (preshweb.co.uk)
  • “What is MetaCPAN” screencast http://youtu.be/7N1lZY5E5gg (now with English subtitles)
  • Can’t let #oscon pass without getting the scoop on cpangloss.com from (<a href="twitter.com)
  • “Perl isn’t a programming language. It’s a life-support system for CPAN.” Damian at #oscon
  • “Perl 6 is solid enough now. Start thinking about porting modules. Start thinking about reinventing modules.” — Damian at #oscon
  • RT @pghphw @mjdominus will be teaching a course and giving a talk at PPW 2011. Watch for details.
  • Notes on Morphing Graph::Easy into Graph::Easy::Marpa (savage.net.au)
  • A new vim plugin to work with ack and iTerm: (vim.org)
  • Holy cow does a lot get done on MetaCPAN in a week (blogs.perl.org)
  • MetaCPAN::API gets updated (blogs.perl.org)
  • Rakudo Star 2011.07 released (rakudo.org)
  • Would you bring your kids to YAPC? (blog.yapcna.org)
  • Recollections of YAPC::NA 2011 (activestate.com)
  • Understanding autovivification (effectiveperlprogramming.com)

Perlbuzz news roundup for 2011-07-14

July 14, 2011 Community, Conferences, CPAN, Perl 5, Perl 6 No comments

These links are collected from the
Perlbuzz Twitter feed.
If you have suggestions for news bits, please mail me at
andy@perlbuzz.com.