Re: Containers

2006-07-11 Thread Aaron Sherman
On Tue, 2006-07-11 at 16:22 -0400, Aaron Sherman wrote: > zip(:fewest, @a;@b;@c); # Until one runs out Once again, I missed some Larry magic. He already selected ":shortest" for this, so I guess on roundrobin, it's ":longest"... ignore my choices. I think just like Larry, but 1,000 times slower

Re: Containers

2006-07-11 Thread Aaron Sherman
On Tue, 2006-07-11 at 12:50 -0700, Trey Harris wrote: > > But I don't think that will do, because it fails when you don't know > > WHICH list would be the longest (or you have to specify them all > > as :with, and that's rather counter-intuitive). Perhaps a stand-alone > > adverb, :parity makes mo

Re: Containers

2006-07-11 Thread Trey Harris
In a message dated Tue, 11 Jul 2006, Aaron Sherman writes: On Tue, 2006-07-11 at 09:53 -0700, Trey Harris wrote: It sounds reasonable to me, but :stop reads badly. Maybe C<:strictly>? Maybe it's not a function of a flag to each, but a marking that certain lists should be tapped non-exhaustively

Re: Containers

2006-07-11 Thread Aaron Sherman
On Tue, 2006-07-11 at 09:53 -0700, Trey Harris wrote: > In a message dated Tue, 11 Jul 2006, Aaron Sherman writes: > > But would it be reasonable to also provide a named-only parameter to > > each for that purpose? > It sounds reasonable to me, but :stop reads badly. Maybe C<:strictly>? > Maybe

Re: Containers

2006-07-11 Thread Trey Harris
In a message dated Tue, 11 Jul 2006, Aaron Sherman writes: But would it be reasonable to also provide a named-only parameter to each for that purpose? our List multi Container::each(Bool :$stop, Container [EMAIL PROTECTED]) So that: for each(:stop, =<>; 1..*) -> ($line, $lineno) { say "$line

Re: Containers

2006-07-11 Thread Aaron Sherman
On Tue, 2006-07-11 at 09:28 -0500, Jordan Kanter wrote: > I was having that problem too going over S09. It seems like we need to get > the glossary together like Uri was saying that we can have a controlled > language for creating the documents. If we dont have one already, I suggest > we start o

Re: Containers

2006-07-11 Thread Aaron Sherman
On Tue, 2006-07-11 at 10:06 -0400, Aaron Sherman wrote: > For example: > > our List multi Container::each(Container [EMAIL PROTECTED]) In thinking about each, I've come across an interesting need. I wrote this example: for each(=<>; 1..*) -> ($line, $lineno) { say "$lineno: $line"; } Whic

Re: Containers

2006-07-11 Thread Jordan Kanter
I was having that problem too going over S09. It seems like we need to get the glossary together like Uri was saying that we can have a controlled language for creating the documents. If we dont have one already, I suggest we start one. Jordan On 7/11/06, Aaron Sherman <[EMAIL PROTECTED]> wrot

Re: Containers vs Objects.

2005-03-04 Thread Thomas SandlaÃ
Luke Palmer wrote: And in fact, one of the big questions that's always in the back of my mind (that I'm not searching for an answer to, but I'm always observing for one) is: what do @ and % mean these days? Another idea: they define the subsystem of the type system that uses structural subtyping as

Re: Containers vs Objects.

2005-02-17 Thread Larry Wall
On Thu, Feb 17, 2005 at 08:58:21AM +0100, Thomas Sandlaß wrote: : HaloO Larry, : : you wrote: : >That would be cool. I'd like to see our community build up a pool of : >theoreticians who are not allergic to the practicalities of building a : >language for ordinary people to think in. It is my pe

Re: Containers vs Objects.

2005-02-16 Thread Thomas SandlaÃ
HaloO Larry, you wrote: That would be cool. I'd like to see our community build up a pool of theoreticians who are not allergic to the practicalities of building a language for ordinary people to think in. It is my persistent belief (and fond hope) that theory and practice don't always have to pu

Re: Containers vs Objects.

2005-02-16 Thread Larry Wall
On Wed, Feb 16, 2005 at 06:35:38PM +0100, Thomas Sandlaà wrote: : Each of these comes with a corresponding postcicumfix dereferencer. : & with .() : @ with .[] : % with .<> and . % with .{} (plus .<> and . as syntactic sugar) : >Maybe now is the time to figure out what they *do* mean. :

Re: Containers vs Objects.

2005-02-16 Thread Juerd
Thomas Sandlaß skribis 2005-02-16 18:35 (+0100): > % with .<> and .«» % with .{} .<> and .<<>> imply {} Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html

Re: Containers vs Objects.

2005-02-16 Thread Thomas SandlaÃ
HaloO All, Luke Palmer wrote: But what are some nice, abstract concepts that these could represent. One that I've been thinking of is: * @something is necessarily ordered: there is a well-defined "first element" * %something is necessarily a set: adding something twice is always redundant

Re: Containers vs Objects.

2005-02-16 Thread Patrick R. Michaud
On Wed, Feb 16, 2005 at 12:14:10AM -0600, Rod Adams wrote: > So in terms of frequency of use in the English Language, I'd rank things > in the following order: > 1) Scalars > 2) Sets > 3) Arrays > 4) Hashes Perhaps. However, it's fairly easy to use an Array or Hash to represent a Set, so perhaps

Re: Containers vs Objects.

2005-02-15 Thread Larry Wall
On Tue, Feb 15, 2005 at 10:01:52PM -0600, Patrick R. Michaud wrote: : Uh oh, I hadn't caught that particular nuance. Is it indeed over the : entire equi-precedential part of the operation, or just over the : chained operators? Just the chained operators, I think. For more general expression thre

Re: Containers vs Objects.

2005-02-15 Thread Rod Adams
Larry Wall wrote: But as far as English is concerned, sets are just objects that have a singular outside and a (potentially) plural inside, much like almost any other object. At least, that's how concrete sets work. Hmm. I would argue that most of the time, when English Speakers use sets qui

Re: Containers vs Objects.

2005-02-15 Thread Damian Conway
Patrick R. Michaud wrote: Uh oh, I hadn't caught that particular nuance. Is it indeed over the entire equi-precedential part of the operation, or just over the chained operators? For example, given $x = -1 | 10; $ref.meth1($x).meth2($x) are the meth1 and meth2 calls considered to be "eq

Re: Containers vs Objects.

2005-02-15 Thread Patrick R. Michaud
On Wed, Feb 16, 2005 at 01:13:53PM +1100, Damian Conway wrote: > Larry wrote: > >0 < $x < 10 > >after all--the problem with rewriting that as > >0 < $x and $x < 10 > >is that it should only work as long as the two values of $x remain > >entangled so that the always refer to the same abstrac

Re: Containers vs Objects.

2005-02-15 Thread Larry Wall
On Wed, Feb 16, 2005 at 01:13:53PM +1100, Damian Conway wrote: : Larry wrote: : : >That's the basic problem with : > : >0 < $x < 10 : > : >after all--the problem with rewriting that as : > : >0 < $x and $x < 10 : > : >is that it should only work as long as the two values of $x remain : >en

Re: Containers vs Objects.

2005-02-15 Thread Damian Conway
Larry wrote: That's the basic problem with 0 < $x < 10 after all--the problem with rewriting that as 0 < $x and $x < 10 is that it should only work as long as the two values of $x remain entangled so that the always refer to the same abstract value. That's certainly true. But I think the re

Re: Containers vs Objects.

2005-02-15 Thread Larry Wall
On Tue, Feb 15, 2005 at 04:20:28PM -0600, Rod Adams wrote: : chromatic wrote: : : >>So I'm interested in hearing what pushes Arrays and Hashes over the edge : >>for needing their own container and sigil, whereas Junctions/Sets do not. : >> : >> : > : >Perl isn't a "pure" object-oriented langua

Re: Containers vs Objects.

2005-02-15 Thread Luke Palmer
Rod Adams writes: > So I'm interested in hearing what pushes Arrays and Hashes over the > edge for needing their own container and sigil, whereas Junctions/Sets > do not. Nothing. In fact, arrays and hashes aren't atomic or fundamental in any respect, and the main thing that keeps them there is h

Re: Containers vs Objects.

2005-02-15 Thread Rod Adams
chromatic wrote: So I'm interested in hearing what pushes Arrays and Hashes over the edge for needing their own container and sigil, whereas Junctions/Sets do not. Perl isn't a "pure" object-oriented language. Rephrasing my question: What characteristics would _any_ new structure or class

Re: Containers vs Objects.

2005-02-15 Thread Rod Adams
At 01:04 PM 2/15/2005 -0800, chromatic wrote: On Tue, 2005-02-15 at 14:26 -0600, Rod Adams wrote: > So I'm interested in hearing what pushes Arrays and Hashes over the edge > for needing their own container and sigil, whereas Junctions/Sets do not. Perl isn't a "pure" object-oriented language. No a

Re: Containers vs Objects.

2005-02-15 Thread chromatic
On Tue, 2005-02-15 at 14:26 -0600, Rod Adams wrote: > The obvious statement I expect to here is "Perl's always had Arrays > and Hashes". While I'm not sure if they were there for Perl 1.0 (I > started w/ Perl 4.xx) They were. > So I'm interested in hearing what pushes Arrays and Hashes over the