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

The last bug #3325

Closed
p6rt opened this issue Feb 2, 2014 · 5 comments
Closed

The last bug #3325

p6rt opened this issue Feb 2, 2014 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Feb 2, 2014

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

Searchable as RT121147$

@p6rt
Copy link
Author

p6rt commented Feb 2, 2014

From mark@kli.org

 

 
 
 
 
  <clsn> perl6​: my $i=0; while $i < 6 { FIRST { say "Here";
  last }; say $i++ }

  <camelia> rakudo-moar 535d91​: OUTPUT«0␤1␤2␤3␤4␤5␤»

  <camelia> ..niecza v24-109-g48a8de3​:
  OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤␤Action method
  statement_prefix​:FIRST not yet implemented at /tmp/tmpfile line
  1​:␤------> �[32mhile $i < 6 { FIRST { say "Here"; last
  }�[33m⏏�[31m; say $i++ }�[0m␤␤Unhandled exception​: Unable to resolve
  metho…»

  <camelia> ..rakudo-parrot 535d91, rakudo-jvm 535d91​:
  OUTPUT«Here␤0␤1␤2␤3␤4␤5␤»

  <masak> clsn​: it's another one of those "how does X interact
  with Y" things. phasers are full of them.

  <clsn> Wow, didn't expect moar to do different there.

  <Timbus> i guess you could always use the first part of a
  loop(;;) ;/

  <clsn> I'm not positive that the behavior is wrong or right
  there...

  <-- rindolf has quit (Quit​: Leaving)

  <masak> clsn​: looks like rakudo-parrot has it right.

  <masak> hm, wait.

  <clsn> Does the "last" not count there then?

  <masak> no, none of them are right.

  <masak> yes, it should, of course.

  <masak> clsn​: feel free to submit a separate rakudobug for
  that one. ;)

  <clsn> Heh. :)

  <Timbus> call it 'the last bug' and we can declare perl 6
  finished when it's closed

 

@p6rt
Copy link
Author

p6rt commented Feb 5, 2014

From @masak

<masak> <[Coke]> masak​: if none of them have RT #​121147 right, what's the right way to have it?
<masak> [Coke]​: sorry, left that out.
<masak> [Coke]​: "Here\n"
<masak> [Coke]​: with the rationale that FIRST runs before any iteration, the say gets printed, and then 'last' quits the loop.
<masak> [Coke]​: rakudo-moar seems to entirely ignore the FIRST. rakudo-parrot and rakudo-jvm run the FIRST, but ignore the 'last'.
* masak adds this to the ticket

@p6rt
Copy link
Author

p6rt commented Feb 5, 2014

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

@p6rt
Copy link
Author

p6rt commented Dec 2, 2015

From @jnthn

On Sun Feb 02 11​:20​:48 2014, mark@​kli.org wrote​:

<clsn> perl6​: my $i=0; while $i < 6 { FIRST { say "Here"; last }; say
$i++ }
<camelia> rakudo-moar 535d91​: OUTPUT«0␤1␤2␤3␤4␤5␤»
<camelia> ..niecza v24-109-g48a8de3​:
OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤␤Action method
statement_prefix​:FIRST not
yet implemented at /tmp/tmpfile line 1​:␤------> �[32mhile $i < 6 {
FIRST { say
"Here"; last }�[33m⏏�[31m; say $i++ }�[0m␤␤Unhandled exception​: Unable
to
resolve metho…»
<camelia> ..rakudo-parrot 535d91, rakudo-jvm 535d91​:
OUTPUT«Here␤0␤1␤2␤3␤4␤5␤»
<masak> clsn​: it's another one of those "how does X interact with Y"
things.
phasers are full of them.
<clsn> Wow, didn't expect moar to do different there.
<Timbus> i guess you could always use the first part of a loop(;;) ;/
<clsn> I'm not positive that the behavior is wrong or right there...
<-- rindolf has quit (Quit​: Leaving)
<masak> clsn​: looks like rakudo-parrot has it right.
<masak> hm, wait.
<clsn> Does the "last" not count there then?
<masak> no, none of them are right.
<masak> yes, it should, of course.
<masak> clsn​: feel free to submit a separate rakudobug for that one.
;)
<clsn> Heh. :)
<Timbus> call it 'the last bug' and we can declare perl 6 finished
when it's
closed

Fixed now. Sadly there do remain 20 more things in the xmas bug list, but...close to last. ;-) Tests in S04-phasers/first.t.

@p6rt
Copy link
Author

p6rt commented Dec 2, 2015

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

@p6rt p6rt closed this as completed Dec 2, 2015
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