Wednesday, August 4, 2010

Fresh tomatoes

A few minutes ago, I saw a short video about the Pomodoro Technique where the presenter talked about distractions and blocking your time in 25 minute increments so that you can focus and get things done. This was not the first time I had heard about this technique, but it was the first time that it resonated with me and made me want to learn more.

A quick overview of the Pomodoro Technique: 25 minutes of focused work followed by a 5 minute break.

The first time I heard about this technique -- I don't remember where or exactly how I heard about it -- the emphasis seemed to be about the 5 minutes. Don't overload your brain. Give time for a little right-brain activity as that will improve your problem solving ability and allow you to be more efficient in accomplishing your goals. I thought then, "eh ... why would I want to do that? My main problem is dealing with interruptions and lack of focus, not giving my brain a rest". And so, I blithely ignored and forgot about the pomodoro technique.

However, the short video talked in terms of distractions and focusing for the 25 minutes. That's exactly what I have (distractions) and what I need (focus)! Now I actually want to read more about it and how I may apply this technique.

Saturday, December 5, 2009

Extra parsing for better errors

Something that I think is a unique feature of Perl 6 is that it goes out of its way to parse things that aren't in the language so that it can give you a really good error message. For instance, in Perl 5 and other C-like languages there is a for loop that looks like this:

for (EXPR ; EXPR; EXPR ) BLOCK

Perl 6's version of that loop doesn't start with "for" since it uses "for" exclusively as an iterator of lists. However, if you happen to write a for loop as above, there is code in the standard Perl 6 parser that matches it and tells you what you did wrong and how to fix it. If you read the grammar for Perl 6, you find this sort of thing all over the place.

Perhaps it's just that Perl is in the unique position of having two major versions of the language that have significant differences in syntax and semantics that such extra parsing is almost required. But, I wonder how many other languages do this to the extent of Perl 6?

Tuesday, December 1, 2009

an annoying meme

I've been following the twitterverse off and on for a while now. Quite often the "Perl is dead" meme rears it's ugly head and I have to wonder why there is such animosity towards Perl. Sometimes it's just ignorance (occasionally willful ignorance) about the state of Perl, but many times it's random vitriol against Perl.

Perl is clearly not dead.

There are easily 5 or 6 conferences a year on Perl. Off the top of my head, there are 3 YAPCs (Yet Another Perl Conference): YAPC::NA, YAPC::EU, YAPC::Asia; The Perl Conference; The Nordic Perl Workshop; Frozen Perl. There are probably several I've forgotten or just don't know about as well. CPAN still has continuous contributions and growth. There are bunches of blog posts about perl every day (See the Perl Ironman challenge). Et cetera.


So what do these people have against Perl that they would say it is "dead"? Does its continued existence cause them such pain? Why do they stomp all over Perl? If they don't like Perl, that's fine. I don't like COBOL. If the topic comes up, I might mention that I don't like it. However, I don't go around saying that COBOL is dead.

Also, what do they get out of it? I think it's the rise they get out of Perl people. Blog posts like this one or even the twittered responses of "Perl is not dead" satiates their child-like desire to gain attention by picking on Perl much like siblings pick on each other.

Maybe we Perl people should wear the "Perl is dead" meme as a badge of honor. I mean, in a way it's nice to know that they consider Perl such a threat that they keep attacking it.

I don't know ... this particular meme just bugs me.

Thursday, October 22, 2009

Awkward edits

