dada's Journal
http://use.perl.org/~dada/journal/
dada's use Perl Journalen-ususe 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:00pudgepudge@perl.orgTechnologyhourly11970-01-01T00:00+00:00dada's Journalhttp://use.perl.org/images/topics/useperl.gif
http://use.perl.org/~dada/journal/
about Apocalypse 5
http://use.perl.org/~dada/journal/5803?from=rss
I'm still in the process of swallowing Larry Wall's <a href="http://www.perl.com/pub/a/2002/06/04/apo5.html">Apocalypse 5</a>.
I lost myself here and there, but I think I got a (blurry) picture.
Damian's <a href="http://www.yetanother.org/damian/Perl6/Synopsis5.pdf">Synopsis 5</a> helped a bit.
<p>
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).
</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{<b>(.*?)</b>}{$1}i; # perl 5<br>
s:i{\<b\>(.*?)\</b\>}{$1}; # 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 [a-z] [aeiou]/; # perl 5<br><nobr> <wbr></nobr>/a<sp><2><[a-z]><sp><4><[aeiou]>/; # perl 6<br>
# or<br><nobr> <wbr></nobr>/a<' '><[a-z]><' '><[aeiou]>/;<br><nobr> <wbr></nobr>/a\ \ <[a-z]>\ \ \ \ <[aeiou]>/; <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<sp><4><[a-z]><sp><8><[aeiou]>/;<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>dada2002-06-20T14:43:14+00:00journalI've grown wings!
http://use.perl.org/~dada/journal/5196?from=rss
<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="http://www.edidomus.it/auto/guidaacquisto/auto_nuove/foto/00000672.jpg">picture here</a>) and I'm quite happy about it. I need some rest.</p>dada2002-05-24T10:44:32+00:00journalcurrent activities
http://use.perl.org/~dada/journal/4783?from=rss
<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>dada2002-05-09T09:43:35+00:00journal