Re: [perl #130845] Some things that are less than 5 aren't

2017-02-24 Thread Joachim Durchholz

On 24.02.2017 13:03, Zoffix Znet via RT wrote:

toolforger: p6: say Inf cmp Inf
camelia: rakudo-moar 320c2f: OUTPUT: «Same␤»

I.e. Inf compares equal to itself - is this intentional?


Yes, and we didn't invent this concept.


Heh. That's what you'd expect before reading IEEE.
After understanding all details of the IEEE standard, it's where you 
return (but only for infinities, not for NaNs) :-)


> This area is governed by IEEE 2008-753 standard, section 6.1 of which 
has this to say on infinities:


"The behavior of infinity in floating-point arithmetic is derived from the 
limiting cases of real arithmetic
with operands of arbitrarily large magnitude, when such a limit exists. 
Infinities shall be interpreted in
the affine sense, that is: −∞ < {every finite number} < +∞"


While that paragraph does not define how Inf relates to Inf, I see 
elsewhere that IEEE indeed defines Inf == Inf (and -Inf == -Inf).


I thought infinities were just a slightly tamed version of NaNs, but 
that was a misconception on my side.



It's not the only departure from mathematical result for the sake more 
practically useful results.


I know :-)

Good thing that we have === so we can compare at the representational level.


