Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 7:58 AM, Todd Chester via perl6-users wrote: Never did figure out why everything went into @x[0] The entire pipe gets put into @x[0]. @x[1] is uninitialized

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 3:02 AM, Peter Pentchev wrote: On Fri, Mar 15, 2019 at 11:52:15AM +0200, Peter Pentchev wrote: [snip] 3. The standard input stream in Perl 6 is called $*IN (think of it as mostly equivalent to what <<>> and <> would read from in Perl 5, ...sorry about this part, I know it's

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:52 AM, Peter Pentchev wrote: Hope that helped! G'luck, Peter [1] The "almost certainly" is because, yes, yes, I know, I also have that dusty old HP/UX crunching away in a customer's basement; still. Yes it does. Thank you! I remember zsh for my Solaris days. Or at

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:52 AM, Peter Pentchev wrote: 1. Learn to use pgrep instead of the myriad variations of ps | grep; pgrep has been standardized by POSIX for a long time and is almost certainly available in all the installations that you will ever need to touch[1]. pgrep is

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:35 AM, Simon Proctor wrote: All looking good so far. what is it you're wanting from this data? Hi Simon, Thank you! What this is for is a backup routine. I am checking for the highest instance of any jammed running instances of [xfa]dump. If I find any, I "kill -9" it and

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is putting ever

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On Fri, 15 Mar 2019, 05:34 Todd Chester via perl6-users, mailto:perl6-users@perl.org>> wrote: On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: > Hi All, > > What am I doing wrong here? > > ps ax | grep [f]irefox | perl6 -ne 'm

Re: I need help with "lines"

2019-03-14 Thread Todd Chester via perl6-users
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is putting ever

print to a printer

2019-03-14 Thread Todd Chester via perl6-users
Hi All Fedora 29 Is there a way to print to a printer, other than a system call to lpr? Many thanks, -T

I need help with "lines"

2019-03-14 Thread Todd Chester via perl6-users
Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is putting everything into @x[0] 2) "reverse" is ignoring me as there is no @x[1]. etc. The result I

Re: .payload

2019-02-28 Thread Todd Chester via perl6-users
On 2/28/19 2:06 PM, Timo Paulssen wrote: I just changed the docs to replace payload with message here. It's not a language bug, however. Here's the change on github: https://github.com/perl6/doc/commit/fb5d341036afe387f0ead0b76e09aef75205dcaf You are a force of nature Timo! :-)

Re: shift left syntax?

2019-02-07 Thread Todd Chester via perl6-users
On 2/7/19 10:36 PM, yary wrote: perl6 -e 'my $i = 0x5DAE; $i +<= 1; say $i.base(0x10);' BB5C -y Hi Yary, $ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int32 $i=0x5DAE; say $x; say $i.base(0x10); $i +< 0x01; say $i.base(0x10);' WARNINGS for -e: Useless use of "+<" in expression "$i

Re: print hex?

2019-02-07 Thread Todd Chester via perl6-users
On 2/7/19 11:22 AM, Curt Tilmes wrote: On Thu, Feb 7, 2019 at 2:14 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: What is the easiest way to get both print and say to print $i below in Hex? $ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int16 $i=0x5DAE; say $x;

buf to integer?

2019-02-07 Thread Todd Chester via perl6-users
Hi All, I am dealing with a Buf what includes 32 bit integers, but they are entered somewhat backwards as view with hexedit: AE 5D 5C 72 represents the number 725C5DAE This is what I have come up with to convert this type of number in a buffer to and integer $ p6 'my Buf

shift left syntax?

2019-02-07 Thread Todd Chester via perl6-users
Hi All, Is this the only way to shift left? $i = $i +< 0x01 $ p6 'my int32 $i=0x5DAE; say $i.base(0x10); $i = $i +< 0x01; say $i.base(0x10);' 5DAE BB5C Does we have any of those fancy += ~= ways of doing it? Many thanks, -T

Re: zef installs not working

2018-10-17 Thread Todd Chester via perl6-users
On 10/17/18 1:05 PM, Joseph Brenner wrote: Todd Chester wrote: What I do is to go to the github source for the module: Next I cd into the directory and install it with zef install . Yes, that much seems to work fine. It seems a little peculiar that I can search the repositories

