Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 07:43, yary wrote: The :foo syntax is called a "colon pair" Thank you!

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
*From:* William Michels > *Sent:* Sunday, August 30, 2020 2:44:55 PM *To:* yary mailto:not@gmail.com>> *Cc:* perl6-users mailto:perl6-us...@perl.org>>; ToddAndMargo mailto:toddandma...@zoho.com>>; Brad Gilbert mailto:b2gi...@gmail.com>> *Subject:* Re: lines

Re: lines :$nl-in question

2020-08-30 Thread yary
+1 on Matthew's comment Do you agree with that definition, Yary? Brad? Here it is: > "Invocant" > "Caller, the one who calls or invokes. The invocant of a method would > be the object on which that method is being called, or, in some cases, > the class itself. Invocant is used instead of caller

Raku Study group in progress

2020-08-30 Thread Joseph Brenner
I'm trying to get the Raku study group working today, but I've been having a bunch of zoom weirdness. It should be in progress now: The SF Perl Raku Study Group, 8/30 at 1pm PDT https://us02web.zoom.us/j/88495193366?pwd=TXpMSlVqaVVGMm52SWlvSmRrZXFBUT09 Password: 4RakuRoll

Re: How to I modify what is a new line in lines?

2020-08-30 Thread Brad Gilbert
$file.IO.lines( :nl-in(…), :chomp, … ) is actually short for $file.IO.open( :nl-in(…), :chomp ).lines( … ) On Sun, Aug 30, 2020 at 10:43 AM yary wrote: > You were close! > > First, you were looking at the docs for Path's "lines", but you are using > a string "lines" and those docs say

Re: lines :$nl-in question

2020-08-30 Thread William Michels via perl6-users
Do you agree with that definition, Yary? Brad? Here it is: "Invocant" "Caller, the one who calls or invokes. The invocant of a method would be the object on which that method is being called, or, in some cases, the class itself. Invocant is used instead of caller because the latter refers to the

Re: lines :$nl-in question

2020-08-30 Thread yary
The Raku glossary has a definition https://docs.raku.org/language/glossary#Invocant suggestion, link to that where the term appears. -y On Sun, Aug 30, 2020 at 9:16 AM William Michels via perl6-users < perl6-us...@perl.org> wrote: > Inline: > > On Sun, Aug 30, 2020 at 12:49 AM Brad Gilbert

Re: lines :$nl-in question

2020-08-30 Thread William Michels via perl6-users
Inline: On Sun, Aug 30, 2020 at 12:49 AM Brad Gilbert wrote: > > Invocant is in the dictionary though. > > In fact it is from Latin. > > Origin & history: > Derived from in- + vocō ("I call"). > > Verb: > I invoke > I call (by name) > > In fact that is pretty close to the same meaning as

Re: How to I modify what is a new line in lines?

2020-08-30 Thread yary
You were close! First, you were looking at the docs for Path's "lines", but you are using a string "lines" and those docs say multi method lines(Str:D: $limit, :$chomp = True) multi method lines(Str:D: :$chomp = True) Files get "nl-in" due to the special case of text files having various line

Re: liens and :chomp question

2020-08-30 Thread yary
Expanding on how to read the docs & signature a bit, from Tobias > You confuse two methods that have the same name "lines". One of them, > which exists in the IO::Path class, has a :chomp argument. The other, > on IO::Handle does not. > "path".IO.lines() <-- calls lines on an IO::Path

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread William Michels via perl6-users
Has an announcement been made on all the following: "Hackernews/Reddit/Slashdot/PerlMonks/[yCombinator]/[Hackernoon]/[Slack]/[Discord]/[IRC]/similar online forum and/or news aggregator?" Can anyone reading here who has an account on another forum/service, make sure an announcement is made? Thank

Re: lines :$nl-in question

2020-08-30 Thread yary
The :foo syntax is called a "colon pair", and colon pair also describes :quux since it is short for :quux(True) Colon pair also describes :$foo because it is a shorthand using a colon to create the Pair object foo=>$foo Searching raku docs showed

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread JJ Merelo
El dom., 30 ago. 2020 a las 11:43, ToddAndMargo () escribió: > >> El dom., 30 ago. 2020 a las 11:34, ToddAndMargo ( >> >) escribió: > >> > >> On 2020-08-30 02:26, JJ Merelo wrote: > >> > Hi, > >> > Here's the link > >> > > >> >

How to I modify what is a new line in lines?

2020-08-30 Thread ToddAndMargo via perl6-users
Hi All, https://docs.raku.org/type/IO::Path#method_lines method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c --> Seq:D) How do I change what lines sees as a new line. Is it :$nl-in? A tab in this case. Some of my missteps: $ p6 'my $x="a\tb\tc\td\t";

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On Sat, Aug 29, 2020 at 9:05 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote: And if you would not mind, what is the official name of variables that begin with ":" On 2020-08-30 00:43, Brad Gilbert wrote: There are no variables that begin with : There are

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread ToddAndMargo via perl6-users
El dom., 30 ago. 2020 a las 11:34, ToddAndMargo (>) escribió: On 2020-08-30 02:26, JJ Merelo wrote: > Hi, > Here's the link > https://docs.google.com/forms/d/e/1FAIpQLSdRPBdn1iRN_sT8BMNMOBhVbEY1u8ngZWVwLyM37sqsa4OLwQ/viewform > >

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread JJ Merelo
In principle, answers are anonymous, so no way, sorry. Did you *actually* fill the form, though, or just answered the question here? We need them to be in the form, to consider them. El dom., 30 ago. 2020 a las 11:34, ToddAndMargo () escribió: > On 2020-08-30 02:26, JJ Merelo wrote: > > Hi, > >

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 02:26, JJ Merelo wrote: Hi, Here's the link https://docs.google.com/forms/d/e/1FAIpQLSdRPBdn1iRN_sT8BMNMOBhVbEY1u8ngZWVwLyM37sqsa4OLwQ/viewform It'll take you five minutes, top. Answers will be summarized and carefully considered. Thanks! -- JJ Hi JJ, I missed one when I

Reminder: Fill Raku's user survey!

2020-08-30 Thread JJ Merelo
Hi, Here's the link https://docs.google.com/forms/d/e/1FAIpQLSdRPBdn1iRN_sT8BMNMOBhVbEY1u8ngZWVwLyM37sqsa4OLwQ/viewform It'll take you five minutes, top. Answers will be summarized and carefully considered. Thanks! -- JJ

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 02:00, Richard Hainsworth wrote: While your logical transitions move you down some interesting rabbit holes, if you are going to say stuff, at least check first. On 30/08/2020 00:39, ToddAndMargo via perl6-users wrote: On 2020-08-28 23:51, Tobias Boege wrote: You do realize

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 00:48, Brad Gilbert wrote: Invocant is in the dictionary though. In fact it is from Latin. Origin & history:   Derived from in- + vocō ("I call"). Verb:   I invoke   I call (by name) In fact that is pretty close to the same meaning as it is used in the Raku docs. It is

Re: lines :$nl-in question

2020-08-30 Thread Richard Hainsworth
Todd, While your logical transitions move you down some interesting rabbit holes, if you are going to say stuff, at least check first. On 30/08/2020 00:39, ToddAndMargo via perl6-users wrote: On 2020-08-28 23:51, Tobias Boege wrote: You do realize "invocant" is not even in the dictionary

Re: liens and :chomp question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 00:35, Tobias Boege wrote: On Sun, 30 Aug 2020, ToddAndMargo via perl6-users wrote: - You are calling .lines on the value of .IO.open which is an IO::Handle. IO::Handle.lines does not take a named argument :chomp, so passing one is useless. That explains it.

Re: liens and :chomp question

2020-08-30 Thread ToddAndMargo via perl6-users
On Sat, Aug 29, 2020 at 10:15 PM ToddAndMargo via perl6-users wrote: Hi All, I am trying to figure out how to use line with :$chomp. Now what am I doing wrong? $ alias p6 alias p6='perl6 -e' $ p6 'say "Lines.txt".IO.open.lines(:chomp)[3,2];' (Line 3 Line 2) $ p6 'say

Re: lines :$nl-in question

2020-08-30 Thread Brad Gilbert
Invocant is in the dictionary though. In fact it is from Latin. Origin & history: Derived from in- + vocō ("I call"). Verb: I invoke I call (by name) In fact that is pretty close to the same meaning as it is used in the Raku docs. It is the object that we are calling (aka invoking) a

Re: lines :$nl-in question

2020-08-30 Thread Brad Gilbert
There are no variables that begin with : There are variable declarations in signatures that begin with : :$foo is exactly the same as :foo($foo) sub bar ( :$foo ) {…} sub bar ( :foo($foo) ){…} :$foo in a signature is a shortcut for declaring a named argument :foo() and a variable with

Re: liens and :chomp question

2020-08-30 Thread Tobias Boege
On Sun, 30 Aug 2020, ToddAndMargo via perl6-users wrote: > >- You are calling .lines on the value of .IO.open which is an > > IO::Handle. IO::Handle.lines does not take a named argument > > :chomp, so passing one is useless. > > That explains it. > > Bu: >

Re: liens and :chomp question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-29 23:09, Tobias Boege wrote: On Sat, 29 Aug 2020, ToddAndMargo via perl6-users wrote: Hi All, I am trying to figure out how to use line with :$chomp. Now what am I doing wrong? $ alias p6 alias p6='perl6 -e' $ p6 'say "Lines.txt".IO.open.lines(:chomp)[3,2];' (Line 3 Line 2) $

Re: liens and :chomp question

2020-08-30 Thread William Michels via perl6-users
Maybe this is what you want? ~$ raku -e 'say "test_lines.txt".IO.lines;' (Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11) ~$ raku -e 'say "test_lines.txt".IO.lines.join("\n");' Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11 ~$ raku

Re: liens and :chomp question

2020-08-30 Thread Tobias Boege
On Sat, 29 Aug 2020, ToddAndMargo via perl6-users wrote: > Hi All, > > I am trying to figure out how to use line with :$chomp. > Now what am I doing wrong? > > > $ alias p6 > alias p6='perl6 -e' > > $ p6 'say "Lines.txt".IO.open.lines(:chomp)[3,2];' > (Line 3 Line 2) > > $ p6 'say