dada's Journal dada's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:26:09+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 dada's Journal about Apocalypse 5 I'm still in the process of swallowing Larry Wall's <a href="">Apocalypse 5</a>. I lost myself here and there, but I think I got a (blurry) picture. Damian's <a href="">Synopsis 5</a> helped a bit. <p> so I started thinking about it, and I have some concerns to share. it's just my &#0128;.02, so feel free to comment about this (and/or beat me on the head) (eventually). </p><ol> <li> <b>how much stuff are we going to escape in a regex???</b> 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! <p> <code> s{&lt;b&gt;(.*?)&lt;/b&gt;}{$1}i;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# perl 5<br> s:i{\&lt;b\&gt;(.*?)\&lt;/b\&gt;}{$1};&nbsp;&nbsp;# perl 6<br> </code> </p></li> <li> <b>the x modifier is the default.</b> 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: <p> <code><nobr> <wbr></nobr>/a&nbsp;&nbsp;[a-z]&nbsp;&nbsp;&nbsp;&nbsp;[aeiou]/;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# perl 5<br><nobr> <wbr></nobr>/a&lt;sp&gt;&lt;2&gt;&lt;[a-z]&gt;&lt;sp&gt;&lt;4&gt;&lt;[aeiou]&gt;/;&nbsp;# perl 6<br> # or<br><nobr> <wbr></nobr>/a&lt;'&nbsp;&nbsp;'&gt;&lt;[a-z]&gt;&lt;'&nbsp;&nbsp;&nbsp;&nbsp;'&gt;&lt;[aeiou]&gt;/;<br><nobr> <wbr></nobr>/a\&nbsp;\&nbsp;&lt;[a-z]&gt;\&nbsp;\&nbsp;\&nbsp;\&nbsp;&lt;[aeiou]&gt;/; <br> </code> </p><p> which one do you prefer? </p><p> 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<nobr> <wbr></nobr><tt>:p5</tt> modifier, which just cuts out a whole world of functionality. </p></li> <li> <b>the angle brackets do way too much stuff!</b> let's take again the previous example: <p> <code><nobr> <wbr></nobr>/a&lt;sp&gt;&lt;4&gt;&lt;[a-z]&gt;&lt;sp&gt;&lt;8&gt;&lt;[aeiou]&gt;/;<br> </code> </p><p> 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:</p><ul> <li>Too much reliance on too few metacharacters</li> <li>Different things look too similar</li> </ul><p> which is just what I see here. </p><p> I understand that there has to be a balance, but these angle brackets are going to hurt me.</p></li> </ol><p> 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<nobr> <wbr></nobr>:-)</p> dada 2002-06-20T14:43:14+00:00 journal I've grown wings! <p>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.</p><p>I'm happily hacking Parrot right now, somewhere near the i386 JIT. man, it's fun!<nobr> <wbr></nobr>:-)</p><p>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).</p><p>tomorrow I'm gonna take my new car (<a href="">picture here</a>) and I'm quite happy about it. I need some rest.</p> dada 2002-05-24T10:44:32+00:00 journal current activities <p>I'm currently working on a new release of Win32::GUI with some bugfixes.</p><p>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<nobr> <wbr></nobr>:-)</p> dada 2002-05-09T09:43:35+00:00 journal