-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
-setting-library/Containers.pod
Log Message:
---
[S32/Containers] spec :as for uniq/squish
-setting-library/Containers.pod
Log Message:
---
Revert "[S32/Containers] specify :with for .uniq/.squish"
This reverts commit ec1b7c619dec5b6d7b779c97bfefc4e2285e72f6.
Conflicts:
S32-setting-library/Containers.pod
-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.
-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
-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
S32-setting-library/Containers.pod
Log Message:
---
[S32::Containers] fix minor typo
-setting-library/Containers.pod
Log Message:
---
[S32::Containers] document Buf.subbuf
-setting-library/Containers.pod
Log Message:
---
[S32/Containers] fixed typo in negative .rotate
/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
/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.
> 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
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
/Containers.pod
Log Message:
---
[Containers] split pick into pick and roll
/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
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:
>> [
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
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
>
>
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
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
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
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
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
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
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
) {
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
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
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
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
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
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)
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
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 (
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
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
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
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
& -
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
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
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
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
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.
:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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;
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
> > 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
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
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
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
> methodoverloadoperator(%thehashinquestion, 'sort', {$a flubber $b})
>
> What is a better syntax for this?
tie %thehashinquestion, 'Sorted', flubber(^a,^b);
???
Damian
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
66 matches
Mail list logo