Re: [perl #128468] Using negative exit code should probably be forbidden (exit -99999)

2016-06-23 Thread Brandon Allbery
On Thu, Jun 23, 2016 at 5:48 PM, Alex Jakimenko <
perl6-bugs-follo...@perl.org> wrote:

> exit -9 # exit code is 97
> exit -99# exit code is 193
> exit -9 # exit code is 1
> exit -  # exit code is 1
>
> I think that only non-negative numbers should be allowed.
>

Historically -1 has been used (on unixlikes) to mean 255; in the old days,
whether the exit status was signed or not was per platform/implementation.
(This is why shells produce 255 for command not found.)

And... well, try these in perl 5 and see what you get. (tl;dr: the same
values as rakudo)

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


[perl #128470] [BUG] Certain Exceptions Crash REPL

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


Hi,

I've tracked this issue to this commit: 
https://github.com/rakudo/rakudo/commit/6b935928a52be5819b6d384b1596e0125250a18b

If you try running this piece of code in REPL, it'll exit the REPL after 
printing the error:

[1..99].map:{[$_%%5&&'fizz', $_%%3&&'buzz'].grep:Str}

Here's the error:

zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6-m 
To exit type 'exit' or '^D'
You may want to `panda install Readline` or `panda install Linenoise` or use 
rlwrap for a line editor

> [1..99].map:{[$_%%5&&'fizz', $_%%3&&'buzz'].grep:Str}
===SORRY!===
Cannot resolve caller grep(Array: ); none of these signatures match:
($: Bool:D $t, *%_)
($: Mu $t, *%_)
zoffix@VirtualBox:~/CPANPRC/rakudo$ 


The issue doesn't happen with every exception and I wasn't able to golf the 
above code.


[perl #128468] Using negative exit code should probably be forbidden (exit -99999)

2016-06-23 Thread via RT
# New Ticket Created by  Alex Jakimenko 
# Please include the string:  [perl #128468]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=128468 >


exit -9 # exit code is 97
exit -99# exit code is 193
exit -9 # exit code is 1
exit -  # exit code is 1

I think that only non-negative numbers should be allowed.