[perl #130857] WARNING: unhandled Failure detected in DESTROY

2017-02-24 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #130857]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130857 >


The code in Failure.pm has:

# "Shouldn't happen."  We use note here because the dynamic scope in GC is 
likely meaningless.
submethod DESTROY () { if not $!handled { note "WARNING: unhandled Failure 
detected in DESTROY:\n" ~ self.mess } }

However, it does happen with this code:
my $matcher = *.so;
say eager grep $matcher, gather with CORE:: -> $c {
with &?BLOCK ->  {
for $c.keys.grep(* ne 'IterationEnd') {
take $c.{$_};
$c.{$_}.WHO.keys and dig $c.{$_};
}
}
}

Output:

zoffix@VirtualBox:~$ perl6 /tmp/z.map.p6 
WARNING: unhandled Failure detected in DESTROY:
Type SocketType does not support associative indexing.
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

WARNING: unhandled Failure detected in DESTROY:
Type PromiseStatus does not support associative indexing.
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

WARNING: unhandled Failure detected in DESTROY:
Type Signal does not support associative indexing.
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

WARNING: unhandled Failure detected in DESTROY:
Type Signal does not support associative indexing.
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

Cannot find method 'keys': no method cache and no .^find_method
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

zoffix@VirtualBox:~$ perl6 /tmp/z.map.p6 
Cannot find method 'keys': no method cache and no .^find_method
  in block  at /tmp/z.map.p6 line 6
  in code  at /tmp/z.map.p6 line 3
  in block  at /tmp/z.map.p6 line 2

zoffix@VirtualBox:~$ 

zoffix@VirtualBox:~$ perl6 -v
This is Rakudo version 2017.02-72-g3de7b08 built on MoarVM version 
2017.02-7-g3d85900
implementing Perl 6.c.
zoffix@VirtualBox:~$ 


Re: Your thoughts on Padre?

2017-02-24 Thread vijayvithal jahagirdar
my alternative is Vim with a bunch of plugins to support (all) the features
quoted at http://padre.perlide.org/features/

If anyone is interested my .vimrc is available at
https://github.com/jahagirdar/misc-scripts/blob/master/.vimrc

On Sat, Feb 25, 2017 at 7:17 AM, ToddAndMargo  wrote:

> On 02/24/2017 04:58 PM, yary wrote:
>
>> I installed and used Padre a little bit last year. It showed promise and
>> seems to have had quite a bit of activity in its day. As of now it works
>> for basic editing in perl6 but it seemed a little rough, and as Brandon
>> noted it isn't maintained, fixes would be DIY.
>>
>>
> Do you have a favorite alternative?
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>



-- 
https://www.facebook.com/vijayvithal.jahagirdar
https://twitter.com/jahagirdar_vs
http://democracies-janitor.blogspot.in/


Re: Geany and group comments

2017-02-24 Thread ToddAndMargo

On 02/24/2017 01:56 PM, ToddAndMargo wrote:

Hi All,

I do adore the Geany editor for coding, but ... it
coughs on group comments

=begin Introduction
blah blah blah
=end Introduction

after the first "=" everything is blue and I lose my
fancy colors that tell me when I forget a quote, etc..

Anyone know a way to keep my group comments and
retain Geany's color coding?


Many thanks,
-T




#`{} across multiple lines worked around the issue:


#!/usr/binperl6

#`{
run on and on and on
comments

blah blah
blah
}

sub abc ( $a, $b, $c ) {}

print "Hi Mon!\n";




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


Re: Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo

On 02/24/2017 05:47 PM, ToddAndMargo wrote:

On 02/24/2017 04:58 PM, yary wrote:

I installed and used Padre a little bit last year. It showed promise and
seems to have had quite a bit of activity in its day. As of now it works
for basic editing in perl6 but it seemed a little rough, and as Brandon
noted it isn't maintained, fixes would be DIY.



Do you have a favorite alternative?



I have been using "vi".  :'(


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


Re: Your thoughts on Padre?

2017-02-24 Thread yary
Not really, and since I am not doing anything major in perl6, I still fire
up Padre in a while.

In general emacs, but I never installed any perl6 mode for it, I just use
"fundamental"


Re: Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo

On 02/24/2017 04:58 PM, yary wrote:

I installed and used Padre a little bit last year. It showed promise and
seems to have had quite a bit of activity in its day. As of now it works
for basic editing in perl6 but it seemed a little rough, and as Brandon
noted it isn't maintained, fixes would be DIY.



Do you have a favorite alternative?

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


Re: Your thoughts on Padre?

2017-02-24 Thread yary
I installed and used Padre a little bit last year. It showed promise and
seems to have had quite a bit of activity in its day. As of now it works
for basic editing in perl6 but it seemed a little rough, and as Brandon
noted it isn't maintained, fixes would be DIY.


Re: Your thoughts on Padre?

2017-02-24 Thread Brandon Allbery
On Fri, Feb 24, 2017 at 5:45 PM, ToddAndMargo  wrote:

> http://padre.perlide.org/
>
> Any good for Perl 6?  You have a better one you like?


Padre's maintained? I thought it died years ago.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Your thoughts on Padre?

2017-02-24 Thread Lloyd Fournier
I haven't heard much on Padre. I use emacs, which gets the job done for me.
A fair bit of work has gone into making an atom mode that works.
See: https://github.com/MadcapJake/language-perl6fe

LL
On Sat, Feb 25, 2017 at 9:46 AM ToddAndMargo  wrote:

http://padre.perlide.org/

Any good for Perl 6?  You have a better one you like?


[perl #130855] [SPESH][OPTIMIZER] glitch with anon vars causes incorrect `Cannot assign to an immutable value` error

2017-02-24 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #130855]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130855 >


Expected no errors, but in the first case it complains about assignment to 
immutable value even though none exist in the code.

zoffix@VirtualBox:~$ perl6 -e 'm: sub foo () {$ = 42}; for ^200 { $ = 
foo }; say now - INIT now'
Cannot assign to an immutable value
  in block  at -e line 1

zoffix@VirtualBox:~$ MVM_SPESH_DISABLE=1 perl6 -e 'm: sub foo () {$ = 42}; 
for ^200 { $ = foo }; say now - INIT now'
2.6287172
zoffix@VirtualBox:~$ perl6 --optimize=off -e 'm: sub foo () {$ = 42}; for 
^200 { $ = foo }; say now - INIT now'   

 
1.3881109
zoffix@VirtualBox:~$ perl6 -e 'm: sub foo () {$ = 42}; for ^2 { $ = foo }; 
say now - INIT now' 


0.00196070
zoffix@VirtualBox:~$ 


Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo

http://padre.perlide.org/

Any good for Perl 6?  You have a better one you like?


Re: Where is "Subject"?

2017-02-24 Thread ToddAndMargo

On 02/24/2017 04:05 AM, Luca Ferrari wrote:

"$Subject$StringFullOfLineFeeds);


Guilty as charged.  I missed the quote at the end of the line.


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


Re: I am having trouble installing panda

2017-02-24 Thread ToddAndMargo

On 02/24/2017 11:51 AM, Timo Paulssen wrote:

Hey Todd,


Net::SMTP  (doesn't support SSL, but others do)
$ zef --force install > Net::SMTP

Are you sure that's the case? i definitely see SSL-related verbiage in
Net::SMTP's Readme. The simple interface offers an "ssl" and a
"starttls" flag in its "new" method, and the raw interface has
"switch-to-ssl()" and "starttls()" methods.

HTH
  - Timo



I was looking over at
https://modules.perl6.org/#q=Net%3A%3ASMTP

which does not bring up Net::SMTP:SSL or others
that Perl 5 is enjoying.

Be nice is the basic Net::SMTP did support SSL and TLS too.
I will look at the readme




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


Geany and group comments

2017-02-24 Thread ToddAndMargo

Hi All,

I do adore the Geany editor for coding, but ... it
coughs on group comments

=begin Introduction
blah blah blah
=end Introduction

after the first "=" everything is blue and I lose my
fancy colors that tell me when I forget a quote, etc..

Anyone know a way to keep my group comments and
retain Geany's color coding?


Many thanks,
-T


--
~~~
Having been erased,
The document you're seeking
Must now be retyped.
~~~


Re: I am having trouble installing panda

2017-02-24 Thread Timo Paulssen
Hey Todd,

> Net::SMTP  (doesn't support SSL, but others do) 
> $ zef --force install > Net::SMTP
Are you sure that's the case? i definitely see SSL-related verbiage in
Net::SMTP's Readme. The simple interface offers an "ssl" and a
"starttls" flag in its "new" method, and the raw interface has
"switch-to-ssl()" and "starttls()" methods.

HTH
  - Timo


[perl #130852] [SEGV][MOAR] nqp::p6recont_ro(Scalar)

2017-02-24 Thread Zoffix Znet via RT
On Fri, 24 Feb 2017 08:21:12 -0800, c...@zoffix.com wrote:
> Originally encountered this grepping CORE:: symbols and calling
> .unique on the result.
> 
> Golfed it down to nqp::p6recont_ro(Scalar):
> 
>  m: unique Scalar
>  rakudo-moar d41b68: OUTPUT: «(signal SEGV)»
> 
>  m: use nqp; nqp::p6recont_ro(Scalar)
>  rakudo-moar d41b68: OUTPUT: «(signal SEGV)»

Thank you for the report. This is now fixed.

Fix: https://github.com/rakudo/rakudo/commit/ae2c1dadf0
Test: https://github.com/perl6/roast/commit/e31c78c52b


Re: Where is "Subject"?

2017-02-24 Thread Brandon Allbery
On Fri, Feb 24, 2017 at 2:50 AM, Luca Ferrari  wrote:

> On Fri, Feb 24, 2017 at 7:51 AM, ToddAndMargo 
> wrote:
> > Am I blind or is there nowhere to set the subject of an eMail
> > in Net::SMTP?
>
> I suspect it is implementing a quite low-level interface: smtp does
> not know anything about a subject, it simply sends it as a line
> "Subject: foo bar"
> followed by an empty line a your message body. In other words: the
> subject is in the payload before your message content.
>

Same thing as when you asked about attaching files; I think I mentioned at
the time it also didn't include headers. Subject: is probably the most
important header --- although many mail systems will reject it if it also
doesn't have From: and preferably Date: and Message-Id:.

You might poke around to see if there is a module that implements at least
RFC822 and preferably RFC2422 to build a proper message.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


[perl #130852] [SEGV][MOAR] nqp::p6recont_ro(Scalar)

2017-02-24 Thread via RT
# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #130852]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130852 >


Originally encountered this grepping CORE:: symbols and calling .unique on the 
result.

Golfed it down to nqp::p6recont_ro(Scalar):

 m: unique Scalar
 rakudo-moar d41b68: OUTPUT: «(signal SEGV)»

 m: use nqp; nqp::p6recont_ro(Scalar)
 rakudo-moar d41b68: OUTPUT: «(signal SEGV)»


Re: Where is "Subject"?

2017-02-24 Thread Luca Ferrari
Seems to me it has to work, but I would suggest a couple of little
changes to make the source code more readable (see below):

On Fri, Feb 24, 2017 at 9:15 AM, ToddAndMargo  wrote:
>for @Report -> $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }

here I would use join, much simpler than a for-string-concatenation

> "$Subject$StringFullOfLineFeeds);

here I would use explicit string concatenation to make it clearer you
are using two variables on the same line. Don't you miss a double
tick?

Luca


[perl #130845] Some things that are less than 5 aren't

2017-02-24 Thread Zoffix Znet via RT
On Thu, 23 Feb 2017 22:01:25 -0800, j...@durchholz.org wrote:
> Somewhat offtopic:

Feels like a bad place for offtopic discussions. You can ask questions in the 
same IRC channel you evaled your example.

> toolforger: p6: say Inf cmp Inf
> camelia: rakudo-moar 320c2f: OUTPUT: «Same␤»
> 
> I.e. Inf compares equal to itself - is this intentional?

Yes, and we didn't invent this concept. This area is governed by IEEE 2008-753 
standard, section 6.1 of which has this to say on infinities:

"The behavior of infinity in floating-point arithmetic is derived from the 
limiting cases of real arithmetic
with operands of arbitrarily large magnitude, when such a limit exists. 
Infinities shall be interpreted in
the affine sense, that is: −∞ < {every finite number} < +∞"

It's not the only departure from mathematical result for the sake more 
practically useful results. Division by zero has well-defined behaviour in 
floating point math, and Rationals in Num view preserve it:

 m: say <1/0> == Inf
 rakudo-moar 320c2f: OUTPUT: «True␤»
 m: say <-1/0> == -Inf
 rakudo-moar 320c2f: OUTPUT: «True␤»
 m: say <0/0>.Num === NaN
 rakudo-moar 320c2f: OUTPUT: «True␤»


On Thu, 23 Feb 2017 22:22:22 -0800, dar...@darrenduncan.net wrote:
> I would have a serious problem with any programming language where it
> isn't the
> case that asking "is $x the same thing as $x in every possible way"
> doesn't
> result in TRUE for all possible values of $x.

Then I'd hate to tell you, but such a value exists in most languages: a NaN:

 m: say NaN == NaN
 rakudo-moar 320c2f: OUTPUT: «False␤»


Re: Where is "Subject"?

2017-02-24 Thread ToddAndMargo

On 02/23/2017 11:50 PM, Luca Ferrari wrote:

On Fri, Feb 24, 2017 at 7:51 AM, ToddAndMargo  wrote:

Hi All,

Am I blind or is there nowhere to set the subject of an eMail
in Net::SMTP?


I suspect it is implementing a quite low-level interface: smtp does
not know anything about a subject, it simply sends it as a line
"Subject: foo bar"
followed by an empty line a your message body. In other words: the
subject is in the payload before your message content.

Luca




Hi Luca,

Thank you!

-T

This is what I will try if I can ever get
Net::SMTP to install:


sub eMailReport ( $message ) {
   # Reference: https://github.com/retupmoca/P6-Net-SMTP

   my $Subject = "Subject: $IAm ERROR(s) = $ErrorCount\n\n";

   if $ErrorCount eq 0 { AddToReport ( "Completed without errors\n" ); }
   else { AddToReport ( "Completed with $ErrorCount errors\n" ); }

   my $StringFullOfLineFeeds;
   for @Report -> $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }

   my $client = Net::SMTP.new(:server("smtpout.secureserver.net"), 
:port(3535), :debug);

   $client.auth( "p...@storall.biz", "admin");
   $client.send("p...@storall.biz", "p...@storall.biz,tmew...@zoho.com",
"$Subject$StringFullOfLineFeeds);
   $client.quit;
}



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