:S let's please not. See also this discussion:
https://irclog.perlgeek.de/perl6/2017-09-25#i_15211785

I'm strongly against making .base return garbage for bases >36. Polymod returns
a list of integers, .base returns a *string* with the number using some
alphabet. I don't understand why we want to break this simple stuff so much.

However, there are other options:
* use some unicode characters. Sadly, circled numbers only go up to ㊿, which is
just yet another arbitrary limit. I don't think there are commonly accepted
characters beyond 36, so maybe we can …
* add a named arg for the alphabet, so that the user can provide any character
set he wants

On 2017-09-25 02:01:55, elizabeth wrote:
>
> > On 25 Sep 2017, at 08:21, Aleks-Daniel Jakimenko-Aleksejev (via RT)
> > <perl6-bugs-follo...@perl.org> wrote:
> >
> > # New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
> > # Please include the string: [perl #132156]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=132156 >
> >
> >
> > Code:
> > say 9123607.base(37)
> >
> > Result:
> > base argument to base out of range. Is: 37, should be in 2..36
> > in block <unit> at <tmp> line 1
> >
> >
> > The error message can suggest .polymod, here is an example:
> >
> > 9123607.polymod(37 xx *).reverse # (4 32 4 15 36)
>
> Perhaps .base(37) should just use .polymod under the hood?

Reply via email to