mutating operators.
Please excuse me if this or something like this has already been taken
care of - I've searched for messages about it, but haven't found
anything.
Regards,
Juerd
that
zips.
Regards,
Juerd
that.
Has this Csay already been decided?
Juerd
programmers; why
should programmers of languages that aren't even Perl be treated
differently?
Juerd
?
What is a list?
Regards,
Juerd
?
use 5;
no 6;
It could be a special case: not throwing a fatal exception, but instead
changing the grammar to a Perl 5 compatible one.
Juerd
key to readpipe if you can use
it for hashes instead.
I think %hash`key makes sense. But I'd like to find out if more people
like this idea.
Juerd
can be used.
Juerd
with that. Even beginners.
Juerd
John Williams skribis 2004-04-14 13:36 (-0600):
On Wed, 14 Apr 2004, Juerd wrote:
I propose to use ` as a simple hash subscriptor, as an alternative to {}
and . It would only be useable for \w+ keys or perhaps -?\w+.
As with methods, a simple atomic (term exists only in perlreftut,
afaix
to use the easier syntax when my
hash does in fact have a key 'keys'.
Juerd
coder will be surprised when seeing Perl 6 in
action. And that is a good thing.
Juerd
Randal L. Schwartz skribis 2004-04-14 13:56 (-0700):
Juerd == Juerd [EMAIL PROTECTED] writes:
Juerd readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
Juerd can be found. Most are in Debian's modules.
That's because they aren't particularly interesting in modules
of whether it is possible. I know it is possible. Either by
changing the grammar or perhaps by adding an operator/macro.
And as explained in multiple messages already, implementing this using
the . has too large drawbacks.
Juerd
of the entire 'problem' that this thread
addresses.
No, it only was an extra motivation.
Juerd
:
$(...)
It's just one keyword and a set of quotes more: $( readpipe pwd )
Juerd
Aaron Sherman skribis 2004-04-15 14:29 (-0400):
On Wed, 2004-04-14 at 16:56, Juerd wrote:
How many of those backticks
Note, those weren't backticks, those were programs. There were 123
PROGRAMS that used backticks or equivalent syntax.
I said backticks, and I meant backticks. I'm not sure
methods are added.
Option two: keys get precedence
Would have to delay everything until runtime.
No, if we want a simple and lean operator for this, it must not be one
that in the same context also has another function.
Juerd
as that in normal use always
follows whitespace or at least interpunction.
On the grounds that personally I hate the backtick :-)
...
Juerd
glyph. (And because of its location on most keyboards.)
Juerd
Austin Hastings skribis 2004-04-15 18:38 (-0400):
$foo % bar
% is 4 keys: space, shift, 5, space. Too much, IMHO.
Typability and readability are both VERY important.
Juerd
no suggestion for this operator's name, although if you wanted to rip
out the current unary backticks, it could be a candidate:
%hash{`key}.
Same as 3, but with another character.
Juerd
Austin Hastings skribis 2004-04-15 19:37 (-0400):
I'm sure that if Juerd or someone were to write a PublicHash class,
they would cleverly reverse the access so that some collision-unlikely
path would get the methods.
I'm sure I have explained several times already why I think using
Sean O'Rourke skribis 2004-04-15 8:55 (-0700):
[EMAIL PROTECTED] (Juerd) writes:
I think it has to go because `pwd`, `hostname`, `wget -O - $url`
should not be easier than the purer Perl equivalents and because
``'s interpolation does more harm than good.
I have to disagree with you here
we really need is one way with a
good enough syntax to meet all of our needs.
Or three syntaxes of which you can choose, depending on what you mean
and like to write.
I thought Perl minded people were used to TIMTOWTDI, but I'm proven
wrong once again.
Juerd
David Wheeler skribis 2004-04-16 9:58 (-0700):
for @thingies, qw(blue yellow) xx Inf - $thingy, $class {
print qq[tr class=$classtd$thingy/td/tr\n;
}
I think that $class would be Cundef after the second record in
@thingies, unfortunately.
Even with the xx Inf? Why?
Juerd
`bar.
Juerd
this?
for @thingies, qw(blue yellow) xx Inf - $thingy, $class {
print qq[tr class=$classtd$thingy/td/tr\n;
}
Juerd
Larry Wall skribis 2004-04-16 11:50 (-0700):
On Fri, Apr 16, 2004 at 07:12:44PM +0200, Juerd wrote:
: Except for the shocking number of closed-minded people on this list.
You seem to be one of them. From my point of view, you've had your
ego plastered all over this proposal from the start
}
$foo or print;
And there are many more examples in Perl. I personally like having two
ways to write exactly the same thing. If the two ways are very
different and one is because of that much easier than the other, I like
having the alternative even more.
Juerd
, as %hash`key would then just be %hash{`key}, but without the
curlies. And :fooa and :foo`a would be :foo(a) and :foo(`a)
without the parens.
But I also like to think that // is m// with implicit m, instead of the
other way around.
Juerd
John Williams skribis 2004-04-16 18:32 (-0600):
You didn't answer his question, which is less complicated?
Wasn't that a rhetociral question?
Juerd
-minded.
Instead of asking me to stop interpreting disagreement as
close-mindedness, ask yourself to stop interpreting closed-minded as
disagreeing.
There is no 'between the lines' in my messages. Stop looking for it.
Juerd
Abhijit A. Mahabal skribis 2004-04-19 11:00 (-0500):
when Dog: ...
when Array: ...
Shouldn't that be:
when Dog { ... }
when Array { ... }
Or is there some .when that I have not yet heard of?
Juerd
not?
Juerd
by something extremely important.
for /home/angel - $file {
That would mean giving up // for regexes (i.e. making the m mandatory).
And I think having quotes for strings other than very simple ones
(anything containing a / is not a simple string imho) is good for
readability.
Juerd
is a hash slice.
I don't understand. Could you give some examples? Is this in the context
of bare /path/to/foo, even?
Juerd
except \0 and /).
Juerd
that it's special syntax, which makes it
recognisable. Still, your idea is doable.
Juerd
this be written as:
method buffersize {
+$.buffer.bytes
} will store {
my $sqrt = $^v.sqrt;
...
}
Or does will store BLOCK really have to go before the main block?
Juerd
for
important things in the core language.
On the sixth hand, by that argument, since .dispatcher is aiming at
a Class, it should be an uppercase C. :-)
Doesn't unicode have that, then? :)
Juerd
then? Or maybe
just my $spot := Dog?
This is, as pointed out, just sugar for Dog::new and Dog::list_breeds, but
it brings up the spectre of undef invocants:
:: or .? I'm confused.
$c-foo-bar-baz; # If foo or bar fails, what happens?
- or .? Even more confused now.
Juerd
like this better:
for {
s:g/\w+/WORD/;
print;
}
But I think I still want to have some non-mutating version of s/// that
returns the modified string, so that you can just write something like
print s:gx/\w+/WORD/ for ;
Juerd
Juerd skribis 2004-05-12 20:15 (+0200):
But I think I still want to have some non-mutating version of s/// that
returns the modified string, so that you can just write something like
print s:gx/\w+/WORD/ for ;
Actually, can't we just use the . for s///?
You'd then use $foo.s/// to get
Larry Wall skribis 2004-05-12 11:39 (-0700):
On Wed, May 12, 2004 at 08:15:36PM +0200, Juerd wrote:
: A2 says $*STDIN and $*STDOUT. Has this been changed?
It's $*IN and $*OUT.
I like this change!
: I'd hate to have to specify stdin and stdout in throw away scripts.
Just because there's
= new IO::Socket::INET :LocalPort 20010 :Listen 5;
But unfortunately, parens are not optional with :pairs.
Juerd
[1] Because I'd use something like that in other contexts. I expect that
I will not use indirect object syntax even in Perl 6 and will in reality
write:
my $n = IO::Socket::INET.new
Aaron Sherman skribis 2004-05-12 17:30 (-0400):
I like C... I like it a LOT. In fact, I'm partial to the idea that
it should be usable anywhere
I agree. It'd make even more of my pseudo code (#perlhelp and
perlmonks.org) valid syntax :).
Juerd
.
#!/usr/bin/perl =
#!/usr/bin/perl =6
Feels like something is missing. Like a LHS.
I like - for command line switches.
Juerd
them as positional ones? Don't
document the feature and you'll effectively have required named
parameters.
Or am I missing something?
the entire P6 grammar
Are parts already available in Perl 6 rule syntax?
Juerd
of attractive to me, because it's a bit like
lc $a eq lc $b
Juerd
. But
again, just having a method for that is probably a better idea (if only
because with the hash, the original order is lost).
Juerd
{ my %foo; $_++ for @[EMAIL PROTECTED]; } }'
Rate a b
a 51121/s -- -9%
b 56220/s 10% --
Juerd
,
'9' = 2,
'12' = 1,
'14' = 1,
'15' = 1,
'8' = 2,
'4' = 2,
'10' = 2,
'5' = 2
};
This is perl, v5.8.4 built for i386-linux-thread-multi
Juerd
can afford to download it each
time you start it: http://startputty.com/ - if you trust them.
Juerd
Juerd
:
*foo.wrap sub (*foo.signature, +$new_thingy) {
# or whatever syntax
...
call;
}
Or is the original signature not usable, and does one need to consult
the manual/source and copy it?
Juerd
-ish: a keyword
that always returns the same value).
Juerd
one?
Please don't say that picking a random sequence of at least 5 different
unicode dingbats will be the best way to be sure :)
Juerd
something that does .isa('Str') ? .chars : .isa('str') ? .bytes
: .isa('Hash') ? .keys : .isa('Array') ? .elements : 1.
Synopsis 6 describes 'str' as 'native string'. Is my assumption that
such a string is one that doesn't have multi-byte characters correct?
Juerd
understand it correctly. It's been a while
since I had a feeling of understanding Perl 6 :)
Is this complexity really needed?
Juerd
Austin Hastings skribis 2004-06-24 15:54 (-0700):
I'd say yeah, it is. 0-but-true is pretty nice to have. (Finally the
system calls can return something other than -1.)
That we already have. 0 but true. (perldoc -f fcntl)
It's 1 but false that's really special :)
Juerd
statement modifier, as if is just a fancy and (or
vice versa):
$a and $b and print $a + $b for 1..3;
Juerd
as:
say .{foo} for @@foo; # Looks strange. Is this correct?
Juerd
Dave Whipp skribis 2004-06-28 9:55 (-0700):
substr($string, 2 bytes, 4 bytes) = $substitute;
substr($string, 2, 4 :bytes)
substr($string, 2 but graphemes, 4 but bytes);
I think but even makes sense, if substr defaults to something.
Juerd
Mark A. Biggar skribis 2004-06-29 9:07 (-0700):
Besides we already have MTOWTDI with local() and hypotheticals.
I thought temp replaced local. If not, how do they differ? (is temp for
lexicals, local for globals (and why would that make sense?))
Juerd
hope, has a default
itself. (I like default defaults...)
Juerd
Scott Bronson skribis 2004-07-01 12:42 (-0700):
But C; requires a surrounding do block, as you noted.
Then invent a horizontal ; operator that does not :)
pray_to $_ then sacrifice $virgin for @evil_gods
pray_to $_ ., then sacrifice $virgin for @evil_gods;
Juerd
;.
See: .,
If you turn your head 90 degrees counter clockwise, you see the
horizontal semicolon and even a smiley face :)
Juerd
Scott Bronson skribis 2004-07-01 14:11 (-0700):
On Thu, 2004-07-01 at 13:35, Juerd wrote:
pray_to $_ ., then sacrifice $virgin for @evil_gods;
I meant it without then, but apparently forgot to remove it.
pray to $_ ., sacrifice $virgin for @evil_gods;
Ha! I love it. Good source code
programs probably only be
used through infix:Y or infix:z, which I will define myself if
necessary. (zip() is not infix and thus not an *equivalent*
alternative.)
Juerd
subscripting.
Accessing strings as if they are arrays was discussed recently. Please
read the archives. (groups.google.com is my favourite interface)
Juerd
abusing things that normally mean
something else.
Juerd
mode and filename in one argument.
Ever since I read about the new :pairs, I thought that would imply :rw
instead of .
Juerd
Luke Palmer skribis 2004-07-13 10:28 (-0600):
for outer(1..3, 4..6) - $x, $y {
say $x,$y;
}
1,4
1,5
1,6
2,4
2,5
2,6
3,4
3,5
3,6
So outer is somewhat like {} in shell globs?
perl -le'print for glob {1,2,3},{4,5,6}'
Juerd
with :append and :clobber.
Juerd
;
}
No, translations don't work in programming.
3. They play nice with possible extensions 'open :utf8, $file;
But
open :w('utf8'), $file;
it would even make using different layers for in and output easy:
open :r('iso-8859-15') :w('utf8'), $file;
although you shouldn't want that :)
Juerd
$ ls -R *
|:
usr
|/usr:
bin
|/usr/bin:
foo
Juerd
If an array element knows that it is an array element, this can be
useful:
for @foo { push @bar, .splice if EXPR }
Juerd
Dave Mitchell skribis 2004-07-17 18:24 (+0100):
On Sat, Jul 17, 2004 at 06:53:28PM +0200, Juerd wrote:
If an array element knows that it is an array element, this can be
useful:
for @foo { push @bar, .splice if EXPR }
What happens if the element is an element of more than one array
Do we have a :) operator yet?
Juerd
«bar». James Mastros pointed out that . is
rather ambiguous in a literal string; sometimes a full stop is just a
full stop.
My preference is $file\.ext. Clear, light and ascii.
Juerd
], but not @foo is not simple.
In fact, with {}, is anything more than $foo and {} needed? Is $foo
needed, even (I'd like to have it, because I dislike brackets
everywhere)?
Juerd
string, the rest of that string becomes bizarrely unreadable.
Juerd
operators in this terminal and have it dwym.)
Juerd
workforme.
Juerd
for zip(@foos, @bars, @xyzzies) - $foo is rw, $bar is rw, $xyzzy is rw { ... }
for %quux.kv - $key is rw, $value is rw { ... }
Comments, anyone?
Juerd
tdttCodelt;$gt;/tt/td
tdttscalar sub truth/tt/td
tdttmatch if $x($_)/tt/td
/tr
!-- ... --
/table
I haven't thought of a solution for non-verbatim cells yet. I'm not
convinced that they are needed.
Juerd
being the other's specialized form.
It's really sick
Sick would be if - were introduced to make the variable write-only ;)
W R
@foos - $foo
@foos - $foo
@foos - $foo
It would be consistent, though...
Juerd
something must be added to tell it *when* to load modules:
at runtime or during compilation.
It shouldn't be hard to implement this module yourself, should it not go
into the standard distribution.
Juerd
also please me. Especially if we can get
{b:foo} instead of Bfoo.
But I haven't really given this much thought. That's why I haven't
proposed it yet. But since POD is a hot topic now anyway, let's see what
everyone thinks about this.
Juerd
;
.mouth.close $strength;
}
}
Juerd
Thalhammer, Jeffrey BGI SF skribis 2004-08-23 12:03 (-0700):
unsubscribe
It doesn't work that way. If I'm not mistaken, unsubscribing is done by
sending mail to [EMAIL PROTECTED].
Also, you might want to consider using a sane e-mail program and some
training in quoting :)
Juerd
modifiers; it's not just linguistically pleasing).
Juerd
be an alternative interface for the array, where 0 is always
the first element.
The real index is then
( $abs_index = 0 ?? @array.first :: @array.last + 1 ) + $abs_index
Juerd
John Williams skribis 2004-09-03 23:06 (-0600):
(A and Z)
I think I'd prefer alpha and omega.
Why not use Cyrillic or Korean or the secret code alphabet we used in
school?
I don't like using letters for array indexes, but if they're used,
please keep it ascii :)
Juerd
that changes an integer into an
ordinal?
4 :th
$foo :th
Obviously, the : should be optional for literal integers:
4th
3th
Juerd
to look at the element whose index is one higher
than the first index, we can say 1.st + 1.
I read this three times, but don't get it. Can you please explain what
the difference is between the element after the 1st and the element
whoso index is one higher than the 1st's?
Juerd
, it seems a little confusing.
Oh my, sparse arrays. Isn't that what we have hashes for?
Juerd
Aaron Sherman skribis 2004-09-14 14:02 (-0400):
qr{(fo*) ({$1 ne 'foo'})}
What is the second set of parens for? Will the following suffice?
rx/ (fo*) { $1 ne 'foo' } /
And it is because of the lack of anchors that this won't work as
expected?
rx/ !before foo fo* /
Juerd
of the syntax :)
Juerd
1 - 100 of 653 matches
Mail list logo