Category Archives: Perl

OO is not the One True Paradigm, but Haskell still sucks at it

I just read osfameron’s Readable Perl talk. It’s a pretty typical language advocation talk, nothing special, but it reminded me of Perl. Those who have not been reading my blog since 2005 may not know that I used to be a Perl nut. I was even on the Perl 6 design team, [...]

use Perl journal

I started a use Perl; journal, where I’ll be posting design team meeting notes and various musings about theoretical Perl 6.

More Multimethod Madness

Damian and I have been intelligently screaming at each other on perl6-language, finally really fleshing out the Manhattan distance MMD debate. It has settled down recently, after I discovered that Damian had been arguing against something that was almost, but not quite, entirely unlike my algorithm. I looked through the message history and [...]

PCPP

Way back when Glop was going to be called GLIC1, it was going to be an extension to C++ with closures and such. I started by trying to write a huge grammar for C++, which I would then extend with my own special rules.
I’ve just implemented a proof-of-concept framework for a very similar idea, [...]

Parse::RecDescent vim trick

Just thought I’d share this. If you’re using Parse::RecDescent and editing with vim, you’d probably like your grammar to be syntax highlighted (at least I do). Here’s a nice little trick to fool vim (and I don’t consider this a bug; vim folks, don’t fix this!):

my $grammar = <<’#'EOG’;
[...]

Logic.pm preview

Due to a request from several people, I am releasing a not-yet-CPAN-ready module called Logic.pm. The development of the idea to write this module is long and boring. But it’s my blog, not yours, so I’ll talk about it.
Many of the problems that I have been solving recently in programming have involved backtracking: [...]

Two modules in One day

I just wrote and uploaded Perl6::Attributes to CPAN. It came out of frustration for code like this:

sub populate {
my ($self, $n) = @_;
for (1..$n) {
[...]

Hypotheticals in Perl 5

In Appendix C of Apocalypse 12, Larry speculatively mentioned the syntax:

let foo();

Which would “try” foo, and then revert things back to the way they were before that if something failed in your block. Well, I’ve implemented a Perl 5 module, Data::COW (which hasn’t been indexed at my time of writing, [...]

Continuation-passing style in Perl 5

While I was thinking about my latest perl module, a logic programming framework, I realized that it would be really nice to have continuations. So after going through all the contortions of getting around that limitation using closures, I discovered that it’s possible to use continuation-passing style in Perl:

sub fibo {
[...]

Ideas and Responsibilities

It’s been a while. Here’s an update.
BIMONSCIFICON
I just got back from a week long trip to Portland, OR, at the O’Reilly Open Source Convention (OSCON). It was quite a lot of fun; I met some interesting people and some very interesting people. I did my presentation, then went on to sign up [...]