By: admin on: May 29,2008
In: perl
Thanks to Chris and Thom for organising the recent GeekUp Liverpool talks. The evening started well with Martin Owen's very interesting talk on justifying Erlang, and why FP is going to become a major factor in tomorrow's concurrency-oriented world. I demonstrated the wisdom of always saving a copy of your talk in PDF to a [...]
By: admin on: May 16,2008
In: perl
Thom has posted the details of the next Liverpool geekup, Tuesday May 27th at 3345 Parr Street. Last time, I admitted to programming in Perl and got ribbed about it being unreadable. Fueled by the fervour of the righteous (and maybe a pint or two of Cains bitter) I volunteered to do a talk on [...]
By: admin on: Nov 27,2007
In: perl
On #moose, the channel for a popular modern dialect of Object Oriented Perl, Debolaz asked:
<Debolaz> Is there a simple way to produce an array of array like [[1..4],[1..4]] without having to specify the [...]
By: admin on: Nov 23,2007
In: perl
This morning, Ranguard asked an interesting question on #london.pm:
11:27 <@ranguard> What's the best way of finding the common root of two paths, e.g. for /a/b/c/d/e, /a/b/c/1/2/3 I want /a/b/c/ returned, [...]
By: admin on: Nov 22,2007
In: perl
Greg confessed on #london.pm to having written a average function in Perl in FP style... recursively.
I asked him about this, as a perfectly good average function (using List::Util would be:
sub avg { sum(@_) / @_ }
which is perfectly fine FP style too. As far as I could understand
it, he was reducing [...]
By: admin on: Nov 21,2007
In: perl
Some interesting comments on yesterday's Haskell post. I thought I'd write this in Perl to compare. Of course, we don't have an "inits" function in the standard library, but that's easily written:#!/usr/bin/perluse strict; use warnings;use Data::Dumper;my %hash = ( "key1" => 1, "key2" => 2, [...]
By: admin on: Nov 12,2007
In: perl
Haskell's prelude has a function words that splits a string by spaces.
Prelude> words "nice cup of tea" ["nice","cup","of","tea"]
Apparently the question comes up quite regularly on irc or
haskell-cafe as to why this function is specialised to split only on
whitespace. Perl's split, for example, can split on any character, or indeed string or regular expression.
As quicksilver [...]
By: admin on: Aug 23,2007
In: perl
For some time I've been wanting to implement the Enfilade, a really
cool data structure discovered by the Xanadu people among others. It's
like a balanced tree, except that it's indexed relatively rather than
absolutely - making it ideal for things like text editor buffers, as
you can insert and delete with impunity, knowing that the changes to
the address [...]
By: admin on: May 25,2007
In: haskell, perl
1. In which a challenge is thrown, but there is a spanner in the
works!
Haskell suddenly became “important” in the Perl community when Audrey
Tang started to blog about Pugs, the prototype version of the Perl 6
interpreter/compiler. So, when I started looking at Haskell, I did so
with another Perl-monger, larsen, one of the key guys in [...]