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

junctions produced by ^methods are unpredictable #1962

Closed
p6rt opened this issue Jul 22, 2010 · 6 comments
Closed

junctions produced by ^methods are unpredictable #1962

p6rt opened this issue Jul 22, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jul 22, 2010

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

Searchable as RT76648$

@p6rt
Copy link
Author

p6rt commented Jul 22, 2010

From cxreg@pobox.com

The following code, executed repeatedly, will produce different results,
seemingly based on the ordering of the junction​:

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff }; Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ?? "yay" !! "nay")'
baz, bar, biff, uniq, isa, map, classify, kv, min, max, pick, flat, first, minmax, does, rotate, join, Numeric, elems, end, reduce, all, Str, postcircumfix​:<[ ]>, postcircumfix​:<{ }>, list, at_key, pairs, one, ACCEPTS, at_pos, any, sort, Seq, grep, values, none, can, reverse, keys, notdef, , BUILDALL, new, Bool, say, print, item, WALK, defined, BUILD, clone, perl, WHICH, Capture, CREATE, PARROT, bless, WHENCE, WHERE
nay

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff }; Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ?? "yay" !! "nay")'
biff, baz, bar, ACCEPTS, at_pos, any, sort, Seq, grep, none, values, can, reverse, keys, uniq, isa, map, classify, kv, min, max, pick, flat, first, minmax, does, rotate, join, Numeric, elems, end, reduce, Str, all, list, postcircumfix​:<{ }>, postcircumfix​:<[ ]>, at_key, pairs, one, BUILDALL, new, Bool, say, print, item, WALK, defined, BUILD, clone, perl, WHICH, Capture, CREATE, PARROT, bless, WHENCE, WHERE, notdef,
yay

@p6rt
Copy link
Author

p6rt commented Jul 29, 2010

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

@p6rt
Copy link
Author

p6rt commented Jan 11, 2012

From @coke

On Thu Jul 22 00​:45​:24 2010, cxreg@​pobox.com wrote​:

The following code, executed repeatedly, will produce different
results,
seemingly based on the ordering of the junction​:

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
baz, bar, biff, uniq, isa, map, classify, kv, min, max, pick, flat,
first, minmax, does, rotate, join, Numeric, elems, end, reduce,
all, Str, postcircumfix​:<[ ]>, postcircumfix​:<{ }>, list, at_key,
pairs, one, ACCEPTS, at_pos, any, sort, Seq, grep, values, none,
can, reverse, keys, notdef, , BUILDALL, new, Bool, say, print,
item, WALK, defined, BUILD, clone, perl, WHICH, Capture, CREATE,
PARROT, bless, WHENCE, WHERE
nay

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
biff, baz, bar, ACCEPTS, at_pos, any, sort, Seq, grep, none, values,
can, reverse, keys, uniq, isa, map, classify, kv, min, max, pick,
flat, first, minmax, does, rotate, join, Numeric, elems, end,
reduce, Str, all, list, postcircumfix​:<{ }>, postcircumfix​:<[ ]>,
at_key, pairs, one, BUILDALL, new, Bool, say, print, item, WALK,
defined, BUILD, clone, perl, WHICH, Capture, CREATE, PARROT, bless,
WHENCE, WHERE, notdef,
yay

This is now pretty consistent​:

19​:55 < [Coke]> rakudo​: class Foo { has $.bar; has $.baz; has $.biff };
  Foo.^methods.join(", ").say;
19​:56 <+p6eval> rakudo 38165a​: OUTPUT«bar, baz, biff␤»

Is this closable?

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Apr 22, 2013

From @coke

On Tue Jan 10 16​:58​:10 2012, coke wrote​:

On Thu Jul 22 00​:45​:24 2010, cxreg@​pobox.com wrote​:

The following code, executed repeatedly, will produce different
results,
seemingly based on the ordering of the junction​:

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
baz, bar, biff, uniq, isa, map, classify, kv, min, max, pick, flat,
first, minmax, does, rotate, join, Numeric, elems, end, reduce,
all, Str, postcircumfix​:<[ ]>, postcircumfix​:<{ }>, list, at_key,
pairs, one, ACCEPTS, at_pos, any, sort, Seq, grep, values, none,
can, reverse, keys, notdef, , BUILDALL, new, Bool, say, print,
item, WALK, defined, BUILD, clone, perl, WHICH, Capture, CREATE,
PARROT, bless, WHENCE, WHERE
nay

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
biff, baz, bar, ACCEPTS, at_pos, any, sort, Seq, grep, none, values,
can, reverse, keys, uniq, isa, map, classify, kv, min, max, pick,
flat, first, minmax, does, rotate, join, Numeric, elems, end,
reduce, Str, all, list, postcircumfix​:<{ }>, postcircumfix​:<[ ]>,
at_key, pairs, one, BUILDALL, new, Bool, say, print, item, WALK,
defined, BUILD, clone, perl, WHICH, Capture, CREATE, PARROT, bless,
WHENCE, WHERE, notdef,
yay

This is now pretty consistent​:

19​:55 < [Coke]> rakudo​: class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say;
19​:56 <+p6eval> rakudo 38165a​: OUTPUT«bar, baz, biff␤»

Is this closable?

Marking testneeded.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 12, 2014

From @coke

On Sun Apr 21 22​:27​:34 2013, coke wrote​:

On Tue Jan 10 16​:58​:10 2012, coke wrote​:

On Thu Jul 22 00​:45​:24 2010, cxreg@​pobox.com wrote​:

The following code, executed repeatedly, will produce different
results,
seemingly based on the ordering of the junction​:

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
baz, bar, biff, uniq, isa, map, classify, kv, min, max, pick, flat,
first, minmax, does, rotate, join, Numeric, elems, end, reduce,
all, Str, postcircumfix​:<[ ]>, postcircumfix​:<{ }>, list, at_key,
pairs, one, ACCEPTS, at_pos, any, sort, Seq, grep, values, none,
can, reverse, keys, notdef, , BUILDALL, new, Bool, say, print,
item, WALK, defined, BUILD, clone, perl, WHICH, Capture, CREATE,
PARROT, bless, WHENCE, WHERE
nay

$ perl6 -e 'class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say; say ("biff" eq any(Foo.^methods) ??
"yay" !! "nay")'
biff, baz, bar, ACCEPTS, at_pos, any, sort, Seq, grep, none, values,
can, reverse, keys, uniq, isa, map, classify, kv, min, max, pick,
flat, first, minmax, does, rotate, join, Numeric, elems, end,
reduce, Str, all, list, postcircumfix​:<{ }>, postcircumfix​:<[ ]>,
at_key, pairs, one, BUILDALL, new, Bool, say, print, item, WALK,
defined, BUILD, clone, perl, WHICH, Capture, CREATE, PARROT, bless,
WHENCE, WHERE, notdef,
yay

This is now pretty consistent​:

19​:55 < [Coke]> rakudo​: class Foo { has $.bar; has $.baz; has $.biff };
Foo.^methods.join(", ").say;
19​:56 <+p6eval> rakudo 38165a​: OUTPUT«bar, baz, biff␤»

Is this closable?

Marking testneeded.

Tests added to S12-introspection/methods.t
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 12, 2014

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