Skip Menu |
Report information
Id: 123980
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: hmbrand <h.m.brand [at] xs4all.nl>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
To: rakudobug [...] perl.org
Subject: * does not allow // in map
Date: Wed, 4 Mar 2015 09:15:59 +0100
Download (untitled) / with headers
text/plain 841b
$ perl6 -e '(1,Str,"a").map(*)[1].say' (Str) $ perl6 -e '(1,Str,"a").map(*)[1].perl.say' Str $ perl6 -e '(1,Str,"a").map(~*)[1].say' use of uninitialized value of type Str in string context in block <unit> at -e:1 $ perl6 -e '(1,Str,"a").map(~*)[1].perl.say' use of uninitialized value of type Str in string context in block <unit> at -e:1 "" $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].say' - $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].perl.say' "-" $ perl6 -e '(1,Str,"a").map(*//"-")[1].say' (Str) $ perl6 -e '(1,Str,"a").map(*//"-")[1].perl.say' Str -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Download (untitled)
application/pgp-signature 490b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 758b
On Wed Mar 04 00:16:25 2015, hmbrand wrote: Show quoted text
> $ perl6 -e '(1,Str,"a").map(*)[1].say' > (Str) > $ perl6 -e '(1,Str,"a").map(*)[1].perl.say' > Str > $ perl6 -e '(1,Str,"a").map(~*)[1].say' > use of uninitialized value of type Str in string context in block > <unit> at -e:1 > > > $ perl6 -e '(1,Str,"a").map(~*)[1].perl.say' > use of uninitialized value of type Str in string context in block > <unit> at -e:1 > > "" > $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].say' > - > $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].perl.say' > "-" > $ perl6 -e '(1,Str,"a").map(*//"-")[1].say' > (Str) > $ perl6 -e '(1,Str,"a").map(*//"-")[1].perl.say' > Str
06:47 < [Tux]> [Coke] in RT#123980, I hoped .map(*//"-") to do the same as .map({*//"-"}) -- Will "Coke" Coleda
Date: Sat, 29 Aug 2015 13:20:40 +0200
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
To: "Will Coleda via RT" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #123980] * does not allow // in map
Download (untitled) / with headers
text/plain 1.2k
On Sat, 29 Aug 2015 04:09:22 -0700, "Will Coleda via RT" <perl6-bugs-followup@perl.org> wrote: Show quoted text
> On Wed Mar 04 00:16:25 2015, hmbrand wrote:
> > $ perl6 -e '(1,Str,"a").map(*)[1].say' > > (Str) > > $ perl6 -e '(1,Str,"a").map(*)[1].perl.say' > > Str > > $ perl6 -e '(1,Str,"a").map(~*)[1].say' > > use of uninitialized value of type Str in string context in block > > <unit> at -e:1 > > > > > > $ perl6 -e '(1,Str,"a").map(~*)[1].perl.say' > > use of uninitialized value of type Str in string context in block > > <unit> at -e:1 > > > > "" > > $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].say' > > - > > $ perl6 -e '(1,Str,"a").map({$_//"-"})[1].perl.say' > > "-" > > $ perl6 -e '(1,Str,"a").map(*//"-")[1].say' > > (Str) > > $ perl6 -e '(1,Str,"a").map(*//"-")[1].perl.say' > > Str
> > 06:47 < [Tux]> [Coke] in RT#123980, I hoped .map(*//"-") to do the same as .map({*//"-"})
Actually: .map(*//"-") to be the same as .map({$_//"-"}) sorry if my IRC comment caused confusion -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Download (untitled)
application/pgp-signature 490b

Message body not shown because it is not plain text.

To: perl6-bugs-followup [...] perl.org
From: bri <bri [...] abrij.org>
Subject: [perl #123980] // does not auto-prime Whatever/WhateverCode
Date: Wed, 2 Sep 2015 23:24:30 -0400
This golfs down to: (* // "foo").WHAT.say All the boolean ops see not to. Just to see what would happen I applied the following patch locally: --- a/src/Perl6/Actions.nqp +++ b/src/Perl6/Actions.nqp @@ -7744,6 +7744,10 @@ Compilation unit '$file' contained the following violations: %curried{'&infix:<^..^>'} := 2; %curried{'&infix:<xx>'} := 2; %curried{'callmethod'} := 3; + %curried{'if'} := 3; + %curried{'defor'} := 3; + %curried{'unless'} := 3; + %curried{'xor'} := 3; %curried{'p6callmethodhow'} := 3; %curried{'&postcircumfix:<[ ]>'} := 3; %curried{'&postcircumfix:<{ }>'} := 3; This did cause //, and, &&, orelse, etc. to autocurry, with the surprising exceptions of ^^ and xor which never seem to reach the whatever_curry rule. Another op that does not includes infix:<min>. This caused no spectest failures, but needs a combined check with design folks and implementation folks given the interaction of conditionals with the optimizer.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org