Re: I need a second pair of eyes

2020-05-26 Thread Peter Pentchev
On Tue, May 26, 2020 at 07:16:54PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-25 23:42, ToddAndMargo via perl6-users wrote: > > HI All, > > > > I am missing something here: > > > > > > 154:   # figure out the label > > 155:   say %CommandLine; > > 156:   if "%CommandLine".starts-wit

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-26 19:16, ToddAndMargo via perl6-users wrote: On 2020-05-25 23:42, ToddAndMargo via perl6-users wrote: HI All, I am missing something here: 154:   # figure out the label 155:   say %CommandLine; 156:   if "%CommandLine".starts-with( "[" )  && 157:  "%CommandLine".contains( "]"

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-25 23:42, ToddAndMargo via perl6-users wrote: HI All, I am missing something here: 154:   # figure out the label 155:   say %CommandLine; 156:   if "%CommandLine".starts-with( "[" )  && 157:  "%CommandLine".contains( "]" ) { BACKUP:\MyDocsBackup\backup1 Cannot resolve caller i

Re: need string is not a a string is a string help

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-26 17:13, ToddAndMargo via perl6-users wrote: Hi All, What in the dickens  Only `say  %Options;` works, but only when it only has a single argument. 241: for split( "", %Options ) -> $y {say "$y = ", ord( $y ) }; 242: for %Options.comb -> $y {say "$y = ", ord( $y ) }; 243: say 

Re: I need help testing for Nil

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-26 16:29, Brad Gilbert wrote: There are various equality operators. 「==」 Tests for numeric equality 「eq」 Tests for string equality 「===」 Tests for value identity 「=:=」 Tests for pointer equality (Note that it looks a bit like 「:=」) 「eqv」 Tests for structure equivalence. The 「==」 and

need string is not a a string is a string help

2020-05-26 Thread ToddAndMargo via perl6-users
Hi All, What in the dickens Only `say %Options;` works, but only when it only has a single argument. 241: for split( "", %Options ) -> $y {say "$y = ", ord( $y ) }; 242: for %Options.comb -> $y {say "$y = ", ord( $y ) }; 243: say %Options; 244: say ">" ~ %Options ~ "<"; 245: prin

Re: Regexps using 'after' and 'before' like ^ and $

2020-05-26 Thread Joseph Brenner
Hey Brad, thanks much for the explication: > 「」 should probably also prevent the position from being at the end. > It does work if you write it differently > 'abc' ~~ / b / > Nil That's pretty interesting, though I can't say I understand at all what's going on there. > It does seem li

Re: I need help testing for Nil

2020-05-26 Thread Brad Gilbert
There are various equality operators. 「==」 Tests for numeric equality 「eq」 Tests for string equality 「===」 Tests for value identity 「=:=」 Tests for pointer equality (Note that it looks a bit like 「:=」) 「eqv」 Tests for structure equivalence. The 「==」 and 「eq」 operators are special because they for

Re: Regexps using 'after' and 'before' like ^ and $

2020-05-26 Thread Brad Gilbert
I'm not sure that is the best way to look at 「」 and 「」. > 'abcd123abcd' ~~ / > .+ > / 「123」 In the above code 「>」 makes sure that the first thing that 「.+」 matches is a 「」 And 「>」 makes sure that the last thing 「.+」 matches is also a 「」 The 「>」 is written in front of the 「.+」 so it start

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
On Tue, May 26, 2020 at 4:54 PM yary > wrote: From this much 158: Cannot resolve caller index(Str:U: Str:D); none of these signatures match: "index" is being called with the 1st arg undefined, 2nd arg defined. There is no "index" multi handling the

Re: I need a second pair of eyes

2020-05-26 Thread Brad Gilbert
This is more of how I would structure it with %CommandLine { .say; # if /^ '[' .*? ']' / { if .starts-with('[') && .contains(']') { ... } } else { say 'no backup path given' } We can skip checking 「.starts-with」 and 「.contains」 if th

Re: I need help testing for Nil

2020-05-26 Thread ToddAndMargo via perl6-users
On Tue, May 26, 2020 at 4:24 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote: Hi All, How do I turn this: $ raku -e 'my $x="abc"; say $x.index( "q" );' Nil into a test? $ raku -e 'my $x="abc"; if $x.index( "q" ) eq Nil {say "Nil"}else{say "Exis

Re: I need help testing for Nil

2020-05-26 Thread Brad Gilbert
Generally you don't need to test for 「Nil」. You can just test for defined-ness. $ raku -e 'my $x="abc"; with $x.index( "q" ) {say "Exists"} else {say "Nil";}' Also 「Nil」 is not a 「Str」, so why would you use 「eq」? $ raku -e 'Nil.Str' Use of Nil in string context If you really need to

Re: I need a second pair of eyes

2020-05-26 Thread yary
>From this much 158: Cannot resolve caller index(Str:U: Str:D); none of these signatures match: "index" is being called with the 1st arg undefined, 2nd arg defined. There is no "index" multi handling the 1st undefined arg, is my guess. -y On Tue, May 26, 2020 at 4:41 AM ToddAndMargo via perl6-

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-26 01:40, ToddAndMargo via perl6-users wrote: On 2020-05-26 01:37, ToddAndMargo via perl6-users wrote: 155: A:\YourDocs\backup1 156: No   157: No     158: Cannot reso

I need help testing for Nil

2020-05-26 Thread ToddAndMargo via perl6-users
Hi All, How do I turn this: $ raku -e 'my $x="abc"; say $x.index( "q" );' Nil into a test? $ raku -e 'my $x="abc"; if $x.index( "q" ) eq Nil {say "Nil"}else{say "Exists";}' Use of Nil in string context in block at -e line 1 Use of Nil in string context in block at -e line 1 Nil Many

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
On 2020-05-26 01:37, ToddAndMargo via perl6-users wrote: 155: A:\YourDocs\backup1     156: No  157: No    158: Cannot resolve caller index(Str:U: Str:D); none of these signatures

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
This is Rakudo version 2020.05.1 built on MoarVM version 2020.05 implementing Raku 6.d. It is back at it again. The second test, I sent it something with brackets in it. It is the failed test to goes wonkers I put some debugging and is seems that it does not like my `&&` 155: say %CommandLi

Re: I need a second pair of eyes

2020-05-26 Thread ToddAndMargo via perl6-users
> On Tue, May 26, 2020, 09:45 ToddAndMargo via perl6-users > mailto:perl6-us...@perl.org>> wrote: > > HI All, > > I am missing something here: > > > 154: # figure out the label > 155: say %CommandLine; > 156: if "%CommandLine".starts-with( "["

Rakudo Star 2020.05

2020-05-26 Thread p.spek via perl6-users
Good day Rakoons! After two release candidates for 2020.05, I'm happy to announce that Rakudo Star is getting its official 2020.05 release. With help from hankache on the Windows side of things, we have gotten no reports of issues that prevent anyone from using this release. The files can be foun