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

Output disappears when doing certain calls to &index using strings with accents in them in Rakudo #1546

Closed
p6rt opened this issue Feb 26, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Feb 26, 2010

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

Searchable as RT73122$

@p6rt
Copy link
Author

p6rt commented Feb 26, 2010

From @masak

<colomon> rakudo​: say index("uuúuúuùù", "úuù")
<p6eval> rakudo 403afe​: ( no output )
* masak submits rakudobug
<masak> even locally, that oneliner produces nothing.
<masak> rakudo​: say index("uuúuúuùù", "úuù"); say "alive"
<p6eval> rakudo 403afe​: OUTPUT«alive␤»
<masak> isn't that strange?
<masak> I don't have an explanation for where the first newline goes.
<jnthn> wtf
<PerlJam> weird indeed
<jnthn> Me either.

@p6rt
Copy link
Author

p6rt commented Feb 26, 2010

From @masak

<pmichaud> 14​:38 <PerlJam> rakudo​: say index("úuúuùù", "úuù");
<pmichaud> 14​:38 <p6eval> rakudo 403afe​: ( no output )
<pmichaud> I call parrotbug.
<pmichaud> code coming up.
<pmichaud> http://nopaste.snit.ch/19794 # bug with index op?
<jnthn> Parrot FAIL.
* masak adds this to the RT ticket
<colomon> That doesn't explain the missing newline from say, does it?
<masak> actually, no.
<colomon> rakudo​: say index("hello", "elf");
<p6eval> rakudo 4fc3af​: ( no output )
<masak> except that a -1 probably translates into a Failure of some
kind.
<pmichaud> fail("Substring '$substring' not found in '{self}'") if
$result < 0;
<colomon> Yes, it becomes a fail.
<masak> ok, so the bug is actually two bugs.
<masak> one Parrot-based, and one having to do with &fail
<pmichaud> ah, yes.
<pmichaud> stringifying the failure causes it to throw the exception
<pmichaud> so say() never gets a chance to output the newline.
<masak> that's it, then.
<pmichaud> that, to me, is not a bug.
<masak> I don't see the failure being thrown, either.
<pmichaud> yeah, that part is an error
<pmichaud> Perhaps the failure is being thrown but we're never seeing
the message?
<pmichaud> rakudo​: sub foo() { fail 'bar'; 'xyz' }; say foo();
<p6eval> rakudo 4fc3af​: ( no output )
<pmichaud> parrot bug gets weirder​: http://nopaste.snit.ch/19795
<masak> o.O
<masak> so, just Unicode strings make the problem occur?
<colomon> Though there were Unicode string examples in the backlog
there that worked, right?
<colomon> It's not just all Unicode strings fail.
<masak> ok.
<colomon> rakudo​: say index("ùuúuù", "úuù");
<p6eval> rakudo 4fc3af​: OUTPUT«2␤»

@p6rt
Copy link
Author

p6rt commented Feb 26, 2010

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 20, 2011

From @coke

On Fri Feb 26 07​:06​:43 2010, masak wrote​:

<pmichaud> 14​:38 <PerlJam> rakudo​: say index("úuúuùù", "úuù");
<pmichaud> 14​:38 <p6eval> rakudo 403afe​: ( no output )
<pmichaud> I call parrotbug.
<pmichaud> code coming up.
<pmichaud> http://nopaste.snit.ch/19794 # bug with index op?
<jnthn> Parrot FAIL.
* masak adds this to the RT ticket
<colomon> That doesn't explain the missing newline from say, does it?
<masak> actually, no.
<colomon> rakudo​: say index("hello", "elf");
<p6eval> rakudo 4fc3af​: ( no output )
<masak> except that a -1 probably translates into a Failure of some
kind.
<pmichaud> fail("Substring '$substring' not found in '{self}'") if
$result < 0;
<colomon> Yes, it becomes a fail.
<masak> ok, so the bug is actually two bugs.
<masak> one Parrot-based, and one having to do with &fail
<pmichaud> ah, yes.
<pmichaud> stringifying the failure causes it to throw the exception
<pmichaud> so say() never gets a chance to output the newline.
<masak> that's it, then.
<pmichaud> that, to me, is not a bug.
<masak> I don't see the failure being thrown, either.
<pmichaud> yeah, that part is an error
<pmichaud> Perhaps the failure is being thrown but we're never seeing
the message?
<pmichaud> rakudo​: sub foo() { fail 'bar'; 'xyz' }; say foo();
<p6eval> rakudo 4fc3af​: ( no output )
<pmichaud> parrot bug gets weirder​: http://nopaste.snit.ch/19795
<masak> o.O
<masak> so, just Unicode strings make the problem occur?
<colomon> Though there were Unicode string examples in the backlog
there that worked, right?
<colomon> It's not just all Unicode strings fail.
<masak> ok.
<colomon> rakudo​: say index("ùuúuù", "úuù");
<p6eval> rakudo 4fc3af​: OUTPUT«2␤»

The original string that caused the issue works now. Needs tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

From @moritz

now tested in S32-str/index.t

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

@moritz - 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