Re: Where is "Subject"?

2017-02-27 Thread ToddAndMargo
On 02/27/2017 11:34 PM, ToddAndMargo wrote: Hi All, Follow up on Net::SMTP: Thank you for all the help! I am posting this back to help others. And, yes, I know I don't have to use "~" so much. -T Comments: 1) "@to" is an array, not a string 2) the "To:", "From:", and "Subject:" are header

Re: Where is "Subject"?

2017-02-27 Thread ToddAndMargo
Hi All, Follow up on Net::SMTP: Thank you for all the help! I am posting this back to help others. And, yes, I know I don't have to use "~" so much. -T Comments: 1) "@to" is an array, not a string 2) the "To:", "From:", and "Subject:" are headers that you make up yourself. And they are

Re: Terminal::ANSIColor problem

2017-02-27 Thread ToddAndMargo
On 02/26/2017 04:13 AM, ToddAndMargo wrote: Hi All, Reference: https://github.com/tadzik/Terminal-ANSIColor/ How do I clean this Perl 5 line for Perl 6? 44: use Terminal::ANSIColor qw( BOLD BLUE RED GREEN RESET ); # perl6 -c CimTrakCheckAndResatart.pl6 ===SORRY!=== Error while compiling /hom

Re: [perl #130876] [BUG] repl error report suppressed by prior output

2017-02-27 Thread Zefram
Zoffix Znet via RT wrote: >Fix: https://github.com/rakudo/rakudo/commit/61a65cee3d You've just moved the problem along. There's now a new class of object that, if evaluated to, will be treated as if evaluation failed on exception. Successful evaluation can yield literally any value, so if you

Re: mocking Proc

2017-02-27 Thread Lloyd Fournier
Ah nice. Wrapping &shell makes more sense than augmenting Proc anyway. LL On Tue, Feb 28, 2017 at 4:22 AM Brian Duggan wrote: > On Monday, February 27, Brian Duggan wrote: > > I tried numerous variants with multis and signatures that match the > > existing signatures, but didn't have any succ

[perl #130876] [BUG] repl error report suppressed by prior output

2017-02-27 Thread Zoffix Znet via RT
On Mon, 27 Feb 2017 14:27:04 -0800, zef...@fysh.org wrote: > Zoffix Znet via RT wrote: > >Fix: https://github.com/rakudo/rakudo/commit/db70a1fda8 > > This doesn't distinguish between an exception being thrown and the > expression evaluating to an exception object. The former is an error > condi

[perl #130887] [BUG] .perl omits backtrace of exception

2017-02-27 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130887] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130887 > > try { my Int $a; $a = "foo" }; say ?$!.backtrace; say ?$!.perl.EVAL.backtrace True False .pe

Re: [perl #130876] [BUG] repl error report suppressed by prior output

2017-02-27 Thread Zefram
Zoffix Znet via RT wrote: >Fix: https://github.com/rakudo/rakudo/commit/db70a1fda8 This doesn't distinguish between an exception being thrown and the expression evaluating to an exception object. The former is an error condition that must be reported; the latter is a successful evaluation in th

[perl #130886] multi subs with inconsistent where clauses don't work correctly

2017-02-27 Thread via RT
# New Ticket Created by Brad Gilbert # Please include the string: [perl #130886] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130886 > This prints the numbers 1 to 9 then fails with a constraint error my \one-out-of-ten

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/ae7bcf1b8e , more tests needed > On 27 Feb 2017, at 00:55, Aleks-Daniel Jakimenko-Aleksejev (via RT) > wrote: > > # New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev > # Please include the string: [perl #130870] > # in the subject line

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Elizabeth Mattijsen
FWIW, I’m working on a fix > On 27 Feb 2017, at 17:11, Brandon Allbery wrote: > > Or to put this another way: the current behavior seems like an > overoptimization where it finds the target container in the source and > optimizes into an update. This is only safe if the target is the first thi

[perl #130876] [BUG] repl error report suppressed by prior output

2017-02-27 Thread Zoffix Znet via RT
On Mon, 27 Feb 2017 00:21:17 -0800, zef...@fysh.org wrote: > > say "a"; "a" + 2; say "b" > a > > "a" + 2 > Cannot convert string to number: base-10 number must begin with valid > digits or '.' in '^a' (indicated by ^) > in block at line 1 > > In both of these cases the addition signals an exce

Re: Your thoughts on Padre?

2017-02-27 Thread Luca Ferrari
On Mon, Feb 27, 2017 at 4:32 PM, Brandon Allbery wrote: > On Mon, Feb 27, 2017 at 9:39 AM, Luca Ferrari wrote: >> >> On Sat, Feb 25, 2017 at 1:26 AM, Brandon Allbery >> wrote: >> > Padre's maintained? I thought it died years ago. >> >> Seems to me it is one year old now: >>

Re: mocking Proc

2017-02-27 Thread Brian Duggan
On Monday, February 27, Brian Duggan wrote: > I tried numerous variants with multis and signatures that match the > existing signatures, but didn't have any success. Okay, looks like wrap does what I want: use module; &shell.wrap( sub (|args) { say 'bye' } ); hello; Brian

Re: mocking Proc

2017-02-27 Thread Brian Duggan
On Monday, February 27, Lloyd Fournier wrote: > You will have to use augment in this case I think: > https://docs.perl6.org/syntax/augment > > Augment Proc with your own shell method and &shell should call it. No luck.. use MONKEY-TYPING; augment class Proc { method shell() {

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Brandon Allbery
To unpack this a bit: in this case I understand the comma to be an infix operator that creates a container by unpacking any containers it encounters and combining their contents with any non-containers it finds, in the specified order, to make a new collection of contents. It operates on the level

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Brandon Allbery
Or to put this another way: the current behavior seems like an overoptimization where it finds the target container in the source and optimizes into an update. This is only safe if the target is the first thing in the list of new contents; you must deoptimize in all other situations (unless your op

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Parrot Raiser
I agree with Brandon on this one. RHS retaining its original value, even when being updated on the LHS is a fundamental behaviour in Perl. Changing that, especially in obscure special circumstances would be bad. On 2/27/17, Brandon Allbery wrote: > And yes, I know that it *is* retaining its valu

Re: mocking Proc

2017-02-27 Thread Lloyd Fournier
Hmm, You will have to use augment in this case I think: https://docs.perl6.org/syntax/augment Augment Proc with your own shell method and &shell should call it. On Tue, 28 Feb 2017 at 1:59 am, Brian Duggan wrote: > On Monday, February 27, Lloyd Fournier wrote: > > Do you mean without modifying

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Brandon Allbery
And yes, I know that it *is* retaining its value as an object pointer, just not the contents. But if I write something like that, I pretty clearly mean the *contents*. On Mon, Feb 27, 2017 at 10:46 AM, Brandon Allbery wrote: > I disagree; this is not Haskell, if I do something like that then I e

Re: Your thoughts on Padre?

2017-02-27 Thread Brandon Allbery
On Mon, Feb 27, 2017 at 9:39 AM, Luca Ferrari wrote: > On Sat, Feb 25, 2017 at 1:26 AM, Brandon Allbery > wrote: > > Padre's maintained? I thought it died years ago. > > Seems to me it is one year old now: > . > I personally use spacemacs with pe

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Brandon Allbery
I disagree; this is not Haskell, if I do something like that then I expect %h2 to retain its original value while the RHS is being evaluated. On Mon, Feb 27, 2017 at 4:35 AM, Elizabeth Mattijsen wrote: > FWIW, this feels like a DIHWIDT case > > > On 27 Feb 2017, at 00:55, Aleks-Daniel Jakimenko-

Re: mocking Proc

2017-02-27 Thread Lloyd Fournier
I was thinking just do: 'sub shell(...) is export { }'. And then 'use MyCrazyShell;' in module.pm. Do you mean without modifying module.pm? LL On Tue, Feb 28, 2017 at 1:46 AM Brian Duggan wrote: > On Monday, February 27, Lloyd Fournier wrote: > > I'd do the follwiing: > > > > 1. make a sub na

Re: mocking Proc

2017-02-27 Thread Brian Duggan
On Monday, February 27, Lloyd Fournier wrote: > Do you mean without modifying module.pm? Yes, ideally without modifying module.pm. Brian

[perl #130883] problem with RESOURCES and PERL6LIB env variable

2017-02-27 Thread via RT
# New Ticket Created by mt1957 # Please include the string: [perl #130883] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130883 > Hi, In Rakudo version 2017.02-56-g9f10434 built on MoarVM version 2017.02-7-g3d85900 impleme

Re: mocking Proc

2017-02-27 Thread Brian Duggan
On Monday, February 27, Lloyd Fournier wrote: > I'd do the follwiing: > > 1. make a sub named shell to overwrite the existing one that calls .shell > on Proc. Once I make a 'shell', is it possible for the test file to inject my 'shell' into module.pm's namespace? e.g. I was hoping for something

Re: Your thoughts on Padre?

2017-02-27 Thread Luca Ferrari
On Sat, Feb 25, 2017 at 1:26 AM, Brandon Allbery wrote: > Padre's maintained? I thought it died years ago. > Seems to me it is one year old now: . I personally use spacemacs with perl6 mode and it does the job for me. Luca

Re: mocking Proc

2017-02-27 Thread Lloyd Fournier
I'd do the follwiing: 1. make a sub named shell to overwrite the existing one that calls .shell on Proc. 2. make a class that inherits from Proc: class MyProc is Proc { } 3. Look at https://github.com/rakudo/rakudo/blob/nom/src/core/Proc.pm and decide what methods you need to override to get the b

mocking Proc

2017-02-27 Thread Brian Duggan
Hi perl6-users, Suppose I have a file like this: # module.pm sub hello is export { shell "echo hello world" } and another like this: # test.t use module; hello; I want to have 'hello' invoke a 'shell' that I write, rather than the real one, so that I can mock th

Re: [perl #130877] [BUG] called-without-args error refers to non-existent method

2017-02-27 Thread Zefram
Elizabeth Mattijsen via RT wrote: >My point is that without knowing the object on which one attempts to >call a method, one cannot know whether or not the method call will fail. That's true, but the conclusion one would reach from that is that one can't suggest calling the sub in method form even

Re: [perl #130877] [BUG] called-without-args error refers to non-existent method

2017-02-27 Thread Elizabeth Mattijsen
> On 27 Feb 2017, at 11:29, Zefram wrote: > > Elizabeth Mattijsen via RT wrote: >> Fixed with https://github.com/rakudo/rakudo/commit/b11dc88a3e , no tests >> needed. > > That only changed one of the two types of message to which I referred. > mkdir still has the unchanged message. Good point

Re: [perl #130877] [BUG] called-without-args error refers to non-existent method

2017-02-27 Thread Zefram
Elizabeth Mattijsen via RT wrote: >Fixed with https://github.com/rakudo/rakudo/commit/b11dc88a3e , no tests >needed. That only changed one of the two types of message to which I referred. mkdir still has the unchanged message. I don't think the change made there fixes the problem. The altered m

Re: [perl #130875] [BUG] clashing Nil type constraints incorrectly described

2017-02-27 Thread Zefram
Elizabeth Mattijsen via RT wrote: >Feels to me that Nil should not be allowed as a type constraint at all. It's a type. The correct behaviour of it as a type constraint is obvious from that observation, and it does in fact exhibit that correct behaviour. (My "mostly" remark was referring to a pro

Re: [perl #130877] [BUG] called-without-args error refers to non-existent method

2017-02-27 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/b11dc88a3e , no tests needed. > On 27 Feb 2017, at 10:30, Zefram (via RT) > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130877] > # in the subject line of all future correspondence about this issue. > # h

Re: [perl #130875] [BUG] clashing Nil type constraints incorrectly described

2017-02-27 Thread Elizabeth Mattijsen
Feels to me that Nil should not be allowed as a type constraint at all. > On 27 Feb 2017, at 09:11, Zefram (via RT) > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130875] > # in the subject line of all future correspondence about this issue. > # https://rt

Re: [perl #130874] [BUG] Nil value misdescribed at repl

2017-02-27 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/a274bdd122 , tests needed > On 27 Feb 2017, at 09:06, Zefram (via RT) > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130874] > # in the subject line of all future correspondence about this issue. > # https

Re: [perl #130870] Some self-referential issue with hash assignment (%h1 = %h1, %h2)

2017-02-27 Thread Elizabeth Mattijsen
FWIW, this feels like a DIHWIDT case > On 27 Feb 2017, at 00:55, Aleks-Daniel Jakimenko-Aleksejev (via RT) > wrote: > > # New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev > # Please include the string: [perl #130870] > # in the subject line of all future correspondence about this issue

[perl #130877] [BUG] called-without-args error refers to non-existent method

2017-02-27 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130877] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130877 > > bag ===SORRY!=== Argument to "bag" seems to be malformed --> bag^ Other potential difficu

[perl #130876] [BUG] repl error report suppressed by prior output

2017-02-27 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130876] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130876 > > say "a"; "a" + 2; say "b" a > "a" + 2 Cannot convert string to number: base-10 number must be

[perl #130875] [BUG] clashing Nil type constraints incorrectly described

2017-02-27 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130875] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130875 > > my Int $a of Nil ===SORRY!=== Error while compiling: Mu not allowed here; variable list alrea

[perl #130874] [BUG] Nil value misdescribed at repl

2017-02-27 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130874] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130874 > > Nil.WHICH Nil|U28688864 > Nil.perl Nil > Nil.gist Nil > Nil (Any) The Nil value can be queri