Re: question about the multi in method

2020-06-08 Thread ToddAndMargo
On 2020-06-08 08:05, Peter Pentchev wrote: On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote: Ok Todd, let me have a go at this issue. Thank you, Richard, for your help. I apologize to Todd and to everyone on the list for my outburst in my last e-mail. G'luck, Peter Hi Pe

smtp question

2017-02-09 Thread ToddAndMargo
Hi All, I am starting a program (run from crontab) to test some things and eMail diagnostics to me. I am looking at https://github.com/retupmoca/P6-Net-SMTP I pretty much understand everything, but send($from, $to, $messag

Re: smtp question

2017-02-09 Thread ToddAndMargo
On 02/09/2017 08:51 PM, Brandon Allbery wrote: On Thu, Feb 9, 2017 at 11:41 PM, ToddAndMargo <toddandma...@zoho.com> wrote: I am looking at https://github.com/retupmoca/

per 5 converter?

2017-02-11 Thread ToddAndMargo
Hi All, I know I asked this once before and I had though I'd written it down, but do you have any favorite Perl5 to Per6 converters? Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when you open windows

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 06:34 AM, Moritz Lenz wrote: Hi, What's the use case for converting Perl 5 to Perl 6 automatically? If you want to use Perl 5 code from within your Perl 6 code, you can do that through Inline::Perl5. But automatic translation (if it works at all) typically doesn't produce good or

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 05:00 PM, yary wrote: There's Rosetta Code to compare short programs in different languages. Not as handy as what you are asking for, still it is educational To try it out I started at http://rosettacode.org/wiki/Category:Perl_6 to find all the pages that have P6 examples. I chos

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 05:02 PM, Brandon Allbery wrote: On Sun, Feb 12, 2017 at 7:48 PM, ToddAndMargo <toddandma...@zoho.com> wrote: The case is, if I can't figure out the syn

Re: per 5 converter?

2017-02-13 Thread ToddAndMargo
On 02/12/2017 05:12 PM, Darren Duncan wrote: On 2017-02-12 5:08 PM, ToddAndMargo wrote: I presume my eyes would tell where I made the boo-boo. Lets hope! I am real tired of Perl 5's stone age subs declarations. @_, oh brother. In principle there is nothing wrong with @_ at least fro

Re: per 5 converter?

2017-02-13 Thread ToddAndMargo
On 02/13/2017 12:55 PM, Darren Duncan wrote: I think the important thing is having choice. Declaring parameters in terms of named variables is normal and important, but when one does that it would still be ideal to get a single extra variable that has all the arguments in it as components, f

Re: per 5 converter?

2017-02-13 Thread ToddAndMargo
On 02/13/2017 02:23 PM, ToddAndMargo wrote: naming and commending oopscommenting -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

clipboard and ps questions?

2017-02-17 Thread ToddAndMargo
Hi All, rakudo-star-0.0.2016.11-1.el7.x86_64 (Linux) Two questions about substitutes for system calls: 1) Is there a reliably Perl 6 way to copy things to the clipboard? (Perl 5 has a module, but it is unreliable and I have to make a system call.) 2) Is there a way to get a list of

sub for die?

2017-02-17 Thread ToddAndMargo
Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", without the commentary "in block " from the "die" command? I jus

what is ".perl"?

2017-02-17 Thread ToddAndMargo
Hi All, What is the difference between these two commands and why would you use ".perl"? say "$ServiceName"; say $ServiceName.perl; Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when you open windows

reverse of .lines?

2017-02-17 Thread ToddAndMargo
Hi All, Is there a reverse of .lines? Original code: @SystemCtl = qx ( systemctl -la ).lines; I presume this is the same as the original code: @Lines = $StringFullOfLineFeeds.lines; Would the reverse be sometime like this? $StringFullOfLineFeeds = @Lines.reverselines; Many thanks, -T --

Re: what is ".perl"?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 06:51 PM, Brandon Allbery wrote: On Fri, Feb 17, 2017 at 9:47 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: What is the difference between these two commands and why would you use ".perl"? say "$ServiceName"; say $ServiceN

Re: reverse of .lines?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 07:26 PM, yary wrote: On Fri, Feb 17, 2017 at 9:52 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: @Lines = $StringFullOfLineFeeds.lines @Lines = $StringFullOfLineFeeds.lines.reverse -y Thank you! -- ~~ Computers are li

Re: reverse of .lines?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 07:44 PM, yary wrote: my $StringReversedLines = $StringFullOfLineFeeds.lines.reverse.join("\n") or my $StringReversedLines = $StringFullOfLineFeeds.split("\n",:v).reverse.join **//___^ Cool. I was wondering how to put the line feed back in! -- ~~~ Havi

