[perl #128913] [BUG] decimal->float non-monotonic conversion

2018-04-13 Thread Zoffix Znet via RT
On Fri, 12 Aug 2016 10:00:17 -0700, zef...@fysh.org wrote: > > "9.9981e0".EVAL < "9.998e0".EVAL > True > > Observe that the literal with a greater nominal value yields a lower > Num value. (The .EVAL circumlocution is required to work around [perl > #128820].) This implie

[perl #128913] [BUG] decimal->float non-monotonic conversion

2018-04-13 Thread Zoffix Znet via RT
On Fri, 12 Aug 2016 10:00:17 -0700, zef...@fysh.org wrote: > > "9.9981e0".EVAL < "9.998e0".EVAL > True > > Observe that the literal with a greater nominal value yields a lower > Num value. (The .EVAL circumlocution is required to work around [perl > #128820].) This implie

Re: [perl #128913] [BUG] decimal->float non-monotonic conversion [Request: ET-9576 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544030 

Re: [perl #128913] [BUG] decimal->float non-monotonic conversion [Request: ET-9577 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544031 

Re: [perl #133107] LTA: require of non installed module

2018-04-13 Thread Elizabeth Mattijsen
The problem is actually caused by the error reporting: https://github.com/rakudo/rakudo/blob/08b951c8f33cfc702c308e64efcb44f3ec725117/src/core/Exception.pm6#L2969 The only heuristic I’ve been able to find so far that the value of $ns{$_} suddenly is no longer fully qualified if the namespace d

Re: [perl #133107] LTA: require of non installed module

2018-04-13 Thread Elizabeth Mattijsen via RT
The problem is actually caused by the error reporting: https://github.com/rakudo/rakudo/blob/08b951c8f33cfc702c308e64efcb44f3ec725117/src/core/Exception.pm6#L2969 The only heuristic I’ve been able to find so far that the value of $ns{$_} suddenly is no longer fully qualified if the namespace d

Re: Re [Request: ET-9592 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544046 

[perl #132329] [MATH] Rat → Num conversion isn’t monotonous

2018-04-13 Thread Zoffix Znet via RT
On Fri, 20 Oct 2017 07:34:04 -0700, victor.a...@derpymail.org wrote: > How to reproduce > > > perl6 -e 'my ($a, $b) = (0.7, > 0.71); say $a <=> $b, " ", Num($a) <=> Num($b)' > > Expected behavior > - > > Prints `Less Less`,

[perl #132329] [MATH] Rat → Num conversion isn’t monotonous

2018-04-13 Thread Zoffix Znet via RT
On Fri, 20 Oct 2017 07:34:04 -0700, victor.a...@derpymail.org wrote: > How to reproduce > > > perl6 -e 'my ($a, $b) = (0.7, > 0.71); say $a <=> $b, " ", Num($a) <=> Num($b)' > > Expected behavior > - > > Prints `Less Less`,

Re: [perl #132329] [MATH] Rat → Num conversion isn’t monotonous [Request: ET-9599 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544053 

Re: [perl #132329] [MATH] Rat → Num conversion isn’t monotonous [Request: ET-9600 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544054 

[perl #133107] LTA: require of non installed module

2018-04-13 Thread Zoffix Znet via RT
On Thu, 12 Apr 2018 23:34:43 -0700, mar...@senfdax.de wrote: > requireing a non installed module leads to strange error if the name > starts with the name of a core module. e.g: > > > > perl6 -e 'require IO::Socket::Async::SSL' > IO::Socket::Async::SSL is a builtin type, not an external module

[perl #133107] LTA: require of non installed module

2018-04-13 Thread Zoffix Znet via RT
On Thu, 12 Apr 2018 23:34:43 -0700, mar...@senfdax.de wrote: > requireing a non installed module leads to strange error if the name > starts with the name of a core module. e.g: > > > > perl6 -e 'require IO::Socket::Async::SSL' > IO::Socket::Async::SSL is a builtin type, not an external module

Re: [perl #133107] LTA [Request: ET-9681 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544135 

Re: [perl #133107] LTA [Request: ET-9680 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544134 

awk?

2018-04-13 Thread ToddAndMargo
Hi All, How to I translate this to Perl 6? I am looking to be able to dig out the fourth (or any) data point. #!bin/bash $x=$(echo "total kB 1804482980 112" | awk '{print $4}') echo $x 2980 Many thanks, -T

how do I do an integer divide?

2018-04-13 Thread ToddAndMargo
Hi All, How do I do and integer divide? By that I mean I want only the whole number and not the decimal point or the fraction. 21 DIV 4 = 5 (not 5.25) 21 % 4 = 1 (remainder = 1) Many thanks, -T

Re: how do I do an integer divide?

2018-04-13 Thread Simon Proctor
It's div (lowercase) so 21 div 4 = 5 :) On Fri, 13 Apr 2018 at 11:07 ToddAndMargo wrote: > Hi All, > > How do I do and integer divide? > > By that I mean I want only the whole number and > not the decimal point or the fraction. > > 21 DIV 4 = 5 (not 5.25) > 21 % 4 = 1 (remainder = 1) > > >

[perl #128914] [BUG] decimal->float conversion differs for literals and Str.Num

2018-04-13 Thread Zoffix Znet via RT
On Fri, 12 Aug 2016 10:24:48 -0700, zef...@fysh.org wrote: > > "9.998e0".EVAL - "9.998e0".Num > 1.77635683940025e-15 > > Observe that the same string yields different Num values when interpreted > as a Num literal and when coerced. Where the string is meaningful both > way

[perl #128914] [BUG] decimal->float conversion differs for literals and Str.Num

2018-04-13 Thread Zoffix Znet via RT
On Fri, 12 Aug 2016 10:24:48 -0700, zef...@fysh.org wrote: > > "9.998e0".EVAL - "9.998e0".Num > 1.77635683940025e-15 > > Observe that the same string yields different Num values when interpreted > as a Num literal and when coerced. Where the string is meaningful both > way

Re: [perl #128914] [BUG] decimal->float conversion differs for literals and Str.Num [Request: ET-9726 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544180 

Re: [perl #128914] [BUG] decimal->float conversion differs for literals and Str.Num [Request: ET-9727 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544181 

[perl #128820] [BUG] == on Num literals produces bogus answer

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 10:55:34 -0700, zef...@fysh.org wrote: > > 1180591620717411303424e0 == 1180591620717409992704e0 > True > > 1180591620717411303424e0 === 1180591620717409992704e0 > True > > Say what? These are distinct Num values, differing by 10 ulp. > These literals work fine in other context

[perl #128820] [BUG] == on Num literals produces bogus answer

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 10:55:34 -0700, zef...@fysh.org wrote: > > 1180591620717411303424e0 == 1180591620717409992704e0 > True > > 1180591620717411303424e0 === 1180591620717409992704e0 > True > > Say what? These are distinct Num values, differing by 10 ulp. > These literals work fine in other context

Re: [perl #128820] [BUG] == on Num literals produces bogus answer [Request: ET-9760 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544216 

Re: [perl #128820] [BUG] == on Num literals produces bogus answer [Request: ET-9759 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544215 

[perl #128819] [BUG] Num.WHICH doesn't discriminate enough

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 10:44:50 -0700, zef...@fysh.org wrote: > > my $a = 1180591620717411303424e0 > 1.18059162071741e+21 > > my $b = 1180591620717409992704e0 > 1.18059162071741e+21 > > $a.Int > 1180591620717411303424 > > $b.Int > 1180591620717409992704 > > $a == $b > False > > $a === $b > False > > $

[perl #128819] [BUG] Num.WHICH doesn't discriminate enough

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 10:44:50 -0700, zef...@fysh.org wrote: > > my $a = 1180591620717411303424e0 > 1.18059162071741e+21 > > my $b = 1180591620717409992704e0 > 1.18059162071741e+21 > > $a.Int > 1180591620717411303424 > > $b.Int > 1180591620717409992704 > > $a == $b > False > > $a === $b > False > > $

Re: [perl #128819] [BUG] Num.WHICH doesn't discriminate enough [Request: ET-9768 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544229 

Re: [perl #128819] [BUG] Num.WHICH doesn't discriminate enough [Request: ET-9769 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1544230 

Re: awk?

2018-04-13 Thread Shlomi Fish
Hi Todd, On Fri, 13 Apr 2018 03:00:22 -0700 ToddAndMargo wrote: > echo "total kB 1804482980 112" | awk '{print $4}') shlomif[Perl6]:$trunk$ echo "total kB 1804482980 112" | perl6 -n -e 'say .split(/\s+/)[3]' 2980 shlomif[Perl6]:$trunk$ echo "total kB

Fw: awk?

2018-04-13 Thread Shlomi Fish
Begin forwarded message: Date: Fri, 13 Apr 2018 13:31:12 +0300 From: Shlomi Fish To: perl6-us...@perl.org Subject: Re: awk? Hi Todd, On Fri, 13 Apr 2018 03:00:22 -0700 ToddAndMargo wrote: > echo "total kB 1804482980 112" | awk '{print $4}') shlomif[Perl6]:$trunk$ echo "

Re: awk?

2018-04-13 Thread Fernando Santagata
Hi, Since "There's More Than One Way To Do It", one can look for the value, instead of the separator: $ echo "total kB 1804482980 112" |perl6 -n -e 'say .comb(/\d+/)[1]' 2980 On Fri, Apr 13, 2018 at 12:31 PM, Shlomi Fish wrote: > Hi Todd, > > On Fri, 13 Apr 2018 03:00:22 -070

Re: awk?

2018-04-13 Thread Brian Duggan
One could also use .words -- $ echo "total kB 1804482980 112" |perl6 -n -e 'say .words[3]' 2980 Brian On Friday, April 13, Fernando Santagata wrote: > Hi, > > Since "There's More Than One Way To Do It", one can look for the value, > instead of the separator: > > $ echo "total

[perl #128817] [BUG] Num.perl doesn't round-trip numeric value

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 09:51:31 -0700, zef...@fysh.org wrote: > > (1180591620717411303424.0e0).Int > 1180591620717411303424 > > (1180591620717411303424.0e0).perl.EVAL.Int > 1180591620717409992704 > > The .perl.EVAL process ought to yield the same value we started with. > It's coming back as a differe

[perl #128817] [BUG] Num.perl doesn't round-trip numeric value

2018-04-13 Thread Zoffix Znet via RT
On Tue, 02 Aug 2016 09:51:31 -0700, zef...@fysh.org wrote: > > (1180591620717411303424.0e0).Int > 1180591620717411303424 > > (1180591620717411303424.0e0).perl.EVAL.Int > 1180591620717409992704 > > The .perl.EVAL process ought to yield the same value we started with. > It's coming back as a differe

Re: [perl #128817] [BUG] Num.perl doesn't round-trip numeric value [Request: ET-10405 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1549154 

Re: [perl #128817] [BUG] Num.perl doesn't round-trip numeric value [Request: ET-10404 is created]

2018-04-13 Thread dcu
  Thank you for your email request. Your request ID is I-1549153 

Re: how do I do an integer divide?

2018-04-13 Thread ToddAndMargo
On Fri, 13 Apr 2018 at 11:07 ToddAndMargo > wrote: How do I do and integer divide? On 04/13/2018 03:09 AM, Simon Proctor wrote: It's div (lowercase) so 21 div 4 = 5 :) That was easy. Thank you! -- ~~ Computers are like

Re: awk?

2018-04-13 Thread ToddAndMargo
On 04/13/2018 03:31 AM, Shlomi Fish wrote: Hi Todd, On Fri, 13 Apr 2018 03:00:22 -0700 ToddAndMargo wrote: echo "total kB 1804482980 112" | awk '{print $4}') shlomif[Perl6]:$trunk$ echo "total kB 1804482980 112" | perl6 -n -e 'say .split(/\s+/)[3]' 2980 s

Re: awk?

2018-04-13 Thread ToddAndMargo
On Fri, Apr 13, 2018 at 12:31 PM, Shlomi Fish > wrote: Hi Todd, On Fri, 13 Apr 2018 03:00:22 -0700 ToddAndMargo mailto:toddandma...@zoho.com>> wrote: > echo "total kB 1804482980 112" | awk '{print $4}') shlomif[Perl6]:$tru

Re: awk?

2018-04-13 Thread ToddAndMargo
On Friday, April 13, Fernando Santagata wrote: Hi, Since "There's More Than One Way To Do It", one can look for the value, instead of the separator: $ echo "total kB 1804482980 112" |perl6 -n -e 'say .comb(/\d+/)[1]' 2980 On Fri, Apr 13, 2018 at 12:31 PM, Shlomi Fish wrote:

Re: awk?

2018-04-13 Thread ToddAndMargo
On 04/13/2018 04:13 AM, Fernando Santagata wrote: "There's More Than One Way To Do It" The definition of Perl! :-)

Does words have a delimiter?

2018-04-13 Thread ToddAndMargo
Hi All, I am over on https://docs.perl6.org/routine/words and I can't make heads of tails out of it. Does "words" have a delimiter, as does "-F" with awk? Many thanks, -T

Re: Does words have a delimiter?

2018-04-13 Thread Jonathan Scott Duff
Looking at that page myself, it doesn't appear that you can specify the separator for .words. So ... no. Though, that would make an interesting addition IMHO -Scott On Sat, Apr 14, 2018 at 12:27 AM, ToddAndMargo wrote: > Hi All, > > I am over on > https://docs.perl6.org/routine/words > an

Re: Does words have a delimiter?

2018-04-13 Thread Brandon Allbery
"words" is just a shorthand for a common invocation of "split", really. On Sat, Apr 14, 2018 at 1:27 AM, ToddAndMargo wrote: > Hi All, > > I am over on > https://docs.perl6.org/routine/words > and I can't make heads of tails out of it. > > Does "words" have a delimiter, as does "-F" with awk