xinming librasteve: I'm not sure when List will be flatten, So I had a habit add | at the front of Positional, Today, I read docs.raku.org/language/list again, When I read "list or arrays with a single element will be flattened", Now I found the answer. 12:35
lizmat xinming: I wonder what you think about the semantics offered by >>> in raku.land/zef:lizmat/OneSeq 12:40
xinming I think the middle letter should be changed to more "list" relted op. :-) 12:49
One of the letter be >>, or <<, 12:50
Or maybe ,>> ,<<
timo (>^_^)> <(^_^<)
xinming Everything >>> makes me feel it's like sending data to other var
timo: Your version is good too 12:51
timo time to standardise support for animated "stickers" so we can have patrick take one variable and put it into another variable 12:53
xinming It's something like, my @merged = [@a1, @a2]; my $merged = @a1 <,< @a2; 12:54
timo (animated stickers outside the standard set require a Raku Turbo subscription)
lizmat thanks for your feedback :-) 12:55
xinming or my $merged = @a1 <<, @a2; 12:57
lizmat m: my @a = ^3; dd @a <<, @a
camelia ===SORRY!=== Error while compiling <tmp>
Missing << or >>
at <tmp>:1
------> my @a = ^3; dd @a <<,<HERE> @a
expecting any of:
infix
infix stopper
xinming But << is used for qutoed list construct 12:58
so <,< is the best bet
lizmat m: my @a = ^3; sub infix:«<<,»(|c) { dd c }; dd @a <<, @a
camelia \([0, 1, 2], [0, 1, 2])
Nil = Nil
lizmat hmmm 12:59
xinming << is used as quoting construct already, So I personally think, <<, should be "quoting" like actions
OneSeq is special version of concat for list, So need something to make it feel like Positional op 13:01
lizmat but the whole point of OneSeq is that it does *not* produce a Positional, but a Seq
(without caching, and hopefully without positional bindfailover 13:02
:q
librasteve lizmat: very nice OneSeq ... any plans to put that in core? 13:07
on the name for the op, well I quite like >>> but I do have the feeling that it could be used for something more common, xinming idea of >,> seems pretty good to me (yes I know its not making a List, but the idea of involving the , and not getting too close to the double quotes is nice 13:10
I am ashamed to say I wrote this line of code has $.url-path = ($!base ?? "$!base/" !! '') ~ "todo";
I find it very ugly ... please can someone give me a hint on how to do this more elegantly? 13:11
lizmat no plans as such, just testing the waters
I recently separated the ops from the underlying functionality, to make it easier to select what you want 13:12
nahita3882 how about less elegant 😐 "{$!base || ""}/todo".substr(!$!base) 14:33
!$! appearing is kind of cool though 14:34
_____________________________._. ($!base || Empty, "todo").join: "/" maybe? 14:54
librasteve hmmm … both good ideas … i was also wondering if there is an IO path kind of operation (prepend parent or something) 14:56
here's my new try do with $base {"$_/"} ~ 'todo' 15:10
ugexe $url-path = join '/', $!base, 'todo'; 15:23
i guess that isn't sufficient either... needs a grep or some such 15:24
$url-path = join '/', grep *.so, $!base, 'todo'; 15:26
librasteve tricky 16:28