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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
On breakage of various types (Score:5, Insightful)
As for breaking expectations...we sure did! Assuming people expected regexes to continue to be an ad hoc accretion of vaguely incompatible syntaxes, obscure stand-alone features, and special cases.
I mean, did people really expect Larry wouldn't take this unique opportunity to drag Perl regexes completely free from the syntactic and semantic mire into which they've slowly been sinking?
Apocalypse 5 is Perl 6 in microcosm: throwing away the prototype and using the lessons learned to design a system that's integrated, rather than aggregated.
Of course, there will almost certainly be issues and problems we've overlooked. That's why we'll be relying so heavily on the community's constructive feedback over the next few weeks. But fear, uncertainty, doubt, and xenophobia aren't likely to be helpful in that regard.
Reply to This
KEKEK I HAXOR YR APOCLIPS! (Score:3, Informative)
I do wish they had a "printable version" link that'd dump the whole thing as simple HTML all on a single page. But http://www.perl.com/pub/a/2002/06/04/apo5.html?page=all [perl.com] works.
Re:KEKEK I HAXOR YR APOCLIPS! (Score:3, Interesting)
Re:On breakage of various types (Score:2)
% wc -l a4.pod a5.pod2175 a4.pod
2811 a5.pod
In word count, about 30% more. In byte code, about 40% more. And A4 wasn't small. Still, it depends on your definition of "a few"...
Re:On breakage of various types (Score:3, Interesting)
% lynx -dump 'http://www.perl.com/pub/a/2002/06/04/apo5.html?page=all' > a5.txt
% lynx -dump 'http://www.perl.com/pub/a/2002/01/15/apo4.html?page=all' > a4.txt
% wc a[45].txt
2518 16682 104463 a4.txt
2768 18534 119403 a5.txt
So in terms of readable content, A5 is 10% bigger by lines, 11% bigger by words, and 14% bigger by bytes. No big deal.
See the Dark One's influence (Score:5, Insightful)
Seriously, it all looks very cool. Simple regexes remain simple, while grammars becomes possible. I like it.
Reply to This
First Reaction (Score:3, Insightful)
Sure, all the changes will take time to get used to. But the result will be both cleaner and more powerful than what we have now.
-sam
Reply to This
Re:First Reaction (Score:4, Interesting)
That way, P::FD can continue P::RD's role as a test-bed for Perl 6 regex/grammar features, as well as providing a migration path from Perl 5 to Perl 6.
Reply to This
Parent
Re:First Reaction (Score:2)
I'm afraid so.
Yes. One of the big tests of P::FD is whether I can build a P::RD metagrammar with it.
/ @kids := [(\S+) \s+]* / (Score:2, Interesting)
Does anyone see this as potentially confusing given...
apo4 wrote:
> An ordinary flattening list assignment:
>
> @a = (@b, @c);
>
> is equivalent to:
>
> *@a
>
> That's not the same as
>
> @a
I mean, we've got
Are there ever going to be cases where one might want to use
If so, how would it be typed? As
Re:/ @kids := [(\S+) \s+]* / (Score:2)
No, it doen't. It means "bind", exactly as it does outside a regex. And what it binds in a regex is a hypothetical variable to a captured value.
Regexp objects (Score:3, Interesting)
Reply to This
I'd just like to say three things... (Score:2, Interesting)
I'd just like to say three things:
---ict / Spoon
yummy! (Score:2, Informative)
My questions/comments above do not reflect my overall
opinion. They're really just things I didn't get and a
nit pick or two.
Overall, although my brain is dripping a bit from one
ear, I quite like perl6-flavoured regexen
I think I need to watch some mind-numbing TV though...
my head hurts a wee bit
-matt
Re:Oh shee-it (Score:3, Interesting)
You really think so? I can't think of any significant way in which Larry's proposal isn't a vast improvement on what we have now: more readable, more consistent, better optimized for the common cases, more powerful. What do you think they'll object to? (That's not a rhetorical question: I'd really like to know.)
Mostly, it makes me wonder how long it will take to build perl6. Much of my apprehension is allieviated by the thought that pe
Re:Oh shee-it (Score:3, Interesting)
OK, that's an oversimplification, but I just woke up. In any event, though, I am far more interested in the Perl syntax than the Perl regex syntax. My primary concern with regexes is the learning curve and speed of execution. It's a very dissimilar situation to Perl syntax itself, to my mind: I mean, how many people are really in love with Perl regex syntax, really?
Re:Oh shee-it (Score:2)
I know they'll still be there, but the syntax will be different -- and pretty much all other regex languages will still allow [aeiou], only Perl6 will require <[aeiou]> (or perhaps <vowel>?). So I won't be able to carry over my knowledge directly.
--
Esli epei eto cumprenan, shris soa Sfaha.
Aettot ibrec epesecoth, spakhea scrifeteis.
Re:inline comments have no syntax (Score:2)
/ x is the default # so this is a comment
and this is not a comment
At least that's what I remember from yesterday. I wish perl.com was up so I could confirm that
Re:inline comments have no syntax (Score:2)
Go to page 6 [perl.com] and look at the table at the bottom.
The very first example shows an inline comment.
Re:inline comments have no syntax (Score:2)
Geez, what a weird nitpick though. I agree that telling people to use inline strings is potentially a problem, but why would you insist on single-line regexes?
Do you try to keep all of you other code on one line too?
Re:Use of // (Score:2)
happening, and when is it happening?
But a regex object in a void, boolean, string, numeric, or =~ context
immediately matches against the current topic.
So you get:
Re:do we need an rx for perl6? (Score:3)
rule lets you name your regexes; rx doesn't.
Re:the topic is the subject of this post (Score:2, Interesting)
dealing with $_. Even =~ behaves as a topicalizer
for its right side. So, while the $_ inside a
closure is the search state object, it's always
related intimately to the outer $_, which is always
an alias for whatever you're currently searching.
Any string operations on the inner $_ should be
delegated to the original string. Providing an
explicit method to get at that string should be a
no-brainer, though if you mess with the string,
there's no guaran
Re:Minor bug? (Score:2, Insightful)
Re:typo in :u0 :u1 :u2 :u3 table? (Score:2, Informative)