Mutating methods

2004-03-10 Thread Juerd
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

z ip

2004-03-21 Thread Juerd
that zips. Regards, Juerd

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-26 Thread Juerd
that. Has this Csay already been decided? Juerd

Re: z ip

2004-03-29 Thread Juerd
programmers; why should programmers of languages that aren't even Perl be treated differently? Juerd

lists and arrays

2004-04-09 Thread Juerd
? What is a list? Regards, Juerd

Re: Compatibility with perl 5

2004-04-13 Thread 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

backticks

2004-04-14 Thread 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

Re: backticks

2004-04-14 Thread Juerd
can be used. Juerd

Re: backticks

2004-04-14 Thread Juerd
with that. Even beginners. Juerd

Re: backticks

2004-04-14 Thread 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

Re: backticks

2004-04-14 Thread Juerd
to use the easier syntax when my hash does in fact have a key 'keys'. Juerd

Re: backticks

2004-04-14 Thread Juerd
coder will be surprised when seeing Perl 6 in action. And that is a good thing. Juerd

Re: backticks

2004-04-14 Thread 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

Re: backticks

2004-04-15 Thread Juerd
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

Re: backticks

2004-04-15 Thread Juerd
of the entire 'problem' that this thread addresses. No, it only was an extra motivation. Juerd

Re: backticks

2004-04-15 Thread Juerd
: $(...) It's just one keyword and a set of quotes more: $( readpipe pwd ) Juerd

Re: backticks

2004-04-15 Thread 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

Re: backticks

2004-04-15 Thread Juerd
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

Re: backticks

2004-04-15 Thread Juerd
as that in normal use always follows whitespace or at least interpunction. On the grounds that personally I hate the backtick :-) ... Juerd

Re: backticks

2004-04-15 Thread Juerd
glyph. (And because of its location on most keyboards.) Juerd

Re: backticks

2004-04-15 Thread 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

Re: backticks

2004-04-16 Thread 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

Re: backticks

2004-04-16 Thread 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

Re: backticks

2004-04-16 Thread Juerd
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

Re: backticks

2004-04-16 Thread Juerd
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

Re: backticks

2004-04-16 Thread 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

Re: backticks

