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

chr(999999999999999999999999999) – chr codepoint cannot be negative #4477

Closed
p6rt opened this issue Aug 15, 2015 · 10 comments
Closed

chr(999999999999999999999999999) – chr codepoint cannot be negative #4477

p6rt opened this issue Aug 15, 2015 · 10 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 15, 2015

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

Searchable as RT125817$

@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

From @AlexDaniel

Code​:
say chr 999999999999999999999999999;

Result​:
chr codepoint cannot be negative
  in block <unit> at ./test.pl​:2

Well, it is not negative.

@p6rt
Copy link
Author

p6rt commented Nov 2, 2015

From @coke

On Fri Aug 14 21​:13​:01 2015, alex.jakimenko@​gmail.com wrote​:

Code​:
say chr 999999999999999999999999999;

Result​:
chr codepoint cannot be negative
in block <unit> at ./test.pl​:2

Well, it is not negative.

Behavior has changed to the more accurate​:

13​:17 < [Coke]> m​: say chr 999999999999999999999999999
13​:17 <+camelia> rakudo-moar 273e89​: OUTPUT«Cannot unbox 90 bit wide bigint
  into native integerâ�¤ in block <unit> at /tmp/LiDTTrQn4t​:1â�¤â�¤Â»

I think this is closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Nov 2, 2015

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

@p6rt
Copy link
Author

p6rt commented Jan 25, 2016

From @AlexDaniel

This is not closable at all. Now it segfaults.

Code​:
say chr 99999999

Result​:
Segmentation fault

Code​:
say chr 999999999999

Result​:
chr codepoint cannot be negative
  in block <unit> at /tmp/jicTmB4rt5 line 1

Code​:
say chr 999999999999999999999999999

Result​:
Cannot unbox 90 bit wide bigint into native integer
  in block <unit> at /tmp/UhwBhUHUEP line 1

@p6rt
Copy link
Author

p6rt commented Jan 28, 2016

From @AlexDaniel

Lots of poking around​: http://irclog.perlgeek.de/perl6/2016-01-28#i_11951375

@p6rt
Copy link
Author

p6rt commented Jul 5, 2016

From @zoffixznet

A lot of the aforementioned issues no longer occur, however, I'm still spotting these two​:

15​:26 BrokenRobot m​: say chr 2**63
15​:26 camelia rakudo-moar d4ac15​: OUTPUT«â��â�¤Â»
15​:26 BrokenRobot m​: say chr 2**63-2
15​:26 camelia rakudo-moar d4ac15​: OUTPUT«chr codepoint cannot be negativeâ�¤ in block <unit> at <tmp> line 1â�¤â�¤Â»

@p6rt
Copy link
Author

p6rt commented Mar 4, 2017

From zefram@fysh.org

chr(0x80000000).ords
chr codepoint cannot be negative
  in block <unit> at <unknown file> line 1

It's right that this signal an error, but the error message in incorrect.
The erroneous codepoint is a largeish positive number, not negative.

-zefram

@p6rt
Copy link
Author

p6rt commented Mar 4, 2017

From @lizmat

Fixed with rakudo/rakudo@20fa14be7a , tests needed.

On 4 Mar 2017, at 11​:21, Zefram (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zefram
# Please include the string​: [perl #​130913]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=130913 >

chr(0x80000000).ords
chr codepoint cannot be negative
in block <unit> at <unknown file> line 1

It's right that this signal an error, but the error message in incorrect.
The erroneous codepoint is a largeish positive number, not negative.

-zefram

@p6rt
Copy link
Author

p6rt commented Mar 8, 2017

@p6rt
Copy link
Author

p6rt commented Mar 8, 2017

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

@p6rt p6rt closed this as completed Mar 8, 2017
@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant