Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dada (707)

dada
  (email not shown publicly)
http://dada.perl.it/

Journal of dada (707)

Thursday June 20, 2002
09:43 AM

about Apocalypse 5

I'm still in the process of swallowing Larry Wall's Apocalypse 5. I lost myself here and there, but I think I got a (blurry) picture. Damian's Synopsis 5 helped a bit.

so I started thinking about it, and I have some concerns to share. it's just my €.02, so feel free to comment about this (and/or beat me on the head) (eventually).

  1. how much stuff are we going to escape in a regex??? Larry has "stolen" three characters (angle brackets and colon) which will need now to be backslashed to be taken literally. but they're so damn common in real world strings! can you imagine what would matching HTML look like? a backslash hell!

    s{<b>(.*?)</b>}{$1}i;       # perl 5
    s:i{\<b\>(.*?)\</b\>}{$1};  # perl 6

  2. the x modifier is the default. well, I have to admit that I've never used it in my code (and I did quite a lot). ok, I get the blame for this. but what about matching strings where spaces do count? consider this:

    /a  [a-z]    [aeiou]/;             # perl 5
    /a<sp><2><[a-z]><sp><4><[aeiou]>/; # perl 6
    # or
    /a<'  '><[a-z]><'    '><[aeiou]>/;
    /a\ \ <[a-z]>\ \ \ \ <[aeiou]>/;

    which one do you prefer?

    I mean, probably having the x modifier the default is a Good Thing after all, but can't we have an option to disable it? aside from the :p5 modifier, which just cuts out a whole world of functionality.

  3. the angle brackets do way too much stuff! let's take again the previous example:

    /a<sp><4><[a-z]><sp><8><[aeiou]>/;

    they're used for: special characters, repetition count, character classes. they're also there for named rules, variables interpolation, and a lot of other things. Larry mentioned 2 problems with the actual regex syntax:

    • Too much reliance on too few metacharacters
    • Different things look too similar

    which is just what I see here.

    I understand that there has to be a balance, but these angle brackets are going to hurt me.

concerns aside, there's a lot of things that I like in the Brave New World of regexp, particularly named rules and grammar support. but I'm afraid it will be a hard, hard time getting used to it :-)

Friday May 24, 2002
05:44 AM

I've grown wings!

you know how these things go... you have a filled-up TODO queue that you're desperately trying to reduce a bit, and suddenly something new and exciting comes up. eating up all your resources.

I'm happily hacking Parrot right now, somewhere near the i386 JIT. man, it's fun! :-)

I've also worked a lot on Win32::API, but things are becoming more difficult than I expected (fighting with C struct alignment is a damn hard battle).

tomorrow I'm gonna take my new car (picture here) and I'm quite happy about it. I need some rest.

Thursday May 09, 2002
04:43 AM

current activities

I'm currently working on a new release of Win32::GUI with some bugfixes.

something great is happening to Win32::API, I have plenty of big changes for the module (including the most wanted callback support). hold your breath, version 0.40 is almost ready :-)