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: 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!

:-)


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:


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  1804482980 112" |
awk
'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a and
http://perldoc.perl.org/perlrun.html .




Fernando Santagata

On 04/13/2018 05:20 AM, Brian Duggan wrote:

One could also use .words --

$ echo "total kB  1804482980 112" |perl6 -n -e 'say .words[3]'
2980

Brian



That almost exactly matches awk and I don't have to
wonder about what each value is made up of.  I love it.
Thank you!

-T

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


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 >
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  1804482980   
  112" | awk

'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a
 and
http://perldoc.perl.org/perlrun.html
 .




On 04/13/2018 04:13 AM, 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  180448    2980 112" |perl6 -n -e 'say 
.comb(/\d+/)[1]'

2980



So the second d+ is [1].  Fascinating.  Thank you!


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

shlomif[Perl6]:$trunk$ echo "total kB  1804482980 112" | awk
'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a and
http://perldoc.perl.org/perlrun.html .



Aw bugger!  I forgot about split!  And I use it all the time.

Thank you!



--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


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 air conditioners.
They malfunction when you open windows
~~


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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 different Num value.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
  https://github.com/rakudo/rakudo/commit/430266629f2e2a0
Test: https://github.com/perl6/roast/commit/dcdbcb31b43a0f6ec


[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 different Num value.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
  https://github.com/rakudo/rakudo/commit/430266629f2e2a0
Test: https://github.com/perl6/roast/commit/dcdbcb31b43a0f6ec


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 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 -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  1804482980 112" |
> > awk
> > '{print $4}'
> >
> > 2980
> >
> > See https://docs.perl6.org/language/5to6-nutshell#-a and
> > http://perldoc.perl.org/perlrun.html .
> >
> > --
> > -
> > Shlomi Fish   http://www.shlomifish.org/
> > What does “Zionism” mean? - http://shlom.in/def-zionism
> >
> > Gödel’s Incompleteness Theorem is about to be replaced by the
> > [Clarissa] Darling “Like, Totally!” Completeness Theorem.
> > — http://www.shlomifish.org/humour/bits/facts/Clarissa/
> >
> > Please reply to list if it's a mailing list post - http://shlom.in/reply .
> >
> 
> 
> 
> -- 
> Fernando Santagata


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 -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  1804482980 112" |
> awk
> '{print $4}'
>
> 2980
>
> See https://docs.perl6.org/language/5to6-nutshell#-a and
> http://perldoc.perl.org/perlrun.html .
>
> --
> -
> Shlomi Fish   http://www.shlomifish.org/
> What does “Zionism” mean? - http://shlom.in/def-zionism
>
> Gödel’s Incompleteness Theorem is about to be replaced by the
> [Clarissa] Darling “Like, Totally!” Completeness Theorem.
> — http://www.shlomifish.org/humour/bits/facts/Clarissa/
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply .
>



-- 
Fernando Santagata


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 "total kB  1804482980 112" | perl6
-n -e 'say .split(/\s+/)[3]'

2980

shlomif[Perl6]:$trunk$ echo "total kB  1804482980 112" | awk
'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a and
http://perldoc.perl.org/perlrun.html .


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  1804482980 112" | awk
'{print $4}'

2980

See https://docs.perl6.org/language/5to6-nutshell#-a and
http://perldoc.perl.org/perlrun.html .

-- 
-
Shlomi Fish   http://www.shlomifish.org/
What does “Zionism” mean? - http://shlom.in/def-zionism

Gödel’s Incompleteness Theorem is about to be replaced by the
[Clarissa] Darling “Like, Totally!” Completeness Theorem.
— http://www.shlomifish.org/humour/bits/facts/Clarissa/

Please reply to list if it's a mailing list post - http://shlom.in/reply .


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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
> > $a.WHICH
> Num|1.18059162071741e+21
> > $b.WHICH
> Num|1.18059162071741e+21
> > $a.WHICH eq $b.WHICH
> True
> 
> These are distinct Num values, as seen by .Int, ==, and ===.  But .WHICH
> is erroneously saying that they're the same.  .WHICH should show distinct
> identities for these distinct values.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
Test: https://github.com/perl6/roast/commit/3f0174e45563d641e


[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
> > $a.WHICH
> Num|1.18059162071741e+21
> > $b.WHICH
> Num|1.18059162071741e+21
> > $a.WHICH eq $b.WHICH
> True
> 
> These are distinct Num values, as seen by .Int, ==, and ===.  But .WHICH
> is erroneously saying that they're the same.  .WHICH should show distinct
> identities for these distinct values.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
Test: https://github.com/perl6/roast/commit/3f0174e45563d641e


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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 contexts:
> 
> > my $a = 1180591620717411303424e0
> 1.18059162071741e+21
> > my $b = 1180591620717409992704e0
> 1.18059162071741e+21
> > $a.Int
> 1180591620717411303424
> > $b.Int
> 1180591620717409992704
> > $a == $b
> False
> > $a === $b
> False
> 
> == and === give the right result when applied to $a and $b as here, or
> when applied to declared constants ("constant \A = 118...").  They also
> work fine when comparing a variable against a literal.  They go wrong when
> applied directly to two literal expressions.  They also go wrong with some
> more complex expressions that bring in both values as literals, such as if
> both sides are multiplied by 1.0e0 or by a variable containing that value.
> 
> -zefram

Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
Test: https://github.com/perl6/roast/commit/52c60ce5c283dd5b8
  https://github.com/perl6/roast/commit/bba5e9fdda431c9f4


[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 contexts:
> 
> > my $a = 1180591620717411303424e0
> 1.18059162071741e+21
> > my $b = 1180591620717409992704e0
> 1.18059162071741e+21
> > $a.Int
> 1180591620717411303424
> > $b.Int
> 1180591620717409992704
> > $a == $b
> False
> > $a === $b
> False
> 
> == and === give the right result when applied to $a and $b as here, or
> when applied to declared constants ("constant \A = 118...").  They also
> work fine when comparing a variable against a literal.  They go wrong when
> applied directly to two literal expressions.  They also go wrong with some
> more complex expressions that bring in both values as literals, such as if
> both sides are multiplied by 1.0e0 or by a variable containing that value.
> 
> -zefram

Thank you for the report. This is now fixed.

Fix:  https://github.com/MoarVM/MoarVM/commit/067c0594103a025
  https://github.com/MoarVM/MoarVM/commit/8841c4241b4faa8
  https://github.com/MoarVM/MoarVM/commit/af2eb8a7f7d4344
  https://github.com/MoarVM/MoarVM/commit/4d3fc2818d0032b
  https://github.com/rakudo/rakudo/commit/8422d7b4e23678b
  https://github.com/rakudo/rakudo/commit/a2a2a745c4242d1
Test: https://github.com/perl6/roast/commit/52c60ce5c283dd5b8
  https://github.com/perl6/roast/commit/bba5e9fdda431c9f4


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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
> ways, this is a bug.  Obviously there are some situations where the
> syntax of Perl 6 literals doesn't exactly match what one would expect of
> a Str.Num conversion, but that's not the case here.  Where the syntax
> matches, as it does in this case, or more generally where the same
> digits are presented with the same weights, one would expect the core
> decimal->float conversion to behave the same for both.
> 
> The conversions yielding different values implies that at least one
> of them is individually incorrect.  In this case, the coercion yields
> the correctly-rounded value, and the literal is getting it wrong.
> [perl #128912] is concerned with these conversions being incorrect per se,
> and my test case there used the conversion for literals.  The difference
> between the two forms of decimal->float conversion is not merely a matter
> of literals getting it wrong and coercion getting it right: there are also
> cases where the coercion gets it wrong.  In fact, coercion gets it wrong
> in the [perl #128912] test case: both literal interpretation and coercion
> get "9.999e-5" wrong in the same way.  I have not yet encountered a case
> where literal interpretation gets it right and coercion gets it wrong,
> but nor can I say that there isn't such a case.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/4da5909f926e7eb42


[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
> ways, this is a bug.  Obviously there are some situations where the
> syntax of Perl 6 literals doesn't exactly match what one would expect of
> a Str.Num conversion, but that's not the case here.  Where the syntax
> matches, as it does in this case, or more generally where the same
> digits are presented with the same weights, one would expect the core
> decimal->float conversion to behave the same for both.
> 
> The conversions yielding different values implies that at least one
> of them is individually incorrect.  In this case, the coercion yields
> the correctly-rounded value, and the literal is getting it wrong.
> [perl #128912] is concerned with these conversions being incorrect per se,
> and my test case there used the conversion for literals.  The difference
> between the two forms of decimal->float conversion is not merely a matter
> of literals getting it wrong and coercion getting it right: there are also
> cases where the coercion gets it wrong.  In fact, coercion gets it wrong
> in the [perl #128912] test case: both literal interpretation and coercion
> get "9.999e-5" wrong in the same way.  I have not yet encountered a case
> where literal interpretation gets it right and coercion gets it wrong,
> but nor can I say that there isn't such a case.
> 
> -zefram


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/4da5909f926e7eb42


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)
>
>
> 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


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


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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
>    in block  at -e line 1


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/4b2512a22236e09
Test: https://github.com/rakudo/rakudo/commit/4b2512a22236e09


[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
>    in block  at -e line 1


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/4b2512a22236e09
Test: https://github.com/rakudo/rakudo/commit/4b2512a22236e09


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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`, or `Less Same`, depending on how rounding is done.
> 
> Actual behavior
> ---
> 
> Prints `Less More`. This seems inconsistent: $a is strictly smaller
> than $b, yet Num($a) is strictly larger than Num($b).
> 
> Version information
> ---
> 
> This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
> implementing Perl 6.c.
> 
> This may be related to https://rt.perl.org/Public/Bug/Display.html?id=132313


Thank you for the report. This is now fixed (specifically, the Num version now 
gives "Same" as
there's not enough precision available to represent those Rats as different 
numbers)

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/db0c58b5f763b085e


On Fri, 20 Oct 2017 17:44:40 -0700, c...@zoffix.com wrote:
> This appears to be not a bug but simply the goodness of floating point
> math. I get the same result in C:

You're wrong, 2017-Zoffix. The result you got in C is because you incorrectly 
used doubles to do the division.


[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`, or `Less Same`, depending on how rounding is done.
> 
> Actual behavior
> ---
> 
> Prints `Less More`. This seems inconsistent: $a is strictly smaller
> than $b, yet Num($a) is strictly larger than Num($b).
> 
> Version information
> ---
> 
> This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
> implementing Perl 6.c.
> 
> This may be related to https://rt.perl.org/Public/Bug/Display.html?id=132313


Thank you for the report. This is now fixed (specifically, the Num version now 
gives "Same" as
there's not enough precision available to represent those Rats as different 
numbers)

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/db0c58b5f763b085e


On Fri, 20 Oct 2017 17:44:40 -0700, c...@zoffix.com wrote:
> This appears to be not a bug but simply the goodness of floating point
> math. I get the same result in C:

You're wrong, 2017-Zoffix. The result you got in C is because you incorrectly 
used doubles to do the division.


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

2018-04-13 Thread dcu



	
		
			
			

	
		 
	

			
			
		
	





	
		
			
			

	
		
	

			
			
		
	





	
		
			
			
			

	
		
	
	
		
		
			

	
	Thank you for your email request. Your request ID is I-1544046 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 doesn’t exist.  I guess 
we can build some heuristic check on that, but it feels fragile.  Perhaps nine 
/ ugexe / jnthn have a better idea about that.

> On 13 Apr 2018, at 08:34, Martin Barth (via RT) 
>  wrote:
> 
> # New Ticket Created by  Martin Barth 
> # Please include the string:  [perl #133107]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=133107 >
> 
> 
> 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
>   in block  at -e line 1


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 doesn’t exist.  I guess 
we can build some heuristic check on that, but it feels fragile.  Perhaps nine 
/ ugexe / jnthn have a better idea about that.

> On 13 Apr 2018, at 08:34, Martin Barth (via RT) 
>  wrote:
> 
> # New Ticket Created by  Martin Barth 
> # Please include the string:  [perl #133107]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=133107 >
> 
> 
> 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
>   in block  at -e line 1


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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




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 
	
	
	
  

 



  
  

  
  

  














  












  



  


DCU Home   
Branches   
Branch/ATM Locator   
Contact


  
  

  
  

  
  

  
  

  Our Privacy Policy protects your privacy and we will never sell your name or email address. 
  Federally insured by NCUA. DCU is an Equal Housing Lender. 
  Please do not reply 
  to this email. For questions or additional information, please email d...@dcu.org. 
  
  
  
  220 Donald Lynch Boulevard, PO Box 9130, Marlborough, MA 01752-9130
  508.263.6700 • 800.328.8797
  ABA Routing Number: 211391825NMLS#: 466914
  
  
  ©  Digital Federal Credit Union
  



  

 

   
 

			
		
		
	

			
			
			
		
	




[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 implies that at least one of the literals is getting
> incorrect rounding, which was the subject of [perl #128912].  (In fact
> the greater one is getting correct rounding and the lower one is not.
> The correct roundings of both are the same.)  But this case goes beyond
> the rounding merely being incorrect; with this behaviour the rounding
> isn't even self-consistent.
> 
> -zefram

Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/07830c2042b998128


[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 implies that at least one of the literals is getting
> incorrect rounding, which was the subject of [perl #128912].  (In fact
> the greater one is getting correct rounding and the lower one is not.
> The correct roundings of both are the same.)  But this case goes beyond
> the rounding merely being incorrect; with this behaviour the rounding
> isn't even self-consistent.
> 
> -zefram

Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/a760ac3cfc6426d9bd2fb00db
  https://github.com/MoarVM/MoarVM/commit/b735866ddee9bd719440e5c82
Test: https://github.com/perl6/roast/commit/07830c2042b998128


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

2018-04-13 Thread via RT
# New Ticket Created by  Martin Barth 
# Please include the string:  [perl #133107]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=133107 >


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
   in block  at -e line 1