Re: Depreciated code????

2021-08-22 Thread ToddAndMargo via perl6-users
On 8/21/21 8:02 PM, ToddAndMargo via perl6-users wrote: On 8/21/21 7:34 PM, ToddAndMargo via perl6-users wrote: Hi All, I narrowed it down by processor eli8mination. The offending line is if  $Code    { $RtnCode   = $proc.status; } I presume what is depreciated is `$proc.status`

Re: (sigils are awesome, they say ...) Re: pairs of separators from a string

2021-08-22 Thread Vadim Belman
Sigils mean a lot. For example, they create a context: my $a = 1,2,3; my @a = 1,2,3; $a = ; say $a.raku; @a = ; say @a.raku; If you have some (actually, a lot of) spare time you can watch my class from TRC2021 where I cover a lot about symbols/sigils/object interaction in Raku:

Re: pairs of separators from a string

2021-08-22 Thread William Michels via perl6-users
Hi Marc! Is it just even/odd elements that you want to separate out? If so, maybe .grep() is your friend here: > my $string0 = q!""''(){}[]! ""''(){}[] > $string0.comb[(0..*-1).grep(* %% 2)].say; (" ' ( { [) > $string0.comb[(0..*-1).grep(* % 2)].say; (" ' ) } ]) It sounds like you have some

Re: intermixed types and resulting types

2021-08-22 Thread yary
"How would you know what types are compatible for a particular operation?" Operations are functions so the question is the same as "How would you know what types are compatible for a particular function" which gets to inspecting a routine's arguments. This SO page helped me figure that out

Re: (sigils are awesome, they say ...) Re: pairs of separators from a string

2021-08-22 Thread Brian Duggan
On Sunday, August 22, Marc Chantreux wrote: > my ($a, $b) = { @^a[0,2...Inf], @a[1,3...Inf] }.(q<(){}[]>.comb); say $a[0]; > say $b[0] > > oh. i never see this direct call of a lambda before but it really makes > sense! this is the answer i like the most. I think it's possible to avoid the

Re: (sigils are awesome, they say ...) Re: pairs of separators from a string

2021-08-22 Thread Fernando Santagata
On Sun, Aug 22, 2021 at 2:58 PM Marc Chantreux wrote: > so of course i tried > > my (@a, @b) = { .[0,2…∞], .[1,3…∞] }.(q.comb); > > because i have two lists and two containers. this doesn't work. > which means @ and $ combines with = to define how things are stored > but i don't understand how

Re: pairs of separators from a string

2021-08-22 Thread Marc Chantreux
hello William, > your string, or whether-or-not some might be nested within each other. You > show a lone ampersand ("&") at the beginning of your example, but other > strings may not be so simple. really sorry about this artefact from previous attempts :( > > $string.comb(/ ( <:Ps> ~ <:Pe> .?)

[solved] pairs of separators from a string

2021-08-22 Thread Marc Chantreux
hello Yary, > and my instinct is that "map" is adding a layer you don't need or want for > this issue, should just be sending the results of comb to a block. But I > can't quite get the syntax right (and docs.raku.org seems down at the > moment) With this and what i understood from Vladim, i

(sigils are awesome, they say ...) Re: pairs of separators from a string

2021-08-22 Thread Marc Chantreux
thanks everyone for sharing, Vadim, my ($a, $b) = { @^a[0,2...Inf], @a[1,3...Inf] }.(q<(){}[]>.comb); say $a[0]; say $b[0] oh. i never see this direct call of a lambda before but it really makes sense! this is the answer i like the most. i rewrote it my way and this works my ($a, $b) = {

Re: pairs of separators from a string

2021-08-22 Thread William Michels via perl6-users
Hi Marc (and yary)! I'll give this a shot, focusing on bracket pairs. It's not clear from your question whether there's any inherent order to the bracket characters in your string, or whether-or-not some might be nested within each other. You show a lone ampersand ("&") at the beginning of your