14 Mar 2009 (updated 14 Mar 2009 at 10:15 UTC)
»
Why Did I Write Acme::Pythonic
Acme::Pythonic is a Perl module
of mine that allows the
user to write Pythonic code as valid Perl code. I mean, you feed this code to
perl:
use Acme::Pythonic; # this semicolon yet needed
sub delete_edges:
my $G = shift
while my ($u, $v) = splice(@_, 0, 2):
if defined $v:
$G->delete_edge($u, $v)
else:
my @e = $G->edges($u)
while ($u, $v) = splice(@e, 0, 2):
$G->delete_edge($u, $v)
and perl executes it right away, directly. There's no intermediate file
being generated or anything. Sounds like magic unless you know what's a
source filter.
But some people don't get that even with the work behind this module,
the test suite, etc. this module is just a fucking joke! That's why it belongs to
the
Acme:: namespace in the first place.
It is a joke about taking programming languages too seriously, to the
hell with that, there you have Python and Perl mixed together. Sublimation.
Climax. You can put
that code against a wall and do vipassana contemplating it, release your
attachments to this mundane world!