Re: zef installs not working

2018-10-16 Thread Todd Chester via perl6-users
On 10/16/18 8:20 PM, Joseph Brenner wrote: Lately zef hasn't been working for me to do module installation. I can do things like "zef --list" to get a list of available modules but when I actually try to do the installation I see things like this: zef install Array::Agnostic ===>

Re: routine declaration line question

2018-10-12 Thread Todd Chester via perl6-users
On 10/12/18 3:47 AM, Curt Tilmes wrote: On Fri, Oct 12, 2018 at 6:08 AM Todd Chester via perl6-users mailto:perl6-users@perl.org>> wrote: > If nothing is being returned, it should really be indicated with --> Nil > since that can enable certain optimizati

Re: routine declaration line question

2018-10-12 Thread Todd Chester via perl6-users
On 10/5/18 8:39 AM, Larry Wall wrote: On Thu, Oct 04, 2018 at 03:13:15PM -0400, Trey Harris wrote: : Right; that's what I meant by "stylistically" — a `--> Mu` can highlight : that something is being returned (and that side-effects are not the primary : purpose), while nothing indicates that

Re: <> thank you

2018-10-05 Thread Todd Chester
On 10/5/18 4:51 AM, Laurent Rosenfeld via perl6-users wrote: You don't even need the quotes: > say [3,1]; (Nil cd) > Hi Laurent, A thing of beauty! Not to ask to stupid a question (when has that ever stooped me), but since [] is considered a subroutine, is <> also considered a

Re: <> thank you

2018-10-05 Thread Todd Chester
On 10/5/18 1:12 AM, Todd Chester wrote: Le ven. 5 oct. 2018 à 08:30, Todd Chester <mailto:toddandma...@zoho.com>> a écrit :     Hi All,     I went to reply to someone, I think it was Brandon for sending me     an eMail to my private address and the stinker disappeared!     Anywa

Re: <> thank you

2018-10-05 Thread Todd Chester
Le ven. 5 oct. 2018 à 08:30, Todd Chester <mailto:toddandma...@zoho.com>> a écrit : Hi All, I went to reply to someone, I think it was Brandon for sending me an eMail to my private address and the stinker disappeared! Anyway whoever sent me $ p6

<> thank you

2018-10-05 Thread Todd Chester
Hi All, I went to reply to someone, I think it was Brandon for sending me an eMail to my private address and the stinker disappeared! Anyway whoever sent me $ p6 'say [0,2];' (the brown) I was trying to figure out why this bombed: $ p6 ' say "a b c d"[3,1];' Index out of

Re: bitwise or?

2018-10-05 Thread Todd Chester
On 10/4/18 12:13 PM, Brandon Allbery wrote: It's fine syntactically, but I think has no effect because it'd be '$v = $v' after the '+|='. Conceivably some future version of rakudo could warn about it having no effect. That explains it. Thank you!

Re: words[] question

2018-09-26 Thread Todd Chester
On 09/25/2018 11:37 PM, Todd Chester wrote: How about my `Str:D $input:` question? That chat line just told me it is an optional way of writing it. I like it!

Could this be any more obscure?

2018-09-26 Thread Todd Chester
Hi All, Over on https://docs.perl6.org/routine/words I see multi method words(Str:D $input: $limit = Inf --> Positional) HOW IN THE WORLD did they convert `$limit = Inf` into an array index!?!?! https://docs.perl6.org/type/Num#Inf And `Inf` means a number larger than Perl can handle or

Re: words[] question

2018-09-26 Thread Todd Chester
El mié., 26 sept. 2018 a las 8:27, Todd Chester (<mailto:toddandma...@zoho.com>>) escribió: >> El mié., 26 sept. 2018 a las 6:12, Todd Chester (mailto:toddandma...@zoho.com> >> <mailto:toddandma...@zoho.com <mailto:toddandm

Re: words[] question

2018-09-26 Thread Todd Chester
El mié., 26 sept. 2018 a las 6:12, Todd Chester (<mailto:toddandma...@zoho.com>>) escribió: Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? On 09/25/2018 10:38 PM, JJ Mer

words[] question

2018-09-25 Thread Todd Chester
Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? $ ls -al Win10_1803_English_x64.dd -rwxrwxrwx. 1 todd root 7927234560 May 9 21:14 Win10_1803_English_x64.dd $ ls -al Win10_1803_English_x64.dd | p6 'my

Re: .kv ?

2018-09-14 Thread Todd Chester
On 09/14/2018 04:18 AM, Simon Proctor wrote: Assigned, created or defined. Basically the object has a value. Not following. Are there three of them?

Re: .kv ?

2018-09-14 Thread Todd Chester
On Fri, Sep 14, 2018 at 7:08 AM Todd Chester <mailto:toddandma...@zoho.com>> wrote: On 09/14/2018 04:01 AM, Simon Proctor wrote: > :D is a type constraint requiring an instantiated (or defined) object of > the given type (or a subtype of it). >

Re: .new?

2018-09-14 Thread Todd Chester
On 09/14/2018 03:34 AM, Simon Proctor wrote: I think the docs of objects (sorry on my phone no link) describe object creation and the default new quite well. They most probably are and most developers would have no issues figuring them out. If a common user can't make heads or tails out of

Re: need p5/p6 :: help

2018-09-14 Thread Todd Chester
> On 14/09/2018 12:59, Todd Chester wrote: >> Hi All, >> >> I am in the process of converting a YUGE program I wrote in >> Perl 5 to Perl 6. I used "xx::yy" at lot for readability >> so I could tell where something came from. >> >> I take

Re: .kv ?

2018-09-14 Thread Todd Chester
On 09/14/2018 04:01 AM, Simon Proctor wrote: :D is a type constraint requiring an instantiated (or defined) object of the given type (or a subtype of it). :U is a type constraint saying you have a container specified for the given type that hasn't been instantiated. Hi Simon, Your went

Re: I need -M help

2018-09-14 Thread Todd Chester
> On 14/09/2018 12:52, Todd Chester wrote: >> Hi All, >> >> With a one liner, how to I load a module that resides in the >> current directory? On 09/14/2018 03:58 AM, Timo Paulssen wrote: The equivalent of "use lib 'blah'" on the commandline is "-I bla

Re: .new?

2018-09-14 Thread Todd Chester
On 09/14/2018 03:37 AM, Elizabeth Mattijsen wrote: Good catch! I am not sure exactly what I tripped across, but as I tell my wife "sometimes it pays to be an idiot." :-) -T

need p5/p6 :: help

2018-09-14 Thread Todd Chester
Hi All, I am in the process of converting a YUGE program I wrote in Perl 5 to Perl 6. I used "xx::yy" at lot for readability so I could tell where something came from. I take it "::" means something different is Perl 6 than Perl 5. $ p6 'use lib "/home/linuxutil"; use PrintColors;

I need -M help

2018-09-14 Thread Todd Chester
Hi All, With a one liner, how to I load a module that resides in the current directory? $ ls PrintColors.pm6 PrintColors.pm6 $ perl6 -MPrintColors -e 'PrintRed "Hi";' ===SORRY!=== Could not find PrintColors at line 1 in: /home/tony/.perl6 /opt/rakudo-pkg/share/perl6/site

Re: .kv ?

2018-09-14 Thread Todd Chester
On Fri, 14 Sep 2018, 11:22 Todd Chester, <mailto:toddandma...@zoho.com>> wrote: Hi All, I adore the "kv" method: $ p6 'for "abc\n23\n4.56".lines.kv -> $i, $j { say "$i $j" };' 0 abc 1 23 2 4.56 So, I decided to go and l

.new?

2018-09-14 Thread Todd Chester
Hi All, What exactly is going on with .new? https://docs.perl6.org/routine/new method new(Telemetry::Sampler: @instruments --> Telemetry::Sampler:D) The whole thing went over my head. It looks like specifications for the developers, but I really can't tell. And it looks like it might be

.kv ?

2018-09-14 Thread Todd Chester
Hi All, I adore the "kv" method: $ p6 'for "abc\n23\n4.56".lines.kv -> $i, $j { say "$i $j" };' 0 abc 1 23 2 4.56 So, I decided to go and look at: https://docs.perl6.org/routine/kv multi method kv(Any:U: -->List) multi method kv(Any:D: -->List) Okay, here is what I see: "method"

Re: Please explain this to me

2018-09-14 Thread Todd Chester
On 09/13/2018 10:24 PM, JJ Merelo wrote: Last time I counted, there were a dozen comments and 3 commits in the issue I created to try and improve the description. 2 files were modified by me. Is there some where I can look at these comments? That's rather a dynamic way of not budging.

Re: Please explain this to me

2018-09-14 Thread Todd Chester
On 09/12/2018 12:19 AM, Simon Proctor wrote: In answer to "why the : between Str:D and Cool:D and why Int(Cool:D) ?" can I just point out the video I linked (or the slides) which answer both of these questions. Hi Simon, Larry Wall, who has a unique gift for making the complex easy,

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/13/2018 10:24 PM, JJ Merelo wrote: Last time I counted, there were a dozen comments and 3 commits in the issue I created to try and improve the description. 2 files were modified by me. That's rather a dynamic way of not budging. Cheers JJ I wrote you off list giving you my

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/12/2018 10:34 AM, Larry Wall wrote: On Tue, Sep 11, 2018 at 10:28:27PM -0700, ToddAndMargo wrote: : Okay, foul! :Str:D: Cool:D $needle : why is there not a comma between "Str:D:" and "Cool:D"? : And what is with the extra ":". By chance is the extra ":" : a confusing way of using a

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/11/2018 05:05 AM, Simon Proctor wrote: Please note the Perl5 docs have had decades of people working on them the Perl6 ones less so. There's bound to be some difference in scope. Hi Simon, That you for the tutorial. I have it tagged to read over again really SSSLLLOOOWWLY As

Re: Nil ?

2018-09-13 Thread Todd Chester
On 09/13/2018 02:24 PM, Elizabeth Mattijsen wrote: On 13 Sep 2018, at 23:21, ToddAndMargo wrote: $ p6 'my $x="\na\nb\nc\n"; for ( split "\n", $x ) -> $i {print "<$i>\n"};' <> <> with beginning and ending new lines. FWIW, a more Perl6ish way would be: $ p6 'my $x="\na\nb\nc\n"; for

Re: how do I do this index in p6?

2018-09-13 Thread Todd Chester
Le jeu. 13 sept. 2018 à 23:12, ToddAndMargo > a écrit : $ p6 'constant c=299792458; say c ~" metres per second";' 299792458 metres per second Hm. Now I am wondering how to format the commas into the say. On 09/13/2018 02:43 PM, Laurent

tip: grep and sed stopped working

2018-08-17 Thread Todd Chester
Hi All, I had the unfortunate experience of grep and sed stopping working in Fedora 28. I have to patch a bunch of scripts. It was a disaster. Anyway, in case my workarounds are of interest to you guys: Hope this doesn't happen to you guys! -T uname -r 4.17.9-200.fc28.x86_64 # rpm -qa

Re: how do I write this in P6?

2018-08-16 Thread Todd Chester
On 08/16/2018 10:19 PM, Todd Chester wrote: $ echo "a-b-c" | perl -pe 's/-//g' abc Figured it out: $ echo "a-b-c" | perl6 -pe 's:g/"-"//' abc $ echo "a-b-c" | perl6 -pe 's:g/\-//' abc I did not realize we had "-pe" available to us in p6!

how do I write this in P6?

2018-08-16 Thread Todd Chester
$ echo "a-b-c" | perl -pe 's/-//g' abc

Re: can't match unicode chars?

2018-07-31 Thread Todd Chester
On 07/31/2018 12:28 PM, Marc Chantreux wrote: hello people, given the slides of my talk in the slides.vim format (https://github.com/eiro/slides.vim), i want some of them to be shown one bullet a slide. so when i have this input: › Renater et le libre  Sympa 

Re: -c bug to report

2018-07-25 Thread Todd Chester
On 07/25/2018 12:23 PM, Brandon Allbery wrote: here's been discussion about having -c run the optimize stage as well, since some information needed for full checking doesn't exist in a useful form until then. I like the idea!

Re: a `pe4rl6 -c` error to fix

2018-06-21 Thread Todd Chester
<mailto:toddandma...@zoho.com>> wrote: > On Tue, Jun 19, 2018 at 10:50 PM, Todd Chester mailto:toddandma...@zoho.com>> wrote: >> Dear Perl Developers, >> >> Would you please fix this `perl6 -c` checker error? >> >>

Re: a `pe4rl6 -c` error to fix

2018-06-20 Thread Todd Chester
> On Tue, Jun 19, 2018 at 10:50 PM, Todd Chester wrote: >> Dear Perl Developers, >> >> Would you please fix this `perl6 -c` checker error? >> >> $ perl6 -v >> This is Rakudo version 2018.05 built on MoarVM version 2018.05 >> implementing Per

Re: using run

2018-06-20 Thread Todd Chester
On 06/20/2018 08:58 AM, Brandon Allbery wrote: A pipe is for communication with a process. "Piped to a file" means what? What's the process you're communicating with? More to the point, "run" is intended to be lower level, specifically so you can directly control things. Things like

Re: using run

2018-06-20 Thread Todd Chester
On 06/20/2018 08:15 AM, Theo van den Heuvel wrote: Hi all, trying to make sense of the documentation on run: https://docs.perl6.org/routine/run. In particular the last part. I don't  understand the adverbs :out and : err there. Can I set it up so that the output is piped into a file

Re: a `pe4rl6 -c` error to fix

2018-06-19 Thread Todd Chester
On 06/19/2018 09:50 PM, Todd Chester wrote: Dear Perl Developers, Would you please fix this `perl6 -c` checker error? $ perl6 -v This is Rakudo version 2018.05 built on MoarVM version 2018.05 implementing Perl 6.c. The checkers passes this line with Syntax OK $ReturnStr, $CurlStatus

a `pe4rl6 -c` error to fix

2018-06-19 Thread Todd Chester
Dear Perl Developers, Would you please fix this `perl6 -c` checker error? $ perl6 -v This is Rakudo version 2018.05 built on MoarVM version 2018.05 implementing Perl 6.c. The checkers passes this line with Syntax OK $ReturnStr, $CurlStatus = CurlDownloadFile $FileAddr, $BaseFileName,

Re: -c error to fix

2018-06-14 Thread Todd Chester
On 06/13/2018 11:28 PM, Todd Chester wrote: Hi All, $ perl6 -v This is Rakudo version 2018.04 built on MoarVM version 2018.04.1 implementing Perl 6.c. I have another `perl6 -c` bug to fix $ perl6 -c GetUpdates.pl6 ===SORRY!=== Could not find Term::termios at line 15 in:     /home

-c error to fix

2018-06-14 Thread Todd Chester
Hi All, $ perl6 -v This is Rakudo version 2018.04 built on MoarVM version 2018.04.1 implementing Perl 6.c. I have another `perl6 -c` bug to fix $ perl6 -c GetUpdates.pl6 ===SORRY!=== Could not find Term::termios at line 15 in: /home/linuxutil /home/todd/.perl6 /usr/lib64/perl6/site

Re: EVAL?

2018-06-14 Thread Todd Chester
On 06/13/2018 12:27 PM, Brandon Allbery wrote: use MONKEY-SEE-NO-EVAL; Thank you. Someone had fun with that name! Do I presume there is not other way around the issue?

Re: EVAL?

2018-06-13 Thread Todd Chester
On Wed, 13 Jun 2018 15:23:56 -0700 yary wrote > Pet peeve, "$RunSpecific" with the quotes on either side is exactly the same as $RunSpecific without the quotes. Perl isn't shell. > > -y Hi Yary, Chuckle. Missed one. What?? Or two or three ... This program that I have been

Re: Need match character help

2018-05-16 Thread Todd Chester
Now I am getting silly. How would I exclude the phrase "gm"? $ p6 'if "def" ~~ /^<[d..z]-["gm"]>*$/ {say "y"} else {say "n"}' Potential difficulties: Quotes are not metacharacters in character classes at -e:1 --> if "def" ~~ /^<[d..z]-⏏["gm"]>*$/ {say "y"} else {say "n"}

Re: Need match character help

2018-05-16 Thread Todd Chester
On Wed, May 16, 2018 at 9:05 PM, Todd Chester <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: On 05/16/2018 07:58 AM, Timo Paulssen wrote: On 16/05/18 00:10, ToddAndMargo wrote: What would the syntax be for d..z, but not g or m?

Re: Need match character help

2018-05-16 Thread Todd Chester
On 05/16/2018 07:58 AM, Timo Paulssen wrote: On 16/05/18 00:10, ToddAndMargo wrote: What would the syntax be for d..z, but not g or m? You can subtract [gm] from [d..z] like this:     say "c" ~~ /<[d..z]-[gm]>/;     say "d" ~~ /<[d..z]-[gm]>/;     say "f" ~~ /<[d..z]-[gm]>/;     say

Re: A s/// brain teaser to share

2018-05-04 Thread Todd Chester
On 05/03/2018 10:52 PM, yary wrote: What you really want is to change a quote to "inch" if the quote is not at the start of the line, not preceeded by a comma, not followed by a comma, and not at the end of a line. $LabelStr ~~ s:global|"3/4\""|3/4 inch|; But that will only fix inch when

Re: OT: creating an icon on the task bar

2018-05-04 Thread Todd Chester
On Thu, May 3, 2018 at 8:55 PM, Todd Chester <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: Hi All, But only a little bit off topic. Windows 7 Pro, SP1, 32 bit I created a Perl6 program for a customer. I created a shortcut to it on

OT: creating an icon on the task bar

2018-05-03 Thread Todd Chester
Hi All, But only a little bit off topic. Windows 7 Pro, SP1, 32 bit I created a Perl6 program for a customer. I created a shortcut to it on the desktop. But Windows won't allow me to to copy it to the task bar as perl6 is a batch file. Looking at google, the trick of creating cmd

need <-[x]> help

2018-05-03 Thread Todd Chester
Hi All, What I am trying to do is to replace a quote `"` with `inches`, but NOT when the quote is followed by a comma `,`. In other words, ignore `",` I am not having too good a time with it. What am I doing wrong? $ perl6 -e 'my $x=qw["44","7" ab","","999"]; say "$x";$x~~s:g/\"(.)<-[,]>/

Re: zef install Linenoise: Use of Nil in string context, (Linenoise) line 15

2018-04-25 Thread Todd Chester
On 04/24/2018 11:30 AM, mimosinnet wrote: This message appears when installing Linenoise <--- $ zef install Linenoise ===> Installing: Linenoise:ver<0.1.1>:auth Use of Nil in string context  in block  at home#sources/0BDF8C54D33921FEA066491D8D13C96A7CB144B9 (Linenoise) line 15 ---> The

Re: how do I match the next two characters?

2018-01-18 Thread Todd Chester
On 01/18/2018 05:17 PM, mimosinnet wrote: The '?' is not necessary Indeed! I use `.*?` when I do not want the wild card to be "greedy" When I have a choice of using either, I always use `.*?` so I remember the difference and as a kind of comment that tells me not to be greedy. Thank you!

Re: how do I match the next two characters?

2018-01-16 Thread Todd Chester
On 01/16/2018 12:57 AM, Elizabeth Mattijsen wrote: On 16 Jan 2018, at 09:46, ToddAndMargo wrote: I want to match the next two character (don't care what they are) in the following I will use ?? for the next two character, but that doesn't work $x ~~ m/.*?(sd??).*/;

Re: p6 for w32

2017-11-30 Thread Todd Chester
On 30 November 2017 at 05:09, Todd Chester <toddandma...@zoho.com> wrote: Hi All, Anyone know of a better download site for Perl 6 for Windows 7, SP1, 32 bit (not 64) than? http://rakudo.org/how-to-get-rakudo/ The 32 bit version is two years old. Many thanks, -T On 11/30/2017 01

p6 for w32

2017-11-29 Thread Todd Chester
Hi All, Anyone know of a better download site for Perl 6 for Windows 7, SP1, 32 bit (not 64) than? http://rakudo.org/how-to-get-rakudo/ The 32 bit version is two years old. Many thanks, -T

Anyone want me eMail and download interface for curl?

2017-11-03 Thread Todd Chester
Hi All, Without going into the reasons why, I was forced to write a module that interfaces curl for Perl 6. The module will 1) download a web page 2) download a file from the web and will properly follow redirects 3) will create proper eMail headers and send an eMail. It will auto sense

