Perl 6 Lists and Arrays vivified: lazy, infinite, flat, slurpy, typed, bound, and LoL'd

Patrick Michaud will give a talk at YAPC::NA 2012 described as:

One of the significant new features of Perl 6 is its support for lazy and infinite lists, arrays, sequences, and other data structures. However, these new features have far-reaching impacts on the whole of Perl 6 design and implementation. Over the past several years there have been many attempts at a coherent design and implementation of Perl 6 lists, each leading to new challenges to be addressed and resolved.

In this talk I’ll shed some light on Perl 6 lists, arrays, sequences, and other structures, explaining some of the fundamentals of how they work and can be used in Perl 6 programs. Lots of examples will be given, with particular emphasis on the lazy, infinite, and flattening behaviors of lists and some of the new range and sequence operators. I’ll also describe how these features have affected Perl 6 development, including an introduction to some of the newer data types such as LoLs, Parcels, Captures, Iterators, and Positionals.

Come to this talk and learn how Perl 6’s list features can result in more elegant and faster code.

[From the YAPC::NA Blog.]

My definition of "stable"

I catch myself always saying, "No, not yet stable enough." I cannot release it, even though it passes all tests. Which you can interpret that the tests suck. Not enough coverage, bad testcases, ...

Well, that is always the case. You can never have enough tests. Problem is that in my case, the compiler, testing costs a lot of time. LOT of time! I usually spend a week to do the final release testing, but more often it lasts several weeks, because one round of test results influence the decisions of TODO, SKIP and mandatory PASSing tests, and then I'll redo the tests. On all versions, with all platforms. You could rely on cpantesters to do that for you, but it is better to do the most common combinations by your own. That's why I use perlall with a few hundred perls.

Lazy == Cache ?

While I was working on some Moose code this past week, I was struck (again) by how the lazy property of attributes functions almost like a cache.  In fact, often when working in Moose I find that when I want something to be cached, I just make it lazy and call it a day.

Let me illustrate what I’m talking about with some code.  Now, the real process of putting this code together involved a lot of blind alleys and false starts, but I’m going to present it like I came up with the final product smoothly and without interruption.  I do this for two reasons: one, it makes for less frustrating reading, and, two, it makes me look smarter. ;->

So I’m creating a little command line utility to do some moderately complex data loading.  I decide to use MooseX::App::Cmd for the basic structure—this is an excellent module that I’m using more and more these days.  Definitely check it out.

Automating On Call Jury Instructions

Early in February, I received a jury summons for the United States District Court, Southern District of California. Prospective jurors for federal jury service (at least in this court) are placed on call for a period of about 30 days. I was to call for instructions on April 1 and potentially proceed to do so periodically until May 4 (assuming I wasn’t instructed to report).

Since my initial instruction date was nearly two months away, I created an entry for it in Google Calendar, and promptly forgot about it. On Monday, April 2, I was riding the train to work when I realized that I hadn’t remembered to check my instructions. Fortunately, after arriving at my office and checking my instructions, I had been deferred to the next day.

So I added a new entry in Google Calendar, this time with an SMS reminder. I proceeded to do this for most of April, checking my instructions and duplicating the calender entry with another SMS reminder.

I’m embarrassed to admit that it wasn’t until the last week of April that it occurred to me that I could automate the whole process. After all, isn’t automating drudgery the whole reason I ended up programming Perl in an engineering support group at my day job?

LiveText is sponsoring YAPC::NA 2012, and they’re...



LiveText is sponsoring YAPC::NA 2012, and they’re hiring!

Looking for the Position that Fits your Work Style?  

Education is one of the most relevant topics in our nation, because it is important.  LiveText is doing forward looking work in education that is making a difference.  We’re looking for “difference making” people. If you’re a smart and energetic self-starter who would like to “make a difference” in transforming education, we want to talk to you!

By hiring top people and nurturing a culture that empowers and rewards those people, we are building one exceptional company.

Open positions include: 

  • Software Engineer
  • MySQL Database Administrator
  • User Interface Designer
  • Systems Administrator
  • System Architect

