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

Map and containerization (my %m := Map.new(‘a’, ‘X’); %m<a> = 42) #6387

Open
p6rt opened this issue Jul 9, 2017 · 3 comments
Open

Comments

@p6rt
Copy link

p6rt commented Jul 9, 2017

Migrated from rt.perl.org#131722 (status was 'new')

Searchable as RT131722$

@p6rt
Copy link
Author

p6rt commented Jul 9, 2017

From @AlexDaniel

Code​:
my %m := Map.new(<a X b Y>);
%m<a> = 42;
say %m.perl

Result (2015.12~HEAD)​:
Map.new((​:a(42),​:b("Y")))

Code​:
my %m := Map.new(�a�, �X�, �b�, �Y�);
%m<a> = 42;
say %m.perl

Result (2015.12 ~ 2016.06)​:
Map.new((​:a(42),​:b("Y")))

Result (2016.07.1 ~ 2017.05)​:
Cannot modify an immutable Str
  in block <unit> at /tmp/8nf6dnM_9C line 2

Result (2017.06 ~ HEAD(05c255c))​:
Cannot modify an immutable Str (X)
  in block <unit> at /tmp/8nf6dnM_9C line 2

The significant change happened after rakudo/rakudo@de5d9e7

I'm not sure what the ideal behavior should be, I'm just pointing out the thing.

IRC log​: https://irclog.perlgeek.de/perl6/2017-07-09#i_14846532

Another interesting point​:

Code​:
my %m := Map.new(<a X b Y>); say %m.perl

Result​:
Map.new((​:a("X"),​:b("Y")))

Code​:
my %m := Map.new(�a�, �X�, �b�, �Y�); say %m.perl

Result​:
Map.new((​:a("X"),​:b("Y")))

If their .perl is identical, I guess they should behave identically too.

@p6rt
Copy link
Author

p6rt commented Jul 10, 2017

From @zoffixznet

There was an email reply to this ticket which for some reason is missing.

The issue was temporarily-fixed with a workaround, which would need to be removed to detect if proper fix is fixing the issue​: rakudo/rakudo@4894a75

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

From @AlexDaniel

FWIW because of workaround commit mentioned above this code behaves a little bit differently​:

Code​:
my $x; my $y := $x; $x = Map.new((​:a(42),​:b($y))); say $x

¦«2015.12»​:
«timed out after 10 seconds» «exit signal = SIGHUP (1)»

¦«2016.06»​:
«timed out after 10 seconds» «exit signal = SIGHUP (1)»

¦«2016.12»​:
«timed out after 10 seconds» «exit signal = SIGHUP (1)»

¦«2017.06»​:
«timed out after 10 seconds» «exit signal = SIGHUP (1)»

¦«f72be0f130cf»​:
Map.new((a => 42, b => (Any)))

Possible IRC discussion​: https://irclog.perlgeek.de/perl6/2017-10-06#i_15265136

Bisectable​: (2017-07-09) rakudo/rakudo@4894a75

I don't know if it's good or bad.

On 2017-07-10 02​:13​:22, cpan@​zoffix.com wrote​:

There was an email reply to this ticket which for some reason is
missing.

The issue was temporarily-fixed with a workaround, which would need to
be removed to detect if proper fix is fixing the issue​:
rakudo/rakudo@4894a75

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