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

get 2 characters from a 1 character file (bonus!) #3796

Closed
p6rt opened this issue Apr 26, 2015 · 4 comments
Closed

get 2 characters from a 1 character file (bonus!) #3796

p6rt opened this issue Apr 26, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 26, 2015

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

Searchable as RT124394$

@p6rt
Copy link
Author

p6rt commented Apr 26, 2015

From @lizmat

[12​:37​:11] <[Tux]> https://gist.github.com/Tux/6e06f3a455a8995adda4 <= WHO BROKE IO?
[12​:37​:27] lizmat guesses jnthn :-)
[12​:37​:39] <lizmat> perhaps rakudobug it
[12​:38​:52] <lizmat> oddly enough, slurping the file shows only 1 +
[12​:39​:00] <[Tux]> This is something I have no workaround for :/
[12​:39​:25] <lizmat> this is something that is *bad* need of a fix
[12​:41​:09] <lizmat> building latest jvm, to make sure it *is* Moar related
[12​:43​:50] <lizmat> .IO.spurt("+"),.IO.open.get.perl.say for "t.csv"; # further golf
[12​:44​:36] <lizmat> fwiw, even a null byte gets copied
[12​:44​:57] <lizmat> $ 6 '.IO.spurt("\0"),.IO.open.get.perl.say for "t.csv"'
[12​:44​:57] <lizmat> "\x[0]\x[0]"
[12​:45​:36] <lizmat> feels like an off-by-one error deep in the bowels of Moar
[12​:46​:31] <lizmat> [Tux]​: will you rakudobug it or shall I ?
[12​:50​:08] <[Tux]> please do (not me)
[12​:51​:38] <lizmat> $ perl6-j -e '.IO.spurt("*"),.IO.open.get.perl.say for "t.csv"'
[12​:51​:38] <lizmat> "*"
[12​:51​:44] <lizmat> so confirmed, a Moar only bug

@p6rt
Copy link
Author

p6rt commented Apr 26, 2015

From @jnthn

On Sun Apr 26 03​:53​:06 2015, elizabeth wrote​:

[12​:37​:11] <[Tux]>
https://gist.github.com/Tux/6e06f3a455a8995adda4 <= WHO BROKE IO?
[12​:37​:27] lizmat guesses jnthn :-)
[12​:37​:39] <lizmat> perhaps rakudobug it
[12​:38​:52] <lizmat> oddly enough, slurping the file shows only 1 +
[12​:39​:00] <[Tux]> This is something I have no workaround for :/
[12​:39​:25] <lizmat> this is something that is *bad* need of a fix
[12​:41​:09] <lizmat> building latest jvm, to make sure it *is* Moar
related
[12​:43​:50] <lizmat> .IO.spurt("+"),.IO.open.get.perl.say for
"t.csv"; # further golf
[12​:44​:36] <lizmat> fwiw, even a null byte gets copied
[12​:44​:57] <lizmat> $ 6 '.IO.spurt("\0"),.IO.open.get.perl.say for
"t.csv"'
[12​:44​:57] <lizmat> "\x[0]\x[0]"
[12​:45​:36] <lizmat> feels like an off-by-one error deep in the
bowels of Moar
[12​:46​:31] <lizmat> [Tux]​: will you rakudobug it or shall I ?
[12​:50​:08] <[Tux]> please do (not me)
[12​:51​:38] <lizmat> $ perl6-j -e
'.IO.spurt("*"),.IO.open.get.perl.say for "t.csv"'
[12​:51​:38] <lizmat> "*"
[12​:51​:44] <lizmat> so confirmed, a Moar only bug

Indeed; it resulted from a thinko while integrating the normalization with the UTF-8 decoding (both of which need to work in a streaming fashion, since codepoints may dangle over byte-buffer read boundaries, and graphemes in turn over those codepoints). Fixed now in MoarVM; added a test in S16-io/basic-open.t.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2015

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

@p6rt
Copy link
Author

p6rt commented Apr 26, 2015

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

@p6rt p6rt closed this as completed Apr 26, 2015
@p6rt p6rt added the moar label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant