Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base conversion of Str containing base conversion doesn't work in Rakudo #2130

Closed
p6rt opened this issue Sep 1, 2010 · 8 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Sep 1, 2010

Migrated from rt.perl.org#77624 (status was 'resolved')

Searchable as RT77624$

@p6rt
Copy link
Author

p6rt commented Sep 1, 2010

From @masak

<TimToady> rakudo​: say :10('​:16<bad.decaf>')
<p6eval> rakudo dc9900​: OUTPUT«DON'T PANIC! Invalid character (​:)!
Please try again :)
<pmichaud> ...DON'T PANIC?
<masak> that's lue's addition, I think.
<masak> should the above work?
<pmichaud> yes, the str-to-num conversions still need a fair bit of work.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented May 11, 2013

From @coke

On Wed Sep 01 10​:17​:15 2010, masak wrote​:

<TimToady> rakudo​: say :10('​:16<bad.decaf>')
<p6eval> rakudo dc9900​: OUTPUT�DON'T PANIC! Invalid character (​:)!
Please try again :)
<pmichaud> ...DON'T PANIC?
<masak> that's lue's addition, I think.
<masak> should the above work?
<pmichaud> yes, the str-to-num conversions still need a fair bit of work.
* masak submits rakudobug

I'm not sure the original request makes sense. Can you point us at the spec that says that this
should work? (Everything I see about :NN in S02 makes it look like a literal syntax only.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented May 11, 2013

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 11, 2013

From @pmichaud

On Fri, May 10, 2013 at 10​:51​:14PM -0700, Will Coleda via RT wrote​:

On Wed Sep 01 10​:17​:15 2010, masak wrote​:

<TimToady> rakudo​: say :10('​:16<bad.decaf>')
<p6eval> rakudo dc9900​: OUTPUT�DON'T PANIC! Invalid character (​:)!
Please try again :)
<pmichaud> ...DON'T PANIC?
<masak> that's lue's addition, I think.
<masak> should the above work?
<pmichaud> yes, the str-to-num conversions still need a fair bit of work.
* masak submits rakudobug

I'm not sure the original request makes sense. Can you point us at the spec that says that this
should work? (Everything I see about :NN in S02 makes it look like a literal syntax only.

S02​:3326, "Conversion functions", talks about :NN as a conversion
function. In particular, all of the below should work​:

  > say :10('99') # correct
  99
  > say :16('99') # correct
  153
  > say :10('0x99') # correct
  153
  > say :10('​:16<99>') # fail, should be 153
  Cannot convert string to number​: base-10 number must begin with valid digits or '.' in '​:10<⏏​:16<99>>' (indicated by ⏏)
  in method sink at src/gen/CORE.setting​:10030
  in method BUILDALL at src/gen/CORE.setting​:801
  in method bless at src/gen/CORE.setting​:743
  in method new at src/gen/CORE.setting​:728
  in method new at src/gen/CORE.setting​:726

Pm

@p6rt
Copy link
Author

p6rt commented Sep 17, 2015

From @coke

On Sat May 11 06​:35​:38 2013, pmichaud wrote​:

On Fri, May 10, 2013 at 10​:51​:14PM -0700, Will Coleda via RT wrote​:

On Wed Sep 01 10​:17​:15 2010, masak wrote​:

<TimToady> rakudo​: say :10('​:16<bad.decaf>')
<p6eval> rakudo dc9900​: OUTPUT�DON'T PANIC! Invalid character (​:)!
Please try again :)
<pmichaud> ...DON'T PANIC?
<masak> that's lue's addition, I think.
<masak> should the above work?
<pmichaud> yes, the str-to-num conversions still need a fair bit of
work.
* masak submits rakudobug

I'm not sure the original request makes sense. Can you point us at
the spec that says that this
should work? (Everything I see about :NN in S02 makes it look like a
literal syntax only.

S02​:3326, "Conversion functions", talks about :NN as a conversion
function. In particular, all of the below should work​:

say :10('99') # correct
99
say :16('99') # correct
153
say :10('0x99') # correct
153
say :10('​:16<99>') # fail, should be 153
Cannot convert string to number​: base-10 number must begin with valid
digits or '.' in '​:10<⏏​:16<99>>' (indicated by ⏏)
in method sink at src/gen/CORE.setting​:10030
in method BUILDALL at src/gen/CORE.setting​:801
in method bless at src/gen/CORE.setting​:743
in method new at src/gen/CORE.setting​:728
in method new at src/gen/CORE.setting​:726

Pm

14​:38 < [Coke]> m​: say (​:10('99'), :16('99'), :10('0x99'),
  :10('​:16<99>')).join("​:") #RT #​77624
14​:38 <+camelia> rakudo-moar 25fed4​: OUTPUT«99​:153​:153​:153␤»

Fixed - closable with tests.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Sep 17, 2015

From @usev6

A lot of tests for colon--form radix overrides were added to S02-literals/radix.t with commit 4c85334660. Those tests cover this ticket as well. I mentioned the ticket number in said file.

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Sep 17, 2015

From @usev6

A lot of tests for colon--form radix overrides were added to S02-literals/radix.t with commit 4c85334660. Those tests cover this ticket as well. I mentioned the ticket number in said file.

I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Sep 17, 2015
@p6rt
Copy link
Author

p6rt commented Sep 17, 2015

@usev6 - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant