Slashdot Mirror


Apocalypse 5 Released

Simon Cozens writes "The Apocalypses are Larry Wall's explanation of the design of Perl 6. In Apocalypse 5, Larry turns to redesigning regular expressions. He set out to intentionally 'break' a lot of the regular expression culture we're all used to, and these are the results - and they're mindblowing."

2 of 234 comments (clear)

  1. Perl parsing Perl by dannyspanner · · Score: 4, Interesting

    I've read comments by Larry to the effect that Perl is great at writing lexers but not parsers. If you look at some of the later examples (around page 11) it's clear that he's trying to make Perl regexes powerful/clear enough to parse Perl. They remind me of yacc/bison, which makes sense.

  2. Perl gives you by nullard · · Score: 4, Interesting
    Perl IS awkward and crazy. I've never understood the attraction to it. The few times I've had to dabble it in, it's just been frustrating, limiting, and ugly as hell. Bleh. I wish someone could explain it to me.

    It's not that perl is akward. It's a language that lets you code in a number of different styles. It gives you the freedom to code your own way. This does reduce readability, but it greatly increases speed of coding. If others need to read your code, just set up style guidelines.

    I use perl for just about all scripting I do on my system. Just a moment ago, I had to read an html file over http, but there were no line breaks. I just needed to get one piece of information, so I did this:
    GET url|perl -ne 's/</\n</g ;print;'|less
    Sure it's unreadable, but it did the job. If I'd been writing CGI, I would've been more verbose since terse perl code can be difficult for even the author to understand by reading it.

    perl gives you lots and lots of freedom. This is not a bad thing, but it is dangerous. Other languages force you to work in one way.

    Think of a bike. A bike w/ trainig wheels makes it hard to fall over, but your agility is reduced. perl has no training wheels by default. You can write really nasty code that works but is unreadable. Perl is anything but limiting.

    If you want more structure to protect you from yourself, try running perl the -w option and put "use strict" in your scripts. If you want pretty built-in identifiers, try "use English"

    I've been coding for so long that the restrictions built into many other languages just get in my way most of the time. I like the way perl never gets in my way.
    --


    t'nera semordnilap