John McNamara [EMAIL PROTECTED] writes:
As far as I can see the current consensus is as follows:
1. Implicit variable: nice but not really worth the trouble.
2. Explicit variable between foreach and the array: might conflict
with other proposals.
3. Explicit counter
Jarkko Hietaniemi [EMAIL PROTECTED] writes:
Access details like this are largely independent of the logical
manipulations made with pathnames. I can claim that there is
"/foo/bar/zap.txt" and I can say that file directory part is
"/foo/bar", but whether such an entity really exists, is a
If the C? modifier is used for a particular parameter, that parameter
is lazily evaluated. This means that it is only evaluated when the
corresponding named parameter (see below) -- or the corresponding element
of @_ -- is accessed in some way. Passing the parameter to another
subroutine or
[EMAIL PROTECTED] (Randal L. Schwartz) writes:
How do you indicate to the compiler at the time of compiling:
lvsub() = FOO
that FOO should be evaluated in list context? Or scalar context?
In all cases but one the context is scalar anyway. The only case when
the context could be
[Quoting David L. Nicol, on August 21 2000, 23:06, in "Re: RFC 132 (v1) sub"]
Looks like a case for automatic dereferencing!
Which Perl has always stated it would _never_ do.
Well, this could be the time of changes.
-- Johan
Dan Sugalski [EMAIL PROTECTED] writes:
continuations, generators and co-routines.
Could someone point me to a reference on these, please? My CS text
collection's rather spotty and doesn't cover this stuff.
The Icon Programming Language
Ralph E. Griswold, Madge T. Griswold
Graham Barr [EMAIL PROTECTED] writes:
Well theres a difference there when you look at the op tree. That is a call
to a sub, whereas otherwise it is a op.
Isn't that an internals issue?
-- Johan
Larry Wall [EMAIL PROTECTED] writes:
Theoretically, we'd like to make subs run as fast as ops.
I'd say that the distinction between subs and ops should be dropped
completely. Ops can be used as subs, subs as ops. The only
distinction in the way either is used.
We may need a better way to
Damian Conway [EMAIL PROTECTED] writes:
Of course, that example might in itself be sufficient reason
to completely redesign the regex syntax!
Perl uses the term "pattern matching" since day one. This opens the
possibility of extending pattern matching with other, not neccessarily
regex based,
Dan Sugalski [EMAIL PROTECTED] writes:
More importantly, the more primitives that perl provides, the wilder
and more useful things people will be able to do.
Not quite. Its the functions that are provided that matter, not
whether they are primitives or not[1]. A small set of primitives with a
John Porter [EMAIL PROTECTED] writes:
But a standardized macro facility would be nice. Although --
wouldn't it have to parse perl? Or else have a wholly distinct
grammar?
Several macro processors exist and are easily available. I do not see
the need to duplicate (parts of) their
Tom Christiansen [EMAIL PROTECTED] writes:
While a function style or quoted form comment might seem clever,
and even Perlish due to its syntax, it doesn't help the author of
the code/comments readily distinguish them. What good are comments
if you can't find them when you need them?
"Kyle R . Burton" [EMAIL PROTECTED] writes:
use self = 'self';
use self = 'this';
Of course, if you _really_ want to avoid religious wars, you would
need a non-selfish pragma name in the first place.
-- Johan
Russ Allbery [EMAIL PROTECTED] writes:
However, cpp has the significant advantage that its active syntax is
designed to be embedded in a programming language and are Perl comments.
This is *not* true of m4, which would be horribly, horribly confused by a
Perl script.
I fail to see this
[The original subject was: Sublist autosubscribe, but that was
rejected by the mailing list manager.]
I would plea for autosubscribing perl6-language list members to every
sublist that gets spawned. The reason is continuity.
Currently, when a new sublist is announced, it takes some time to get
John Porter [EMAIL PROTECTED] writes:
I think this should mean what it means in Icon, namely, that
$x $y evaluates to false if $x = $y, and evaluates to
"$y (but true)" if $x $y.
Icon also allows $x == ( 1 | 2 ), meaning ($x == 1) || ($x == 2).
-- Johan
The solution is simple: return hashes instead of lists.
Hash ref, I may hope?
localtime-{year}
-- Johan
Peter Scott [EMAIL PROTECTED] writes:
@a = @b || @c should 'work'. In P5 it puts @b in scalar context and
thus evaluates as the number of elements in @b if there are any.
Define 'work'.
if (@b) { @a = @b } else { @a = @c }
$a[$_] = $b[$_] || $c[$_] foreach (0..max(@a,@b,@c))
Perl6 RFC Librarian [EMAIL PROTECTED] writes:
I like this proposal, although I do have a lot of remarks.
Consider them constructive!
The C$time specifier can be followed by a C$timezone argument,
s/$time/$format/
which returns the date relative to that timezone. By default, the time
is
Perl6 RFC Librarian [EMAIL PROTECTED] writes:
There are times when one may need (or desire) to change the shell used
for interpretation, as well as force shell interpretation, regardless
of optimization, for consitency's sake.
print `fancysh -c 'your uninterpreted and unoptiomized shell
On Sun, Aug 06, 2000 at 01:10:23PM -0700, Nathan Wiger wrote:
So you see why we need a persistent format() function. However, I think
your real issue is a one-time call that just changes the format
temporarily:
print $date-strftime('%H:%M'); # print the time
print "$date";
Jason Elbaum [EMAIL PROTECTED] writes:
Perl regexps support the following features, though they're a bit
obscure to my tastes...
(from perlre:)
\l lowercase next char (think vi)
Actually, this has little to do with regexes, it a string issue.
...but Perl doesn't offer a
On Thu, Aug 10, 2000 at 07:04:50AM -0400, Ilya Zakharevich wrote:
$quoted = qr/(['"]).*?\2/;
@a = $str =~ /($quoted)/gp;
Here //p is the "postponed" flag. Put (?p{$quoted}) instead of
$quoted to get this semantic now (or some other char).
$quoted = qr/(['"]).*?\1/;
@a = $str =~
On Thu, Aug 10, 2000 at 04:42:56AM -0400, Ilya Zakharevich wrote:
These are just user-defined ops. You should be able to overwrite the
normal ops, as in:
sub match_all {
use re_ops 'overload_usual_ops';
"(" . group(1, [ 'a' .. 'z' ] * [3,5] ) . ")"
}
Will this go?
I think
On Wed, Aug 09, 2000 at 04:20:32PM -0400, Ilya Zakharevich wrote:
It is not clear though how to design concise-but-no-line-noise
notation for \w etc. But qr/ \( ( [a-z]{3,5} ) \) / may become
"(" (.) group(1, [[ 'a' .. 'z' ]] (*) [3,5] ) (.) ")"
here (.) is the ASCII substitution for
"Stephen P. Potter" [EMAIL PROTECTED] writes:
* Socket functions (such as Caccept, Cbind, etc) should be moved from
the core to modules/libraries.
* Math functions (such as Cabs, Catan2, Ccos, etc) should be moved
from the core to modules/libraries.
* IPC functions (such as Cmsgctl,
Damian Conway [EMAIL PROTECTED] writes:
Okay, what if Cwith simply aliased its hash argument to a
localized %_ (remember that one?):
with (%ws) {
print $_{height}; # prints $ws{height}
print $height; # perl5 visibility rules
Nathan Torkington [EMAIL PROTECTED] writes:
Read my lips: GOOD THING.
Do we have an RFC yet that proposes Perl to be easier parsable?
Damian?
-- Johan
Peter Scott [EMAIL PROTECTED] writes:
I think you can't just leave it at that; the implication of this
requirement is that there should be a prototype for print's optional
filehandle.
I count on Larry's promise to do something about the indirect object
stuff.
-- Johan
qx, redo,
return, s, scalar, shift, sort, splice, split, study, sub, tie,
tied, tr, undef, unless, unshift, untie, until, use, while, and y.
Johan Vromans added:
Hmm. Quite a few of these should no longer be special:
chop, defined, delete, dump, each, exists, glob, grep, keys, map,
pop
Tom Christiansen [EMAIL PROTECTED] writes:
keys %HASH = LIST;
is really
@HASH{ LIST } = ();
Hmm, is it?
I'd expect the first form to set the keys, meaning that the hash will
have _only_ the indicated keys.
The second form will only add the keys, making sure they exist, and
not
Perl6 RFC Librarian [EMAIL PROTECTED] writes:
The ability to easily retrieve and edit your N most recent commands to the
debugger (much like a bash_history).
and
A better default pager. The default pager should assume a 24x80 term
window ...
To me, these clearly indicates that the
Philip Newton [EMAIL PROTECTED] writes:
so fewer "cluttering"
parentheses are needed to make things readable while still being correct.
Since when do parentheses make things less readable?
What is your definition of readable?
-- Johan
Philip Newton [EMAIL PROTECTED] writes:
so fewer "cluttering"
parentheses are needed to make things readable while still being correct.
By the same reasoning, you can reduce the use of curlies by using
indentation to define block structure.
-- Johan
[Quoting Dave Storrs, on September 26 2000, 11:47, in "Re: RFC 292 (v1) Ext"]
I'm confused...are you suggesting that the debugger should no
longer be integrated into perl?
Absolutely not!
What I wanted to indicate is that the input and output handling of the
debugger, currently line
Jonathan Scott Duff [EMAIL PROTECTED] writes:
I'll just add my voice to the others. POD is more readable than XML.
Don't forget: more _writable_ as well.
-- Johan
Dan Sugalski [EMAIL PROTECTED] writes:
The module loaded can define the routines as either regular perl
subs or opcode functions (the difference is in calling convention
mainly) [...]
Difference in calling convention at the user level or just internal?
-- Johan
James Mastros [EMAIL PROTECTED] writes:
On Thu, Feb 01, 2001 at 07:36:59PM -0600, David L. Nicol wrote:
And I always hated that about VB and Pascal -- you can assign to the magic
variable, but can't modify it.
That was before the invention of auto-assignment operators. In the
70s, Burroughs
Bart Lateur [EMAIL PROTECTED] writes:
The place where it would be put, would be irrelevant.
sub readit {
POST {
close F;
}
open F, " $f" ...
scalar(F)
}
Would the POST be executed if the open fails? Why? Why
John Porter [EMAIL PROTECTED] writes:
As someone else said before me, Perl should not be changed
Just Because We Can. Aspects which have proven usefulness and
are deeply engrained in the Perl mindset should not be tampered
with just because some recent convert finds them un-Algol-like.
Adam Turoff [EMAIL PROTECTED] writes:
We're all for making easy things easy, but the complexities of
"map {} sort {} map {} @list" has always been befuddling to newbies,
especially when reading the code left-to-right.
I've always thought that the purpose of the Schwartzian transform was
to
Graham Barr [EMAIL PROTECTED] writes:
I have not looked at SelfTest, but I have always done this with
unless (defined wantarray) {
# Self Test
}
This works because whenever a file is use'd, require'd etc. it is
evaluated in a scalar context. The main file is in a void context.
Nice.
[Quoting Michael G Schwern, on May 6 2001, 22:58, in Re: Apo2: \Q ambigui]
Hmmm, maybe you can point out the compose key on my keyboard, I
can't find it. ;)
Pick whatever you find convenient. I use the right control key.
From my .Xmodmap:
! Compose key
keycode 109 = Multi_key
I know
Larry Wall [EMAIL PROTECTED] writes:
That's part of why I named it btw in the first place. The problem with
prop is it's not quite obscure enough.
In the Netherlands, we have a value added tax named BTW. So it's not
unlikely for financial programs to implement a btw property or
method...
--
Dave Storrs [EMAIL PROTECTED] writes:
I discovered today that I had forgotten to put 'use strict' at the top of
one of my modules...it was in the script that _used_ the module, but not
in the module itself. Putting it in instantly caught several annoying
bugs that I'd been trying to track
Nathan Torkington [EMAIL PROTECTED] writes:
Hi, folks. As has probably been obvious to most of you, I've been
really busy with my O'Reilly day job and haven't had time to attend to
Perl 6 and Parrot business. With no prompting, Allison Randal stepped
forward and has been taking on more and
Gregor N. Purdy [EMAIL PROTECTED] writes:
... that I would be perfectly happy to be required to start all my
Perl 6 programs with #!/usr/bin/perl6 instead of
#!/usr/bin/perl,
Ten years ago I was perfectly happy to start all my perl programs with
/usr/bin/perl5. Today, I would be quite unhappy
Larry Wall [EMAIL PROTECTED] writes:
: my $d=a;
: print --$d--{my $d = b }--$d--\n;
Yes, that is correct.
I'm afraid things like this will keep many popular editors and IDEs
from implementing perl6 support...
-- Johan
Hi Juerd,
[Quoting Juerd, on February 5 2005, 16:57, in CLI signature?]
signature (
Rule $pattern,
bool +$help:short('h'),
Int +$verbose :short('v'),
Str [EMAIL PROTECTED] = -
);
The actual parsing still has to happen 'somewhere else', exactly
Aaron Sherman [EMAIL PROTECTED] writes:
http://www.cs.tut.fi/~jkorpela/emacs-iso.html
Coincidentally, last week the emacs developers decided to declare
iso-accents mode (dated 1998) obsolete. Emacs 21 (out for several
years now) has native support for language encodings.
-- Johan
Chip Salzenberg [EMAIL PROTECTED] writes:
According to Michael G Schwern:
In the same way that we have open() not fopen, fdopen, freopen... we
can choose the safest and most sensible technique for determining
the cwd and use that.
And there is more than one open. Perl does have
Paul Johnson [EMAIL PROTECTED] writes:
I think I understand the implementation details leading to each
behaviour, but rather than saying which was right, I think I'd be
quite happy to see Perl6 copy (the ideas behind) C's rules regarding
sequence points and undefined behaviour. I'm not so
52 matches
Mail list logo