Tip: how to each individual leading space in a line

2017-11-01 Thread Todd Chester
Hi All, wander_ over on the chat line helped me figure out a vexing problem. I needed to replace each individual leading space in a line. Not remove all the leading white space or replace it with a single character. Each space had to be replaced with a sequence of characters and leave the

Re: <<>> question

2017-10-04 Thread Todd Chester
On 10/04/2017 08:20 PM, Todd Chester wrote: So in this context "{$x}" means insert (interpolate) a variable into the list?  I was thinking it meant to insert a variable into a string.  Did saying <<>> automatically tell Perl6 that this was a list and not a sting?

Re: <<>> question

2017-10-04 Thread Todd Chester
On 10/04/2017 12:48 PM, Andy Bach wrote: > I think maybe I don't understand how <<>> is used in a and how <<>> differs from a "" <<>> is quoteword, no commas needed. You get back a list.  "" create a string, you get back a single thing. my $z=<>; (xyz abc def) is the same as

Re: bash and pm6 question

2017-09-21 Thread Todd Chester
On 09/21/2017 01:19 AM, Shlomi Fish wrote: Hi Todd, On Wed, 20 Sep 2017 23:22:41 -0700 ToddAndMargo wrote: Hi All, Can I call a pm6 directly from bash or do I need to call a pl6 that calls the pm6? why not use "perl6 -e"? Regards, Shlomi perl6 -e'use

