Re: Persistance of superpositions?

2002-10-30 Thread Luke Palmer
> Date: Tue, 29 Oct 2002 15:57:56 -0800 (PST) > From: Larry Wall <[EMAIL PROTECTED]> > > That's not a problem with builtins, but what about > > sub foo (); > sub prefix:foo ($x); > > @a = [foo][1,2,3,4,5]; So how is this interpreted? Such syntactic ambiguity isn't nice. Should we go

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > unary (prefix) operators: > >\ - reference to >* - list flattening >? - force to bool context >! - force to bool context, negate >not - force to bool context, negate >+ - force to numer

[OT] linguistics and cultural bias?

2002-10-30 Thread Martin D Kealey
On Tue, 29 Oct 2002, Larry Wall wrote: > Logically entangle nouns *are* more basic than grade school. Kids are > even sophisticated enough to disambiguate "xor" from "or" by context, > despite the fact that English has no "xor" operator: > > Which do you want? A popsicle or a Mickey Mouse ha

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Martin D Kealey
On Tue, 29 Oct 2002, Larry Wall wrote: > Maybe we should just say that you can put it anywhere that makes sense, > and let the perl parser sort out the sheep from the goats. The basic > rule is that for any op, [op] is also expected in the same place. It would be nice to have a fully generalized

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > Still thinking about ..! or ..^ or some such. Could have ^..^ and ^.. > too, for all that. We could indeed have a whole range of Japanese smiley operators. -- A year spent in artificial intelligence is enough to make one believe in God.

Re: [OT] linguistics and cultural bias?

2002-10-30 Thread Simon Cozens
[EMAIL PROTECTED] (Larry Wall) writes: > Well, it's actually a little worse than that. Not all languages do > noun disjunctions. In Japanese you can't ask > > Want tea or coffee? > > as far as I know. You have to ask > > Want tea? Want coffee? I'm not sure I believe that. You can sa

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Angel Faus
LW said: > > :<...>- readline > > Iterate interator. > Couldn't we go the python way and assume that <..> is implicit in "for" statments: $fh = open(..); for $fh { # instead of for <$fh> print $_; } For explicit iteration, we could well do just with a ".next" me

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Larry wrote: > >> All other things being equal, I think people will find modal operators >> more confusing than if we just make separate operators. > > Agreed. > > >> That being said, I'm still wondering whether we can finesse it. > > We can get close. B

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: > >> Whilst I don't wish to get Medieval on your collective donkey I must >> say that I'm really not sure of the utility of the proposed infix >> superposition ops. I'm a big fan of any/all/one/none, I just think >> that >> one(an

Re: Persistance of superpositions?

2002-10-30 Thread Piers Cawley
Michael Lazzaro <[EMAIL PROTECTED]> writes: > On Tuesday, October 29, 2002, at 01:50 PM, Damian Conway wrote: >> PS: Is anyone collecting these examples. It would make writing that >> perl.com >> article much easier for me ;-) > > But of course! Piers is summarizing this entire thread -- rig

Re: Generalising properties

2002-10-30 Thread Paul Johnson
chromatic said: > On Tue, 29 Oct 2002 14:19:59 -0800, Paul Johnson wrote: > >> So I would like to see able to tag arbitrary information onto just >> about everything, including files, packages, classes, subroutines, >> blocks, control structures, statements, lines, expressions, variables >> and wh

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Tue, 29 Oct 2002, Michael Lazzaro wrote: > : For this version of the operator list, (since I am unsure that > _every_ > : unary/binary op has a meaningful hyper, and some tentatively have > : _two_) I have placed all of them in EXPLICITLY. Please c

Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Piers Cawley
Given an acyclic graph of nodes, where a node has a method C, returning a list of all the nodes it points to, is it the case that the following code: sub descent($src, $dst) { when $src == $dst { return $dst } when !$src.kids{ die } otherwise { return ( $src, descent(any(

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > For this version of the operator list, (since I am unsure that > _every_ > unary/binary op has a meaningful hyper, and some tentatively have > _two_) I have placed all of them in EXPLICITLY. Please check that I > didn't miss any, or put any i

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Jonathan Scott Duff
On Tue, Oct 29, 2002 at 11:39:26PM -0800, Michael Lazzaro wrote: > So maybe the correct interpretation of the above is indeed this: > > (1..10)-1 # (1..10).length-1, e.g. 9 (oops!) Do "range objects" return their length in scalar context? > (1..10) [-] 1 # (0..9) (correct, if that's W

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 01:17:24AM +, Simon Cozens wrote: > [EMAIL PROTECTED] (David Wheeler) writes: > > Well, I like "set operators," too, but what's the grammatical term for > > the above "logically entangled list of nouns"? > > Conjunctions and disjunctions. The only thing this inspires i

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Austin Hastings
Suggesting that a "logically entangled list of nouns" should be called a "train". But that's just nasty. =Austin We've got "when," we're just missing "where". Maybe Dave Frishberg should be on this list? Lyrics & Music: Dave Frishberg Performed by: Jack Sheldon "Conjunction junction, what's

Re: Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 02:25:02PM +, Piers Cawley wrote: > Given an acyclic graph of nodes, where a node has a method C, > returning a list of all the nodes it points to, is it the case that > the following code: > > sub descent($src, $dst) { > when $src == $dst { return $dst } > w

Re: Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Wed, Oct 30, 2002 at 02:25:02PM +, Piers Cawley wrote: >> Given an acyclic graph of nodes, where a node has a method C, >> returning a list of all the nodes it points to, is it the case that >> the following code: >> >> sub descent($src,

Re: [OT] linguistics and cultural bias?

2002-10-30 Thread Larry Wall
On 30 Oct 2002, Simon Cozens wrote: : [EMAIL PROTECTED] (Larry Wall) writes: : > Well, it's actually a little worse than that. Not all languages do : > noun disjunctions. In Japanese you can't ask : > : > Want tea or coffee? : > : > as far as I know. You have to ask : > : > Want tea?

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Buddha Buck
Larry Wall wrote: Maybe we should just say that you can put it anywhere that makes sense, and let the perl parser sort out the sheep from the goats. The basic rule is that for any op, [op] is also expected in the same place. So if the user defines a postfix:! for factorial, they automatically g

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Andrew Wilson
On Wed, Oct 30, 2002 at 11:26:01AM -0500, Buddha Buck wrote: > Larry Wall wrote: > >I think we could also allow > > > >@a [??] @b [::] @c > > > >But it's not clear whether we can parse > > > >@a = [undef][...] > > How would you parse: > > @a = @b[[5]]; > > (My intent: for @a; @b -> $x i

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Brent Dax
Buddha Buck: # How would you parse: # # @a = @b[[5]]; A 2D array slice, since you can't hyper numbers? --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) Wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowin

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Jonathan Scott Duff
Maybe we've gone over this before but, if so, I don't remember ... On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > hyperoperators: > >[op] - as prefix to any unary/binary operator, "vectorizes" the > operator >. - method call on current topic What would [.]metho

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 11:26:01AM -0500, Buddha Buck wrote: > How would you parse: > > @a = @b[[5]]; > > (My intent: for @a; @b -> $x is rw; $y { $x = $y[5] }; # I think... ) I'd write that as @a [=] @b[5]; -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Austin Hastings
--- Brent Dax <[EMAIL PROTECTED]> wrote: > Buddha Buck: > # How would you parse: > # > # @a = @b[[5]]; > > A 2D array slice, since you can't hyper numbers? > It's hypering the [5]. @a = a list made up of the [5] (sub-)element of each element of @b. for @b -> @b_subarr { @a.push(@b_subarr[5]

Re: Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 04:03:55PM +, Piers Cawley wrote: > Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > > Hey, that's neat. Although it looks like it returns the $src when there > > isn't a path. You probably want it to return undef or something. > > Nah, it'll die when there isn't a pat

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Markus Laire
On 29 Oct 2002 at 11:22, Jonathan Scott Duff wrote: > On Tue, Oct 29, 2002 at 10:13:39AM +0200, Markus Laire wrote: > > Also the idea of allways using 'function' style for something so > > basic like superpositions doesn't appeal to me. > > Superpositions are "basic" in a fabric-of-the-universe

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 07:18 AM, Jonathan Scott Duff wrote: The only thing this inspires in my brain is Schoolhouse Rock flashbacks. o/~ Conjuction Junction, what's your function? o/~ Heh. That's what I heard, too. David -- David Wheeler AIM:

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > Maybe we've gone over this before but, if so, I don't remember ... > > On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > > hyperoperators: > > > >[op] - as prefix to any unary/binary operator, "vectorizes" the > > > oper

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Austin Hastings wrote: : --- Brent Dax <[EMAIL PROTECTED]> wrote: : > Buddha Buck: : > # How would you parse: : > # : > # @a = @b[[5]]; : > : > A 2D array slice, since you can't hyper numbers? : > : : It's hypering the [5]. I don't think so. We can't allow general expres

RE: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Brent Dax
When I'm trying to figure out what the "default" hypering semantics for an operator would be, I use this: ***BEGIN CODE*** { use strict; use warnings; sub _is_arrayref { ref $_[0] && ref $_[0] eq 'ARRAY' } sub hyper(&\@\@) { my($code, $a, $b)=@_; my @results; if

Re: Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Austin Hastings
Way outside the stuff I "get", Larry mentioned something about a "transactional model" for flexen. I keep wanting that to play somewhere in there, but I can't get my brain around how it should work. Essentially, I keep degenerating into Prolog. Since I *REALLY* don't wish to change all my perl scr

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 09:13:02AM -0800, Austin Hastings wrote: > --- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > > Maybe we've gone over this before but, if so, I don't remember ... > > > > On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > > > hyperoperators: > > > > > >

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 09:25 AM, Larry Wall wrote: So despite the beauty of @a [+] @b I think it cannot survive in its current form. It overloads square My own backup proposals would be: h<+> h[+] or similar, e.g. give the brackets a prefix to differentiate them fir

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread fearcadi
Larry Wall writes: > > So despite the beauty of > > @a [+] @b > > I think it cannot survive in its current form. It overloads square > brackets too heavily. > > Larry > so may be @a <+> @b @a < => > @b @a < , > @b @a < .= > replace ( // -> { "bar" } ) but @c = @a < <=>

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
[.]foo() # What does this mean? One could argue that several ways, depending on what's in the current topic. It's the exact same thing as the binary form of dot, but with the left side being implied, as 'the current topic': topic is a scalar: hyperdot does nothing (scalar hyperop sca

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 09:25:21AM -0800, Larry Wall wrote: > But the general problem is just about enough to kill the whole [] > idea for hyper. Need. More. Punctuation. :-) > So despite the beauty of > > @a [+] @b > > I think it cannot survive in its current form. It overloads squar

worth adding collections to the core language?

2002-10-30 Thread Dave Storrs
In the "Re: Wh<[ie]>ther Infix Superposition ops" thread On Wed, 30 Oct 2002, Piers Cawley wrote: > But given a decent Collection hierarchy: > > my $seen = Set.new($start,$finish); > > for <> -> $next { > print $next unless $next =~ $seen; > $seen.insert($next); > }

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Austin Hastings wrote: : >[op] - as prefix to any unary/binary operator, "vectorizes" the : > operator : : What, if any, guarantees are there about the order of evaluation for : vectorized operations? : : If I say : : @b = @a[.meth]; : : and .meth has a side-effect, w

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Jonathan Scott Duff wrote: : @a x+ @b : @a `+ @b : @a ^+ @b# I like this one best ;-) : : if we did go back to using ^ for hyper I have no clue what to do about : xor. I'd suggest % but I use the modulus too much. Gee, % looks kinda like an X. Larr

Re: worth adding collections to the core language?

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Dave Storrs wrote: : In the "Re: Wh<[ie]>ther Infix Superposition ops" thread : : On Wed, 30 Oct 2002, Piers Cawley wrote: : : > But given a decent Collection hierarchy: : > : > my $seen = Set.new($start,$finish); : > : > for <> -> $next { : > print $next unle

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002 [EMAIL PROTECTED] wrote: : Larry Wall writes: : > : > So despite the beauty of : > : > @a [+] @b : > : > I think it cannot survive in its current form. It overloads square : > brackets too heavily. : > : > Larry : > : : so may be @a <+> @b : : @a < => > @b

Re: Nondeterministic algorithms, flexops, and stuff

2002-10-30 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Wed, Oct 30, 2002 at 04:03:55PM +, Piers Cawley wrote: >> Jonathan Scott Duff <[EMAIL PROTECTED]> writes: >> > Hey, that's neat. Although it looks like it returns the $src when there >> > isn't a path. You probably want it to return undef or

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Michael Lazzaro wrote: : My own backup proposals would be: : : h<+> : h[+] : : or similar, e.g. give the brackets a prefix to differentiate them : firmly as 'hyper'. Personally, I still don't mind that extra char, : because it makes it extra-super-obvious; as we've

Re: worth adding collections to the core language?

2002-10-30 Thread Piers Cawley
Dave Storrs <[EMAIL PROTECTED]> writes: > In the "Re: Wh<[ie]>ther Infix Superposition ops" thread > > On Wed, 30 Oct 2002, Piers Cawley wrote: > >> But given a decent Collection hierarchy: >> >> my $seen = Set.new($start,$finish); >> >> for <> -> $next { >> print $next unless $nex

Re: worth adding collections to the core language?

2002-10-30 Thread Piers Cawley
Piers Cawley <[EMAIL PROTECTED]> writes: > Personally, I'd love to see something like the whole Smalltalk > Collection hierarchy available complete with Bags, Sets, > Dictionaries, OrderedCollections and the whole deal. I note, for > instance that Christian Lemburg has implemented Set::Object, and

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Aaron Crane
Jonathan Scott Duff writes: > @a `+ @b Ick. In my experience, many people actually don't get the backtick character at all. They can't find it on the keyboard, and they don't really see what's so different about it from apostrophe. Indeed, many typefaces (including common print-media face

Re: worth adding collections to the core language?

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Piers Cawley wrote: :"It is a truth universally acknowledged that a language in : possession of a rich syntax must be in need of a rewrite." : -- Jane Austen? It is a truth universally acknowledged that a language in possession of a rich syntax must be in need

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread fearcadi
Larry Wall writes: > > Well, "v" for vector makes a little more sense, maybe. Could be lots of things: > > @a *[+] @b > @a .[+] @b > @a =[+] @b > @a ![+] @b > @a ^[+] @b > @a _[+] @b > @a :[+] @b > @a '[+] @b > @a v[+] @b > > There's a problem w

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Aaron Crane
Larry Wall writes: > @a ^[+] @b I like this one in preference to plain ^+, but (unless I'm missing something) it still leaves the question of what to do with xor. > @a '[+] @b Doesn't this reinvent the $Package'symbol problem? > The * has obvious mnemonic value of the splat sort, but al

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Wed, Oct 30, 2002 at 09:13:02AM -0800, Austin Hastings wrote: > > --- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > > > Maybe we've gone over this before but, if so, I don't remember > ... > > > > > > On Tue, Oct 29, 2002 at 05:16:48PM -0

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Austin Hastings wrote: : > No, no. I'm talking about the unary . prefix : > : > method blah { : >.foo() : >[.]foo() # What does this mean? : > } : : Vector of invocations of the foo methods of the current topic. Except that the topic is b

Re: Iterators [was: worth adding collections to the core language?]

2002-10-30 Thread Luke Palmer
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Cc: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > From: Piers Cawley <[EMAIL PROTECTED]> > Date: Wed, 30 Oct 2002 18:59:15 + > X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ > > Dave Storrs <[EMAIL PROTECTED]> writes: > > > In

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Wed, 30 Oct 2002, Austin Hastings wrote: > : > No, no. I'm talking about the unary . prefix > : > > : > method blah { > : > .foo() > : > [.]foo() # What does this mean? > : > } > : > : Vector of invocations of the foo meth

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 11:58 AM, Larry Wall wrote: I'd even be willing to give up ´foo bar bazª meaning qw(foo bar baz) for this. I can't see that right (MacOSX Jaguar) in the email; to me it looks like a forwardtick and an, um, underlined 'a' -- but in spite of that, I'm game.

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Me
> So despite the beauty of > > @a [+] @b > > I think it cannot survive in its current form. It overloads square > brackets too heavily. What about using colon thus: @a [:+] @b or other character after the opening bracket, so long as that character is not valid as the initial character

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 12:17 PM, Michael Lazzaro wrote: I can't see that right (MacOSX Jaguar) in the email; to me it looks like a forwardtick and an, um, underlined 'a' -- but in spite of that, I'm game. It's just so pretty (when it works!) On my Mac, it's spelled «op» -- can ot

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Mark J. Reed
On 2002-10-30 at 12:23:53, David Wheeler wrote: > This tells me that Mail.app, for some reason, didn't know that it was > supposed to use UTF-8 when showing Larry's mail. When I pasted his mail > into a UTF-8 document in Emacs, it looked fine. > > Given that it's probably UTF-8 that Perl 6 sourc

Re: Vectorizing operators for Hashes

2002-10-30 Thread fearcadi
Proposal : Vector operations for Hashes %a ^{+} %b the direct generalization would be as follows : @a ^[op] @b for @a ; @b -> $x ; $y { $x op $y } %a op %b # find common keys @k = keys hash{ map { { _=>1 } } *( %a.keys , %b.keys ) }; #return has

Re: Vectorizing operators for Hashes

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002 [EMAIL PROTECTED] wrote: : # find common keys : @k = keys hash{ map { { _=>1 } } *( %a.keys , %b.keys ) }; It seems a bit odd to privilege the intersection over the union. Larry

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Nicholas Clark
On Wed, Oct 30, 2002 at 06:45:52PM +0200, Markus Laire wrote: > You are making the fundamental mistake of thinking superpositions as > superpositions. When thinking them as another-kind-of or/and, their > usefulness comes a lot clearer. > perl5: if $x > 0 && $x < 20 && $y > 0 && $y < 20 && $z >

Re: Vectorizing operators for Hashes

2002-10-30 Thread fearcadi
!! Sorry, in previos post I had a mistake Proposal : Vector operations for Hashes ( this is just a joke %a ^{+} %b ) the direct generalization would be as follows : @a ^[op] @b for @a ; @b -> $x ; $y { $x op $y } %a ^[op] %b # f

plaintive whine about 'for' syntax

2002-10-30 Thread Dave Storrs
In a different thread, Buddha Buck wrote the following code snippet: for @a; @b -> $x is rw; $y { $x = $y[5] }; And I finally had to whimper publicly about this. I've been lurking around the P6 process since the very beginning of the RFC process. I saw the new 'for' syntax come out, and

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Brian Ingerson
On 30/10/02 15:33 -0500, Mark J. Reed wrote: > On 2002-10-30 at 12:23:53, David Wheeler wrote: > > This tells me that Mail.app, for some reason, didn't know that it was > > supposed to use UTF-8 when showing Larry's mail. When I pasted his mail > > into a UTF-8 document in Emacs, it looked fine.

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Austin Hastings
--- Dave Storrs <[EMAIL PROTECTED]> wrote: > for @a -> $x<; @b -> $y { $x = $y[5] }; Yes!!! (Except for the '<'. That's feigen-ugly. I'll say "is r?" where needed, regardless of which is the default. I prefer default=ro, though, because that let's the optimizer do more by default.) I proposed

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 12:48:21PM -0800, Dave Storrs wrote: > Current: for @a; @b -> $x is rw, $y; $z { ...stuff... }; > > The above (IIUC) means "loop over @a, pulling out two elements at a time > and aliasing them to $x (which is rw) and $y (which is r). > Simultaneously loop over @b, alia

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 12:48 PM, Dave Storrs wrote: for @a; @b -> $x is rw; $y { $x = $y[5] }; I agree that it's an eyeful. How many of your issues could be solved if the above were just written: for (@a;@b) -> ($x is rw; $y) { $x = $y[5] }; Would that suffice to make it cle

RE: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Markus Laire
On 29 Oct 2002 at 22:29, Larry Wall wrote: > Of course, Real Mathematicians will want [1..10) and (1..10] instead. That seems familiar, I like it ;) > There's also an issue of what (1..10) - 1 would or should mean, if > anything. Does it mean (1..9)? Does 1 + (1..10) mean (2..10)? > > And what

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Nicholas Clark wrote: : On Wed, Oct 30, 2002 at 06:45:52PM +0200, Markus Laire wrote: : : > You are making the fundamental mistake of thinking superpositions as : > superpositions. When thinking them as another-kind-of or/and, their : > usefulness comes a lot clearer. : : >

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Nicholas Clark
On Wed, Oct 30, 2002 at 03:33:57PM -0500, Mark J. Reed wrote: > On 2002-10-30 at 12:23:53, David Wheeler wrote: > > This tells me that Mail.app, for some reason, didn't know that it was > > supposed to use UTF-8 when showing Larry's mail. When I pasted his mail > > into a UTF-8 document in Emacs,

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Mark J. Reed wrote: : Larry's mail was *marked* as UTF-8, but by the time I got it it : had no French quotes in it in UTF-8, Latin-1, or any other encoding anymore. : My mailer understand UTF-8 just fine, and so does vim (which I used to : look at my spool file to check for e

Re: plaintive whine about 'for' syntax

2002-10-30 Thread fearcadi
Michael Lazzaro writes: > > On Wednesday, October 30, 2002, at 12:48 PM, Dave Storrs wrote: > >for @a; @b -> $x is rw; $y { $x = $y[5] }; > > I agree that it's an eyeful. How many of your issues could be solved > if the above were just written: > > for (@a;@b) -> ($x is rw; $

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Jonathan Scott Duff
On Wed, Oct 30, 2002 at 11:10:54PM +0200, Markus Laire wrote: > If we are going to do math with ranges, we definitely need non- > discreet ranges also. Or at least make sure it's easy enough to > implement as a class. > > (1.9 .. 2.1) + (5..7) * (72.49 .. 72.51); I don't think that "non-discrete

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > Do these French quotes come through? > > @a «+» @b Oui, M'sieu! __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/

RE: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Richard Proctor
On Wed 30 Oct, Larry Wall wrote: > An earlier message had something like this as a hyper: > > @a = @b[.method]; > > That absolutely won't work, because [.method] is a valid subscript. > In this case it would have to be written > > @a = @b[.]method; > > But the general problem is just ab

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 12:47 PM, Larry Wall wrote: This is currently running in a window that does Latin-1 rather than UTF-8. Do these French quotes come through? @a ´+ª @b Nope. But given that I don't even know where to go to type them in, and doing so will likely be a PITA

plaintive whine about 'for' syntax

2002-10-30 Thread fearcadi
Dave Storrs writes: > is a Bad Thing and is going to cause a lot of bugs. I have the following > problems with it: > > for @a; @b -> $x is rw; $y { $x = $y[5] }; > > 1) This is (AFAIK) the ONLY place in Perl where a semicolon that > is not enclosed in parens is used for anything

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: > --- Larry Wall <[EMAIL PROTECTED]> wrote: > > > Do these French quotes come through? > > > > @a «+» @b Odd, I see them in this message. But In the message from Larry I see ?'s Graham.

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 01:28 PM, David Wheeler wrote: But given that I don't even know where to go to type them in, and doing so will likely be a PITA...even though I *love* the idea of using these characters, might it be better to abandon them for now? Oh, don't say that! I alre

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 01:35 PM, Graham Barr wrote: On Wed, Oct 30, 2002 at 01:25:44PM -0800, Austin Hastings wrote: --- Larry Wall <[EMAIL PROTECTED]> wrote: Do these French quotes come through? @a «+» @b Odd, I see them in this message. But In the message from Larry I see

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Dave Storrs
On Wed, 30 Oct 2002, Michael Lazzaro wrote: > On Wednesday, October 30, 2002, at 12:48 PM, Dave Storrs wrote: > > for @a; @b -> $x is rw; $y { $x = $y[5] }; > > I agree that it's an eyeful. How many of your issues could be solved > if the above were just written: > > for (@a;@b) -> (

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Damian Conway
Dave Storrs wrote: for @a; @b -> $x is rw; $y { $x = $y[5] }; I agree that it's an eyeful. How many of your issues could be solved if the above were just written: for (@a;@b) -> ($x is rw; $y) { $x = $y[5] }; Would that suffice to make it clearer? Actually, yes, that would solve everyt

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread David Wheeler
On Wednesday, October 30, 2002, at 01:43 PM, Michael Lazzaro wrote: Oh, don't say that! I already know what all of these should mean! :-) ≈ … ∫ § ¿ ∆ ∑ Ω ø ¶ º ≠ ≤ ≥ ‹ › ‡ Ø ˇ ¬ Ç Œ ∞ ¡ • Nice, I can see all of those. Your mailer is the same as mine, Apple Mail, and the headers are: Conte

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Damian Conway
Larry Wall wrote: : if we did go back to using ^ for hyper I have no clue what to do about : xor. I'd suggest % but I use the modulus too much. Gee, % looks kinda like an X. Just put that alpha down and back away quietly, mister. There's no need for anyone to get hurt here. ;-) Damian

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Michael Lazzaro
On Wednesday, October 30, 2002, at 01:46 PM, David Wheeler wrote: But let me ask you -- how did you input those characters? Applications/Utilities/"Key Caps" (Again, OSX) which shows you where they all are. The «» quotes, for example, are option-\ and shift-option-\ :-) MikeL

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Dave Storrs
On Wed, 30 Oct 2002, Austin Hastings wrote: > > --- Dave Storrs <[EMAIL PROTECTED]> wrote: > > > for @a -> $x<; @b -> $y { $x = $y[5] }; > > Yes!!! > > (Except for the '<'. That's feigen-ugly. *shrug* You may not like the aesthetics, but my point still stands: "is rw" is too long for

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread John Williams
On Tue, 29 Oct 2002, Austin Hastings wrote: > Any of you OO guys know of a case where > > $a = $a + $b; # @A [+]= @B; --> @A = @A [+] @B; > > and > > $a += $b; # @A [+=] @B; > > should be different? They are different in the "scalar [op] list" case, as explained here:

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, Michael Lazzaro wrote: : On Wednesday, October 30, 2002, at 12:48 PM, Dave Storrs wrote: : > for @a; @b -> $x is rw; $y { $x = $y[5] }; : : I agree that it's an eyeful. How many of your issues could be solved : if the above were just written: : : for (@a;@b) -> (

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Dave Storrs
On Thu, 31 Oct 2002, Damian Conway wrote: > Dave Storrs wrote: > > > Actually, yes, that would solve everything for me...and I knew > > this was valid syntax. > > So is this vertical layout, which I think will become fairly standard > amongst those who care about readability: > > for @

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Angel Faus
Wednesday 30 October 2002 22:08, Michael Lazzaro escribió: > On Wednesday, October 30, 2002, at 12:48 PM, Dave Storrs wrote: > > for @a; @b -> $x is rw; $y { $x = $y[5] }; > > I agree that it's an eyeful. How many of your issues could be > solved if the above were just written: > > for

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Dave Storrs
On Wed, 30 Oct 2002, Angel Faus wrote: > Then let's make the parens required when there is more than one > stream. > > Sane people will put them there anyway, and it will force the rest of > us to behave. > > It also solves the ";"-not-a-line-seperator problem. > > -angel Yes! Thank y

Re: worth adding collections to the core language?

2002-10-30 Thread Markus Laire
On 30 Oct 2002 at 11:09, Larry Wall wrote: > On Wed, 30 Oct 2002, Piers Cawley wrote: > :"It is a truth universally acknowledged that a language in > : possession of a rich syntax must be in need of a rewrite." > : -- Jane Austen? > > It is a truth universally acknowledged that a

Re: Perl6 Operator List, Damian's take

2002-10-30 Thread Larry Wall
On Wed, 30 Oct 2002, John Williams wrote: : They are different in the "scalar [op] list" case, as explained here: : : : ($a = 0) [+=] @b; # sum : ($a = 1) [*=] @b; # product : ($a ='') [~=] @b; # cat That's

Re: worth adding collections to the core language?

2002-10-30 Thread Larry Wall
On Thu, 31 Oct 2002, Markus Laire wrote: : And you could always have something else as a backup for those : unfortunates who can't use «+» - like ^[+] : : What are the good reasons not to use «» ? It would force everyone to get their act together with respect to Unicode. Oh, wait, that's a feat

Re: plaintive whine about 'for' syntax

2002-10-30 Thread fearcadi
Dave Storrs writes: > > > On Wed, 30 Oct 2002, Angel Faus wrote: > > > Then let's make the parens required when there is more than one > > stream. > > > > Sane people will put them there anyway, and it will force the rest of > > us to behave. > > > > It also solves the ";"-not-a-line-

Re: plaintive whine about 'for' syntax

2002-10-30 Thread Graham Barr
On Wed, Oct 30, 2002 at 01:57:00PM -0800, Dave Storrs wrote: > *shrug* You may not like the aesthetics, but my point still > stands: "is rw" is too long for something we're going to do fairly often. I am not so sure. If I look back through a lot of my code, there are more cases where I use

Re: [RFC] Perl6 Operator List, Take 5

2002-10-30 Thread Markus Laire
On 30 Oct 2002 at 15:24, Jonathan Scott Duff wrote: > On Wed, Oct 30, 2002 at 11:10:54PM +0200, Markus Laire wrote: > > If we are going to do math with ranges, we definitely need non- > > discreet ranges also. Or at least make sure it's easy enough to > > implement as a class. > > > > (1.9 .. 2.1

Re: Wh<[ie]>ther Infix Superposition ops

2002-10-30 Thread Erik Steven Harrison
-- On Wed, 30 Oct 2002 07:13:40 Damian Conway wrote: >Yes. That superpositions are going to be so widely used once people >catch on, that users going to curse us every time they have to >write C at the start of every scope. So, I open my inbox and see that it has been stuffed with Perl 6

Re: Persistance of superpositions?

2002-10-30 Thread Damian Conway
Brian Ingerson wrote: Not quite. You also need to discriminate the *type* of the superposition: Oh right. I was thinking that C and friends were operations, not types. Oops. YAML type-URIs are made up of a type-family with an optional format: !domain.com/type#format and: !int is s

  1   2   >