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

Zip operator doesn't extend lists ending in a Whatever #3427

Closed
p6rt opened this issue Jul 5, 2014 · 8 comments
Closed

Zip operator doesn't extend lists ending in a Whatever #3427

p6rt opened this issue Jul 5, 2014 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Jul 5, 2014

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

Searchable as RT122230$

@p6rt
Copy link
Author

p6rt commented Jul 5, 2014

From @coke

Several tests in t/spec/S03-metaops/zip.t were marked as "nom
regression" and either fail or explode. See file for tests marked with
this ticket number.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 5, 2014

From @coke

On Fri Jul 04 19​:54​:26 2014, coke wrote​:

Several tests in t/spec/S03-metaops/zip.t were marked as "nom
regression" and either fail or explode. See file for tests marked with
this ticket number.

Also see S03-metaops/hyper.t
--
Will "Coke" Coleda

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jul 5, 2014

From @coke

On Fri Jul 04 19​:54​:26 2014, coke wrote​:

Several tests in t/spec/S03-metaops/zip.t were marked as "nom
regression" and either fail or explode. See file for tests marked with
this ticket number.

Also see S03-metaops/hyper.t
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Dec 15, 2014

From @usev6

For the records​: TimToady++ today explained the underlying problem (final * NYI)​:

< bartolin> I've got a question about zip​: S03 says "By default the zip function reads to the end of the shortest list, but a short list may always be
  extended arbitrarily by putting * after the final value, which replicates the final value as many times as necessary."
< bartolin> what is the expected result of '(1, 2, *) Z (1, 2, 3, *)'? is it '(1, 1), (2, 2), (2, 3)' or rather an infinite list '(1, 1), (2, 2), (2, 3), (2, 3), ...'?
< bartolin> some tests in S03-metaops/zip.t seem to suggest the latter.
< TimToady> bartolin​: final * is not implemented
< bartolin> TimToady​: yes, but I'm trying to implement it ;-)
< TimToady> well, 1,2,* should be 1, 2 xx *
< TimToady> but the tricky bit is implementing @​list, *
< TimToady> you can't just assume you have the value to xx at compile time
< bartolin> I see. it's probably above my skills, but I was curios anyway ;-)
< TimToady> it's probably not worth thinking about until after the GLR
< TimToady> and it might be the wrong notation anyway
< TimToady> plus, you can always say @​array, {$_} ... * currently
< TimToady> m​: say 1,2,3, {$_} ... *
<+camelia> rakudo-moar 4d2710​: OUTPUT«1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
  3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...␤»
< TimToady> maybe it should just be a method​: (1,2,3).extend
< TimToady> or some such
< bartolin> ok, thanks for explaining! I think I'll leave it as it is ;-)

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 15, 2014

From @usev6

For the records​: TimToady++ today explained the underlying problem (final * NYI)​:

< bartolin> I've got a question about zip​: S03 says "By default the zip function reads to the end of the shortest list, but a short list may always be
  extended arbitrarily by putting * after the final value, which replicates the final value as many times as necessary."
< bartolin> what is the expected result of '(1, 2, *) Z (1, 2, 3, *)'? is it '(1, 1), (2, 2), (2, 3)' or rather an infinite list '(1, 1), (2, 2), (2, 3), (2, 3), ...'?
< bartolin> some tests in S03-metaops/zip.t seem to suggest the latter.
< TimToady> bartolin​: final * is not implemented
< bartolin> TimToady​: yes, but I'm trying to implement it ;-)
< TimToady> well, 1,2,* should be 1, 2 xx *
< TimToady> but the tricky bit is implementing @​list, *
< TimToady> you can't just assume you have the value to xx at compile time
< bartolin> I see. it's probably above my skills, but I was curios anyway ;-)
< TimToady> it's probably not worth thinking about until after the GLR
< TimToady> and it might be the wrong notation anyway
< TimToady> plus, you can always say @​array, {$_} ... * currently
< TimToady> m​: say 1,2,3, {$_} ... *
<+camelia> rakudo-moar 4d2710​: OUTPUT«1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
  3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...␤»
< TimToady> maybe it should just be a method​: (1,2,3).extend
< TimToady> or some such
< bartolin> ok, thanks for explaining! I think I'll leave it as it is ;-)

@p6rt
Copy link
Author

p6rt commented Dec 15, 2014

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

@p6rt
Copy link
Author

p6rt commented Oct 10, 2015

From @niner

This is now fixed in Rakudo​:
rakudo/rakudo@ebde5e8df0
rakudo/rakudo@e07f31b959
Marked as such in roast​:
Raku/roast@b6ba447105

@p6rt p6rt closed this as completed Oct 10, 2015
@p6rt
Copy link
Author

p6rt commented Oct 10, 2015

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

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

No branches or pull requests

1 participant