Skip Menu |
Report information
Id: 123572
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] :256[list of numbers] wrongly allows the numbers to exceed 255 in Rakudo
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Date: Fri, 9 Jan 2015 19:58:57 +0100
Download (untitled) / with headers
text/plain 316b
<TimToady> m: say :256["☺".ords] <camelia> rakudo-moar c5dcdf: OUTPUT«9786␤» <TimToady> m: say :256[0x263a] <camelia> rakudo-moar c5dcdf: OUTPUT«9786␤» <TimToady> seems we could use a check there... <TimToady> m: say :256[256,256] <camelia> rakudo-moar c5dcdf: OUTPUT«65792␤» * masak submits rakudobug
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 796b
On Fri, 09 Jan 2015 10:59:08 -0800, masak wrote: Show quoted text
> <TimToady> m: say :256["☺".ords] > <camelia> rakudo-moar c5dcdf: OUTPUT«9786␤» > <TimToady> m: say :256[0x263a] > <camelia> rakudo-moar c5dcdf: OUTPUT«9786␤» > <TimToady> seems we could use a check there... > <TimToady> m: say :256[256,256] > <camelia> rakudo-moar c5dcdf: OUTPUT«65792␤» > * masak submits rakudobug
I suspect we should disallow out-of-radix entries for all but the first, since there are uses for allowing the first entry to overflow, such as encoding hours, minutes, and seconds. On the other hand, if we had something to do a reverse polymod, we wouldn't need to use :radix[] for that purpose, and could restrict all the digits on the assumption that it is only to be used for normal homogenous numeric bases.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org