Re: what am I doing wrong here?

2017-09-14 Thread Todd Chester
On 09/14/2017 09:10 AM, Timo Paulssen wrote: You're reaching deep into rakudo's internals here, reaching an object that doesn't know about pretty much any methods you might want to have, and there's also no support for them in things like the ~~ operator, for example. You're getting the

how do you pipe to perl6?

2017-08-04 Thread Todd Chester
Hi All, In Linux, how do I things to a perl6 one liner? I want to send ip -o -f inet addr show | perl6 ***dig out the netmask on eno1*** I know how to dig out the net mask, I just don't how to pipe to the command. Many thanks, -T

Need sub for `LWP::UserAgent`

2017-07-27 Thread Todd Chester
Hi All, I am trying to convert a p5 program to p6. What do I use in place of `LWP::UserAgent`? I use it for downloading files from the web. I need to be able to pass the following to the web page: Caller Host UserAgent Referer Cookies This is the p5 code I want to convert:

Re: Announce: Rakudo Star Release 2017.07

2017-07-25 Thread Todd Chester
On 07/25/2017 12:30 AM, Elizabeth Mattijsen wrote: What do you mean by “the full Rakudo” ? Rakudo Star is the Rakudo compiler release with a set of useful modules added (“batteries included”). https://rakudo.perl6.org/downloads/star/ vs https://rakudo.perl6.org/downloads/rakudo/

Re: Is win 32 being worked on?

2017-07-21 Thread Todd Chester
On 07/21/2017 01:57 AM, Mark Carter wrote: On 21/07/2017 09:50, Todd Chester wrote: I may be wrong, but I do believe what you want is called "Rakudo Star". You can download it from https://rakudo.perl6.org/downloads/star/ But no recent win 32-bit. https://rakudo.perl6.org

Re: Is win 32 being worked on?

2017-07-21 Thread Todd Chester
On 07/21/2017 01:07 AM, Mark Carter wrote: I noticed that there is no Windows 32-bit version of rakudo, and it won't even compile on cygwin. Are there plans for fixing this? Hi Mark, I may be wrong, but I do believe what you want is called "Rakudo Star". You can download it from

Security and modules question

2017-07-18 Thread Todd Chester
Hi All, I have been wondering about pl programs that are used by the root account. I have been marking them to root and 700 to keep other out. But it is occurring to me, if the bad guys have access to my custom modules, they could insert anything they want into it and have root access. So, I