LiveText provides schedule flexibility, an open office environment, and a full benefits package that includes: Medical, Dental, Life Insurance, 401k, and Paid Vacations/Holidays.

 If you’re interested in any of the open positions, visit the LiveText booth located within Exhibit Hall B of the Job Fair and Expo. Resumes may also be forwarded to, “resume@livetext.com”.

[From the YAPC::NA Blog.]

Is Try::Tiny still recommended for exception handling in Perl 5.14 or later?

Because I am interested in the result, I wanted to make the community aware of this question on StackOverflow. If you have an opinion answer there. Perhaps I will summarize the results here when the discussion warrants.

When is line 1 not line 1?

When eval-ing a simple use without a final semicolon, and doubly so on Solaris.

Sometimes eval 'some deadly code' dies at line 2 instead of line 1.

Compiler progress with 5.16

The latest B::C package on CPAN 1.42 works stable for almost all perls until 5.14, but so far did not work good enough for the upcoming 5.16 release.

I couldn't even pinpoint to a specific perl change which caused the problems. I know that hashes need a different initialization now. Empty hashes need to declare

HvTOTALKEYS(hv) = 0

after creation, and readonly hashes must be set readonly after they were created.

DynaLoader and %INC handling is much stricter now with 5.16.

Perl for Big Data

Martin Holste will give a talk at YAPC::NA 2012 described as:

Hadoop is overrated.  Come see what modern Perl can do with map/reduce on terabytes of data with an extremely simple, maintainable architecture by orchestrating the inserting and querying of data on enormous scales.  This talk will deconstruct the Enterprise Log Search and Archive (ELSA) project which is fully written in asynchronous, object-oriented Perl and provides a framework for Big Data analytics in a modular, pluggable architecture with the flexibility and customization that only Perl can provide.

[From the YAPC::NA Blog.]

Building C/C++ libraries and applications with Module::Build‎

Alberto Simões will give a talk at YAPC::Europe 2012 described as

In this talk I will present the recipe I am using to build Perl Modules that depend on C or C++ libraries (and that ship those C or C++ libraries with the module itself).

The recipe uses a mixture of Module::Build custom building module, ExtUtils::CBuilder for C compiler interface, ExtUtils::LibBuilder to adapt some ExtUtils::CBuilder defaults that make standards library build impossible, and Config::AutoConf for externals libraries and headers detection.

This recipe has been used in a lot of different modules I maintain: Lingua::Identify::CLD, Text::BibTeX, Lingua::Jspell and the recent Lingua::FreeLing2 (still beta) and Lingua::NATools (still not released at the date).

Quantum-Relativistic Time-Travel in Lisbon

My brief visit to Portugal just expanded a little.

In addition to the two public classes we’re running (and, yes, there are still a few seats left for either day), I’m now also going to be delivering my infamous Temporally Quaquaversal Virtual Nanomachine Programming In Multiple Topologically Connected Quantum-Relativistic Parallel Spacetimes…Made Easy! presentation, as a free seminar next Thursday night.

This talk has already melted hundreds of geek neocortexes in both London and Oslo in the past fortnight; next week it will wreak its terrible destruction on Lusitanian minds as well.

So, if you’re in Lisbon, don’t miss out on my most brain-twisting talk ever. Thursday May 3 from 7pm at Edifício Fórum Picoas. Entry is free and everyone is welcome (though you do need to register to ensure a seat).

Damian

PS: My sincere thanks to SAPO for sponsoring this event.

Eclipse: Unable to locate companion shared library

Eclipse executable launcher error: Unable to locate companion shared library now includes my answer for when Cygwin's unzip utility fails (hint: use another unzip program).

DBIx::Class - the whirlwind overview

Frew Schmidt will give a talk at YAPC::NA 2012 described as: 

This talk will be a whirlwind overview based on the talk I did a couple years ago.  The general overview version of that talk ended up in https://metacpan.org/module/DBIx::Class::Manual::Features.  This talk will cover (most of) that material, but additionally at least give examples of more advanced topics like correlated subqueries, deployment with DBIx::Class::DeploymentHandler, and will additionally have a bit of my own opinions on modules you should be using with DBIx::Class.