Am I the only one who has trouble doing a simple cut-n-paste into the edit box for Blogspot to generate a post? Simple HTML suddenly gets less simple. :-(

Rakudo Perl 6 development release #22 ("Thousand Oaks")

Announce: Rakudo Perl 6 development release #22 ("Thousand Oaks")


On behalf of the Rakudo development team, I'm pleased to announce the October 2009 development release of Rakudo Perl #22 "Thousand Oaks". Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine (see http://www.parrot.org). The tarball for the October 2009 release is available from http://github.com/rakudo/rakudo/downloads

Due to the continued rapid pace of Rakudo development and the frequent addition of new Perl 6 features and bugfixes, we recommend building Rakudo from the latest source, available from the main repository at github. More details are available at http://rakudo.org/how-to-get-rakudo.

Rakudo Perl follows a monthly release cycle, with each release code named after a Perl Mongers group. The October 2009 is code named "Thousand Oaks" for their amazing Perl 6 hackathon, their report at http://www.lowlevelmanager.com/2009/09/perl-6-hackathon.html, and just because I like the name :-)

Since the 2009-08 release, Rakudo Perl builds from an installed Parrot instead of using Parrot's build tree. This means that, unlike previous versions of Rakudo Perl, the "perl6" (or "perl6.exe") executables only work when invoked from the Rakudo root directory until a "make install" is performed. Running "make install" will install Rakudo and its libraries into the Parrot installation that was used to build it, and then the executables will work when invoked from any directory.

This release of Rakudo requires Parrot 1.7.0.

For the latest information on building and using Rakudo Perl, see the readme file section titled "Building and invoking Rakudo". (Quick note: the "--gen-parrot" option still automatically downloads and builds Parrot as before, if you prefer that approach.)

Some of the specific changes and improvements occuring with this release include:


  • Rakudo is now passing 32,582 spectests, an increase of 17,085 passing tests since the September 2009 release. With this release Rakudo is now passing 85.0% of the available spectest suite.
  • We have a huge increase in the number of spectests relating to the Complex and Rat numeric types.
  • Complex numbers are now implemented as a Perl 6 class, and supports all trigonometric functions from the specification.
  • Rakudo has a new signature binder which makes calling routines and operators much faster, and allows binding of positional arguments by name.
  • Rakudo has improved signature introspection, better errors relating to signatures and signature literals are now supported.
  • Rakudo now supports accessing outer lexical variables from classes and packages.
  • Some new variants of the series operator are now implemented.
  • When configuring Rakudo with --gen-parrot, the --optimize flag is now passed to Parrot's Configure.pl


The development team thanks all of our contributors and sponsors for making Rakudo Perl possible. If you would like to contribute, see http://rakudo.org/how-to-help , ask on the perl6-compiler@perl.org mailing list, or ask on IRC #perl6 on freenode.

The next release of Rakudo (#23) is scheduled for November 19, 2009. A list of the other planned release dates and codenames for 2009 is available in the "docs/release_guide.pod" file. In general, Rakudo development releases are scheduled to occur two days after each Parrot monthly release. Parrot releases the third Tuesday of each month.

Have fun!

Thursday, October 8, 2009

Perl around the world.

Maybe it's just that I'm so very American but I've been reading the posts from the Perl Iron Man challenge and I'm amazed and excited at how many posts there are in other languages. Just now I've seen Spanish, French, German, and what I think is Russian. Yes, I know that Perl is spoken around the world, but, for me, it's neat to see a microcosm of the world. Sometimes these posts seem interesting from the code that they present, but unfortunately I'm too much of a monoglot.

Anyway, Perl++

Sunday, October 4, 2009

Catalyst Sparklines

At work we maintain several platforms along the Texas coast that collect various physical parameters in or near the waters of the Gulf of Mexico or bay systems. In order to maintain the quality of the data, we have a QC process that displays a series of graphs that show the last 7 days of data collected at each station. A human reviews these graphs each morning to look for potential problems which are noted and forwarded to the field crew and the IT staff so that they may be resolved.

Over the last few months one of the ideas that's come up to improve the QC process is to use sparklines to get a high level overview at a glance rather than the larger graphs that we currently use. Since we're in the process of turning this legacy application grown over the last 19 years into something that uses more modern tools such as Moose and Catalyst, I thought I'd see how difficult it would be to implement sparkline-QC in Catalyst.

Turns out it was ueber-easy because earlier today I ran across this entry in last year's Catalyst Advent Calendar. So, now in the span of an hour or so I've got a working prototype generating sparklines for all of the data series at each station similar to the way we generate graphs for our QC page. Hooray for Perl, CPAN, and Catalyst!