net::SMTP in rpm land?

2017-02-17 Thread ToddAndMargo
Hi All, Before I go using Panda and lose my revision control, does anyone know what Net::SMTP is called in RPM land? $ yum --enablerepo=* whatprovides */net-smtp Many thanks, -T -- ~~~ Serious error. All shortcuts have disappeared. Screen. Mind. Both are blank. ~~~

intercept STDERR

2017-02-17 Thread ToddAndMargo
Hi All, In Net::SMTP, we have: $debug when set to a true value, will print the SMTP traffic to stderr. Is there an easy way to intercept this so I can analyze if the mail went through properly? Many thanks, -T -- ~~ Computers are like air conditio

cifs control

2017-02-17 Thread ToddAndMargo
Hi All, Sorry for the 1000 questions today, but I have anb entire week to think them up. And I have another one. In Windows, I am noticing that Cobian Backup and Windows Explorer (not Internet Explorer) can tool around CIFS (Windows) shares based on the IP (not the drive letter). Can I do this

Re: reverse of .lines?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 07:44 PM, yary wrote: Oh, then chain join on the end: my $StringReversedLines = $StringFullOfLineFeeds.lines.reverse.join("\n") or my $StringReversedLines = $StringFullOfLineFeeds.split("\n",:v).reverse.join **//___^ Hmmm. I wanted to recreate the array, not reverse the line.

Re: sub for die?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 06:43 PM, ToddAndMargo wrote: Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", wi

Re: sub for die?

2017-02-18 Thread ToddAndMargo
On 02/18/2017 03:30 AM, Timo Paulssen wrote: It is usually considered The Right Thing to output error messages to stderr instead of stdout; you can use "note" to output to stderr (and it'll also put a newline at the end for you, which print doesn't do). True. Thank you -- ~~~

Re: net::SMTP in rpm land?

2017-02-18 Thread ToddAndMargo
On 02/18/2017 03:51 AM, Timo Paulssen wrote: Almost no linux distros package perl6 modules for their native package manager yet. The only distro i know of that has any kind of perl6 module packaging at all is archlinux: https://aur.archlinux.org/packages/?O=0&K=perl6 You need to use panda

Re: cifs control

2017-02-18 Thread ToddAndMargo
On 02/18/2017 06:16 AM, yary wrote: If your code will be running on Windows, then you should be able to use Perl6's native filesystem calls with UNC paths, and those can take IP addresses instead of host names eg. \\192.168.1.154\C$\Users\MiniMe\Documents Cool. Thank you! -- ~~~

need {} help

2017-02-18 Thread ToddAndMargo
Hi All, I need to figure out how to use {} is substitutes. I got the // down, now I need to learn {}. I am trying to get away from the \/\/\\/\/\/\\/ nightmare. #!/usr/bin/perl6 print "FILE = <$?FILE>\n"; (my $IAm =~ $?FILE ) ~~ s/.*\///; print "IAm = <$IAm>\n"; (my $IAm2 =~ $?FILE ) ~

Re: need {} help

2017-02-18 Thread ToddAndMargo
On 02/18/2017 04:47 PM, Timo Paulssen wrote: / doesn't have a meaning in regex, but it's not an alpha character, so if you want to "match literally" it "must be quoted" as the first error message tells you. On top of that, balanced characters like () and {} aren't allowed for the s/// form (only

print to STDERR problem

2017-02-18 Thread ToddAndMargo
Hi All, I am having issues writing to STDERR. I am using this as a reference: https://perl6.org/archive/rfc/30.html The p52p6 translator needs to be able to spot instances of barewords and globs and translate them to scalars: print STDERR @foo; -> pri

Re: sub for die?

2017-02-18 Thread ToddAndMargo
On 02/17/2017 06:43 PM, ToddAndMargo wrote: Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", wi

Re: print to STDERR problem

2017-02-18 Thread ToddAndMargo
On 02/18/2017 07:35 PM, Brandon Allbery wrote: On Sat, Feb 18, 2017 at 10:33 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: am having issues writing to STDERR. I am using this as a reference: https://perl6.org/archive/rfc/30.html <https://perl6.org/archi

Re: print to STDERR problem

2017-02-19 Thread ToddAndMargo
On 02/19/2017 07:15 AM, Timo Paulssen wrote: Oh, another question: please tell us how you reached that site? I expect you did a google search or something; can you tell us what search terms you've used to get there? We should obviously improve the docs so that they get found instead of the archi

Re: clipboard and ps questions?

