Don't 'say' anything. Just let the optimizer spit out the QAST that you
are interested in looking at.
The following spits out a diff after optimization:
# diff -u <(perl6 --target=optimize -e '"test".IO.e') <(perl6
--target=optimize -e '"test".IO.e.Bool')
>> Huh. Not sure what I am looking at
On 2020-05-17 21:48, Paul Procacci wrote:
You can check this yourself by looking at the QAST nodes after the
static analyzer has had its fill:
# diff -u <(perl6 --target=optimize -e '"test".IO.e') <(perl6
--target=optimize -e '"test".IO.e.Bool')
Huh. Not sure what I am looking at
$ diff -
On 2020-05-17 21:56, ToddAndMargo via perl6-users wrote:
Follow up:
Thank you for all the help figuring all this out!
Follow up:
When I go to maintain this thing in five days or five
years and I have one of those "what the h*** is IO.d.Bool
suppose to mean?" moments, I created the follow subs to make the code
more readable/maintainable.
And mind you I can always look up what IO.d.Bool means
in my own IO docum
You can check this yourself by looking at the QAST nodes after the static
analyzer has had its fill:
# diff -u <(perl6 --target=optimize -e '"test".IO.e') <(perl6
--target=optimize -e '"test".IO.e.Bool')
On Mon, May 18, 2020 at 12:25 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
On 2020-05-17 21:19, ToddAndMargo via perl6-users wrote:
On 2020-05-17 20:28, Paul Procacci wrote:
So tack a .Bool at the end.
You are coercing a bool to a bool by doing so and hopefully the
optimizer is smart enough for people who like to be redundant.
;)
Hi Paul,
Especially when I can ne
On 2020-05-17 20:28, Paul Procacci wrote:
So tack a .Bool at the end.
You are coercing a bool to a bool by doing so and hopefully the
optimizer is smart enough for people who like to be redundant.
;)
Hi Paul,
Especially when I can never remember when IO.someletter
will return a full True or
So tack a .Bool at the end.
You are coercing a bool to a bool by doing so and hopefully the optimizer
is smart enough for people who like to be redundant.
;)
On Sun, May 17, 2020 at 6:10 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2020-05-17 14:43, ToddAndMargo via perl6-
On 2020-05-17 14:43, ToddAndMargo via perl6-users wrote:
Although
"say 'yes' if 'h:/'.IO.d"
is obscure to me and
"say 'h:/'.IO.d.Bool"
is very easy for me to understand.
Hi Peter,
I think it would help if you knew how my
mind worked.
`if` to me is a Boolean function. If this
exp
On 2020-05-17 13:04, Peter Pentchev wrote:
On Sun, May 17, 2020 at 12:12:51PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-05-17 03:36, Peter Pentchev wrote:
On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users wrote:
On 2020-05-17 02:30, Peter Pentchev wrote:
You said
On Sun, May 17, 2020 at 12:12:51PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-05-17 03:36, Peter Pentchev wrote:
> > On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > On 2020-05-17 02:30, Peter Pentchev wrote:
> > > > You said that you would tack Boo
On 2020-05-17 03:50, Elizabeth Mattijsen wrote:
[11:50:21]you don.t need the .Bool, .e already returns a Bool
[11:53:07] sometimes IO.someletter returns True of Fail, not
False. Tacking .Bool on the end, means I don't have to remember which ones
[11:57:23] True or Fail. Typo
[11:58:2
On 2020-05-17 03:36, Peter Pentchev wrote:
On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users wrote:
On 2020-05-17 02:30, Peter Pentchev wrote:
You said that you would tack Bool at the end in "if" statements, too.
Hi Peter,
No wonder. I do not remember saying that, but I
On 2020-05-17 07:47, Brad Gilbert wrote:
Why do you have `.Bool` on all of the `.e` tests?
Hi Brad,
I do this because it keeps me out of trouble.
I want back a yes or no answer, not True or Fail
(X::IO::DoesNotExist).
And I never remember which IO. will return
a True or Fail or which functio
Peter Pentchev wrote:
> Actually, there is, and I conveniently did not mention it :) It's the
> case when the patterns may overlap: if you do the ' 'the' and 'entrance', you might match 'thentrance', which, depending on
> your use case, might not be ideal.
That's a good point, but it's true that
Why do you have `.Bool` on all of the `.e` tests?
A file or directory either exists or it doesn't. So `.e` always returns a
Bool.
So there is zero reason to try to coerce it to a Bool.
You can look at the return value of `.e`.
> say '.'.IO.can('e').head.signature
(IO::Path:D: *%_ --> Boo
[11:50:21] you don.t need the .Bool, .e already returns a Bool
[11:53:07]sometimes IO.someletter returns True of Fail,
not False. Tacking .Bool on the end, means I don't have to remember which ones
[11:57:23]True or Fail. Typo
[11:58:21] A Failure is always false
[12:03
On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-05-17 02:30, Peter Pentchev wrote:
> > You said that you would tack Bool at the end in "if" statements, too.
>
> Hi Peter,
>
> No wonder. I do not remember saying that, but I could
> have. My `if` statements
On 2020-05-17 02:30, Peter Pentchev wrote:
You said that you would tack Bool at the end in "if" statements, too.
Hi Peter,
No wonder. I do not remember saying that, but I could
have. My `if` statements look like:
if not "%Options".IO.d.Bool {
say "Creating %Options";
mkdir(
On 2020-05-17 00:52, ToddAndMargo via perl6-users wrote:
Hi All,
Windows 7 & 10
I want to know if a drive letter exists:
K:\Windows\NtUtil>df -kPT
Filesystem Type 1024-blocks Used Available Capacity
Mounted on
C:/Program Files/Git ntfs 40585620 15044068 25541552 3
On Sun, May 17, 2020 at 02:18:30AM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-05-17 01:23, Peter Pentchev wrote:
> > On Sat, May 16, 2020 at 06:57:53PM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > On 2020-05-16 17:44, Peter Pentchev wrote:
> > > > On Sat, May 16, 2020 at 03:19:05
On 2020-05-17 01:23, Peter Pentchev wrote:
On Sat, May 16, 2020 at 06:57:53PM -0700, ToddAndMargo via perl6-users wrote:
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 *
On Sat, May 16, 2020 at 06:57:53PM -0700, ToddAndMargo via perl6-users wrote:
> 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 sc
Hi All,
Windows 7 & 10
I want to know if a drive letter exists:
K:\Windows\NtUtil>df -kPT
Filesystem Type 1024-blocks Used Available Capacity
Mounted on
C:/Program Files/Git ntfs 40585620 15044068 25541552 38% /
D: udf 5294394 5294394
24 matches
Mail list logo