Inline::Perl5 "run" question

2017-03-04 Thread ToddAndMargo
Hi All, In the following code, how do I get access to the Perl 6 variables inside the Perl 5 code? #!/usr/bin/perl6 use Inline::Perl5; my $p6str = "string from Perl 6"; my $perl5 = Inline::Perl5.new(); $perl5.run(' print $p6str . "\n\n"; '); Many thanks, -T -- ~

[perl #130911] [REGEX] bogus range o ** { 1..0 } succeeds

2017-03-04 Thread via RT
# New Ticket Created by Lloyd Fournier # Please include the string: [perl #130911] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130911 > my $i = 0; say "ooo" ~~ / "o" ** {1..$i} / #-> 「ooo」 It is impossible to match "one or

Re: Inline::Perl5 "run" question

2017-03-04 Thread ToddAndMargo
On 03/04/2017 12:52 AM, ToddAndMargo wrote: Hi All, In the following code, how do I get access to the Perl 6 variables inside the Perl 5 code? #!/usr/bin/perl6 use Inline::Perl5; my $p6str = "string from Perl 6"; my $perl5 = Inline::Perl5.new(); $perl5.run(' print $p6str . "\n\n"; '); Many

[perl #130912] [BUG] Str.perl/repl fail on outside-Unicode codepoints

2017-03-04 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130912] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130912 > > "\x[11]".ords (1114112) > "\x[11]".gist.ords (1114112) > "\x[11]".perl.ords (34 1

[perl #130913] [LTA] poor error message for chr(large)

2017-03-04 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130913] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130913 > > chr(0x8000).ords chr codepoint cannot be negative in block at line 1 It's right that

[perl #130914] [BUG] chr() aliases codepoint numbers mod 2**32

2017-03-04 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #130914] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130914 > > chr(0x10001).ords (1) > "\x[10001]".ords (1) > chr(-0x).ords (1) chr() is re

[perl #130863] [LTA][BUG] Cannot extract partially dimensioned view of array from fixed-size array

2017-03-04 Thread Zoffix Znet via RT
On Sat, 25 Feb 2017 22:06:29 -0800, cookbook_...@yahoo.co.jp wrote: > See the following example: > > $ perl6 -e 'my @a; @a = [[1, 2], [3, 4]]; @a[0;*].say;' > (1 2) > > $ perl6 -e 'my @a[2;2]; @a = [[1, 2], [3, 4]]; @a[0;*].say;' > Partially dimensioned views of arrays not yet implemented. Sorry

[perl #130863] [LTA][BUG] Cannot extract partially dimensioned view of array from fixed-size array

2017-03-04 Thread Zoffix Znet via RT
On Sat, 25 Feb 2017 22:06:29 -0800, cookbook_...@yahoo.co.jp wrote: > See the following example: > > $ perl6 -e 'my @a; @a = [[1, 2], [3, 4]]; @a[0;*].say;' > (1 2) > > $ perl6 -e 'my @a[2;2]; @a = [[1, 2], [3, 4]]; @a[0;*].say;' > Partially dimensioned views of arrays not yet implemented. Sorry

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

2017-03-04 Thread Zoffix Znet via RT
On Tue, 28 Feb 2017 05:54:51 -0800, timo wrote: > I'd say this is NOTABUG via the DIHWIDT category. If your where clause > has side-effects, you're bound to get in trouble. > > If you're fine with relying on internals, you can just put True into the > one-out-of-ten three times at the end and the

[perl #130919] Supplier.done is only handled by first tap

2017-03-04 Thread brian d foy
# New Ticket Created by "brian d foy" # Please include the string: [perl #130919] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130919 > The .done method of a Supplier should call all the done handlers in all the taps that ha

Re: [perl #130913] [LTA] poor error message for chr(large)

2017-03-04 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/20fa14be7a , tests needed. > On 4 Mar 2017, at 11:21, Zefram (via RT) wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130913] > # in the subject line of all future correspondence about this issue. > # https://

Re: [perl #130914] [BUG] chr() aliases codepoint numbers mod 2**32

2017-03-04 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/20fa14be7a , tests needed. > On 4 Mar 2017, at 11:24, Zefram (via RT) wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #130914] > # in the subject line of all future correspondence about this issue. > # https://

[perl #130920] Tap's closing callback doesn't call back

2017-03-04 Thread brian d foy
# New Ticket Created by "brian d foy" # Please include the string: [perl #130920] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130920 > This is the example from the Tap docs. I expect the output to be "Tap closed", but I get

[perl #130920] Tap's closing callback doesn't call back

2017-03-04 Thread Zoffix Znet via RT
On Sat, 04 Mar 2017 13:24:08 -0800, comdog wrote: > This is the example from the Tap docs. I expect the output to be > "Tap closed", but I get no output using 2017.01: > > my $s = Supplier.new; > my $tap = $s.Supply.tap( > -> $v { say "the value is $v" }, > done=> { say

embedded sub question

2017-03-04 Thread ToddAndMargo
Hi All, I am coming frrom Modula2 here. I M2 (using Perl syntax), sub A () { sub B () { }} B can only be seen inside A. Outside of A, B is invisible. What are the rules for embedded subs in Perl 6? Many thanks, -T -- ~~ Computers are like ai

Re: embedded sub question

2017-03-04 Thread Brandon Allbery
On Sat, Mar 4, 2017 at 9:22 PM, ToddAndMargo wrote: > I am coming frrom Modula2 here. > > I M2 (using Perl syntax), > >sub A () { > sub B () { >}} > > B can only be seen inside A. Outside of A, B is > invisible. > > What are the rules for embedded subs in Perl 6? > subs default to

Re: embedded sub question

2017-03-04 Thread ToddAndMargo
On 03/04/2017 06:27 PM, Brandon Allbery wrote: On Sat, Mar 4, 2017 at 9:22 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: I am coming frrom Modula2 here. I M2 (using Perl syntax), sub A () { sub B () { }} B can only be seen inside A. Outside of A,

program/script question

2017-03-04 Thread ToddAndMargo
Hi All, This is one of those really dumb questions, but can I call what I write in Perl a "program" or a "script"? Or, does it even matter? Many thanks, -T -- Yesterday it worked. Today it is not working. Windows is like that.

Re: program/script question

2017-03-04 Thread Brandon Allbery
On Sat, Mar 4, 2017 at 10:23 PM, ToddAndMargo wrote: > This is one of those really dumb questions, but can I call > what I write in Perl a "program" or a "script"? Or, does > it even matter? > These days it doesn't really matter. The line was already significantly blurred in the 90s, and by now

Re: program/script question

2017-03-04 Thread ToddAndMargo
On 03/04/2017 07:31 PM, Brandon Allbery wrote: On Sat, Mar 4, 2017 at 10:23 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: This is one of those really dumb questions, but can I call what I write in Perl a "program" or a "script"? Or, does it even matter? These days it doe