[perl #126092] pairs X pairs can't bind to subsig

2017-09-29 Thread Sam S. via RT
On Fri, 18 Sep 2015 00:51:42 -0700, larry wrote: > 00:13 < TimToady> m: for (1,2,3).pairs X (4,5,6).pairs -> ($x,$y) { say "$x > $y" } > 00:13 <+camelia> rakudo-moar c0e0c9: OUTPUT«This type cannot unbox to a > native string␤ in block at /tmp/YnA_LhZbRO:1␤␤» It gives a nicer error message now:

Re: Any way to get hashes to loop in order?

2017-09-29 Thread ToddAndMargo
On 09/29/2017 07:25 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 9:55 PM, ToddAndMargo > wrote: for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Is there a way to get them to do so? Not without

Re: Any way to get hashes to loop in order?

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 9:55 PM, ToddAndMargo wrote: > for %SmtpIni.kv -> $key, $value { say $key; } > > Does "say" the keys in the order that I created them. > > Is there a way to get them to do so? > Not without storing that order somewhere yourself and using it to retrieve values. The point o

Re: Any way to get hashes to loop in order?

2017-09-29 Thread ToddAndMargo
On 09/29/2017 06:55 PM, ToddAndMargo wrote: Hi List, for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Does not Stinking typos Is there a way to get them to do so? Many thanks, -T -- ~~ Computers a

Any way to get hashes to loop in order?

2017-09-29 Thread ToddAndMargo
Hi List, for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Is there a way to get them to do so? Many thanks, -T

[perl #132186] [REGEX][PRECOMP] "getlex: outer index out of range" with precomped `constant` Regex

2017-09-29 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132186] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132186 > $ echo 'unit class Foo; constant $RT_RE = rx/« [RT]?"#"? <( <[0..9]>**{5..6} »/; metho

[perl #132154] slurp is mangling newlines, it should not (slurp ‘foo’)

2017-09-29 Thread Zoffix Znet via RT
On Thu, 28 Sep 2017 13:56:49 -0700, alex.jakime...@gmail.com wrote: > I'm shocked to see \r\n→\n translation being defended without any > reasoning. Well, it's just a pretty common thing to do. Perl did it for ages. And IIRC we already had tickets on this because Proc::Async didn't do it. > Why a

[perl #132154] slurp is mangling newlines, it should not (slurp ‘foo’)

2017-09-29 Thread Zoffix Znet via RT
On Thu, 28 Sep 2017 13:56:49 -0700, alex.jakime...@gmail.com wrote: > I'm shocked to see \r\n→\n translation being defended without any > reasoning. Well, it's just a pretty common thing to do. Perl did it for ages. And IIRC we already had tickets on this because Proc::Async didn't do it. > Why a

[perl #132185] [LTA] file tests and Failure do not interact as expected

2017-09-29 Thread Zoffix Znet via RT
On Fri, 29 Sep 2017 14:43:22 -0700, allber...@gmail.com wrote: > So, the first problem is that you have to be aware of the special behavior > of Failure and how it interacts with a method which is documented as > producing Bool. That documentation also lists the conditions when the method `fail`s.

[perl #132185] [LTA] file tests and Failure do not interact as expected

2017-09-29 Thread Zoffix Znet via RT
On Fri, 29 Sep 2017 14:43:22 -0700, allber...@gmail.com wrote: > So, the first problem is that you have to be aware of the special behavior > of Failure and how it interacts with a method which is documented as > producing Bool. That documentation also lists the conditions when the method `fail`s.

[perl #131079] [SECURITY] regex injection allows arbitrary execution using dynamic method lookup

2017-09-29 Thread Brian S. Julin via RT
On Fri, 29 Sep 2017 12:05:52 -0700, c...@zoffix.com wrote: > PR is now merged: https://github.com/rakudo/rakudo/pull/1168 Tests now merged into roast via commit 6ae5f8ee2, so resolving this ticket.

[perl #132185] [LTA] file tests and Failure do not interact as expected

2017-09-29 Thread via RT
# New Ticket Created by Brandon Allbery # Please include the string: [perl #132185] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132185 > This turns out to be fairly complex, and has implications that may go well beyond file

[perl #128054] [PARSER] In a string enclosed in parens, a {}-interpolation can't access the topic $_ of a statement modifier

2017-09-29 Thread Brian S. Julin via RT
On Sun, 28 May 2017 00:08:18 -0700, sml...@gmail.com wrote: > This bug is still present in > > This is Rakudo version 2017.05-134-g0c5fe56cc built on MoarVM version > 2017.05-25-g62bc54e9 > implementing Perl 6.c. OK, keeping in mind that I have entirely, absolutely no idea what I am doing... I

Re: write bytes requires an object with REPR MVMOSHandle

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:22 PM, ToddAndMargo wrote: On Fri, Sep 29, 2017 at 1:49 AM, ToddAndMargo > wrote:     Hi All,     I am stumped.  This only screws up in the for loop.     This is only the chopped up version         #!/usr/bin/env perl6     my $SmtpIniFileName =

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:41 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 3:27 PM, ToddAndMargo > wrote: I do not understand.  :'( There's not enough syntax to go around, so perl 6 has to use spaces sometimes to figure out what you want. $ perl6 -e 'my $x=

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:43 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 3:36 PM, ToddAndMargo > wrote: This is the correct one. The warning about "useless use" here is a bug in rakudo. It's meant to warn for things like Another bug.  Luck

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 3:36 PM, ToddAndMargo wrote: > This is the correct one. The warning about "useless use" here is a bug >> in rakudo. It's meant to warn for things like >> > Another bug. Lucky me, again. :'( > > Thank you! > Also, this is about the third time in the past 2 days that I p

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 3:27 PM, ToddAndMargo wrote: > I do not understand. :'( > There's not enough syntax to go around, so perl 6 has to use spaces sometimes to figure out what you want. > $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' > ===SORRY!=== Error while compiling -e > Missing req

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:30 PM, Timo Paulssen wrote: On 09/29/2017 09:27 PM, ToddAndMargo wrote: $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' Potential difficulties:     Useless use of [R~]= in sink context     at -e:1     --> my $x="abc"; $x ⏏[R~]= "yyz"; say $x; yyzabc This is the correc

[perl #131251] Useless use warning triggered on assignment forms of reverse metaops

2017-09-29 Thread Timo Paulssen via RT
This also happens with other metaops than R, like [Z+]=, [X+]=, and also [S+]= (which admittedly doesn't do sensible things)

[perl #132179] Don't put Mexico and Texas in opposition in Perl 6 jargon

2017-09-29 Thread Zoffix Znet via RT
On Thu, 28 Sep 2017 13:20:50 -0700, j...@durchholz.org wrote: > Am 28.09.2017 um 15:44 schrieb brian d foy (via RT): > > And, that's not bake any other geopolitical oppositions into the > > language either. The Texas metaphor was a joke about that an American > > stereotype and you shouldn't go fur

[perl #132179] Don't put Mexico and Texas in opposition in Perl 6 jargon

2017-09-29 Thread Zoffix Znet via RT
On Thu, 28 Sep 2017 13:20:50 -0700, j...@durchholz.org wrote: > Am 28.09.2017 um 15:44 schrieb brian d foy (via RT): > > And, that's not bake any other geopolitical oppositions into the > > language either. The Texas metaphor was a joke about that an American > > stereotype and you shouldn't go fur

Re: Need append help

2017-09-29 Thread Timo Paulssen
On 09/29/2017 09:27 PM, ToddAndMargo wrote: > $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' > Potential difficulties: >     Useless use of [R~]= in sink context >     at -e:1 >     --> my $x="abc"; $x ⏏[R~]= "yyz"; say $x; > yyzabc This is the correct one. The warning about "useless use" h

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:12 PM, Andy Bach wrote: Hmm $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' yyzabc no space: $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' ===SORRY!=== Error while compiling -e Missing required term after infix at -e:1 --> my $x="abc"; $x[R~⏏]= "yyz"; say $x;     expec

Re: write bytes requires an object with REPR MVMOSHandle

2017-09-29 Thread ToddAndMargo
On Fri, Sep 29, 2017 at 1:49 AM, ToddAndMargo > wrote: Hi All, I am stumped. This only screws up in the for loop. This is only the chopped up version #!/usr/bin/env perl6 my $SmtpIniFileName = $?FILE ~ ".ini"; my %SmtpIni = [ 'DebugT

Re: Need append help

2017-09-29 Thread Andy Bach
Hmm $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' yyzabc no space: $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' ===SORRY!=== Error while compiling -e Missing required term after infix at -e:1 --> my $x="abc"; $x[R~⏏]= "yyz"; say $x; expecting any of: prefix term $

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 2:59 PM, ToddAndMargo wrote: > $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' > ===SORRY!=== Error while compiling -e > Missing required term after infix > at -e:1 > --> my $x="abc"; $x[R~⏏]= "yyz"; say $x; > expecting any of: > prefix > term >

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 11:32 AM, Sean McAfee wrote: On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery > wrote: On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Question:  Is thee a pretty way like the above to do a prepend?

Re: write bytes requires an object with REPR MVMOSHandle

2017-09-29 Thread Andy Bach
close ( $SmtpHandle ); } Your indenting has done you wrong - you close the file handle inside the loop for loop, so it closed after the first print. On Fri, Sep 29, 2017 at 1:49 AM, ToddAndMargo wrote: > Hi All, > > I am stumped. This only screws up in the for loop. > > This is only the ch

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 2:32 PM, Sean McAfee wrote: > On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery > wrote: > >> On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo >> wrote: >> >>> >>> Question: Is thee a pretty way like the above to do a prepend? >>> >> >> No, sorry. >> > > Actually, there se

Re: Need append help

2017-09-29 Thread Sean McAfee
On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery wrote: > On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo > wrote: > >> >> Question: Is thee a pretty way like the above to do a prepend? >> > > No, sorry. > Actually, there seems to be: > my $x = "abc" abc > $x [R~]= "xyz" xyzabc > $x xyzabc

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo wrote: > $ perl6 -e 'my $x="abc"; $x ~= "def"; say $x;' > abcdef > > Perfect! Thank you! > > I am slowly getting away from my Modula 2 "Array of Characters" days. > > Question: Is thee a pretty way like the above to do a prepend? > No, sorry. The d

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 10:54 AM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 1:49 PM, ToddAndMargo > wrote: I am trying to find a shorter way of doing      $x = $x ~ "def" But I can't seem to master "append" What am I doing wrong? Again (as with last

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 1:49 PM, ToddAndMargo wrote: > I am trying to find a shorter way of doing > $x = $x ~ "def" > > But I can't seem to master "append" > > What am I doing wrong? > Again (as with last night in IRC) you are treating a string as a list. But a string is a single thing; it

Need append help

2017-09-29 Thread ToddAndMargo
Hi All, I am trying to find a shorter way of doing $x = $x ~ "def" But I can't seem to master "append" What am I doing wrong? Many thanks, -T https://docs.perl6.org/routine/append $ perl6 -e 'my $x="abc"; $x.append("def"); say $x;' Cannot resolve caller append(Str: Str); none of these

Re: -f ???

2017-09-29 Thread ToddAndMargo
On 09/29/2017 10:23 AM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 9:53 AM, Parrot Raiser <1parr...@gmail.com > wrote: Discussing the full implications of these tests could probably keep a philosophy class busy for an afternnon. It might even rise to an

Re: -f ???

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 9:53 AM, Parrot Raiser <1parr...@gmail.com> wrote: > Discussing the full implications of these tests could probably keep a > philosophy class busy for an afternnon. It might even rise to an > LPU[1] paper. > It's even more involved than you think; I have notes for what cou

[perl #132184] [6.d] .skip semantics are inconsistent

2017-09-29 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132184] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132184 > - Seq.skip mutates the invocant: $ ./perl6 -e 'my $s := (1, 2, 3).Seq; $ = $s.skip; sa

Re: -f ???

2017-09-29 Thread Parrot Raiser
>> In other words, I think we should change the Perl 6 spec to define .f as >> "exists and is a file". >> >> -- >> Mark Montague Mark and I appear to be having a vigorous agreement about the principle of Least Surprise. If -f X is defined as meaning "X exists and is a file", then obviously if

Re: -f ???

2017-09-29 Thread Fernando Santagata
One might argue that -f returning Failure is like a SQL query returning NULL, which is appealing to me. On Fri, Sep 29, 2017 at 4:05 PM, Mark Montague wrote: > On 2017-09-29 09:53, Parrot Raiser wrote: > >> -e is fairly easy. It asks if something exists. Ignoring Schrodinger, >> either it does (

Re: -f ???

2017-09-29 Thread Mark Montague
On 2017-09-29 09:53, Parrot Raiser wrote: -e is fairly easy. It asks if something exists. Ignoring Schrodinger, either it does (i.e True) or it doesn't. (False) -f is more ambiguous. It asks if something has a property (fileness) or not. If it exists, it either does or doesn't. [...] Bash appear

Re: -f ???

2017-09-29 Thread Parrot Raiser
Discussing the full implications of these tests could probably keep a philosophy class busy for an afternnon. It might even rise to an LPU[1] paper. -e is fairly easy. It asks if something exists. Ignoring Schrodinger, either it does (i.e True) or it doesn't. (False) -f is more ambiguous. It asks

Re: -f ???

2017-09-29 Thread Timo Paulssen
> This sounds broken, actually; I understand that a Failure treated as > a Bool > prevented it from throwing, so it should have simply returned > False. > > Checking it for .defined *does* prevent throwing. Still seems like a > bug. It doesn't get "treated as a Bool"; any Failure makes it through