On Fri, 4 Feb 2005 04:09:03 +0800, Autrijus Tang [EMAIL PROTECTED]
wrote:
...
Let's take the first one first, because it is what S06 seems to imply,
although it is against Perl5's tie() intuition:
my @carton is Scalar; # assuming this is the default
Now @carton implements the
in perl5 Cuse strict doesn't save us from typo bugs in code like
use strict;
print $OtherPackage::erroneuos_name;
in perl5 Cour $var auotovivifies ${__PACKAGE__ . ::}{var} glob at
compile time, so there's something one could check with Cexists, but to
do it manually is senseless.
And there
On Sat, 4 Dec 2004 22:03:19 -0800, Larry Wall [EMAIL PROTECTED] wrote:
On Sun, Dec 05, 2004 at 02:15:51AM +0300, Alexey Trofimenko wrote:
: oh! that it. I've found example which could make it clear to me
:
: sub test {
: return sub {
: for 1..3 {
:state $var = 1;
:print $var
On Mon, 06 Dec 2004 12:22:22 GMT, Smylers [EMAIL PROTECTED] wrote:
David Green writes:
I guess we could always use prepend/append, pull/pop.
No! Cpush and Cpop are a well-defined pair, not just in Perl, for
dealing with stacks; we should keep those as they are. (And no
synonyms, before somebody
On Fri, 3 Dec 2004 21:25:39 -0800, Larry Wall [EMAIL PROTECTED] wrote:
On Sat, Dec 04, 2004 at 06:31:35AM +0300, Alexey Trofimenko wrote:
:
: for 1..10_000_000 {
: my ($a,$b,$c) = ...
: ...
: }
:
: vs.
:
: for 1..10_000_000 {
: state ($a,$b,$c
hm.. consider that:
perl5:
open $fh, 'file';
$first_line = $fh;
@remaining = $fh;
perl6:
$fh = open 'file';
$first_line = $fh();
@remaining = $fh();
I thought about parallels between arrays and iterators, and realized that
they aren't very close to each other:
iterators are
On Sat, 04 Dec 2004 11:03:03 -0600, Rod Adams [EMAIL PROTECTED] wrote:
Larry Wall wrote:
for =$*IN {...}
for =$*ARGS {...}
for =foo.c {...}
for =foo.c foo.h {...}
for =$foo.c $foo.h {...}
for =['foo.c', 'foo.h'] {...}
for =['.myrc', @*ARGS] {...}
for [EMAIL PROTECTED] {...}
On Sat, 04 Dec 2004 11:03:03 -0600, Rod Adams [EMAIL PROTECTED] wrote:
Okay, this rant is more about the \s\s than \s=\s. To me, it is easier
to understand the grouping of line 1 than line 2 below:
if( $a$b $c$d ) {...}
if( $a $b $c $d ) {...}
In line2, my mind has to stop and ask: is that
On Sat, 4 Dec 2004 11:33:10 -0800, Larry Wall [EMAIL PROTECTED] wrote:
On Sat, Dec 04, 2004 at 08:03:45PM +0300, Alexey Trofimenko wrote:
: P.S.
: btw, what about
:
: my @rray;
: # i'm starting to like that sigil is a part of name idea :)
: for 1..10 {
: {
:push @rray, \( state
my $var=foo;
{
temp $var;
say $var;
}
would it be undef or foo? if the former, how could I make $var to
contain a copy of original content?
using analogy with my $x = $x, that's not going to work..
temp $var = $OUTER::var?
OTOH,
my @a = ... # something not lazy with 10_000_000
for 1..10_000_000 {
my ($a,$b,$c) = ...
...
}
vs.
for 1..10_000_000 {
state ($a,$b,$c) = ...
...
}
latter looks like it would run faster, because no reallocation envolved
here.
I've read an advice somewhat like that in Ruby docs, tried it on perl5,
and it really
On Tue, 30 Nov 2004 10:43:10 +0100, Juerd [EMAIL PROTECTED] wrote:
Alexey Trofimenko skribis 2004-11-30 9:09 (+0300):
delimiters should have corresponding closing character, so it should be
something like
Please, stop seeing ` as a circumfix operator in this context. What you
do is like saying
Matthew Walton wrote:
James Mastros wrote:
Larry Wall wrote:
On Fri, Nov 26, 2004 at 07:32:58AM +0300, Alexey Trofimenko wrote:
: ah, I forget, how could I do qx'echo $VAR' in Perl6? something like
: qx:noparse 'echo $VAR' ?
I think we need two more adverbs that add the special features of qx
On Sat, 27 Nov 2004 11:36:14 +0100, James Mastros [EMAIL PROTECTED]
wrote:
Larry Wall wrote:
Likewise a qw/a b/ is short for
q:w/a b/
qw:q/a b/
$fromvar = 'foo bar';
qw:qq/a something with spaces b $fromvar/
# ?? -- slightly OT, but is that a, 'something', with,
P.P.P.S. If answer on my why? would be just because! I would take it
silently.
yes, answer was as I predicted above. I promised..
..but:
As far as I understood, arrays and hashes, and references them are much
more similar in Perl6 than it was in Perl5.
F.e. we have @a and $a = [EMAIL
On Fri, 26 Nov 2004 09:33:49 -0800, Larry Wall [EMAIL PROTECTED] wrote:
On Fri, Nov 26, 2004 at 07:32:58AM +0300, Alexey Trofimenko wrote:
: I notice that in Perl6 thoose funny and could be much more common
: than other paired brackets. And some people likes how they look, but
: nobody likes
On Thu, 25 Nov 2004 13:45:51 -0800, Larry Wall [EMAIL PROTECTED] wrote:
...
Hmm, I would say that is short for qq//, not qq. Quote characters
lose their identity when used with generalized quotes. (I realize this
is not always true with Perl 5, but that can be construed as a mistake.)
So is
As far as I understood, arrays and hashes, and references them are much
more similar in Perl6 than it was in Perl5.
F.e. we have @a and $a = [EMAIL PROTECTED];
the same:
push @a,1,2,3 push $a, 1,2,3
$b = @a $b = $a
(?) say @a[] say $a[]
(?) myfunc( [EMAIL PROTECTED])
On Fri, 20 Aug 2004 09:21:02 +0100, Matthew Walton
[EMAIL PROTECTED] wrote:
On 19 Aug 2004, at 18:04, Luke Palmer wrote:
[...]
my $num = $param == 0 ?? 0 : rand $param;
my $num = $param == 0 ?? 0 :: rand $param;
surely?
a little off theme.. I wanna ask, could be there in perl6 any
On Wed, 21 Jul 2004 10:21:58 -0700 (PDT), Austin Hastings
[EMAIL PROTECTED] wrote:
--- Larry Wall [EMAIL PROTECTED] wrote:
If {...} supplies list context by default, most
intepolations are either the same length or shorter:
$($foo) {$foo}
@(@foo) [EMAIL PROTECTED]
$(@foo)
On Tue, 20 Jul 2004 19:15:49 +0200, Juerd [EMAIL PROTECTED] wrote:
The Perl 6 Summarizer skribis 2004-07-20 14:46 (+0100):
Another subthread discussed interpolation in strings. Larry'schanged
his mind so that $file.ext is now interpreted as
$object.method. You
need to do ${file}.ext
On Tue, 20 Jul 2004 16:06:40 -0700, Larry Wall [EMAIL PROTECTED] wrote:
Actually, I've been rethinking this whole mess since last week, and
am seriously considering cranking up the Ruby-o-meter here just a tad.
At the moment I'm inclined to say that the *only* interpolators in
double quotes are:
On Fri, 9 Jul 2004 20:14:32 -0400, Joe Gottman [EMAIL PROTECTED]
wrote:
-Original Message-
From: Larry Wall [mailto:[EMAIL PROTECTED]
Sent: Friday, July 09, 2004 2:33 PM
To: [EMAIL PROTECTED]
Subject: Re: if not C, then what?
On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings
On Fri, 9 Jul 2004 13:19:46 -0700 (PDT), Austin Hastings
[EMAIL PROTECTED] wrote:
--- Larry Wall [EMAIL PROTECTED] wrote:
If there reasonably can be block modifiers, I will unreasonably
declare that there can't be. You can always say:
do { print; next; } if|when /stgh/;
(It's still the case
On Fri, 9 Jul 2004 11:13:29 -0700, Larry Wall [EMAIL PROTECTED] wrote:
On Fri, Jul 09, 2004 at 10:39:56AM +0200, Michele Dondi wrote:
: On Thu, 1 Jul 2004, Alexey Trofimenko wrote:
:
: if we really about to lose C-style comma, would we have something new
: instead?
:
: A late thought, but since
On Fri, 9 Jul 2004 18:25:40 -0700, Larry Wall [EMAIL PROTECTED] wrote:
On Sat, Jul 10, 2004 at 05:12:54AM +0400, Alexey Trofimenko wrote:
: perl is filled with functions which do different things in different
: contexts. It seems that in perl6 with plenty of new contexts, it will
: be even more
On Fri, 9 Jul 2004 18:00:44 -0700, Larry Wall [EMAIL PROTECTED] wrote:
On Sun, Jun 20, 2004 at 03:41:41AM +0400, Alexey Trofimenko wrote:
: There was some talks about hash keys autoquoting and barewords.. later
are
: gone and former is disambigued by forcing to write %hash{'key'} or
: %hashkey
On Thu, 1 Jul 2004 16:14:37 -0700 (PDT), Jonathan Lang
[EMAIL PROTECTED] wrote:
Actually, the whole purpose of the C-style comma is to allow you to place
multiple expressions in a place that's only designed to take one, such as
the various divisions within a loop control set (loop ($i = 0, $j =
consider this:
say for map {...} grep {...} map {...} 1..1_000_000
as far as I can imagine, in perl5 it does:
1)flatten 1..1_000_000 into anonimous array; (maybe in this particular
case it is optimized in perl5, like it done in Cforeach.. I don't know.)
2)map trough it elements and store
On Wed, 30 Jun 2004 19:41:24 -0600, Luke Palmer [EMAIL PROTECTED] wrote:
Alexey Trofimenko writes:
if we really about to lose C-style comma, would we have something new
instead?
new C,,( as I've been told here by wise ones), doesn't guarantee order
in which its operands will be evaluated, and even
if we really about to lose C-style comma, would we have something new
instead?
new C,,( as I've been told here by wise ones), doesn't guarantee order
in which its operands will be evaluated, and even doesn't guarantee that
they won't be optimised away before evaluating, if all expression is in
On Tue, 29 Jun 2004 10:52:31 -0400, Jonadab The Unsightly One
[EMAIL PROTECTED] wrote:
People who think in terms of statements often get mixed up when they
put complex expressions in void context, expecting them to be treated
as statements. print(2+3)*7; is another example. Perl doesn't have
On Thu, 24 Jun 2004 10:55:26 -0700, Larry Wall [EMAIL PROTECTED] wrote:
Well, any operator or function that knows how to call a closure can
function as a short-circuit operator. The built-in short-circuit
operators are a bit special insofar as they're a kind of macro that
treats the right side
AFAIR, I've seen in some Apocalypse that lexical scope boundaries will be
the same as boundaries of block, in which lexical variable was defined.
so, my question is, what the scope of variables, defined in Cif and
Cloop conditions?
in perl5:
my $a=first\n;
if (my $a=second\n) {print $a}
On Sun, 20 Jun 2004 18:37:03 -0700 (PDT), Goplat [EMAIL PROTECTED]
wrote:
--- Alexey Trofimenko [EMAIL PROTECTED] wrote:
oh my.. it seems to me, that Perl6 starts new age of ASCII-graphics.
(not
ASCII, really.. maybe Uni-graphics?)..
but now i have this issue: I'm coding on Windows, there's
There was some talks about hash keys autoquoting and barewords.. later are
gone and former is disambigued by forcing to write %hash{'key'} or
%hashkey ( as opposite to %hash{key} which is now %hash{key()} )..
right?..
that's almost ok to me, if there's any hope that will have a _standard_
what do you think about adding Cdiv operator, akin %, to perl6 core?
I mean, as$a % $b
really does int($a) % int($b)
and returns modulous,
so $a div $b
really does int( int($a) / int($b) )
and returns integer division.
but with native
oh my.. it seems to me, that Perl6 starts new age of ASCII-graphics. (not
ASCII, really.. maybe Uni-graphics?)..
but now i have this issue: I'm coding on Windows, there's already two
unicode compliant monospace fonts: Lucida Console and Courier New. And I
do not like both of them, (f.e. in
, if need arise.
--
Excuse my French..
Alexey Trofimenko
On Sun, 20 Jun 2004 15:57:48 +0100, Jonathan Worthington
[EMAIL PROTECTED] wrote:
Alexey Trofimenko [EMAIL PROTECTED] wrote:
what do you think about adding Cdiv operator, akin %, to perl6 core?
I mean, as$a % $b
really does int($a) % int($b)
and returns
40 matches
Mail list logo