May 2013 Archives

The Design of Four

[ This is cross-posted from the Ocean of Awareness blog. ]

In the Perl world at this moment, a lot is being said about the consequences of bad design. And it is useful to study design failures. But the exercise will come to nothing without a road to good design. This post will point out four Perl-centric projects that are worth study as models of good design.

The projects are ack, cpanm, local::lib and perlbrew. Each of these is perfect in the older sense of "having all that is requisite to its nature and kind" (Webster's 1828). If you are into Perl, they are all widely useful, and looking at them as a potential or an actual user is the best way to gain an appreciation of the art behind them.

Why Marpa works: table parsing

Marpa works very differently from the parsers in wide use today. Marpa is a table parser. And Marpa is unusual among table parsers -- its focus is on speed.

The currently favored parsers use stacks, in some cases together with a state machine. These have the advantage that it is easy to see how they can be made to run fast. They…

About Jeffrey Kegler

user-pic I blog about Perl, with a focus on parsing and Marpa, my parsing algorithm based on Jay Earley's.