perl6-all@perl.org

2017-03-08 Thread Brent Laabs
You must be doing something wrong then: > sub LinuxCheck () { print &?ROUTINE.name ~ " " ~ "$*DISTRO OS\n"; } sub LinuxCheck () { #`(Sub|140478449412680) ... } > LinuxCheck(); LinuxCheck macosx OS On Tue, Mar 7, 2017 at 11:54 PM, ToddAndMargo wrote: > On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMa

Re: I need the rules for qx with a pipe inside

2017-03-08 Thread ToddAndMargo
On 03/07/2017 11:46 PM, yary wrote: No, my main intent is showng that the code won't copy a string with a quote in it, and can have unintended side effects. I was thinking you were concerned over security, This guy's workaround is https://github.com/kmwallio/p6-OS-Clipboard/blob/master/lib/OS

perl6-all@perl.org

2017-03-08 Thread ToddAndMargo
On Tue, Mar 7, 2017 at 11:54 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo mailto:toddandma...@zoho.com> >> wrote: Hi

Re: program/script question

2017-03-08 Thread Shlomi Fish
On Tue, 7 Mar 2017 13:46:08 -0800 ToddAndMargo wrote: > On 03/07/2017 07:42 AM, Shlomi Fish wrote: > > Hi Todd, > > > > On Sat, 4 Mar 2017 19:23:07 -0800 > > ToddAndMargo wrote: > > > >> Hi All, > >> > >> This is one of those really dumb questions, but can I call > >> what I write in Perl a "p

How do I call system functions?

2017-03-08 Thread ToddAndMargo
Hi All, In Linux, how do I call system functions from Perl 6? int XStoreBytes(Display *display, char *bytes, int nbytes); And what is that? "C"? Is there an inline "C" call? Many thanks, -T man XStoreBuffer NAME XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBu

[perl #130953] [REGRESSION][REGEX] chars that look different in .fc break :i regex matches

2017-03-08 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #130953] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130953 > The mere presence of this ligature, breaks the :i regex match for 'T': IOninja m:

[perl #130954] [BUG] Capture.WHICH does not distinguish rw arguments

2017-03-08 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #130954] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130954 > my $x = 42; my $c1 = \($x); my $c2 = \(42); say $c1 eqv $c2; # True say

Re: [perl #130951] [BUG] EVAL thread safety

2017-03-08 Thread Nicholas Clark
Thanks for the bug report. On Tue, Mar 07, 2017 at 05:12:34PM -0800, J . David Lowe wrote: > > ``` > #!/usr/bin/env perl6 > > use v6.c; > > sub MAIN { >await Promise.anyof((^2).map: { > start { > loop { > EVAL "True"; > } > } >}); > } > ``` > 2

[perl #130954] [BUG] Capture.WHICH does not distinguish rw arguments

2017-03-08 Thread Zoffix Znet via RT
Related: https://rt.perl.org/Ticket/Display.html?id=128977#ticket-history

[perl #130953] [REGRESSION][REGEX] chars that look different in .fc break :i regex matches

2017-03-08 Thread Zoffix Znet via RT
Ooops. Never mind. That hang is due to RT#130940 As for this ticket, I've added fudged tests to cover it now: https://github.com/perl6/roast/commit/2fa32e11eb Please note, this ticket is now marked as a release blocker, with the release scheduled to occur on March 18, 2017.

[perl #130955] [BUG] split with skip-empty not woring on null string

2017-03-08 Thread Zoffix Znet via RT
On Wed, 08 Mar 2017 04:46:55 -0800, blackcatoverw...@gmail.com wrote: > Split a null string with skip-empty not working. > > Code: > > say "".split(';', :skip-empty).perl; > > say "".split(';').perl; > > Result: > > ("",) > > ("",) > > perl6 -v : > > This is Rakudo version 2017.02 built on

Re: I need the rules for qx with a pipe inside

2017-03-08 Thread yary
On Wed, Mar 8, 2017 at 3:13 AM, ToddAndMargo wrote: > This guy's workaround is sub clipboard-slash($text) {... > And there's another part to the workaround: the code adds double-quotes around the string to be pasted when it's creating the shell string. The shell sees the double quotes, whic

Re: How do I call system functions?

2017-03-08 Thread Will Coleda
Perl 6 uses "NativeCall" to call out to native library functions. I would start with https://docs.perl6.org/language/nativecall and come back with specific questions. On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo wrote: > Hi All, > > In Linux, how do I call system functions from Perl 6? > > int

Re: How do I call system functions?

2017-03-08 Thread Brandon Allbery
On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo wrote: > int XStoreBytes(Display *display, char *bytes, int nbytes); Do I want to know why you're using X11R3 compatibility functions? -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com

[perl #130956] [BUG] `xx` with large Int repeat count gives bogus results

2017-03-08 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #130956] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130956 > 15:53 m: dd (($++ ?? 42 !! |()) xx 999)[^4] 15:53 camelia

[perl #125651] [CONC] Proc::Async has some [LTA] behavior when running an unknown command

2017-03-08 Thread jn...@jnthn.net via RT
On Mon, 20 Jul 2015 19:43:44 -0700, r...@hoelz.ro wrote: > See the attached script. > > If you create a Proc::Async to execute an unknown command and try to > write data for the child process' standard input, Rakudo will exit via > a SIGPIPE signal. If you remove the $proc.write from the attached

[perl #128526] [CONC] Proc::Async's .write appears to exit when the process run doesn't exist

2017-03-08 Thread jn...@jnthn.net via RT
On Sun, 03 Jul 2016 07:22:09 -0700, ddgr...@gmail.com wrote: > This works like it should: > > perl6 -e 'my $p; try {$p = Proc::Async.new("asdfcat", exists>); CATCH {die "in new"}}; my $pr; try {$pr = $p.start; CATCH {die > "in start"}}; try {await($pr); CATCH {die "in await"}}' > in await > in

Re: [perl #128526] [CONC] Proc::Async's .write appears to exit when the process run doesn't exist

2017-03-08 Thread Brandon Allbery
On Wed, Mar 8, 2017 at 11:33 AM, jn...@jnthn.net via RT < perl6-bugs-follo...@perl.org> wrote: > Fixed and tested in S17-procasync/nonexistent.t. (The change is to default > to ignoring SIGPIPE, since we error-check all operations anyway. Those who > do want to exit on SIGPIPE can write `signal(SI

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

2017-03-08 Thread jn...@jnthn.net via RT
On Sat, 04 Mar 2017 13:40:22 -0800, c...@zoffix.com wrote: > 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( > >

Re: I need the rules for qx with a pipe inside

2017-03-08 Thread ToddAndMargo
On 03/08/2017 06:41 AM, yary wrote: On Wed, Mar 8, 2017 at 3:13 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: This guy's workaround is sub clipboard-slash($text) {... And there's another part to the workaround: the code adds double-quotes around the string to be pasted when i

Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo
On 03/08/2017 07:49 AM, Brandon Allbery wrote: On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: int XStoreBytes(Display *display, char *bytes, int nbytes); Do I want to know why you're using X11R3 compatibility functions? Well now ... I am trying to pu

Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo
On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo wrote: Hi All, In Linux, how do I call system functions from Perl 6? int XStoreBytes(Display *display, char *bytes, int nbytes); And what is that? "C"? Is there an inline "C" call? Many thanks, -T On 03/08/2017 06:51 AM, Will Coleda wrote: Pe

Re: How do I call system functions?

2017-03-08 Thread Brandon Allbery
On Wed, Mar 8, 2017 at 1:00 PM, ToddAndMargo wrote: > On 03/08/2017 07:49 AM, Brandon Allbery wrote: > >> >> On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo > > wrote: >> >> int XStoreBytes(Display *display, char *bytes, int nbytes); >> >> >> Do I want to know why y

Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo
On 03/08/2017 06:51 AM, Will Coleda wrote: Perl 6 uses "NativeCall" to call out to native library functions. I would start with https://docs.perl6.org/language/nativecall and come back with specific questions. Oh poop I have a lot of reading to do. Found a great example over at: http://ro

Re: How do I call system functions?

2017-03-08 Thread Brandon Allbery
On Wed, Mar 8, 2017 at 1:23 PM, ToddAndMargo wrote: > > class Display is repr('CStruct') {} > > > Class Display has no attributes, which is illegal with > the CStruct representation. > > What in the world? > It's an opaque pointer; CStruct is the wrong representation to use. Try CPoint

Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo
On 03/08/2017 10:04 AM, Brandon Allbery wrote: On Wed, Mar 8, 2017 at 1:00 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: On 03/08/2017 07:49 AM, Brandon Allbery wrote: On Wed, Mar 8, 2017 at 5:51 AM, ToddAndMargo mailto:toddandma...@zoho.com>

Re: How do I call system functions?

2017-03-08 Thread ToddAndMargo
On 03/08/2017 10:26 AM, Brandon Allbery wrote: On Wed, Mar 8, 2017 at 1:23 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: class Display is repr('CStruct') {} Class Display has no attributes, which is illegal with the CStruct representation. What in th

[perl #130891] [LTA] infix: always returns a Block with .arity 0 and .count Inf

2017-03-08 Thread Zoffix Znet via RT
On Tue, 28 Feb 2017 14:41:07 -0800, sml...@gmail.com wrote: > my &a = *+1; > my &b = */2; > > say &a.arity; # 1 > say &b.arity; # 1 > say (&a o &b).arity; # 0 > > say &a.count; # 1 > say &b.count; # 1 > say (&a o &b).count; # Inf >

[perl #130959] [BUG] Str ~~ Range(with Str end points) gives wrong results

2017-03-08 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #130959] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130959 > The smartmatch needs to give True, as the element is present in that range: 20:18 IOnin

issues with

2017-03-08 Thread ToddAndMargo
Hi All, What is wrong with this? $ perl6 -MX11::Xlib::Raw -e 'say "hi";' ===SORRY!=== Could not find X11::Xlib::Raw::X at line 5 in: /home/tony/.perl6 /usr/share/perl6/site /usr/share/perl6/vendor /usr/share/perl6 CompUnit::Repository::AbsolutePath<68732640> CompUnit::Rep

Re: [perl #130956] [BUG] `xx` with large Int repeat count gives bogus results

2017-03-08 Thread Elizabeth Mattijsen
> On 8 Mar 2017, at 16:56, Zoffix Znet (via RT) > wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130956] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=130956 > > > > > > 15:53

Re: [perl #130959] [BUG] Str ~~ Range(with Str end points) gives wrong results

2017-03-08 Thread Elizabeth Mattijsen
> On 8 Mar 2017, at 21:29, Zoffix Znet (via RT) > wrote: > > # New Ticket Created by Zoffix Znet > # Please include the string: [perl #130959] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=130959 > > > > The smartmatc

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

2017-03-08 Thread Elizabeth Mattijsen
> On 8 Mar 2017, at 18:09, jn...@jnthn.net via RT > wrote: > > On Sat, 04 Mar 2017 13:40:22 -0800, c...@zoffix.com wrote: >> 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 first inline code!

2017-03-08 Thread ToddAndMargo
Hi All, With the help of the guys over on the char line, I wrote my first inline code. Yippee!! I did not realize the name of the was was also the name of the line line c call. And I did not realize the call really did want an initialized variable as its parameter. #!/usr/bin/perl6 #`{

Re: issues with

2017-03-08 Thread ToddAndMargo
On 03/08/2017 01:08 PM, ToddAndMargo wrote: Hi All, What is wrong with this? $ perl6 -MX11::Xlib::Raw -e 'say "hi";' ===SORRY!=== Could not find X11::Xlib::Raw::X at line 5 in: /home/tony/.perl6 /usr/share/perl6/site /usr/share/perl6/vendor /usr/share/perl6 CompUnit::Reposit

Re: My first inline code!

2017-03-08 Thread ToddAndMargo
On 03/08/2017 02:58 PM, ToddAndMargo wrote: Hi All, With the help of the guys over on the char line, I wrote my first inline code. Yippee!! I did not realize the name of the was was also the name of the line line c call. And I did not realize the call really did want an initialized variable a

Variables in modules

2017-03-08 Thread ToddAndMargo
Hi All, I want to set a global variable in a module that I want all "is export" sub's to see when called. INIT { ( my $IAm =~ $?FILE ) ~~ s|.*"/"|| }; Does not work. Is there a way to do this, or do I have to create $IAm inside each "is export" sub? Many thanks, -T -- ~

Re: Your thoughts on Padre?

2017-03-08 Thread Dominique Dumont
[ sorry, I'm late on my mails.. ] On Monday, 27 February 2017 18:23:19 CET Luca Ferrari wrote: > please note that at least in Ubuntu Padre is shipped as version 1 > while 1.01 is available. I'm afraidr that won't last. Due to the many bugs (debuggger test don't work with recent perl), and lack o

Re: Your thoughts on Padre?

2017-03-08 Thread ToddAndMargo
Hi All, The guys on the chat line told me to look at https://atom.io/ as it is specifically written for Perl 6 I tested it under "ssh -X". Oh boy it is SSSLLLOOOWWW. But if you are not using it remotely, it looks like a really sweet program for Perl 6. You can even create projects. Ove

How to defined reversed word in a perl6 grammar ?

2017-03-08 Thread jeanpierre . carayol
Hi, I'd like to know how can I define reserved word in a Perl6 grammar. If you have a look at https://gist.github.com/anonymous/2c04533cb3a61a00b8822ea20237ba7e , you will find a small perl grammar for parsing from clause of sql statement. The issue is when I execute this testcase that the