Re: Associative class for any key, any value

2020-08-26 Thread yary
Yep that's it, thanks! > my Any %h{ Any }; > %h{ 22 } = "foo"; %h{ "22" } = IO; %h{ IO } = sub { ... }; > %h.kv.raku; (IO, sub { ... }, 22, "foo", "22", IO).Seq -y On Wed, Aug 26, 2020 at 8:04 PM Brad Gilbert wrote: > > On Wed, Aug 26, 2020 at 9:56 PM yary wrote: > >> Map and its descendan

Re: Associative class for any key, any value

2020-08-26 Thread Brad Gilbert
On Wed, Aug 26, 2020 at 9:56 PM yary wrote: > Map and its descendants like Hash relate "from *string* keys to values of > *arbitrary* types" > QuantHash and its descendants like Mix, Bag, Set "provide *object* hashes > whose values are *limited* in some way" > > Is there an associative class wher

Associative class for any key, any value

2020-08-26 Thread yary
Map and its descendants like Hash relate "from *string* keys to values of *arbitrary* types" QuantHash and its descendants like Mix, Bag, Set "provide *object* hashes whose values are *limited* in some way" Is there an associative class where both the keys and values are arbitrary? -y

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread Tobias Boege
On Wed, 26 Aug 2020, Tobias Boege wrote: > Observe: > > > 1 ...^ 20 > (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) > > > 1 ... ^20 # actually C«1 ... (0..19)» > (1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) > > The documentation [1] states that the C«...» infix is list-asso

Re: Extended identifiers in named attributes

2020-08-26 Thread Brad Gilbert
The problem is that often adverbs are chained without a comma. my %h = (a => 1); %h{'a'}:exists:delete # True say %h.keys; # () --- my %h = (a => 1); postcircumfix:< { } >( %h{'a'}, :exists:delete ) # True say %h.keys; # () On Wed, Aug 26, 2020 at 7:31 AM Marcel Timmer

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread William Michels via perl6-users
On Wed, Aug 26, 2020 at 10:33 AM Tobias Boege wrote: > > On Wed, 26 Aug 2020, William Michels via perl6-users wrote: > > > They can be pretty great, especially when combined with the magic op= > > > operators that (in essence) know about identity elements. I've done a > > > few challenges on th

Re: Extended identifiers in named attributes

2020-08-26 Thread Marcel Timmerman
On 2020-08-26 17:48, Tom Browder wrote: On Wed, Aug 26, 2020 at 07:31 Marcel Timmerman > wrote: I was experimenting with extended identifiers and found that it is not possible to use it in named attributes. E.g. > sub a (:$x:y) { say $x:y; } Are you sure t

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread Tobias Boege
On Wed, 26 Aug 2020, William Michels via perl6-users wrote: > > They can be pretty great, especially when combined with the magic op= > > operators that (in essence) know about identity elements. I've done a few > > challenges on the Code Golf Stackexchange site where I wanted an infinite > > s

Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread William Michels via perl6-users
> They can be pretty great, especially when combined with the magic op= > operators that (in essence) know about identity elements. I've done a few > challenges on the Code Golf Stackexchange site where I wanted an infinite > sequence like this: > > 0, 1, -2, 3, -4, 5, -6, ... > > It took m

Re: Extended identifiers in named attributes

2020-08-26 Thread Tom Browder
On Wed, Aug 26, 2020 at 07:31 Marcel Timmerman wrote: I was experimenting with extended identifiers and found that it is > > not possible to use it in named attributes. E.g. > > > sub a (:$x:y) { say $x:y; } > > Are you sure that is supposed to work without some kind of () or <> like a module ide

Re: Extended identifiers in named attributes

2020-08-26 Thread Gianni Ceccarelli
On Wed, 26 Aug 2020 14:31:06 +0200 Marcel Timmerman wrote: > I was experimenting with extended identifiers and found that it is > not possible to use it in named attributes. E.g. > > > sub a (:$x:y) { say $x:y; } > ===SORRY!=== Error while compiling: > Unsupported use of y///. In Raku please us

Re: Extended identifiers in named attributes

2020-08-26 Thread William Michels via perl6-users
Hi Marcel, It almost looks to me that a pair of characters--possibly the two colons--is being interpreted as an alternative delimiter for the tr/// operator. I'd suggest this is a bug, so you should consider opening an issue on Github. But I have little experience with "named attributes", so does a

Extended identifiers in named attributes

2020-08-26 Thread Marcel Timmerman
Hi everyone, I was experimenting with extended identifiers and found that it is not possible to use it in named attributes. E.g. sub a (:$x:y) { say $x:y; } ===SORRY!=== Error while compiling: Unsupported use of y///. In Raku please use: tr///. --> sub a (:$x:y⏏) { say $x:y; } sub a

Re: Readline package

2020-08-26 Thread p.spek via perl6-users
On Fri, Aug 21, 2020 at 11:43:34AM -0500, Daniel ”Fooist” Lathrop wrote: > Hi Patrick, > > What do you think? > > -Daniel > > Sent from my iPhone > > Daniel Lathrop (@lathropd) > Mobile: (206) 718-0349 > PGP key: https://keybase.io/lathropd (raw) Hi Daniel, I've just started on making the