2004-04-16 Thread Juerd
`bar. Juerd

Re: backticks

2004-04-16 Thread Juerd
this? for @thingies, qw(blue yellow) xx Inf - $thingy, $class { print qq[tr class=$classtd$thingy/td/tr\n; } Juerd

Re: backticks

2004-04-16 Thread 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

Re: backticks

2004-04-16 Thread Juerd
} $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

Re: backticks

2004-04-16 Thread 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

Re: backticks

2004-04-17 Thread 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

Re: backticks

2004-04-17 Thread 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

Re: Is Dog|undef a legal type?

2004-04-19 Thread 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

Re: A12: default accessors and encapsulation

2004-04-19 Thread Juerd
not? Juerd

Re: backticks (or slash, maybe)

2004-04-19 Thread 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

Re: backticks (or slash, maybe)

2004-04-19 Thread 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

Re: backticks (or slash, maybe)

2004-04-19 Thread Juerd
except \0 and /). Juerd

Re: backticks

2004-04-20 Thread Juerd
that it's special syntax, which makes it recognisable. Still, your idea is doable. Juerd

Re: A12: default accessors and encapsulation

2004-04-20 Thread 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

Re: A12: a doubt about .meta, .dispatcher and final methods

2004-04-23 Thread 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

Re: A12: Typed undef

2004-04-23 Thread 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

Re: C style conditional statements

2004-05-12 Thread 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

$foo.s/foo/bar/

2004-05-12 Thread 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

Re: C style conditional statements

2004-05-12 Thread Juerd
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

Re: C style conditional statements

2004-05-12 Thread Juerd
= 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

Re: Yadda yadda yadda some more

2004-05-12 Thread Juerd
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

Re: Compatibility with perl 5

2004-04-26 Thread Juerd
. #!/usr/bin/perl = #!/usr/bin/perl =6 Feels like something is missing. Like a LHS. I like - for command line switches. Juerd

Re: Required Named Params and go write your own grammar

2004-05-04 Thread 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

Re: RFC eq and ==

2004-05-17 Thread Juerd
of attractive to me, because it's a bit like lc $a eq lc $b Juerd

Re: idiom for filling a counting hash

2004-05-18 Thread 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

Re: idiom for filling a counting hash

2004-05-18 Thread Juerd
{ my %foo; $_++ for @[EMAIL PROTECTED]; } }' Rate a b a 51121/s -- -9% b 56220/s 10% -- Juerd

Re: idiom for filling a counting hash

2004-05-19 Thread 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

Re: FW: Periodic Table of the Operators

2004-06-08 Thread Juerd
can afford to download it each time you start it: http://startputty.com/ - if you trust them. Juerd

Re: cmd line like switches for functions and operators.

2004-06-22 Thread Juerd
Juerd

Re: cmd line like switches for functions and operators.

2004-06-23 Thread 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

Re: definitions of truth

2004-06-24 Thread Juerd
-ish: a keyword that always returns the same value). Juerd

Re: definitions of truth

2004-06-24 Thread 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

Re: definitions of truth

2004-06-24 Thread 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

Re: definitions of truth

2004-06-24 Thread Juerd
understand it correctly. It's been a while since I had a feeling of understanding Perl 6 :) Is this complexity really needed? Juerd

Re: definitions of truth

2004-06-24 Thread 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

Re: more than one modifier

2004-06-25 Thread Juerd
statement modifier, as if is just a fancy and (or vice versa): $a and $b and print $a + $b for 1..3; Juerd

Re: more than one modifier

2004-06-25 Thread Juerd
as: say .{foo} for @@foo; # Looks strange. Is this correct? Juerd

Re: The .bytes/.codepoints/.graphemes methods

2004-06-28 Thread 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

Re: undo()?

2004-06-29 Thread 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

Re: The .bytes/.codepoints/.graphemes methods

2004-07-01 Thread Juerd
hope, has a default itself. (I like default defaults...) Juerd

Re: if not C, then what?

2004-07-01 Thread 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

Re: if not C, then what?

2004-07-01 Thread Juerd
;. See: ., If you turn your head 90 degrees counter clockwise, you see the horizontal semicolon and even a smiley face :) Juerd

Re: if not C, then what?

2004-07-01 Thread 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

Re: if not C, then what?

2004-07-03 Thread Juerd
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

Re: scalar subscripting

2004-07-08 Thread Juerd
subscripting. Accessing strings as if they are arrays was discussed recently. Please read the archives. (groups.google.com is my favourite interface) Juerd

Re: if not C, then what?

2004-07-09 Thread Juerd
abusing things that normally mean something else. Juerd

Re: enhanced open-funktion

2004-07-13 Thread Juerd
mode and filename in one argument. Ever since I read about the new :pairs, I thought that would imply :rw instead of . Juerd

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread 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

Re: enhanced open-funktion

2004-07-13 Thread Juerd
with :append and :clobber. Juerd

Re: enhanced open-funktion

2004-07-15 Thread 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

Re: enhanced open-funktion

2004-07-15 Thread Juerd
$ ls -R * |: usr |/usr: bin |/usr/bin: foo Juerd

push @bar, .splice;

2004-07-17 Thread Juerd
If an array element knows that it is an array element, this can be useful: for @foo { push @bar, .splice if EXPR } Juerd

Re: push @bar, .splice;

2004-07-17 Thread 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

:)

2004-07-17 Thread Juerd
Do we have a :) operator yet? Juerd

Re: This week's summary

2004-07-20 Thread 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

Re: String interpolation

2004-07-21 Thread 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

Re: String interpolation

2004-07-22 Thread Juerd
string, the rest of that string becomes bizarrely unreadable. Juerd

Re: Precedence table update

2004-08-18 Thread Juerd
operators in this terminal and have it dwym.) Juerd

Re: Return with no expression

2004-08-19 Thread Juerd
workforme. Juerd

- as - with automatic is rw

2004-08-20 Thread 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

Re: A thought for later -- POD tables

2004-08-21 Thread 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

Re: - as - with automatic is rw

2004-08-21 Thread 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

Re: Instantiation

2004-08-23 Thread 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

Re: Progressively Overhauling Documentation

2004-08-23 Thread 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

Re: Progressively Overhauling Documentation

2004-08-23 Thread Juerd
; .mouth.close $strength; } } Juerd

Re: Progressively Overhauling Documentation

2004-08-23 Thread 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

Re: A question about attribute functions

2004-09-01 Thread Juerd
modifiers; it's not just linguistically pleasing). Juerd

Re: Synopsis 9 draft 1

2004-09-04 Thread 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

Re: parameter contexts (was: Synopsis 9 draft 1)

2004-09-04 Thread 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

Re: What Requires Core Support (app packaging)

2004-09-07 Thread Juerd
that changes an integer into an ordinal? 4 :th $foo :th Obviously, the : should be optional for literal integers: 4th 3th Juerd

Re: more ordinal discussion

2004-09-07 Thread 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

Re: more ordinal discussion

2004-09-08 Thread Juerd
, it seems a little confusing. Oh my, sparse arrays. Isn't that what we have hashes for? Juerd

Re: But is it intuitive?

2004-09-14 Thread 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

Re: Still about subroutines...

2004-09-16 Thread Juerd
of the syntax :) Juerd

  1   2   3   4   5   6   7   >