Re: parameters from the command line: how do they do that?

2017-06-21 Thread Todd Chester
On 06/21/2017 10:26 PM, Brandon Allbery wrote: On Thu, Jun 22, 2017 at 1:18 AM, Todd Chester <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: > On 22/06/17 14:49, Todd Chester wrote: >> I know how to read things on the command line. But >>

Re: parameters from the command line: how do they do that?

2017-06-21 Thread Todd Chester
> On 22/06/17 14:49, Todd Chester wrote: >> Hi All, >> >> I know how to read things on the command line. But >> how to other's figure out what goes together when things >> don't arrive in order? >> >> For instance, from "man grep" >>

parameters from the command line: how do they do that?

2017-06-21 Thread Todd Chester
Hi All, I know how to read things on the command line. But how to other's figure out what goes together when things don't arrive in order? For instance, from "man grep" -E, --extended-regexp Interpret PATTERN as ... -F, --fixed-strings Interpret PATTERN as ...

Re: for loop index question

2017-03-01 Thread Todd Chester
On 02/28/2017 11:06 PM, Andrew Kirkpatrick wrote: The zip operator in this case takes two sequences and interleaves them into a single sequence. It might be useful if you have handy or can generate a list of keys and a list of values you want to put together in pairs using => to create a hash

Re: for loop index question

2017-03-01 Thread Todd Chester
On 03/01/2017 12:45 AM, Richard Hainsworth wrote: Todd, As Andrew explained Z takes two arrays and an operator, eg. =>, or +, and then 'runs' the operator on the elements of the two lists. Here, you defined @x as a list of strings. I defined two lists, one of keys and one of values. Then I

Re: for loop index question

2017-02-28 Thread Todd Chester
On Wednesday, March 01, 2017 01:01 PM, Todd Chester wrote: Hi All, And it even gets more interesting. It even works with Associative Arrays (Hashes), which I adore! Interesting how associative arrays don't print in order that they were entered into the array. #!/usr/bin/perl6 my @x

Re: for loop index question

2017-02-28 Thread Todd Chester
Hi All, And it even gets more interesting. It even works with Associative Arrays (Hashes), which I adore! Interesting how associative arrays don't print in order that they were entered into the array. #!/usr/bin/perl6 my @x = ( "a", "b", "c", "d" ); print "loop of \@x\n"; for @x.kv ->

Re: for loop index question

2017-02-28 Thread Todd Chester
On 02/28/2017 01:30 PM, yary wrote: Maybe using placeholder variables was a bit too much (those variables with the ^ twigil) for @a.kv -> $k, $v { say "Value $v has index $k" } Value g has index 0 Value h has index 1 Value i has index 2 Value j has index 3 Value k has index 4 Hi Yary,

Re: for loop index question

2017-02-28 Thread Todd Chester
On 02/28/2017 01:25 PM, Elizabeth Mattijsen wrote: On 28 Feb 2017, at 22:20, ToddAndMargo wrote: 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,

Re: for loop index question

2017-02-28 Thread Todd Chester
On 02/28/2017 01:20 PM, ToddAndMargo wrote: 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

Re: for loop index question

2017-02-28 Thread Todd Chester
On Tue, Feb 28, 2017 at 01:20:47PM -0800, ToddAndMargo wrote: 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

Re: Terminal::ANSIColor problem

2017-02-28 Thread Todd Chester
On 02/28/2017 04:11 AM, yary wrote: You don't need the double quotes around $Str- not even in Perl5! Hi Yary, You made me think of where I picked up that particular "bad habit". I go it, not from Perl 5, but from bash programming, where all h*** breaks loose if you don't quote things. :-)

Re: panda's port?

2017-01-18 Thread Todd Chester
On 01/17/2017 12:52 PM, Will Coleda wrote: Note that you can also set the environment variable GIT_PROTOCOL to https or ssh to use those protocols on their various ports, respectively. (Useful when behind a corporate firewall and http proxy) $ GIT_PROTOCOL=https panda install JSON::Fast

  1   2   >