Re: I need help with IO.e

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-15 22:30, ToddAndMargo via perl6-users wrote: Hi All,. Windows 7, sp1, x64 >raku -v This is Rakudo version 2020.01 built on MoarVM version 2020.01.1 implementing Perl 6.d. I am trying to get perl to tell me if a drive letter exists This is from Git's df command: >df -kPT H:\ Fi

Re: I need help with IO.e

2020-05-16 Thread Laurent Rosenfeld via perl6-users
Hi, it should be: $ raku *-e* "your one-liner script here" Best regards, Laurent. Le sam. 16 mai 2020 à 12:16, ToddAndMargo via perl6-users < perl6-us...@perl.org> a écrit : > On 2020-05-15 22:30, ToddAndMargo via perl6-users wrote: > > Hi All,. > > > > Windows 7, sp1, x64 > > > > >raku -v >

Re: I need help with IO.e

2020-05-16 Thread Kevin Pye
There are three possibilities for the.d test -- the file exists and is a directory, the files exists and is not a directory, and the file does not exist. The test needs to distinguish between these three cases. The documentation for .d states: Returns True if the invocant is a path that exists an

Re: fill in form

2020-05-16 Thread Peter Pentchev
On Fri, May 15, 2020 at 04:42:44PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-15 15:23, Peter Pentchev wrote: > > On Fri, May 15, 2020 at 02:51:10PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-13 14:05, Peter Pentchev wrote: > > > > So... I believe Timo gave you th

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Peter Pentchev
On Fri, May 15, 2020 at 07:32:50PM -0700, Joseph Brenner wrote: > Regex engines by their nature care a lot about order, but I > occasionally want to relax that to match for multiple > multicharacter subpatterns where the order of them doesn't > matter. > > Frequently the simplest thing to do is ju

Re: I need help with IO.e

2020-05-16 Thread Peter Pentchev
On Sat, May 16, 2020 at 01:29:12PM +0200, Laurent Rosenfeld via perl6-users wrote: > Hi, > > it should be: > > $ raku *-e* "your one-liner script here" And also you might want to put some quotes around the paths to let Raku know that those are strings and not some identifiers or something. G'l

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread William Michels via perl6-users
On Fri, May 15, 2020 at 7:33 PM Joseph Brenner wrote: > > Regex engines by their nature care a lot about order, but I > occasionally want to relax that to match for multiple > multicharacter subpatterns where the order of them doesn't > matter. > > Frequently the simplest thing to do is just to ju

Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-14 22:26, Peter Pentchev wrote: And what is `2 * 100 ** 2000 `? Is that `(2 x 100)^ 2000` ((2 times 100) to the 2000 power? Point 1: exponentiation has a higher priority than multiplication. Point 2:https://rosettacode.org/wiki/Integer_roots Any chance of you answering the questio

Re: sqrt and Buf question

2020-05-16 Thread William Michels via perl6-users
Hi Todd, Yes, ** stands for exponentiation. And exponentiation has higher precedence than multiplication. See below (I dropped a few zeros to help clarify): > put 2 * 10 ** 20 2 > put (2 * 10) ** 20 1048576 > put 2 * (10 ** 20) 2 > 20 **

Re: I need help with IO.e

2020-05-16 Thread ToddAndMargo via perl6-users
> Le sam. 16 mai 2020 à 12:16, ToddAndMargo via perl6-users > mailto:perl6-us...@perl.org>> a écrit : > > On 2020-05-15 22:30, ToddAndMargo via perl6-users wrote: > > Hi All,. > > > > Windows 7, sp1, x64 > > > > >raku -v > > This is Rakudo version 2020.01 built o

Re: I need help with IO.e

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 05:34, Kevin Pye wrote: The documentation for .d states: Returns |True| if the invocant is a path that exists and is a directory. The method will |fail|  with |X::IO::DoesNotExist| if the path points to a non-existent filesystem entity. (and

Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 14:48, William Michels via perl6-users wrote: Yes, ** stands for exponentiation Thank you!

Re: I need help with IO.e

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 06:38, Peter Pentchev wrote: $ raku *-e* "your one-liner script here" And also you might want to put some quotes around the paths to let Raku know that those are strings and not some identifiers or something. G'luck, Peter Hi Peter, This is what goofed me up: $ alias p5 alias

Re: I need help with IO.e

2020-05-16 Thread Peter Pentchev
On Sat, May 16, 2020 at 03:19:05PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-16 06:38, Peter Pentchev wrote: > > > $ raku *-e* "your one-liner script here" > > And also you might want to put some quotes around the paths to let Raku > > know that those are strings and not some identifi

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Joseph Brenner
This is pretty interesting, though I think you're talking about a different subject... I was talking about cases where the sub-patterns are more than one character long. It's true that if you were interested in single-character sub-patterns, then you could get close with character classes and nega

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Joseph Brenner
Yes, both of those work, and arguably they're a little cleaner looking than my conjunction approach-- though it's not necessarily any easier to think about. It looks like a pattern that's matching for three things in order, but the zero-widthness of the "before" let's them all work on top of each

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Peter Pentchev
On Sat, May 16, 2020 at 05:53:04PM -0700, Joseph Brenner wrote: > Peter Pentchev wrote: > > On Fri, May 15, 2020 at 07:32:50PM -0700, Joseph Brenner wrote: > >> Regex engines by their nature care a lot about order, but I > >> occasionally want to relax that to match for multiple > >> multicharact

Re: I need help with IO.e

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 17:44, Peter Pentchev wrote: On Sat, May 16, 2020 at 03:19:05PM -0700, ToddAndMargo via perl6-users wrote: On 2020-05-16 06:38, Peter Pentchev wrote: $ raku *-e* "your one-liner script here" And also you might want to put some quotes around the paths to let Raku know that those a