7 Dec 2021 Nemokosch While Bag.new would keep the lists as the elements 00:20 Copy link Show on day Add to gist Remove moreover Bag.new doesn't count the duplicates 00:46 Copy link Show on day Add to gist Remove this is a bit cruel. It compares with === and (1,2) fails on that, no matter that it's immutable 00:48 Copy link Show on day Add to gist Remove (1,2) !=== (1,2) Copy link Show on day Add to gist Remove I can get by by converting the lists into pairs that do match by === but frankly, one would expect identity to work on plain immutable data 00:53 Copy link Show on day Add to gist Remove hm, it works with the data sigil! 00:55 Copy link Show on day Add to gist Remove \\(1,2) === \\(1,2) Copy link Show on day Add to gist Remove gfldex I would be really careful to use ===. You are in C-land if you do. 00:56 Copy link Show on day Add to gist Remove Nemokosch I don't use it - Bag does... 00:57 Copy link Show on day Add to gist Remove this leads to another question - what is (1,2) actually? Copy link Show on day Add to gist Remove if it's apparently not the same as \\(1,2) Copy link Show on day Add to gist Remove is it the same as @(1,2)? Copy link Show on day Add to gist Remove gfldex Those are instances of Capture. Raku-Objects are just C-pointers under the hood. Since value objects are cached, they can return True on ===. 00:59 Copy link Show on day Add to gist Remove Nemokosch they can whenever they feel like or are they guaranteed to? Copy link Show on day Add to gist Remove gfldex if you do 1 === 1 you rely on the fact that the compiler reuses the object that is 1. Copy link Show on day Add to gist Remove The spec demands as such. Copy link Show on day Add to gist Remove If you ask me to list all types that are considered values, I would be at a loss. Copy link Show on day Add to gist Remove Nemokosch so I can call .Capture on a list to get this \\ version? 01:01 Copy link Show on day Add to gist Remove gfldex m: put (1,2,3,4).&{ say $_,$_}.Capture.raku; 01:02 Copy link Show on day Add to gist Remove m: 01:03 Copy link Show on day Add to gist Remove put (1,2,3,4).&{ say $_,$_}.Capture.raku; Copy link Show on day Add to gist Remove  Copy link Show on day Add to gist Remove m: (1,2,3,4).Capture.raku.put; Copy link Show on day Add to gist Remove Nemokosch okay, this worked, thank you 🙂 01:07 Copy link Show on day Add to gist Remove Can I get a downwards range? 01:28 Copy link Show on day Add to gist Remove in fact, the sequence operator will do just fine but I'm still curious 01:30 Copy link Show on day Add to gist Remove I wonder what happens when writing Z... 01:34 Copy link Show on day Add to gist Remove m: dd (8, 10) Z... (16, 2) Copy link Show on day Add to gist Remove it seems to me that basically a plain zip call happens Copy link Show on day Add to gist Remove Z.. produces ranges tho Copy link Show on day Add to gist Remove m: dd (8, 10) Z.. (16, 2) Copy link Show on day Add to gist Remove I'm pretty sure the former is related to list associativity again because I got an error for an $a ...$b Z $c ...$d kind of call 01:38 Copy link Show on day Add to gist Remove gfldex m: dd &infix:<..>; 01:59 Copy link Show on day Add to gist Remove I would have guessed that to be some grammar magic. It's operators all the way down. :) 02:01 Copy link Show on day Add to gist Remove Nemokosch How does ... work though? 10:09 Copy link Show on day Add to gist Remove gfldex m: &infix:<...>; 13:59 Copy link Show on day Add to gist Remove m: dd &infix:<...>; 14:00 Copy link Show on day Add to gist Remove Nemokosch hmmm 14:34 Copy link Show on day Add to gist Remove (|) Copy link Show on day Add to gist Remove How can I unite lists? 14:50 Copy link Show on day Add to gist Remove lakmatiol [|@a,|@b] I have seen in the docs quite a bit 14:56 Copy link Show on day Add to gist Remove Nemokosch it works I guess... I kinda miss an operator for this 15:05 Copy link Show on day Add to gist Remove gfldex m: 15:55 Copy link Show on day Add to gist Remove multi sub infix:«|,»(\left, \right) is equiv(&infix:) { |left, |right } Copy link Show on day Add to gist Remove  Copy link Show on day Add to gist Remove SmokeMachine m: my @a = 1,2,3; my @b = ; @a.push: |@b; say @a # if you want to mutate it... 17:28 Copy link Show on day Add to gist Remove Run code camelia [1 2 3 a b c] Copy link Show on day Add to gist Remove SmokeMachine m: my @a = 1,2,3; my @b = ; @a.append: @b; say @a Copy link Show on day Add to gist Remove Run code camelia [1 2 3 a b c] Copy link Show on day Add to gist Remove Nemokosch yes, I know that part 17:52 Copy link Show on day Add to gist Remove is there a placeholder argument in signatures, indicating that I don't care about a certain argument for the return value? Copy link Show on day Add to gist Remove gfldex m: say sub subby($a,$, \$b){}; subby(1,2,3); 17:56 Copy link Show on day Add to gist Remove Nemokosch oh fine Copy link Show on day Add to gist Remove