Just came across something cool on the frink mailing list - was
wondering if perl6 had any intention on implementing this, or if not natively,
ideas on what would be the best way of implementing it in perl6.
They have the intent (Alan Eliasen has the intent) of implementing 'intervals'
which
If the generator was used as the primary way to testing the regex
engine, do you really think that any of these limitations would
exist?
Sigh. [Because] seems to have flown right by you.
Ok, I think this thing has pretty much played itself out, but I hate ending
on a
If the generator was used as the primary way to testing the regex
engine, do you really think that any of these limitations would
exist?
Sigh. [Because] seems to have flown right by you.
Ok, I think this thing has pretty much played itself out, but I hate ending
on a
On Fri, Sep 24, 2004 at 10:24:32PM -0400, Aaron Sherman wrote:
On Fri, 2004-09-24 at 16:58, Edward Peschko wrote:
Ok, ok, I'll give you that point ... lets call them 'intimately related' and
leave it at that... if you say 3 foo and your algorithm goes:
3 foo = 3 = 2
then you
From: Edward Peschko [EMAIL PROTECTED]
To: Jeff Clites [EMAIL PROTECTED], [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Bcc:
Subject: Re: S5 updated
Message-ID: [EMAIL PROTECTED]
Reply-To:
In-Reply-To: [EMAIL PROTECTED]
ok,
I'm going to answer both you and Luke in the same message to save time.
I'm
How do you do that? Generation and matching are two different things
algorithmically.
yes, but they are intimately linked. just like the transformation of a string
into a number, and from a number to a string. Two algorithmically different
things as well, but they'd damn-well better be exact
ok, cool, I'm beginning to understand perl6 patterns a bit better.
Just a tiny request though (and I seem to remember this being
discussed)
You were the one who initiated the thread :-)
Ah yes, I forgot about that. Damn brain cells.. ;-)
- I wish that there was an easy syntax to
The reason for the modifier (or even a new operator (g/ for example) is that
you can easily test your regular expressions. The interface is trivial - all you
have
to do is switch your m/ out for g/, and sit back and see how your patterns
translate
into strings.
Yeah, that looks
I've been working at updating the various synopses on dev.perl.org.
In particular, you folks might like to know that the regex synopsis at:
http://dev.perl.org/perl6/synopsis/S05.html
is no longer two years out of date :-)
Larry
ok, cool, I'm beginning to understand perl6 patterns
On Thu, Apr 03, 2003 at 07:30:10AM -0700, Luke Palmer wrote:
just an aside, and a bit off-topic, but has anybody considered
hijacking the regular expression engine in perl6 and turning it into
its opposite, namely making *productions* of strings/sounds/whatever
that could possibly match
What I think you're looking for is the fact that they're not regexes any more. They
are rexen, but in horrifying-secret-reality, what has happened is that Larry's
decided
to move Fortran out of core, and replace it with yacc.
just an aside, and a bit off-topic, but has anybody considered
On Mon, Jul 30, 2001 at 08:23:12PM -0500, David L. Nicol wrote:
raptor wrote:
hi,
we have = and 'cmp' operators but we don't have the conditional constroct
to use better their result :
May be forthcomming switch will solve this in some way, but isn't it better
to have shortcut
Ed,
Why should it die a horrible death? It seems like something which could be
pretty easily implemented:
sub if3 ($) {
return {$_[1]} unless $_[0];
return {$_[2]} if $_[0] 0;
return {$_[3]};
}
gives the functionality. A little more research (and perhaps a quick
hey
A small nitpick, but I really do hope that perl6 includes a 'next', 'last', etc
for 'do..while'.. enclosing every condition on which to actually do the block
becomes a real pain:
do
{
if ($dont_skip || $dont_skip2)
{
}
} while (..)
I'd much rather:
do
{
On Mon, May 21, 2001 at 08:57:45AM +0100, Graham Barr wrote:
On Sun, May 20, 2001 at 01:24:29PM +0100, Simon Cozens wrote:
On Sun, May 20, 2001 at 12:46:35AM -0500, Jonathan Scott Duff wrote:
my $a is true = 0; # variable property
my $a = 0 is true; #
Err. There are only two things: compile-time variable properties and
run-time value properties. Attributes are a Perl 5 construct that we're
renaming because the name conflicts with the OO term for object data.
So,
$a is true
and
$a.true = 1
are synonyms, right?
if not, then there are
I don't see that at all. We're simply providing one more
way for a value to be true, and one more way for it to be false.
You might as well argue that the following is action-at-a-distance:
undef $fh;
$fh = 0 but true;
... 1200 lines later...
if ($fh) {
So... why the *$#$ is it getting into the loop?
There has to be a method to print out the *contents* of $fh, not
just the values.
print $fh.true; # Just the truth
print %{(+$fh).prop}; # All the value's properties
um.. I'm not the greatest fan of this
On Fri, May 18, 2001 at 08:08:54PM -0700, Daniel S. Wilkerson wrote:
Damian Conway wrote:
You may also be wondering what happens if a variable and the value it
contains both have a property of the same name. The answer is that we
always get back the variable's property in preference to
Any ideas on how to handle this with the 'is' keyword? I was reading the
slashdot comments to Exegesis II, and this seemed to be the one issue that had
merit. A couple of the posters bemoaned the fact that they were debugging PL/I
about 25 years ago, and had code that depended on some obscure
On Tue, May 15, 2001 at 03:01:47PM -0400, Stephen P. Potter wrote:
Lightning flashed, thunder crashed and Larry Wall [EMAIL PROTECTED] whispered:
| Peter Scott writes:
| : So, I wonder aloud, do we want to signify that degree of change with a more
| : dramatic change in the name?
|
|
On Tue, May 15, 2001 at 03:32:46PM -0600, Nathan Torkington wrote:
Damian's writing a series of articles parallel to Larry's Apocalypses.
These Exegesis articles will show full perl6 programs, with
commentary exlaining the new features.
The first Exegesis (numbered 2, to keep in sync with
For example, I see that 'use warnings' and 'use strict' are still at the top
of the page.
Yes. Is there some point you want to make about that?
yes, that there shouldn't need to be - at least in the 'use warnings'
department.
print Post order: ; show($root,$post); print \n;
would
On Wed, May 16, 2001 at 12:25:34AM +0100, Simon Cozens wrote:
On Tue, May 15, 2001 at 04:04:52PM -0700, Edward Peschko wrote:
yes, that there shouldn't need to be - at least in the 'use warnings'
department.
Oh, you wanted warnings to be on by default? Oh well.
Exactly. This has
On Mon, May 14, 2001 at 10:11:01PM +0200, Bart Lateur wrote:
On Mon, 14 May 2001 20:38:31 +0100, Graham Barr wrote:
You forgot
$bar[$foo]; # $bar is an array reference
$bar{$foo}; # $bar is a hash reference
As to what the combined
$bar[$foo]
would mean:
On Thu, May 10, 2001 at 09:43:34AM -0700, Larry Wall wrote:
Peter Scott writes:
: So, I wonder aloud, do we want to signify that degree of change with a more
: dramatic change in the name?
I'm inclined to think that people will be more likely to migrate if
they subconsciously think we're
: also - why does it have to be tied to perl (in name) at all?
Er, because we're writing it?
: I like the idea
: that it would *not* be tied to perl, ie: it would be more generic if it was
: not named after it.
Well, the fact that Tcl and Tk both start with T didn't stop people
On Fri, May 04, 2001 at 11:23:12PM -0400, John Siracusa wrote:
On 5/4/01 11:09 PM, Nathan Wiger wrote:
The real trick is what to do with these:
Note: stabbing wildly here... :)
%a = (%b, %c);
%a = (stringify(\%b) = \%c); # Perl 5-ish
%a = (%b.str = %c); # Perl 6
Maybe we need a new flattening operator. I don't think the proposed := by
itself would do everything we need to do. Maybe we need a way to say
flatten these together. I'm going to throw out a new : op here:
%a = (%b, %c); # same as %a = %b
%a = (%b : %c);# flattened
: (is a nice city in Italy with a great symbol, the tower of Pisa).
:
: a'P' at the beginning, which means 'Perl',
: an 'I' which may mean 'Interpreter',
: a'S' which may means'Six'
: an 'A' which may means'Alpha'
I
On Thu, May 03, 2001 at 10:14:47PM -0500, David L. Nicol wrote:
I am going to miss doublequoting being the default quoting for
here strings. I find that to be a very nice optimization and
would like to know more about the reasoning behind taking it
away. I worry that official standard p6
On Wed, Apr 25, 2001 at 06:30:37PM +0100, Simon Cozens wrote:
On Tue, Apr 24, 2001 at 07:38:50PM -0700, Brent Dax wrote:
IMHO, . can DWIM in most cases even if it's both object deref _and_
concat--without paying any attention to whitespace.
Please, no. Some of us have to *teach* this
On Thu, Apr 26, 2001 at 01:03:50AM +0200, Paul Johnson wrote:
On Wed, Apr 25, 2001 at 03:33:52PM -0700, Edward Peschko wrote:
I think its really time to have a vote on this
Aaargh. I don't. Wouldn't you rather wait and see what Larry is
planning with all this? I doubt the proposed
'.' is already, to some extent, space sensitive anyway, because it has
to pull double duty as a decimal point, as well.
'4.5' (4.5) vs '4 .5' (45) vs '4. 5' (missing operator)
beautiful. Then extending this is simple, consistent, easy to read, compatible
with perl5..
Ed
On Thu, Apr 26, 2001 at 03:16:46AM +0100, Simon Cozens wrote:
On Wed, Apr 25, 2001 at 03:33:52PM -0700, Edward Peschko wrote:
Please, no. Some of us have to *teach* this language.
Then I guess that either space sensitive '.' is the answer
Sorry. I'll try it again.
SPACE SENSITIVE
beautiful. Then extending this is simple, consistent, easy to read,
compatible with perl5..
I'm not sure that that was the point I was trying to make.
If nothing else, the '.' would then be responsible for *three*
different actions.
Right, but what *I* am saying is that any given user
More often that you might think. I see Perl folks who love white
space writing:
print
$cgi - header,
$cgi - start_html,
$cgi - h2( 'my page' ),
$cgi - hr,
$cgi - a(
{ -href = 'http://geeknest.com' },
$cgi -
On Tue, Apr 24, 2001 at 05:44:49PM +0100, Michael G Schwern wrote:
On Tue, Apr 24, 2001 at 12:32:29PM -0400, John L. Allen wrote:
I think someone may have mentioned this already, but why not just say
that if you want '.' to mean concatenation, you have to surround it on
either side with
ok, well.. I've heard arguments for '+' (namely that its intuitive, other
language compatible, etc...) so what are the arguments against it?
Well, it looks like I'm a little bit behind. Spend 15 minutes typing something,
and you get 7 messages in your mailbox on the exact topic that you had
This is going to make finding syntax errors a bit difficult, as many
will simply become concatination operators. Consider
print Foo
foo(bar);
Did the author forget a semi-colon, or did they intend to concatinate
there? Also, consider this...
*sigh*. Ok, how about:
I still think it's a good idea - better than any other proposed so far.
Are we so afraid of a little mandatory disambiguating white space
that we are willing to pay the price of contorting other syntax
beyond the bounds of sanity? :-)
It's perfectly obvious to me that
$x = $foo
On Tue, Apr 24, 2001 at 06:54:18PM -0700, Larry Wall wrote:
Nick Ing-Simmons writes:
: Larry Wall [EMAIL PROTECTED] writes:
: I think using overloading to write a parser is going to be a relic of
: Perl 5's limitations, not Perl 6's.
:
: I am _NOT_ using overloading to write a parser.
:
On Tue, Apr 24, 2001 at 06:39:09PM -0700, Larry Wall wrote:
Edward Peschko writes:
: I guess my question is what would be the syntax to access hashes? Would
:
: $hashref.{ }
:
: be that desirable? I really like -{ } in that case..
It won't be either of those. It'll simply be $hashref
On Tue, Apr 17, 2001 at 09:23:56AM -0400, John Porter wrote:
Tim Bunce wrote:
If the file doesn't start with Perl 6 thingy then
it's Perl 5. Period.
To mandate the impossible is to mandate failure.
"Nothing can parse perl like Perl."
Why is that?
Because perl has a bunch of special
Whoa. This is so simple yet so sublime. It solves so many issues in one
swoop. Cool.
Assuming Perl6 will be parsing Perl5 code? Hmmm. That's interesting.
Forget p52p6 and the whole 80/20 thing, we could potentially hit the
100% mark.
I'd really rather not, and I don't think that was
And what would be a better way of testing this out than being able to
make perl6 parse and run perl5 code correctly?
Well, I think it'd be easier to write a proper C parser for perl. Or an APL
one. Heck, depending on what Larry does a Forth one might be easier. Perl 5
has a *lot* of
Loooking over dev.perl.org/rfc, only two RFCs mention sorting:
RFC 124: Sort order for any hash
RFC 304: sort algorithm to be selectable at compile time
and none mentioning the Schwartz. :-)
This message is not an RFC, nor is it an intent to add a feature
to Perl or
Can you give me an example of the former?
I can't think of any off the top of my head.
Scalar value @foo[$bar] better written as $foo[$bar], for one.
If part of Perl's breeding is autovivication and interpretation of undef as
0 or "" in the appropriate context, why should Perl
On Tue, Feb 20, 2001 at 08:33:50PM -0500, Bryan C. Warnock wrote:
On Tuesday 20 February 2001 19:34, Edward Peschko wrote:
Well, for one, your example is ill-considered. You are going to get
autovivification saying:
The two ideas were disjoint. The example wasn't an example of autoviv
This isn't an addition to the language that you're talking about - it's
changing some of the fundamental behavior of the language. It's saying
that no longer is Perl a loose, powerful language - oh, you want BD? well,
we can do that for you too - but rather that Perl is just another
much deleted
As much as I'd like to respond to some of these points, I'll refrain from it
now, I'll let my RFCs speak for themselves.
Speaking of which... apologies in advance for cross-posting this, but I wanted
to get the largest audience possible... I won't do it again. At least not in the
print IRONY;
I consider a module without tests or documentation to be a syntax
error. Maybe perl should refuse to run a module without POD and
MakeMaker should refuse to install a module without tests unless given
a special flag. Then people will sometimes forget to use that flag
and
I thought that was the problem you were having. Forgetting to type
"use strict" in your programs.
No -- its *anywhere* that you write scripts/modules/what have you. Anywhere
you miss it, it is a syntax error to me.
Modules? Modules should have test suites. A simple test would be to
check
hat others have said. Sorry, but that's the truth...
On Fri, Feb 16, 2001 at 09:03:54PM -0800, Edward Peschko wrote:
Right now, I do a search on the standard distribution, and I see
'use warnings::register' in 13 out of 270 modules. Make 'use warnings' the
default, and you'd bet that t
b 16, 2001 at 09:03:54PM -0800, Edward Peschko wrote:
Right now, I do a search on the standard distribution, and I see
'use warnings::register' in 13 out of 270 modules. Make 'use warnings' the
default, and you'd bet that there would be a big push to make the standard
distribu
On Fri, Feb 16, 2001 at 08:41:02PM -0500, [EMAIL PROTECTED] wrote:
On Fri, Feb 16, 2001 at 03:28:36PM -0800, Edward Peschko wrote:
Its because '-w' is a global switch.
What about the new lexical warnings? "use warnings"?
umm... that's part of what this is all about. People
On Fri, Feb 16, 2001 at 03:51:31PM -0500, [EMAIL PROTECTED] wrote:
Can we take this thread over to perl6-language-strict? Its where it
belongs. Then you can argue to your heart's content and let us know
when you've reached a conclusion.
Ok, that seems fair enough. But I really don't think
On Fri, Feb 16, 2001 at 06:33:46PM -0500, [EMAIL PROTECTED] wrote:
On Fri, Feb 16, 2001 at 02:48:01PM -0800, Edward Peschko wrote:
1) be lax on warnings and strict in a script, assume strictness and
warnings in the modules. Rationale: in a script, you really
have
Take PHP and Python, for example.
my $a, $b, $c;# only $a is lexically scoped
RTFM.
my ($a) = FHANDLE; # after deducing (by the above) . . .
# when I wanted only the first line.
Silly beginner gotchas. It's not an
Still would be able to do it with `use strict'. My proposal isn't going to
replace it! As it didn't replace the default global variables! As I said, I
don't want you to use it or even like it, I'm only wanting YAWTDI.
Right, but your approach isn't going to help in the cases where it is
On Thu, Feb 15, 2001 at 02:40:52PM -0600, Jonathan Scott Duff wrote:
On Thu, Feb 15, 2001 at 12:25:44PM -0800, Edward Peschko wrote:
well, I was thinking about this - there really should be an extra switch that
makes this possible, rather than typing 'no strict; no warn;' ie:
#!/usr
And in any case, make '-e' have the additional connotation that implies
'no strict', and 'no warn'.
no 'warnings'
thanks. 'no warnings'
Seems simple enough to me.
Yes, that's what I thought; but this has generated more heat than light, at
least on the times I've brought it up, e.g.,
So... what was the rationale against it?
Best read the archives... I am the wrong person to ask for a statement of
the opposing viewpoint...
hey... I'm a lazy guy.. ;-) So - I guess coming from someone who holds the
opposing viewpoint, what was it?
Ed
If I have:
(my $foo1, $bar1) = (my $foo2, $bar2) = ("foo", "bar");
then '(my $foo1, $bar1)' is in void context, while '(my $foo2, $bar2)'
isn't.
Do you really want them to behave differently?
best way to shoot down my suggestion is an example where existing behaviour
can't be
It was suggested to DWIM when I use my in void context, and not when
my isn't used in void context. With the above example, such a rule
would mean '$bar1' is my()ed, and '$bar2' isn't. That's IMO, very hard
to explain, very hard to bugtrack and totally unexpected. Even if not
everyone uses
On Thu, Feb 15, 2001 at 02:54:37PM -0800, Nathan Wiger wrote:
Edward Peschko wrote:
Right, but what I don't understand is that its two extra characters at the end
of a command line... whats the big deal about typing '-q' on one line in
scripts? Its easy enough to advertise '-q' and put
On Fri, Feb 16, 2001 at 12:32:01AM +0100, [EMAIL PROTECTED] wrote:
On Thu, Feb 15, 2001 at 03:07:51PM -0800, Edward Peschko wrote:
Also, if I have:
@a = (1 .. 10);
$a, $b, $c = @_;
How about 'an implicit parens around a set of statements separated by commas
in any
I guess this was what was meant by 'put your asbestos gloves on'.
On Thu, Feb 15, 2001 at 07:57:31PM -0500, Bryan C. Warnock wrote:
On Thursday 15 February 2001 19:21, Edward Peschko wrote:
How many times have I wanted to put 'use strict' in a module and
forgotten
about
On Tue, Feb 06, 2001 at 12:49:28AM +0100, Bart Lateur wrote:
On Mon, 05 Feb 2001 11:35:59 -0500, Dan Sugalski wrote:
use autoload { Bar = 'http://www.cpan.org/modules/Bar' },
{ Baz = 'ftp://my.local.domain/perl-modules/Baz', VERSION =
2 };
Very good idea indeed!!! Append
69 matches
Mail list logo