perl6-all@perl.org

2017-03-07 Thread ToddAndMargo
On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Hi All, I am trying to print out the name of the sub I am in. Reference: https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE

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

2017-03-07 Thread yary
cc'ing the list again, since my reply has Timo's code formatted in a more readable & useful way- On Wed, Mar 8, 2017 at 1:58 AM, ToddAndMargo wrote: > Are you saying that someone could go into a module, alter the code, > then catch a root level program calling the module and use it > to wreck ha

perl6-all@perl.org

2017-03-07 Thread Brent Laabs
Try &?ROUTINE.name -- that should get you the sub's name. On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo wrote: > Hi All, > > I am trying to print out the name of the sub I am in. > > Reference: > https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE > &?ROUTINE Which rout

perl6-all@perl.org

2017-03-07 Thread ToddAndMargo
Hi All, I am trying to print out the name of the sub I am in. Reference: https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE &?ROUTINE Which routine am I in? sub LinuxCheck () { print &?ROUTINE ~ " " ~ "$*DISTRO $OS\n"; } rhel linux &?ROUTINE resolves to "",

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

2017-03-07 Thread ToddAndMargo
On 03/07/2017 05:05 PM, yary wrote: On Tue, Mar 7, 2017 at 11:51 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: I have it running perfectly with the sub I showed. Thank you for the help! I enjoy helping out and you've stuck through our suggestions in the past. Stick through t

[perl #130951] [BUG] EVAL thread safety

2017-03-07 Thread via RT
# New Ticket Created by J . David Lowe # Please include the string: [perl #130951] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130951 > On my system, this short program crashes within a few seconds of starting: ``` #!/usr/

Re: Your thoughts on Padre?

2017-03-07 Thread Dominique Dumont
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. That won't last. Ubuntu ships Debian packages. Due to the many bugs (debuggger never worked), and lack of stability (random crashes), I've

Re: program/script question

2017-03-07 Thread ToddAndMargo
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 "program" or a "script"? Or, does it even matter? Many thanks, -T Please see: * https://gi

Re: two questions: use 6, p5: package

2017-03-07 Thread ToddAndMargo
On 03/07/2017 11:53 AM, Brandon Allbery wrote: On Tue, Mar 7, 2017 at 3:12 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: 1) Looking at other code, I see this at the top a lot: use v6; Mine have as the first line #!/usr/bin/perl6 What is "u

Re: two questions: use 6, p5: package

2017-03-07 Thread Brandon Allbery
On Tue, Mar 7, 2017 at 3:12 AM, ToddAndMargo wrote: > 1) Looking at other code, I see this at the top a lot: > use v6; > > Mine have as the first line > #!/usr/bin/perl6 > > What is "use v6;" used for? > It ensures that perl 5 will choke if it gets asked to load the file

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

