[perl6/specs] 71d0c0: [S32::Containers] Change duplicate =item of `pairs...

2016-01-02 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32::Containers] Change duplicate =item of `pairs` into `antipairs`; Fix typo from db834e73 . Commit: b0657be1c92e11e99e07a617fb29da8493dd46c0 https://github.com/perl6/specs/commit/b0657be1c92e11e99e07a617fb29da8493dd46c0

[perl6/specs] c313c2: [S32/Containers] spec :as for uniq/squish

2013-08-04 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32/Containers] spec :as for uniq/squish

[perl6/specs] f6aa7f: Revert "[S32/Containers] specify :with for .uniq/....

2013-08-04 Thread GitHub
-setting-library/Containers.pod Log Message: --- Revert "[S32/Containers] specify :with for .uniq/.squish" This reverts commit ec1b7c619dec5b6d7b779c97bfefc4e2285e72f6. Conflicts: S32-setting-library/Containers.pod

[perl6/specs] ec1b7c: [S32/Containers] specify :with for .uniq/.squish

2013-08-03 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32/Containers] specify :with for .uniq/.squish See http://irclog.perlgeek.de/perl6/2013-08-03#i_7407490 for relevant spec discussion.

[perl6/specs] fa46a8: [S32/Containers] clarify that the *first* is kept

2013-08-03 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32/Containers] clarify that the *first* is kept ...in .uniq and .squish -- not the last, or an arbitrary one. The first. Commit: 29aeb7d71954a737843a447865a0d530a1407898 https://github.com/perl6/specs/commit

[perl6/specs] 02ee80: [S32/Containers] explain uniq/squish a bit more

2013-08-03 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32/Containers] explain uniq/squish a bit more - both uniq and squish preserve order - omit some implementation details which shouldn't be in the spec - give examples

[perl6/specs] 22f12c: [S32::Containers] fix minor typo

2012-09-12 Thread GitHub
S32-setting-library/Containers.pod Log Message: --- [S32::Containers] fix minor typo

[perl6/specs] 4238da: [S32::Containers] document Buf.subbuf

2012-08-27 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32::Containers] document Buf.subbuf

[perl6/specs] : [S32/Containers] fixed typo in negative .rotate

2012-01-11 Thread GitHub
-setting-library/Containers.pod Log Message: --- [S32/Containers] fixed typo in negative .rotate

[perl6/specs] 411f2a: [S32/Containers] removed parameter to .keys etc

2011-03-05 Thread noreply
/Containers.pod Log Message: --- [S32/Containers] removed parameter to .keys etc You could match on indexes/keys using an optional parameter on the .keys, .values, .pairs, .enums, .kv methods. I discovered this by accident, and went to check the source of both Rakudo and Niecza. Neither

[perl6/specs] ece320: [S32/Containers] Require &classify's test argument...

2011-01-14 Thread noreply
/Containers.pod Log Message: --- [S32/Containers] Require &classify's test argument to be Callable. An arbitrary Matcher may not have much of a notion of a return value.

Re: 8ecf53: [Containers] split pick into pick and roll

2010-09-16 Thread yary
> The last added paragraph says (emphasis mine): > > +The default metaphor for _picking_ is that you're pulling colored > +marbles out a bag and then putting them back. (For "picking without > replacement" see C instead.) > +Rolling requires no temporary state. > > This is confusing to me. It is su

Re: 8ecf53: [Containers] split pick into pick and roll

2010-09-16 Thread jkpeters_37
10-09-15 (Wed, 15 Sep 2010) > > Changed paths: >   M S32-setting-library/Containers.pod > > Log Message: > --- > [Containers] split pick into pick and roll The last added paragraph says (emphasis mine): +The default metaphor for _picking_ is that you're pulling c

[perl6/specs] 8ecf53: [Containers] split pick into pick and roll

2010-09-15 Thread noreply
/Containers.pod Log Message: --- [Containers] split pick into pick and roll

[perl6/specs] f73043: [S32::Containers] Changed the *default* default de...

2010-09-15 Thread noreply
/Containers.pod Log Message: --- [S32::Containers] Changed the *default* default default KeyHash value to Any. S02 says the default default value is sensitive to the value type of the KeyHash. If the default value type of a KeyHash is Any, which seems logical to me, then the default default

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Moritz Lenz
Jason Switzer wrote: > On Wed, Jun 2, 2010 at 5:10 AM, wrote: > >> Author: masak >> Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) >> New Revision: 31043 >> >> Modified: >> docs/Perl6/Spec/S32-setting-library/Containers.pod >> Log: >> [

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Aaron Sherman
On Wed, Jun 2, 2010 at 2:59 PM, Jason Switzer wrote: > On Wed, Jun 2, 2010 at 5:10 AM, wrote: > > > > > -class Buf does Positional {...} > > +class Buf does Positional does Stringy {...} > > > > I never really thought about this, but now that I see it here, it made me > realize that how

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Jason Switzer
On Wed, Jun 2, 2010 at 5:10 AM, wrote: > Author: masak > Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) > New Revision: 31043 > > Modified: > docs/Perl6/Spec/S32-setting-library/Containers.pod > Log: > [S32/Containers] Buf does Stringy, too > >

r31045 -[S32/Containers] oh, and let's bump the version, too

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:11:42 +0200 (Wed, 02 Jun 2010) New Revision: 31045 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] oh, and let's bump the version, too Modified: docs/Perl6/Spec/S32-setting-library/Container

r31044 -[S32/Containers] Buf.new parameter no longer slurpy

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:10:26 +0200 (Wed, 02 Jun 2010) New Revision: 31044 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] Buf.new parameter no longer slurpy Feedback from implementors suggests that this would be too inefficient. Also, might be

r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) New Revision: 31043 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] Buf does Stringy, too Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod

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
) { say "$lineno: $line"; } would only iterate until one of the containers was exhausted (in this case, the filehandle). Should this be added? Should zip have the same modifier? It sounds reasonable to me, but :stop reads badly. Maybe C<:strictly>? Maybe it's not a function of

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
ur List multi Container::each(Bool :$stop, Container [EMAIL PROTECTED]) So that: for each(:stop, =<>; 1..*) -> ($line, $lineno) { say "$lineno: $line"; } would only iterate until one of the containers was exhausted (in this case, the filehandle). Should this be added? Shoul

Re: Containers

2006-07-11 Thread Jordan Kanter
TED]> wrote: S02 and S06 discuss containers quite a bit. They say things like: "The is NAME (DATA) syntax defines traits on containers and subroutines" -S06 "A variable object may itself be bound to a container type that specifies how the co

Containers

2006-07-11 Thread Aaron Sherman
S02 and S06 discuss containers quite a bit. They say things like: "The is NAME (DATA) syntax defines traits on containers and subroutines" -S06 "A variable object may itself be bound to a container type that specifies how the containe

Re: Does list construction create new containers?

2005-08-27 Thread Ingo Blechschmidt
Hi, Yuval Kogman wrote: > On Sat, Aug 27, 2005 at 17:38:26 +0200, Ingo Blechschmidt wrote: >> ($foo, $bar)[0] =:= $foo; >> # False (i.e. no difference to arrays) or true? > > I think this is true, because you can say: > > ($foo, $bar) = (1, 2); > > And more curiously: > > for ($foo, $bar)

Re: Does list construction create new containers?

2005-08-27 Thread Yuval Kogman
On Sat, Aug 27, 2005 at 17:38:26 +0200, Ingo Blechschmidt wrote: > Hi, > > * my @array = ; > @array[1] = "new"; > # Array elements are, of course, new (rw) containers. > > * my @array = ($foo, $bar); > > @array[0] =:= $foo; > # False -- array ele

Re: Does list construction create new containers?

2005-08-27 Thread Juerd
Ingo Blechschmidt skribis 2005-08-27 17:38 (+0200): > I think these semantics are pretty clear. But what about lists? Lists are a language thing, not a data type. List elements can be lvalues. > ($foo, $bar)[0] =:= $foo; > # False (i.e. no difference to arrays) or true? I think this can be (

Does list construction create new containers?

2005-08-27 Thread Ingo Blechschmidt
Hi, * my @array = ; @array[1] = "new"; # Array elements are, of course, new (rw) containers. * my @array = ($foo, $bar); @array[0] =:= $foo; # False -- array element are new containers. @array[0] = $baz; # $foo unchanged I think these semantics are pretty clear. But

Re: Strongly typed containers?

2005-05-30 Thread Sam Vilain
Yuval Kogman wrote: > We already have the Set class, how do we say what it contains? > class Set { >has $.type; >method members returns $.type () { ... } > } > my Set of Int $s = Set.new; # is this how you call it? You are describing "Higher Order" types, also called Generic Algebraic Dat

Re: Strongly typed containers?

2005-05-30 Thread Yuval Kogman
ds for a container? > In the case of a set this requirement is to check the identity of > elements---basically like the keys of hashes. True, but there are more complicated containers out there... =) > Well, I think there are the concrete list types Eager and Lazy, > so it could be

Re: Strongly typed containers?

2005-05-30 Thread TSa (Thomas Sandlaß)
Yuval Kogman wrote: my Set of Int $s = Set.new; # is this how you call it? This whole thing depends on how hard-wired the first level container implementation is. There is either a loose or very strict mapping from sigils to container types: $ --> Scalar/Item @ --> Array % --> Hash & -

Strongly typed containers?

2005-05-30 Thread Yuval Kogman
We already have the Set class, how do we say what it contains? class Set { has $.type; submethod BUILD { # get something into $.type, using 'of' handler } method members returns $.type () { ... } } my Set of Int $s = Set.new; # is this how you cal

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
n hash by default, but hash would mean a "set of pairs". Correspondingly, @ would mean array by default, but you could certainly put a linked list in there. The biggest problem (perhaps) with these abstractions is that subscripting--their most common operation--is not well-defined. Presumably most of t

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

Containers vs Objects.

2005-02-15 Thread Rod Adams
In my recent unsuccessful attempt to convert junctions into sets with their own container, perhaps the strongest argument against could be paraphrased as follows: Everything about junctions or sets can be represented fully as an object, and objects are nicely stored in scalars, because it's sim

Re: making variables or containers read-only

2001-06-21 Thread John Porter
David L. Nicol wrote: > "seal" has been suggested. > ... > As for read-only being an attribute, if attributes are compiler hints, how > do we set something to be read-only then? And we can't unseal a r-o item > without making a copy of it. Pardon me, but why the fsck is so much time and energy

making variables or containers read-only

2001-06-21 Thread David L. Nicol
"Mark J. Reed" wrote: > If I wanted to make a variable read-only, I would expect to do it > by setting the read-only attribute on that variable, which I would > further expect to do the same way I would set any other attribute at > any other time. Orthogonality has its good points, even in Perl;

Re: Self-Sorting Containers

2000-08-13 Thread David L. Nicol
Dave Storrs wrote: > > On Fri, 11 Aug 2000, David L. Nicol wrote: > > > I've started talking about "containers" instead of arrays and hashes > > since those both tie directly to implementation details, and containers > > are abstractions. > [...] &g

Re: Self-Sorting Containers

2000-08-11 Thread Damian Conway
> > tie %thehashinquestion, 'Sorted', flubber(^a,^b); > > > > ??? > > > > Damian > > > Compiler will know to pass flubber as ref-to-code instead of > intant eval because (^a,^b) instead of ($a,$b), or is more, > like \&flubber needed here? I was using the HOF

Re: Self-Sorting Containers

2000-08-11 Thread Dave Storrs
On Fri, 11 Aug 2000, David L. Nicol wrote: > I've started talking about "containers" instead of arrays and hashes > since those both tie directly to implementation details, and containers > are abstractions. [...] > > If hashes normally had a sort method of

Re: Self-Sorting Containers

2000-08-11 Thread David L. Nicol
Damian Conway wrote: > >> methodoverloadoperator(%thehashinquestion, 'sort', {$a flubber $b}) >> >> What is a better syntax for this? > > tie %thehashinquestion, 'Sorted', flubber(^a,^b); > > ??? > > Damian Compiler will know to pass flubber as ref-to-code instead of intant eval

Re: Self-Sorting Containers

2000-08-11 Thread Dan Sugalski
At 03:44 PM 8/11/00 -0500, David L. Nicol wrote: >If hashes normally had a sort method of null, they would work normally, >but you could overload the sort method of any hash with > >methodoverloadoperator(%thehashinquestion, 'sort', {$a flubber $b}) > >What is a better syntax for this? Overload t

Re: Self-Sorting Containers

2000-08-11 Thread Damian Conway
> methodoverloadoperator(%thehashinquestion, 'sort', {$a flubber $b}) > > What is a better syntax for this? tie %thehashinquestion, 'Sorted', flubber(^a,^b); ??? Damian

Self-Sorting Containers

2000-08-11 Thread David L. Nicol
I've started talking about "containers" instead of arrays and hashes since those both tie directly to implementation details, and containers are abstractions. A self-sorting container would be easy enough to tie to, most methods would inherit from an underlying numbered ar