Tests added in
https://github.com/perl6/roast/commit/d78f33966cf6a6ec6bc060d98dfc521ad59b6f75
Closing
On 2018-02-06 14:12:56, jan-olof.hen...@bredband.net wrote:
> On Sat, 07 May 2016 13:26:09 -0700, sml...@gmail.com wrote:
> > Confirmed on current Rakudo.
> >
> > Interestingly, it works if `for
Tests in
https://github.com/perl6/roast/commit/1a42efd4ce0fdc695b16bbf64af92ecf0bca1866
On 2018-03-10 10:43:14, alex.jakime...@gmail.com wrote:
> This ticket now needs tests, further discussion related issues here:
> https://github.com/rakudo/rakudo/issues/1607
>
> On 2017-03-08 05:56:13, c...@zof
This ticket now needs tests, further discussion related issues here:
https://github.com/rakudo/rakudo/issues/1607
On 2017-03-08 05:56:13, c...@zoffix.com wrote:
> A temporary fix has been committed in
>
https://github.com/rakudo/rakudo/commit/5b7b7fb5c942a3e74097b5eb94a22be262f74c9f
On Sat, 07 May 2016 13:26:09 -0700, sml...@gmail.com wrote:
> Confirmed on current Rakudo.
>
> Interestingly, it works if `for @a` is replaced with `for @a[*]`:
>
> ➜ my Int @a; @a[5] = 42; $_ = 100 for @a[*]; say @a;
> [100 100 100 100 100 100]
Seems to have been fixed with Rakudo
# New Ticket Created by Zoffix Znet
# Please include the string: [perl #130941]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130941 >
Original user with the problem:
https://irclog.perlgeek.de/perl6/2017-03-06#i_14216611
T
-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
On Sat Oct 31 14:12:36 2015, sml...@gmail.com wrote:
> S07 [https://github.com/perl6/specs/blob/master/S07-lists.pod] claims:
>
> "The single argument rule does respect Scalar containers."
> "The single argument rule is implemented consistently throughout the
>
On Wed Oct 21 15:40:57 2015, elizabeth wrote:
> # this internally uses .push-at-least
> $ 6 'my $l = gather { take-rw my $ = 1 }; $l.AT-POS(0) = 42'
> Cannot modify an immutable Int
> in block at -e:1
>
> # this internally uses .pull-one
> $ 6 'my $l = gather { take-rw my $ = 1 }; for @$l { $_
argument rule does respect Scalar containers."
"The single argument rule is implemented consistently throughout the
language."
It lists 'for', '.push', 'infix:<,>' and 'postcircumfix:<[ ]>' as examples of
things that consisten
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #126424]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126424 >
# this internally uses .push-at-least
$ 6 'my $l = gather { take-rw my $ = 1 }; $l
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #126312]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126312 >
$ 6 'my Int @a; @a[5] = 42; $_ = 666 for @a'
Cannot assign to an immutable value
On Sat Aug 08 04:11:12 2015, Faye wrote:
> Bug invalid now that parrot is no longer with us. Additionally this
> appears at first glance to have been an issue with the module instead
> of rakudo.
That's what I thought, too. I'm closing this ticket as 'rejected'.
On Tue Nov 20 12:16:04 2012, FROGGS.de wrote:
> looks good today:
>
> r: my Int @a = 1, 2, 3; my Str $x = "foo"; @a[0] := $x; say @a[0];
> rakudo bf472b: OUTPUT«foo»
>
> r: my Int @a = 1, 2, 3; my Int $x = 5; @a[0] := $x; say @a[0];
> rakudo bf472b: OUTPUT«5»
>
> r: my Int @a = 1, 2, 3; m
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #122028]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=122028 >
m: class D {}; my Array[D] %ds; %ds.push: D.new # golf'd
rakudo-moar 17f023: OUTPUT«Typ
-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] 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
-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.
S32-setting-library/Containers.pod
Log Message:
---
[S32::Containers] fix minor typo
-setting-library/Containers.pod
Log Message:
---
[S32::Containers] document Buf.subbuf
# New Ticket Created by Wenzel Peppmeyer
# Please include the string: [perl #114402]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org:443/rt3/Ticket/Display.html?id=114402 >
use v6;
use Grammar::Debugger;
grammar Foo { rule TOP { 'fail' } };
Foo.par
R); say w $a, $b
rakudo 7e1b38: OUTPUT«-1»
curiouser and curiouser.
r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my
($a, $b) = R, R; say w $a, $b
rakudo 7e1b38: OUTPUT«-1»
a-ha!
not parameter binding. variables!
containers, most like.
r: class R {}; multi w(::T, T) { 0 }; multi w
-setting-library/Containers.pod
Log Message:
---
[S32/Containers] fixed typo in negative .rotate
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #89484]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=89484 >
18:01 < moritz> rakudo: my $x = 5; sub f(Int $y) { $x := 'foo'; say $y
}; f($x); say $x
/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
x27;. See the commit message for the details.
From a010550295d5ef9392e5cc0e60dd120fb0fe79e8 Mon Sep 17 00:00:00 2001
From: Kodi Arfer
Date: Thu, 16 Sep 2010 09:14:23 -0400
Subject: [PATCH] Containers galore.
I added the Bag, KeyHash, KeySet, and KeyBag types and modified Set so
that it
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
Today Stevan started writing out Roles for container
types,
so there can be multiple classes that implements the Hash/Array/Scalar
interface, so operations like .{} and .[] can apply to user-defined
types as well.
This is similar to the Perl 5 way of using the "tie"
interface, as well as over
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
On Sun, Jul 31, 2005 at 02:00:13PM +1200, Sam Vilain wrote:
> Tieing a hash would be the same as sub-classing it
Sub-classing a container is exactly what tying is all about.
That, and not losing the original non-tied storage inbetween ties.
> Or is this merely a mechanism for the above?
You can
Autrijus Tang wrote:
Containers come in two flavours: Non-tieable and Tieable. Both are typed,
mutable references. There is no way in runtime to change the flavour.
data Container s a
= NCon (STRef s (NBox a))
| TCon (STRef s (TBox a))
A Non-tieable container is comprised
%foo := %ENV;
()
==> my %foo := %ENV;
Following is a semi-formal treatment for containers, directly transliterated
from the Haskell source.
Containers come in two flavours: Non-tieable and Tieable. Both are typed,
mutable references. There is no way in runtime to change the flavour.
d
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;
Dan Sugalski wrote:
> If you want efficiency, n-dimensional arrays really need to be a concrete
> data type all of their own. That way one big block of memory can be
> allocated and, if it's a typed array, properly sized.
I wholeheartedly agree ;)
>
> That doesn't mean that n-dimensional array
At 08:18 AM 8/29/00 +1200, Christian Soeller wrote:
>Dan Sugalski wrote:
> > That doesn't mean that n-dimensional arrays won't be just sugar over the
> > standard list-o-list structure to start, but they won't have to stay
> that way.
>
>That seems to be a possible route. Get multi-dim syntax for
Dan Sugalski wrote:
> >
> >I'm thinking that a n-dim array could just be a list of lists (of lists of
> >lists of...) with the n-dim notation just being syntactic sugar (and perhaps
> >helping with optimisation too).
>
> If you want efficiency, n-dimensional arrays really need to be a concrete
>
At 10:28 AM 8/28/00 +1000, Jeremy Howard wrote:
>
>
>David L. Nicol wrote:
> > If arrays as we know them implement by using a key space restricted to
> > integers, I think a reasonable way to get matrices would be to open
> > up their key space to lists of integers.
> >
>I've been thinking along e
David L. Nicol wrote:
> If arrays as we know them implement by using a key space restricted to
> integers, I think a reasonable way to get matrices would be to open
> up their key space to lists of integers.
>
I've been thinking along exactly the same lines. There's a lot of language
issues to c
You can make multidimensional containers in perl5 by settling
on a syntax for combining all the dimensions into a key value and
using that as the key in a hash.
If arrays as we know them implement by using a key space restricted to
integers, I think a reasonable way to get matrices would be to
86 matches
Mail list logo