By: osfameron on: Jan 31,2009
In: haskell, perl
This week's simple longest path exercise seems to have had more mileage in it than I expected. Thanks to everyone's comments and suggestions, I've updated with a number of times with, among other things, an improved Haskell version that acts on path elements instead of just characters.
But I had intended to do a version [...]
By: osfameron on: Jan 27,2009
In: haskell, perl
Here's a simple problem, with solutions in Perl and Haskell.
@joel: suppose I have a list of strings (they happen to be paths) -
how might I find only the longest instance of each path?
@joel: that is give /foo /foo/bar /foo/bar/baz /qux I only want back
[...]
By: osfameron on: Dec 3,2008
In: perl
First of all, a disclaimer: I know "larsen" (Stefano Rodighiero) not just as an
ex-colleague (he is one of the most respected senior programmers at DADA in
Italy), or through the Italian Perl
community, but also as a good friend.
But of course, those were excellent reasons to look forward to his book: an
introduction to Perl in a pocket [...]
By: osfameron on: Dec 1,2008
In: haskell, perl
On Saturday I gave an updated version of my Functional Pe(a)rls talk. This time around I cut the whistlestop tour of builtin FP techniques in Perl (map/grep/join) and added a section on Monads - what they are and how to implement them. I'd originally worried that the slides might have been over-academic and [...]
By: osfameron on: Sep 24,2008
In: perl
I went to my 3rd Italian Perl Workshop, IPW2008 at the end of
last week. It seems to have been the most successful Italian conference to
date, and it certainly succeeded at being both a national workshop and an
international event. It hadn't occurred to me before that these are actually
two orthogonal aims.
An international [...]
By: osfameron on: Aug 1,2008
In: perl
(Cross posted from my use.perl blog)
The Italian Perlmongers are finalising their preparations for
IPW 2008, Pisa. I managed to get to the last 2 while I was working in Florence, and the organizers have always managed to get a great venue, coffee breaks with unusually nice biscuits, and put on a fantastic mix of [...]
By: osfameron on: Jul 27,2008
In: perl
I recently posted some things to Perl's CPAN that I've previously discussed in this blog.
After my post on AUTOLOAD hate, I released the module discussed in it as Sub::Auto.
I finally released Attribute::Cached briefly discussed in my Readable Perl slides).
Already mentioned Sub::Curried today.
By: osfameron on: Jul 27,2008
In: perl
Debolaz asked in #moose about the best way to create:
a list of numbers like 10,25,50,100,250,500,1000,etc without tracking any other
state than the number itself
Nope, this isn't
A020179
but the much more prosaic
A112024.
Debolaz wanted this sequence, or something similar to it, for the same reason
the US used it for currency - the numbers are human meaningful, and are useful
as [...]
By: osfameron on: Jul 3,2008
In: perl
A couple of interesting comments to my
Five things I hate about Perl.
Quicksilver pointed out that I'd missed the difference between arrays and lists.
Yup, that's pretty subtle, and of course it's bitten me a few times (though oddly
enough, I don't have that strong a dislike of it). Luqui on the other hand pointed
out that [...]
By: admin on: Jun 23,2008
In: perl
Enough
advocacy, let's get to the nitty gritty of 5 things I hate about Perl.
(After brian d foy.)
The difference between list and scalar context is subtle. One bug that bites people too
often is this (for some value of "people", including me, far too often):
sub myfunc { return } my $scalar = myfunc(); [...]