2017-02-23 Thread ToddAndMargo
On 02/17/2017 06:38 PM, ToddAndMargo wrote: Hi All, rakudo-star-0.0.2016.11-1.el7.x86_64 (Linux) Two questions about substitutes for system calls: 1) Is there a reliably Perl 6 way to copy things to the clipboard? (Perl 5 has a module, but it is unreliable and I have to make a

Re: clipboard and ps questions?

2017-02-23 Thread ToddAndMargo
On 02/23/2017 06:08 PM, yary wrote: On Thu, Feb 23, 2017 at 7:09 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: But ... it calls xclip (Linux), pbcopy (OS X), or clip (Windows), so you might as well call these programs directly with qx or qqx rather than having to use

I am having trouble installing panda

2017-02-23 Thread ToddAndMargo
Hi All, I am having trouble installing "panda" on Fedora Code 25. $ perl6 -v This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c. What is going on? Many thanks, -T $ git clone --recursive http://github.com/tadzik/panda.git $ cd panda # perl6 bootstrap.pl ==

Where is "Subject"?

2017-02-23 Thread ToddAndMargo
Hi All, Am I blind or is there nowhere to set the subject of an eMail in Net::SMTP? https://github.com/retupmoca/P6-Net-SMTP Many thanks, -T -- ~~~ Serious error. All shortcuts have disappeared. Screen. Mind. Both are blank. ~~~

Re: Where is "Subject"?

2017-02-24 Thread ToddAndMargo
On 02/23/2017 11:50 PM, Luca Ferrari wrote: On Fri, Feb 24, 2017 at 7:51 AM, ToddAndMargo wrote: Hi All, Am I blind or is there nowhere to set the subject of an eMail in Net::SMTP? I suspect it is implementing a quite low-level interface: smtp does not know anything about a subject, it

Re: I am having trouble installing panda

2017-02-24 Thread ToddAndMargo
On 02/23/2017 10:41 PM, ToddAndMargo wrote: Hi All, I am having trouble installing "panda" on Fedora Code 25. $ perl6 -v This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c. What is going on? Many thanks, -T $ git clone --recursive http://github.

Geany and group comments

2017-02-24 Thread ToddAndMargo
Hi All, I do adore the Geany editor for coding, but ... it coughs on group comments =begin Introduction blah blah blah =end Introduction after the first "=" everything is blue and I lose my fancy colors that tell me when I forget a quote, etc.. Anyone know a way to keep my group comments and r

Re: I am having trouble installing panda

2017-02-24 Thread ToddAndMargo
On 02/24/2017 11:51 AM, Timo Paulssen wrote: Hey Todd, Net::SMTP (doesn't support SSL, but others do) $ zef --force install > Net::SMTP Are you sure that's the case? i definitely see SSL-related verbiage in Net::SMTP's Readme. The simple interface offers an "ssl" and a "starttls" flag in its

Re: Where is "Subject"?

2017-02-24 Thread ToddAndMargo
On 02/24/2017 04:05 AM, Luca Ferrari wrote: "$Subject$StringFullOfLineFeeds); Guilty as charged. I missed the quote at the end of the line. -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo
http://padre.perlide.org/ Any good for Perl 6? You have a better one you like?

Re: Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo
On 02/24/2017 04:58 PM, yary wrote: I installed and used Padre a little bit last year. It showed promise and seems to have had quite a bit of activity in its day. As of now it works for basic editing in perl6 but it seemed a little rough, and as Brandon noted it isn't maintained, fixes would be D

Re: Your thoughts on Padre?

2017-02-24 Thread ToddAndMargo
On 02/24/2017 05:47 PM, ToddAndMargo wrote: On 02/24/2017 04:58 PM, yary wrote: I installed and used Padre a little bit last year. It showed promise and seems to have had quite a bit of activity in its day. As of now it works for basic editing in perl6 but it seemed a little rough, and as

Re: Geany and group comments

2017-02-24 Thread ToddAndMargo
On 02/24/2017 01:56 PM, ToddAndMargo wrote: Hi All, I do adore the Geany editor for coding, but ... it coughs on group comments =begin Introduction blah blah blah =end Introduction after the first "=" everything is blue and I lose my fancy colors that tell me when I forget a

Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
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 /home/linuxutil/CimTrakCheckAndResatart.pl6 Und

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 05:12 AM, yary wrote: On Sun, Feb 26, 2017 at 7:13 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Undeclared routine: qw used at line 44 Use any other bracketing than parens, eg qw[a b c d] or qw/a b c d/ Parens are used for calling subs/methods

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 07:28 AM, yary wrote: On Sun, Feb 26, 2017 at 8:21 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Now what am I doing wrong? Read the POD! I was over here at https://github.com/tadzik/Terminal-ANSIColor/ "This is a Term::ANSIColor module for

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 05:14 PM, ToddAndMargo wrote: And he doesn't link the POD. Where is the POD by the way? Found it: https://github.com/tadzik/Terminal-ANSIColor/commit/c95c318efe6ee1596d012146f4fed7e15f1f316e -- ~~ Computers are like air conditioners.

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 05:59 PM, ToddAndMargo wrote: On 02/26/2017 05:14 PM, ToddAndMargo wrote: And he doesn't link the POD. Where is the POD by the way? Found it: https://github.com/tadzik/Terminal-ANSIColor/commit/c95c318efe6ee1596d012146f4fed7e15f1f316e This is better: https://githu

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 06:02 PM, Brandon Allbery wrote: On Sun, Feb 26, 2017 at 8:14 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Speaking of syntax errors, what is wrong with these two lines (not used a the same time)? use Terminal::ANSIColor qw[ color ]; use Te

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 05:56 PM, yary wrote: Hmm... use Terminal::ANSIColor;**//___^ by itself will import color and everything else. For selectively importing only what you want- which is good style IMHO- I looked up this https://docs.perl6.org/language/modules#___top which says "Note there currently

Re: Terminal::ANSIColor problem

2017-02-26 Thread ToddAndMargo
On 02/26/2017 06:44 PM, Brandon Allbery wrote: It should be the first, but it appears to be unimplemented at present. Only tagged imports work (https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing). "Note there currently is no way for the user to import a single object if th

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

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: 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:

Re: Terminal::ANSIColor problem

2017-02-28 Thread ToddAndMargo
On 02/28/2017 04:11 AM, yary wrote: On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: sub PrintRed ( $Str ) { print color('bold'), color('red'), "$Str", color('reset'); } sub PrintGreen ( $Str ) {

Re: Terminal::ANSIColor problem

2017-02-28 Thread ToddAndMargo
On 02/28/2017 12:53 PM, Brandon Allbery wrote: On Tue, Feb 28, 2017 at 3:46 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: On 02/28/2017 04:11 AM, yary wrote: On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo mailto:toddandma...@zoho.com> <mail

Net::SMTP attachments?

2017-02-28 Thread ToddAndMargo
Hi All, Anyone know how to do an attachment with Net::SMTP. I need to attach a tar ball. I see this is Thunderbird's message source, but .. --0__=0ABB0A53DFD693F18f9e8a93df938690918c0ABB0A53DFD693F1 Content-type: image/gif; name="pic15602.gif" Content-Disposition: attachment; filename

Hidden partitions question

2017-02-28 Thread ToddAndMargo
Hi All, In Windows 7 Pro, I know that several backup programs are able to manipulate files on hidden NTFS partitions. Is there a Perl6 way to do this? (I am trying to avoid mounting with a drive letter to end around ransomware.) Many thanks, -T -- ~ I am Windows I

for loop index question

2017-02-28 Thread ToddAndMargo
Hi All, There are times when I want to know th4e index of an array when I am in a "for @array" loop. I can do it with a variable outside the for loop and increment it, but I would line to know know if there is a way to incorporate it in the loop command. This is my long winded way of doing it i

Re: Net::SMTP attachments?

2017-03-01 Thread ToddAndMargo
On Tue, Feb 28, 2017 at 10:04 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Hi All, Anyone know how to do an attachment with Net::SMTP. I need to attach a tar ball. I see this is Thunderbird's message source, but ..

Re: Net::SMTP attachments?

2017-03-01 Thread ToddAndMargo
On 03/01/2017 12:03 PM, yary wrote: On Wed, Mar 1, 2017 at 3:01 PM, yary mailto:not@gmail.com>> wrote: On Wed, Mar 1, 2017 at 2:54 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: MIME::Lite Sorry not MIME::Lite but "a number of alternatives, like Em

Re: Net::SMTP attachments?

2017-03-01 Thread ToddAndMargo
On 03/01/2017 01:27 PM, Brandon Allbery wrote: On Tue, Feb 28, 2017 at 4:04 PM, ToddAndMargo mailto:toddandma...@zoho.com>> wrote: Anyone know how to do an attachment with Net::SMTP. Didn't you ask that a couple months ago, and I told you to look for a MIME module? Yes, bu

Need Inline::Perl5 help

2017-03-03 Thread ToddAndMargo
Hi All, I am trying to write myself an example of how to use Inline::Perl5 (yes, I know there is a way to write in color in Perl 6). I also have a low level test(.use), which I am not showing, as it works. I am doing this in an Xfce 4.12 (Linux) "Terminal". #!/usr/bin/perl6 use Inline::Perl

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 -- ~

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

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 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. Outsid

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 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 ev

Re: clipboard and ps questions?

2017-03-05 Thread ToddAndMargo
On 02/17/2017 06:38 PM, ToddAndMargo wrote: 1) Is there a reliably Perl 6 way to copy things to the clipboard? (Perl 5 has a module, but it is unreliable and I have to make a system call.) In Linux, OS::Clipboard is using xclip and is writing to the "mouse over" and &qu

Re: Need Inline::Perl5 help

2017-03-05 Thread ToddAndMargo
On 03/05/2017 09:05 PM, Brock Wilcox wrote: Looks like Term::ANSIColor does weird things with exported constants -- they are some sort of constant-function rather than simple strings. Here is an alternate usage that does what you want: #!/usr/bin/perl6 use Inline::Perl5; use Term::ANSIColor:from

Re: Need Inline::Perl5 help

2017-03-05 Thread ToddAndMargo
Followup, This is my notes on Inline::Perl5. I hope this is useful to others. -T #!/usr/bin/perl6 # Inline::Perl5 test # Reference: https://github.com/niner/Inline-Perl5/commit/cc683dae98df19db8cfbb551f7a87ef79bdc2a8b use Inline::Perl5; use Term::ANSIColor:from; # my $Red = Term::

I need the rules for qx with a pipe inside

2017-03-06 Thread ToddAndMargo
qx{ echo $Str | xclip -selection primary }; passes syntax, but hangs when run

$*DISTRO

2017-03-06 Thread ToddAndMargo
Hi All, Is there a $*DISTRO or some such that will tell me just "linux" and not "rhel ..." or "fedora ..."? Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 01:32 AM, Timo Paulssen wrote: This is because of how xclip works. It keeps running until you kill it, or until the number of pastes has been reached that you specify with -loops. You will want to use Proc::Async or run with an :in parameter instead of shelling into a redirect with

Re: $*DISTRO

2017-03-06 Thread ToddAndMargo
On 03/06/2017 01:40 AM, Steve Mynott wrote: Try $*KERNEL S Hi Steve, That works! Thank you! -T $ perl6 -e ' say $*KERNEL;' linux (3.10.0.514.6.1.el.7.x.86._.64) C:\perl6 -e "say $*KERNEL;" win32 By the way win64 also give win32 including with the 64 bit raku Don't know if I will ever

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 01:32 AM, Timo Paulssen wrote: This is because of how xclip works. It keeps running until you kill it, or until the number of pastes has been reached that you specify with -loops. You will want to use Proc::Async or run with an :in parameter instead of shelling into a redirect with

Re: $*DISTRO

2017-03-06 Thread ToddAndMargo
On 03/06/2017 01:35 AM, Timo Paulssen wrote: Doesn't seem to be, but there's $*DISTRO.is-win, which is usually enough (i.e. you have to do one dumb thing on windows and another sane thing on literally anything else) Thank you! -- ~ I am Windows I am the Blue Scree

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

2017-03-06 Thread ToddAndMargo
Hi All, Is there a list of all the \n pairs out there somewhere? Many thanks, -T

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 01:55 AM, Timo Paulssen wrote: Is there a way to send and "end of file" marker to terminate the pipe? That is exactly what the call to .close does. Looking over at https://github.com/kmwallio/p6-OS-Clipboard/blob/master/lib/OS/Clipboard.pm6 lines 47 to 52 sub clipboard-cop

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 12:20 AM, ToddAndMargo wrote: qx{ echo $Str | xclip -selection primary }; passes syntax, but hangs when run I figured it out. I will get back later today with and explanation and examples -- ~~ Computers are like air conditioners. They

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 12:20 AM, ToddAndMargo wrote: qx{ echo $Str | xclip -selection primary }; passes syntax, but hangs when run Hi All, I figured it out. The reason the above "hangs" is because it is "ambiguous". What is Perl and what is bash are not tightly delineated. Is

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

2017-03-06 Thread ToddAndMargo
On 03/06/2017 02:21 AM, ToddAndMargo wrote: Why is he putting the commands into an array He's being "fancy". -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

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

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

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/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: 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: 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: 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 W

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

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. St

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 "",

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 <https://docs.perl6.org/language/variab

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> <mailto:toddandma...@zoho.com <mailto:toddandma...@zo

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

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 t

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 a

  1   2   3   4   5   6   7   8   9   10   >