[perl #131785] [BUG] - runtime looping.

2017-08-10 Thread Brian S. Julin via RT
Analysis... you've run into a nest of LTA/bugs. 1) First off, this will loop: perl6 -e 'class A does Numeric { }; say A.new + A.new' The reason it loops is because the default infix:<+> (provided by Numeric) does this: multi sub infix:<+>(\a, \b){ a.Numeric + b.Numeric } ...and the defa

[perl #131881] [REGRESSION] JSON::Tiny tests output bad text on latest build

2017-08-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
It was bisected to https://github.com/rakudo/rakudo/commit/f590863e1736c75207c9ce0335ea646e3529060e Example (before and after): https://gist.github.com/Whateverable/2a9088ddcff37fd6f748b77ba3339af2 On 2017-08-10 14:54:24, jdv79 wrote: > I updated to: > > > [jdv@localhost ~]$ perl6 -v > This is Ra

[perl #131881] [BUG] json::tiny tests output bad text on latest build

2017-08-10 Thread via RT
# New Ticket Created by Justin DeVuyst # Please include the string: [perl #131881] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131881 > I updated to: [jdv@localhost ~]$ perl6 -v This is Rakudo version 2017.07-144-gec7bc25

[perl #123016] [BUG] When overriding .gist, it's all or nothing

2017-08-10 Thread Zoffix Znet via RT
On Mon, 20 Oct 2014 09:00:24 -0700, j...@johnkingsley.ca wrote: > Hi, > > When I define a gist() method, it doesn't get called when I expected > it to be called. > > This occurs when you call gist() not on the object directly, but > instead > on another object which uses the class where the gist(

[perl #123016] [BUG] When overriding .gist, it's all or nothing

2017-08-10 Thread Zoffix Znet via RT
On Mon, 20 Oct 2014 09:00:24 -0700, j...@johnkingsley.ca wrote: > Hi, > > When I define a gist() method, it doesn't get called when I expected > it to be called. > > This occurs when you call gist() not on the object directly, but > instead > on another object which uses the class where the gist(

[perl #131879] [REGRESSION] Memory “leak”

2017-08-10 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #131879] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131879 > After recent rakudo updates whateverables started having some problem

Re: Running external CLI tool and capturing output

2017-08-10 Thread Tom Browder
On Thu, Aug 10, 2017 at 11:28 Gabor Szabo wrote: > Oh right. Thanks. I forgot about them. Maybe > https://docs.perl6.org/routine/run should mention them as well. > > In any case a simpler way to capture everything might be useful. Maybe not simpler but take a look at my published Perl 6 module

Re: Running external CLI tool and capturing output

2017-08-10 Thread Gabor Szabo
Oh right. Thanks. I forgot about them. Maybe https://docs.perl6.org/routine/run should mention them as well. In any case a simpler way to capture everything might be useful. Gabor On Thu, Aug 10, 2017 at 6:09 PM, Brock Wilcox wrote: > How about qx and qxx? I guess those don't separate/capture s

Re: Running external CLI tool and capturing output

2017-08-10 Thread Brock Wilcox
How about qx and qxx? I guess those don't separate/capture stderr, and don't separate out the params. --Brock On Thu, Aug 10, 2017 at 10:57 AM, Gabor Szabo wrote: > The documentation has a nice example showing how to run an external > program and how to get its output or even its standard erro

Re: Running external CLI tool and capturing output

2017-08-10 Thread Brandon Allbery
"ps. security bad, correctness bad, do the simplest thing even when it's wrong." On Thu, Aug 10, 2017 at 10:57 AM, Gabor Szabo wrote: > The documentation has a nice example showing how to run an external > program and how to get its output or even its standard error. > https://docs.perl6.org/typ

Running external CLI tool and capturing output

2017-08-10 Thread Gabor Szabo
The documentation has a nice example showing how to run an external program and how to get its output or even its standard error. https://docs.perl6.org/type/Proc However it looks a lot more complex than the plain backtick Perl 5 has and more complex than the capture function of Capture::Tiny. IMH

[perl #131845] Binding a Seq to a `@` variable tries to consume it first

2017-08-10 Thread Zoffix Znet via RT
On Sun, 06 Aug 2017 18:52:07 -0700, alex.jakime...@gmail.com wrote: > Not sure if this info is relevant now, but the hang was introduced in > (2016-02-18) > https://github.com/rakudo/rakudo/commit/9983c2c8434ed81c532a5706996f284283b48d0a Yes, very relevant. It's the .perl that hangs and even in no

[perl #131845] Binding a Seq to a `@` variable tries to consume it first

2017-08-10 Thread Zoffix Znet via RT
On Sun, 06 Aug 2017 18:52:07 -0700, alex.jakime...@gmail.com wrote: > Not sure if this info is relevant now, but the hang was introduced in > (2016-02-18) > https://github.com/rakudo/rakudo/commit/9983c2c8434ed81c532a5706996f284283b48d0a Yes, very relevant. It's the .perl that hangs and even in no

[perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Zoffix Znet via RT
On Thu, 10 Aug 2017 06:37:58 -0700, szab...@gmail.com wrote: > However a more common case is the frequent language switching. I keep > typing Python constructs in Perl and Perl constructs in Python. Not to > mention Perl 5 vs 6 constructs. And JavaScript too. This is really a double-edged sword. W

[perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Zoffix Znet via RT
On Thu, 10 Aug 2017 06:37:58 -0700, szab...@gmail.com wrote: > However a more common case is the frequent language switching. I keep > typing Python constructs in Perl and Perl constructs in Python. Not to > mention Perl 5 vs 6 constructs. And JavaScript too. This is really a double-edged sword. W

Re: [perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Gabor Szabo
On Thu, Aug 10, 2017 at 3:59 PM, Zoffix Znet via RT wrote: > On Thu, 10 Aug 2017 02:09:30 -0700, szab...@gmail.com wrote: >> In Python one can pass a string to the exit() function >> Would it be possible to special case > > Not really keen on adding special cases to support programming-by-guessing

Re: [perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Gabor Szabo via RT
On Thu, Aug 10, 2017 at 3:59 PM, Zoffix Znet via RT wrote: > On Thu, 10 Aug 2017 02:09:30 -0700, szab...@gmail.com wrote: >> In Python one can pass a string to the exit() function >> Would it be possible to special case > > Not really keen on adding special cases to support programming-by-guessing

[perl #131841] [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-10 Thread Zoffix Znet via RT
On Mon, 07 Aug 2017 11:08:07 -0700, timo wrote: > Annoyingly, 2017.07 has a bug that makes every --ll-exception print > that Just for reference, if needed, it's possible to work around that bug by telling rakudo to use a custom exceptions handler: cd $(mktemp -d) mkdir Exceptions ech

[perl #131841] [BUG] In a 'unit module', a 'die' along any CATCH block causes a compiler error

2017-08-10 Thread Zoffix Znet via RT
On Mon, 07 Aug 2017 11:08:07 -0700, timo wrote: > Annoyingly, 2017.07 has a bug that makes every --ll-exception print > that Just for reference, if needed, it's possible to work around that bug by telling rakudo to use a custom exceptions handler: cd $(mktemp -d) mkdir Exceptions ech

[perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Zoffix Znet via RT
On Thu, 10 Aug 2017 02:09:30 -0700, szab...@gmail.com wrote: > In Python one can pass a string to the exit() function > Would it be possible to special case Not really keen on adding special cases to support programming-by-guessing instead of reading the documentation. However, it's worth noting

[perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Zoffix Znet via RT
On Thu, 10 Aug 2017 02:09:30 -0700, szab...@gmail.com wrote: > In Python one can pass a string to the exit() function > Would it be possible to special case Not really keen on adding special cases to support programming-by-guessing instead of reading the documentation. However, it's worth noting

[perl #131865] [REGRESSION] Looping over a HyperSeq in sink context does nothing (for .hyper { say 2 })

2017-08-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
IRC discussion: https://irclog.perlgeek.de/perl6/2017-08-09#i_14989886 Turns out that .hyper/.race never worked reliably anyway, so this ticket is less important than it looks. Maybe we should have a meta ticket that tracks all .hyper/.race issues. Another option would be to just close them all,

Re: [perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Brandon Allbery via RT
At some point, one has to accept that this language is not Python, not call for one's favorite Python-isms to be incorporated into the core regardless of how it might interact with what is already there. On Thu, Aug 10, 2017 at 8:12 AM, Aleks-Daniel Jakimenko-Aleksejev via RT < perl6-bugs-follo...

Re: [perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Brandon Allbery
At some point, one has to accept that this language is not Python, not call for one's favorite Python-isms to be incorporated into the core regardless of how it might interact with what is already there. On Thu, Aug 10, 2017 at 8:12 AM, Aleks-Daniel Jakimenko-Aleksejev via RT < perl6-bugs-follo...

[perl #131877] [LTA] better error message for exit("hello")

2017-08-10 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
There's a little problem with it. You see, right now this works: exit "1" So we simply cannot force it to do something else with Strs because that can break existing (perfectly valid) code. We can go through a long deprecation cycle but it's not worth it (IMO). But it may be possible to catch X:

Re: User defined infix operators and whitespace

2017-08-10 Thread Brock Wilcox
I think there are a couple answers. The simple one is yes -- embrace the whitespace. Maybe wrap them in ()', like (2 d 6). Another line of ideas is wrapping things with some other operators. Maybe a special quoting operator or a converter. [[2d6]] # double for dice! "2d6":dice # postfix. This

User defined infix operators and whitespace

2017-08-10 Thread Simon Proctor
So I had a crazy little idea. I've played the odd bit of roleplaying in my time and wanted to created a 'd' operator. Quite simple really. sub infix: ( Int $num, Int $size ) { [+] (1..$size).roll($num) }; sub prefix: ( Int $size ) { 1 d $size } Gives us 3 d 6 to roll 3 six sided dice or a prefi

Re: [perl #131877] better error message for exit("hello")

2017-08-10 Thread Joachim Durchholz via RT
> Would it be possible to special case when someone passes a string to > exit and give a better error message telling how to write that? Maybe the error message should indicate what types are allowed. > Better yet, could exit accept a string? That would be equivalent to `print("hello");exit(0)`.

Re: [perl #131877] better error message for exit("hello")

2017-08-10 Thread Joachim Durchholz
Would it be possible to special case when someone passes a string to exit and give a better error message telling how to write that? Maybe the error message should indicate what types are allowed. Better yet, could exit accept a string? That would be equivalent to `print("hello");exit(0)`. V

[perl #131877] better error message for exit("hello")

2017-08-10 Thread via RT
# New Ticket Created by Gabor Szabo # Please include the string: [perl #131877] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131877 > In Python one can pass a string to the exit() function that will be displayed and the prog