Beginners will certainly find the talk a good jumping off point for DBIC, but I hope to include about 10-20 minutes of advanced topics at the end if seasoned users want to join late.

[From the YAPC::NA Blog.]

Ninja Code

As this is only my second post—my first merely being a plug for a Damian Conway talk at my local Perl Mongers meeting—I thought I’d keep it short and silly.

At OSCON 2008, Amazon had a prominent booth advertising heavily that they were hiring. They didn’t want to hire just anyone. No, the question posed on the large sheet of poster board was, “Are you a ninja coder?” This was combined with a raffle, which as anyone who has ever been to a conference knows, is the most common tool used to get people to hand over their contact information. To enter, one had simply to look over some Perl code written out on that same poster board and tell them what it did. It looked a little something like this:

Alien::Base Perl Foundation Grant Report Month 2

After last month’s breakneck development pace, I knew this month wouldn’t be as gratifying, and indeed it turned into quite a slog.

This month involved lots of little bug fixes, posting dev releases to CPAN, then waiting for test results from CPANtesters. As a side note, there are a larger number of reports coming from Solaris and BSD than I would have expected. Sadly one of the bugs that still hasn’t been sorted out is this recurring Solaris bug when changing working directory. It would appear that I am going to have to find a Solaris box or VirtualBox appliance, since waiting for test results for every fix attempt would take far too long.

Post-mortem Linguistics in Zurich

For reasons I don’t entirely understand, it’s been quite a few years since I last gave a public talk in Zurich. Happily, we’ve been able to remedy that on this visit.

Digicomp run a regular seminar series entitled ”Open Tuesday” on the first Tuesday of each month, and I’m going to be speaking at that event on (no surprise) Tuesday May 8, from 6pm. Specifically, I’ll be giving my Fun with Dead Languages seminar.

The event is completely free, but they do need people to register so they can manage numbers correctly (just follow the “shopping cart” link on the Open Tuesday webpage)

Meanwhile, my various Perl-related classes at ETH are slowly filling, but there are still plenty of places left if you’re interested in some (entirely new) classes on Test-Driven Development, OO or API design, or optimizing your Perl development processes.

So if you’re in Zurich in early May, sign up for one (or more!) of my events. At very least, drop in to the “Open Tuesday” talk and see me do great and terrible things with ancient langauges.

Damian

DuckDuckHack

DuckDuckGo has launched a new plugin system that enables individual developers and Perl community members to build plugins on DuckDuckGo (http://duckduckhack.com/). The plugins will be available for all our users. Gabriel’s post introduces the plugin platform and different ways to get started: http://ye.gg/ddh

[From the YAPC::NA Blog.]

For Want of a Newline

Recently I had the pleasure of spending three hours debugging an obscure bug. An obscure bug I caused by introducing a newline. That little punk, 0x0A.

I released a new version of a command line program. For me, it’s an elegant piece of work, combining a marvelously complex-but-intuitive configuration for system administrators with an absolutely simple interface for users. To use the command, the user runs it with a couple of arguments and it prints out a single line of useful text derived from that marvelously complex configuration.

But, it doesn’t print a newline.

It’s never printed a newline. The original author didn’t include one for some reason. Anyone who has ever encountered a command like this knows well my irritation.

my awesome prompt> some_lame_command
my awesome prompt>e answer

Argh!

The workaround I’ve seen used, after seeing the above is to face-palm, then run the command again, only differently.

Continuous deployment with Perl

Lenz Gschwendtner will give a talk at YAPC::Europe 2012 described as

Continuous Deployment is a big topic if you want to push out code to production as fast as possible. The little pitfall is that it is not that straight forward if you want to use a PP approach. We at iWantMyName came up with a pure perl tool chain all the way from your git repository via integration testing to deployment to your production servers.

My first perl blog

write down my thought, experience and life about perl.

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.