2017-03-07 Thread ToddAndMargo
On 03/07/2017 09:29 AM, Timo Paulssen wrote: For example: > > sub WriteSecondaryClipboard ( $Str ) { # my $Cmd = "echo \"$Str\" | xclip -selection clipboard"; shell $Cmd; } > > > problem solved. Please don't forget that if $Str can be modified by a user or outside process somehow, you've

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

2017-03-07 Thread Timo Paulssen
> For example: > > sub WriteSecondaryClipboard ( $Str ) { # >my $Cmd = "echo \"$Str\" | xclip -selection clipboard"; > shell $Cmd; > } > > > problem solved. Please don't forget that if $Str can be modified by a user or outside process somehow, you've opened the door to remote code execution

Re: Design question re: function parameters

2017-03-07 Thread Timo Paulssen
On 07/03/17 17:59, Sean McAfee wrote: > […] If I want to freely accept both numbers and strings in the manner > of > Perl 5, it looks like I must type all of my function arguments as > Cool, or omit the types altogether. […] Don't forget you can use a coercive type in parameter lists: sub po

Design question re: function parameters

2017-03-07 Thread Sean McAfee
Recently this Perl 6 version of the factorial function was mentioned: sub postfix:(Int $n) { [*] 2 .. $n } I experimented a bit with it and found that I couldn't do '3'! as I naively expected from my Perl 5 intuition. Similarly, I can't pass an integer literal to a function that takes a S

Re: program/script question

2017-03-07 Thread Timo Paulssen
On 07/03/17 10:54, Brandon Allbery wrote:> Perl compiles to an internal AST, as does Python --- but there are > "compilers" for both, at various levels [...] more precisely, python code compiles down to bytecode rather than sticking around at an AST level.

Re: program/script question

2017-03-07 Thread Shlomi Fish
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 "program" or a "script"? Or, does > it even matter? > > Many thanks, > -T > Please see: * https://github.com/shlomif/Freenode-pro

[perl #130947] [LTA] Multi-dimensional Hash subscripts return a List even when indexing a single element

2017-03-07 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #130947] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130947 > When using a multi-dimensional Hash subscript of the form `.{ ; }` the result is always returne

Re: Install Drive on Windows

2017-03-07 Thread Will Coleda
Rakudo isn't relocatable (yet)- you cannot move it to a different install directory and have it still work, so when doing a build for the installer, C: is the only reasonable default. Please watch https://github.com/rakudo/star/issues/10 (which specifically mentions parrot, which rakudo no longer

Re: program/script question

2017-03-07 Thread Brandon Allbery
On Tue, Mar 7, 2017 at 4:44 AM, Luca Ferrari wrote: > Usually a script is something that is not compiled, rather interpreted > on the fly (where "interpreted" could include any sort of JIT or alike > compilation). > This is one of those things where the ground has shifted enough to make the dist

Re: program/script question

2017-03-07 Thread Luca Ferrari
On Sun, Mar 5, 2017 at 4:23 AM, ToddAndMargo wrote: > 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? > My point of view is it does not matter. Usually a script is something that is not compiled,

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread Brent Laabs
Also keep in mind that \v matches one character of vertical space in regexes. Though \n can match one or two charcters, but not all of the Unicode vertical space types. On Tue, Mar 7, 2017 at 12:37 AM, H.Merijn Brand wrote: > On Tue, 7 Mar 2017 00:23:38 -0800, ToddAndMargo > wrote: > > > >>> 0

Install Drive on Windows

2017-03-07 Thread Andreas Mueller
Hi, why do I have to install rakudo on drive C:\ ? Greetings Andreas -- Andreas Müller

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread H.Merijn Brand
On Tue, 7 Mar 2017 00:23:38 -0800, ToddAndMargo wrote: > >>> 002b93NEWLINE RIGHT > >>> 003037IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL > >>> 004dd7HEXAGRAM FOR RETURN > >> > >> Do these have "\x" escape characters like "\n"? > > > > perl5 -wE'say "\x{2028}"' > >

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread Elizabeth Mattijsen
> On 7 Mar 2017, at 09:21, H.Merijn Brand wrote: > > On Tue, 7 Mar 2017 00:13:49 -0800, ToddAndMargo > wrote: > >> On 03/06/2017 09:35 AM, H.Merijn Brand wrote: >> >>> 0aLINE FEED >>> 0cFORM FEED >>> 0dCARRIAGE RETURN >>> 1eRECORD SEPARATOR >>>

Re: program/script question

2017-03-07 Thread ToddAndMargo
On 03/06/2017 09:46 AM, Parrot Raiser wrote: This is an "angels dancing on the head of a pin" sort of question. "Program" is about purpose, "script" is about form. Any set of instructions (even a single one), given to a computer , can be considered a program. (If you don't believe me, see what B

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread ToddAndMargo
On 03/07/2017 12:21 AM, H.Merijn Brand wrote: On Tue, 7 Mar 2017 00:13:49 -0800, ToddAndMargo wrote: On 03/06/2017 09:35 AM, H.Merijn Brand wrote: 0aLINE FEED 0cFORM FEED 0dCARRIAGE RETURN 1eRECORD SEPARATOR 1fUNIT SEPARATOR 8d

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread H.Merijn Brand
On Tue, 7 Mar 2017 00:13:49 -0800, ToddAndMargo wrote: > On 03/06/2017 09:35 AM, H.Merijn Brand wrote: > > > 0aLINE FEED > > 0cFORM FEED > > 0dCARRIAGE RETURN > > 1eRECORD SEPARATOR > > 1fUNIT SEPARATOR > > 8dREVERSE LINE FE

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread ToddAndMargo
On 03/06/2017 09:35 AM, H.Merijn Brand wrote: 0aLINE FEED 0cFORM FEED 0dCARRIAGE RETURN 1eRECORD SEPARATOR 1fUNIT SEPARATOR 8dREVERSE LINE FEED 002028LINE SEPARATOR 0023ce ⏎ RETURN SYMBOL 00240a ␊ SYMBOL F

Re: Is there a list out there of all the \n characters?

2017-03-07 Thread ToddAndMargo
On 03/06/2017 08:28 AM, Will Coleda wrote: Can you clarify the request here, I'm not sure what you mean. On Mon, Mar 6, 2017 at 5:14 AM, ToddAndMargo wrote: Hi All, Is there a list of all the \n pairs out there somewhere? Many thanks, -T Hi Will, I am trying to figure out if there are

two questions: use 6, p5: package

2017-03-07 Thread ToddAndMargo
Hi All, Two questions: 1) Looking at other code, I see this at the top a lot: use v6; Mine have as the first line #!/usr/bin/perl6 What is "use v6;" used for? 2) I have been looking at other's modules in Perl6. In Perl 5, the first line is package Packa