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

< $< $> > yields a one-element list, not a two-element list in Rakudo #3217

Open
p6rt opened this issue Aug 21, 2013 · 5 comments
Open

< $< $> > yields a one-element list, not a two-element list in Rakudo #3217

p6rt opened this issue Aug 21, 2013 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 21, 2013

Migrated from rt.perl.org#119401 (status was 'open')

Searchable as RT119401$

@p6rt
Copy link
Author

p6rt commented Aug 21, 2013

From @masak

<lizmat> r​: .say for < $&lt; $&gt; > # rakudobug ?
<camelia> rakudo e84dda​: OUTPUT«$<$>␤»
<benabik> Yeah. I would have expected "$<\n$>\n"
<benabik> r​: < $&lt; $&gt; >.perl.say
<camelia> rakudo e84dda​: OUTPUT«("\$<\$>",).list␤»
<jnthn> Yeah. Odd
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Apr 20, 2014

From @Mouq

On Wed Aug 21 05​:40​:22 2013, masak wrote​:

<lizmat> r​: .say for < $&lt; $&gt; > # rakudobug ?
<camelia> rakudo e84dda​: OUTPUT«$<$>␤»
<benabik> Yeah. I would have expected "$<\n$>\n"
<benabik> r​: < $&lt; $&gt; >.perl.say
<camelia> rakudo e84dda​: OUTPUT«("\$<\$>",).list␤»
<jnthn> Yeah. Odd
* masak submits rakudobug

There's other fallout from the same thing that causes this​:

$ perl6 -e'say qx[ echo [ echo abcd ] ]'
/bin/sh​: line 1​: ]​: command not found
[abcd
$ echo [ echo abcd ]
[ echo abcd ]

This happens because postprocess_* is called on each <nibble>. Something like "< < a b c > >" is parsed as​:
"<" ← <starter>
" " ← .
"<" ← <starter>
" a b c " ← <nibbler>
">" ← <stopper>
" " ← .
">" ← <stopper>

The inside <nibbler> post-processes " a b c ", turning it into ("a","b","c"). The outer <nibbler> subsequently turns that into "<"("a","b","c")">" (or "<a b c>"), and post-processes that into "<a b c>". A similar process happens for qx[].

@p6rt
Copy link
Author

p6rt commented Apr 20, 2014

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

@p6rt
Copy link
Author

p6rt commented Apr 20, 2014

From @Mouq

On Sat Apr 19 20​:42​:11 2014, Mouq wrote​:

On Wed Aug 21 05​:40​:22 2013, masak wrote​:

<lizmat> r​: .say for < $&lt; $&gt; > # rakudobug ?
<camelia> rakudo e84dda​: OUTPUT«$<$>␤»
<benabik> Yeah. I would have expected "$<\n$>\n"
<benabik> r​: < $&lt; $&gt; >.perl.say
<camelia> rakudo e84dda​: OUTPUT«("\$<\$>",).list␤»
<jnthn> Yeah. Odd
* masak submits rakudobug

There's other fallout from the same thing that causes this​:

$ perl6 -e'say qx[ echo [ echo abcd ] ]'
/bin/sh​: line 1​: ]​: command not found
[abcd
$ echo [ echo abcd ]
[ echo abcd ]

This happens because postprocess_* is called on each <nibble>.
Something like "< < a b c > >" is parsed as​:
"<" ← <starter>
" " ← .
"<" ← <starter>
" a b c " ← <nibbler>
">" ← <stopper>
" " ← .
">" ← <stopper>

The inside <nibbler> post-processes " a b c ", turning it into
("a","b","c"). The outer <nibbler> subsequently turns that into
"<"("a","b","c")">" (or "<a b c>"), and post-processes that into "<a
b c>". A similar process happens for qx[].

Rather it *post-processes that into ("<a","b","c>")

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

From @AlexDaniel

OP Still reproducible (2017.11, HEAD(5929887))

On 2013-08-21 05​:40​:22, masak wrote​:

<lizmat> r​: .say for < $&lt; $&gt; > # rakudobug ?
<camelia> rakudo e84dda​: OUTPUT«$<$>␤»
<benabik> Yeah. I would have expected "$<\n$>\n"
<benabik> r​: < $&lt; $&gt; >.perl.say
<camelia> rakudo e84dda​: OUTPUT«("\$<\$>",).list␤»
<jnthn> Yeah. Odd
* masak submits rakudobug

@p6rt p6rt added the Bug 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