Re: print particular lines question

2020-08-31 Thread William Michels via perl6-users
Thanks Yary! So that means Brian's answer in Raku can use the smartmatch operator instead of the "==". Good to know! ~$ raku -ne '.say if ++$ ~~ 3|5|11' test_lines.txt Line 3 Line 5 Line 11 On Mon, Aug 31, 2020 at 8:47 AM yary wrote: > > Aww don't you remember Raku's earliest(?) contribution to

Re: print particular lines question

2020-08-31 Thread yary
Aww don't you remember Raku's earliest(?) contribution to Perl? I was so happy when this arrived, and sad over its subsequent neglect perl -ne 'no warnings "experimental"; print if $. ~~ [3,5,11]' line0-10.txt -y On Mon, Aug 31, 2020 at 8:28 AM William Michels via perl6-users <

Re: print particular lines question

2020-08-31 Thread William Michels via perl6-users
How would P5 handle line numbers > 10 ? Not getting back line #11 with the P5 examples below: $ raku -ne '.say if ++$ == 3|2|5|11' test_lines.txt Line 2 Line 3 Line 5 Line 11 ~$ perl -ne 'print if $. =~ /\b[3 2 5 11]\b/' test_lines.txt Line 1 Line 2 Line 3 Line 5 ~$ perl -ne 'print if $. =~

Re: print particular lines question

2020-08-31 Thread Brian Duggan
On Monday, August 31, Andy Bach wrote: > > raku -ne '.say if $++ == 3|2|5' Lines.txt > > OT, maybe, but is > perl -ne 'print if $. =~ /\b[325]\b/' Lines.txt > > or > perl -ne 'print if $c++ =~ /\b[436]\b/' Lines.txt > > the best you can do in P5? I can't think of anything better :-) Brian

Re: print particular lines question

2020-08-31 Thread Andy Bach
st 31, 2020 7:53 AM To: Curt Tilmes Cc: perl6-users Subject: Re: print particular lines question On Monday, August 24, Curt Tilmes wrote: > $ cat Lines.txt | raku -e '.say for lines()[3,2,5]' The -n flag is an option here too: raku -ne '.say if $++ == 3|2|5' Lines.txt Brian

Re: lines :$nl-in question

2020-08-31 Thread Stuckwisch, Matthew
Michels mailto:w...@caa.columbia.edu>> Sent: Sunday, August 30, 2020 2:44:55 PM To: yary mailto:not@gmail.com>> Cc: perl6-users mailto:perl6-users@perl.org>>; ToddAndMargo mailto:toddandma...@zoho.com>>; Brad Gilbert mailto:b2gi...@gmail.com>> Subject: Re:

Re: print particular lines question

2020-08-31 Thread Brian Duggan
On Monday, August 24, Curt Tilmes wrote: > $ cat Lines.txt | raku -e '.say for lines()[3,2,5]' The -n flag is an option here too: raku -ne '.say if $++ == 3|2|5' Lines.txt Brian

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
com>> *Subject:* Re: lines :$nl-in question 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. Invoc

Re: lines :$nl-in question

2020-08-30 Thread yary
term had to rule them > all. > > -- > *From:* William Michels > *Sent:* Sunday, August 30, 2020 2:44:55 PM > *To:* yary > *Cc:* perl6-users ; ToddAndMargo < > toddandma...@zoho.com>; Brad Gilbert > *Subject:* Re: lines :$nl-in question

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-users@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: 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: 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: 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-users@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: 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: 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: 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
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
quot;.IO.open(:chomp).lines()[3,2];' > ("Line 3", "Line 2") > > $ p6 'dd "Lines.txt".IO.open(:!chomp).lines()[3,2];' > ("Line 3\n", "Line 2\n") > > $ p6 'say "Lines.txt".IO.open(:!chomp).lines()[3,2];' > (Line

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

liens and :chomp question

2020-08-29 Thread ToddAndMargo via perl6-users
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 "Lines.txt".IO.open.lines(:!chomp)[3,2];' (Line 3 Line 2) I am looking for Line 3 Line 2

Re: lines :$nl-in question

2020-08-29 Thread ToddAndMargo via perl6-users
On 2020-08-29 17:04, ToddAndMargo via perl6-users wrote: On 2020-08-28 23:51, Tobias Boege wrote:    - :$chomp, :$enc, :$nl-in which are passed on to the open call in the first bullet point above, Hi Tobias, I am in process of revising my keeper on lines. May I talk you out of examples

Re: lines :$nl-in question

2020-08-29 Thread ToddAndMargo via perl6-users
On 2020-08-28 23:51, Tobias Boege wrote: - :$chomp, :$enc, :$nl-in which are passed on to the open call in the first bullet point above, Hi Tobias, I am in process of revising my keeper on lines. May I talk you out of examples of the syntax used by :$chomp, :$enc, and :$nl-in? Many

Re: lines :$nl-in question

2020-08-29 Thread ToddAndMargo via perl6-users
On 2020-08-28 23:51, Tobias Boege wrote: On Fri, 28 Aug 2020, ToddAndMargo via perl6-users wrote: https://docs.raku.org/type/IO::Path#method_lines (IO::Path) method lines Defined as: method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c -->

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-29 Thread William Michels via perl6-users
Dear Tobias (and Sean), I opened a Github issue: https://github.com/rakudo/rakudo/issues/3881 On Wed, Aug 26, 2020 at 12:12 PM Tobias Boege wrote: > On Wed, 26 Aug 2020, Tobias Boege wrote: > > Observe: > > > > > 1 ...^ 20 > > (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) > > > > > 1

Re: lines :$nl-in question

2020-08-29 Thread Tobias Boege
On Fri, 28 Aug 2020, ToddAndMargo via perl6-users wrote: >https://docs.raku.org/type/IO::Path#method_lines > >(IO::Path) method lines > >Defined as: > >method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = > ["\x0A", "\r\n"], |c --> Seq:D) > >Opens the

Re: lines :$nl-in question

2020-08-28 Thread ToddAndMargo via perl6-users
On 2020-08-28 18:49, Paul Procacci wrote: |c slurps the remaining arguments into c and passese those arguments to the lines method of IO::Handle. I do not understand

Re: lines :$nl-in question

2020-08-28 Thread Paul Procacci
:nl-in is a named parameter that defines what the method lines would consider as line endings. It defines "\x0A", "\r\n" as the default. Example: % echo "Hi, Frank." > test.txt ; echo "What's up?" >> test.txt ; echo '"test.txt".IO.lines(:nl-in).say' > test.pl6 ; perl6 ./test.pl6 (Hi, Fr nk. Wh

lines :$nl-in question

2020-08-28 Thread ToddAndMargo via perl6-users
Hi All, In the following: https://docs.raku.org/type/IO::Path#method_lines (IO::Path) method lines Defined as: method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c --> Seq:D) Opens the invocant and returns its lines. The behavior is

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread Tobias Boege
On Wed, 26 Aug 2020, Tobias Boege wrote: > Observe: > > > 1 ...^ 20 > (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) > > > 1 ... ^20 # actually C«1 ... (0..19)» > (1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) > > The documentation [1] states that the C«...» infix is

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread William Michels via perl6-users
On Wed, Aug 26, 2020 at 10:33 AM Tobias Boege wrote: > > On Wed, 26 Aug 2020, William Michels via perl6-users wrote: > > > They can be pretty great, especially when combined with the magic op= > > > operators that (in essence) know about identity elements. I've done a > > > few challenges on

Re: Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread Tobias Boege
On Wed, 26 Aug 2020, William Michels via perl6-users wrote: > > They can be pretty great, especially when combined with the magic op= > > operators that (in essence) know about identity elements. I've done a few > > challenges on the Code Golf Stackexchange site where I wanted an infinite > >

Seq whitespace sensitivity? (was Re: print particular lines question)

2020-08-26 Thread William Michels via perl6-users
> They can be pretty great, especially when combined with the magic op= > operators that (in essence) know about identity elements. I've done a few > challenges on the Code Golf Stackexchange site where I wanted an infinite > sequence like this: > > 0, 1, -2, 3, -4, 5, -6, ... > > It took

Re: print particular lines question

2020-08-25 Thread ToddAndMargo via perl6-users
On 2020-08-24 20:30, ToddAndMargo via perl6-users wrote: On Mon, Aug 24, 2020 at 11:08 PM ToddAndMargo via perl6-users wrote: On 2020-08-24 19:35, ToddAndMargo via perl6-users wrote: Hi All, I seems I should know how to do this, but I am drawing a blank. $ cat Lines.txt | raku -ne 'say

Re: print particular lines question

2020-08-25 Thread Bruce Gray
> On Aug 25, 2020, at 4:13 PM, yary wrote: > > > Now, does anyone have a simpler way than using the ".map" above? > > There were a few in the thread! > > Here's my golfing, unlike the others, this preserves the order of the lines > (which may or may not be desired) > > raku -ne '.say if

Re: print particular lines question

2020-08-25 Thread William Michels via perl6-users
ry mode >>> in block at -e line 1 >>> >>> a >>> >>> Andy Bach, BS, MSCMECFA >>> Systems Mangler >>> Internet: andy_b...@wiwb.uscourts.gov >>> Voice: (608) 261-5738, Cell: (608) 658-1890 >>> >>> "The three gre

Re: print particular lines question

2020-08-25 Thread Sean McAfee
On Tue, Aug 25, 2020 at 2:31 PM Andy Bach wrote: > Pretty cool - I didn't know about the bare "$" as a magic state var. > They can be pretty great, especially when combined with the magic op= operators that (in essence) know about identity elements. I've done a few challenges on the Code Golf

Re: print particular lines question

2020-08-25 Thread Andy Bach
ers ; Parrot Raiser <1parr...@gmail.com>; ToddAndMargo ; Andy Bach ; Curt Tilmes Subject: Re: print particular lines question > Now, does anyone have a simpler way than using the ".map" above? There were a few in the thread! Here's my golfing, unlike the others, this preserve

Re: print particular lines question

2020-08-25 Thread yary
in block at -e line 1 >> >> a >> >> Andy Bach, BS, MSCMECFA >> Systems Mangler >> Internet: andy_b...@wiwb.uscourts.gov >> Voice: (608) 261-5738, Cell: (608) 658-1890 >> >> "The three great problems of computer science: >> compi

Re: print particular lines question

2020-08-25 Thread William Michels via perl6-users
ne' errors". > https://martinfowler.com/bliki/TwoHardThings.html > > -- > *From:* Andy Bach > *Sent:* Tuesday, August 25, 2020 12:18 PM > *To:* Parrot Raiser <1parr...@gmail.com> > *Cc:* perl6-users ; ToddAndMargo < > toddandma..

Re: print particular lines question

2020-08-25 Thread Andy Bach
_ From: Andy Bach Sent: Tuesday, August 25, 2020 12:18 PM To: Parrot Raiser <1parr...@gmail.com> Cc: perl6-users ; ToddAndMargo Subject: Re: print particular lines question On Win10 C:\>type lines.txt | "\Program Files (x86)\rakudo\bin\raku.exe" -ne "say lines()[1

Re: print particular lines question

2020-08-25 Thread Andy Bach
f computer science: compiler complexity and 'off-by-one' errors". https://martinfowler.com/bliki/TwoHardThings.html From: Parrot Raiser <1parr...@gmail.com> Sent: Tuesday, August 25, 2020 11:22 AM To: Andy Bach Cc: perl6-users ; ToddAndMargo Subjec

Re: print particular lines question

2020-08-25 Thread Parrot Raiser
(608) 658-1890 > > Every man has the right to an opinion but no man > has a right to be wrong in his facts. Nor, above all, > to persist in errors as to facts. Bernard Baruch > > > From: ToddAndMargo via perl6-users > Sent: Monday, August 24, 2

Re: print particular lines question

2020-08-25 Thread Andy Bach
errors as to facts. Bernard Baruch From: ToddAndMargo via perl6-users Sent: Monday, August 24, 2020 9:35 PM To: perl6-users Subject: print particular lines question Hi All, I seems I should know how to do this, but I am drawing a blank. $ cat Lines.txt | raku -ne 's

Re: print particular lines question

2020-08-24 Thread ToddAndMargo via perl6-users
On Mon, Aug 24, 2020 at 11:08 PM ToddAndMargo via perl6-users wrote: On 2020-08-24 19:35, ToddAndMargo via perl6-users wrote: Hi All, I seems I should know how to do this, but I am drawing a blank. $ cat Lines.txt | raku -ne 'say $_;' Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8

Re: print particular lines question

2020-08-24 Thread Curt Tilmes
$ cat Lines.txt | raku -e '.say for lines()[3,2,5]' On Mon, Aug 24, 2020 at 11:08 PM ToddAndMargo via perl6-users wrote: > > On 2020-08-24 19:35, ToddAndMargo via perl6-users wrote: > > Hi All, > > > > I seems I should know how to do this, but > > I am drawing a blank. > > > > $ cat Lines.txt |

Re: print particular lines question

2020-08-24 Thread ToddAndMargo via perl6-users
On 2020-08-24 19:35, ToddAndMargo via perl6-users wrote: Hi All, I seems I should know how to do this, but I am drawing a blank. $ cat Lines.txt | raku -ne 'say $_;' Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11 I want to print liens 1, 3, and 7. Assigning 

print particular lines question

2020-08-24 Thread ToddAndMargo via perl6-users
Hi All, I seems I should know how to do this, but I am drawing a blank. $ cat Lines.txt | raku -ne 'say $_;' Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11 I want to print liens 1, 3, and 7. Assigning `my @x=$_.lines` puts everything into $x[0] Many thanks,

Multi-file 'join' question on Twitter...

2020-08-18 Thread William Michels via perl6-users
Greetings fellow Raku-uns! Here's a recent multi-file 'join' question on Twitter. Does anyone with a Twitter account want to attempt an answer? https://twitter.com/peterbourgon/status/1289595252253134848 Best, Bill.

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
> > Ok Todd, let me have a go at this issue. > > > > > > > > From what I understand, you see 'multi' and think 'there are more than > > > > one', which leads to the question 'where are they?' > > > > > > > > My understanding

RE: question about the multi in method

2020-06-08 Thread Mark Devine
Peter, I applaud your excellent assistance with Raku. Et. al. (you know the names)... Outstanding community! Mark -Original Message- From: Peter Pentchev Sent: Monday, June 8, 2020 17:13 To: perl6-users@perl.org Subject: Re: question about the multi in method On Mon, Jun 08, 2020

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
 leads to the question 'where are they?' My understanding of 'multi' is 'there COULD be more than one', which leads to the question 'are there any?' This is actually a very powerful aspect of Raku. There are (as has been stated in this thread) four types of which  multi = 'could be more than one

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 02:45, Richard Hainsworth wrote: > > Ok Todd, let me have a go at this issue. > > > > From what I understand, you see 'multi' and think 'there are more than > > one', which l

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

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-08 02:45, Richard Hainsworth wrote: Ok Todd, let me have a go at this issue. From what I understand, you see 'multi' and think 'there are more than one', which leads to the question 'where are they?' My understanding of 'multi' is 'there COULD be more than one', which leads

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
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 -- Peter Pentchev r...@ringlet.net r...@debian.org

Re: question about the multi in method

2020-06-08 Thread Richard Hainsworth
Ok Todd, let me have a go at this issue. From what I understand, you see 'multi' and think 'there are more than one', which leads to the question 'where are they?' My understanding of 'multi' is 'there COULD be more than one', which leads to the question 'are there any?' This is actually

Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 10:15 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > On 2020-06-08 00:48, Fernando Santagata wrote: > > On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users > > mailto:perl6-users@perl.org>> wrote: > > > > On 2020-06-07 22:39, Peter Pentchev wrote:

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:12:07AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 22:39, Peter Pentchev wrote: > > I thought I explained that. The Rakudo developers are*never* finished > > with the development of some methods. Somebody*will* want to extend > > them in their own

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-08 00:48, Fernando Santagata wrote: On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-06-07 22:39, Peter Pentchev wrote: I addressed this in my original e-mail: the documentation is currently: 1. a reference manual Targets

Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > On 2020-06-07 22:39, Peter Pentchev wrote: > > I addressed this in my original e-mail: the documentation is currently: > > 1. a reference manual > > Targets at what audience? > I think that that point

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users
On 2020-06-07 22:39, Peter Pentchev wrote: I thought I explained that. The Rakudo developers are*never* finished with the development of some methods. Somebody*will* want to extend them in their own module. The Rakudo developers*want* to declare some methods as "multi" to allow the Rakudo

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
; > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > > > > perl6-users@perl.org> wrote: > > > > > > > > > > > Hi All,

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
rl6-users@perl.org> wrote: Hi All, Dumb question: Does the "multi" in "multi method" mean there is more than one way to address a method? Or, are the all methods "multi methods". If not and the method is a multi, should not the documentation show all (more than

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > > > perl6-users@perl.org> wrote: > > > > > > > > > Hi All, > > > > > > > > > > Dumb question: > > > > > > > > > > Does th

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
t; perl6-users@perl.org> wrote: > > > > > > > Hi All, > > > > > > > > Dumb question: > > > > > > > > Does the "multi" in "multi method" mean there > > > > is more than one way to

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
On 2020-06-07 08:29, Veesh Goldman wrote: I imagine they called it cool because it, indeed, is cool. The Raku developers do have a sense of humor. Cool, needle, slurp, spurt: someone had a good laugh. :-)

Re: question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
On 2020-06-07 08:19, Peter Pentchev wrote: On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: Hi All, Dumb question: Does the "multi" in "multi method" mean

Re: question about the multi in method

2020-06-07 Thread Veesh Goldman
M ToddAndMargo via perl6-users < > > > perl6-users@perl.org> wrote: > > > > > > > Hi All, > > > > > > > > Dumb question: > > > > > > > > Does the "multi" in "multi method

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 06:19:29PM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > perl6-users@perl.org> wrote: > > > > > Hi All, > &g

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > perl6-users@perl.org> wrote: > > > Hi All, > > > > Dumb question: > > > > Does the "multi" in "multi met

Re: question about the multi in method

2020-06-07 Thread Brad Gilbert
zz say $var.name; # baz On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Hi All, > > Dumb question: > > Does the "multi" in "multi method" mean there > is more than one way to address a method? > > Or, ar

question about the multi in method

2020-06-07 Thread ToddAndMargo via perl6-users
Hi All, Dumb question: Does the "multi" in "multi method" mean there is more than one way to address a method? Or, are the all methods "multi methods". If not and the method is a multi, should not the documentation show all (more than one) the ways of addressin

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
On 2020-05-30 21:28, Kevin Pye wrote: While the original documentation you were referring to called them Pod comments, that's not really accurate. The full documentation (to which I referred you) calls them "Pod documents" which is much more descriptive. The Pod document is parsed by Rakudo,

Re: question on pod comments

2020-05-30 Thread Kevin Pye
> >> >> > >> >> Many thanks, > >> >> -T > >> >> > >> > >> On 2020-05-30 20:20, Kevin Pye wrote: > >> > They're not Pod comments, they're Pod abbreviated blocks: > >

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
Many thanks, >> -T >> On 2020-05-30 20:20, Kevin Pye wrote: > They're not Pod comments, they're Pod abbreviated blocks: > > https://docs.raku.org/language/pod > > Kevin. > I see that: https://docs.raku.org/language/po

Re: question on pod comments

2020-05-30 Thread Kevin Pye
gt;> -T > >> > > On 2020-05-30 20:20, Kevin Pye wrote: > > They're not Pod comments, they're Pod abbreviated blocks: > > > > https://docs.raku.org/language/pod > > > > Kevin. > > > > I see that: > > https://docs.raku.org/language/pod#Delimited_blocks > =begin head1 > Top Level Heading > =end head1 > > So back to my original question, where are the "=end " for > the other blocks? > > I am confused. > -T >

Re: question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
1 So back to my original question, where are the "=end " for the other blocks? I am confused. -T

Re: question on pod comments

2020-05-30 Thread Kevin Pye
They're not Pod comments, they're Pod abbreviated blocks: https://docs.raku.org/language/pod Kevin. On Sun, 31 May 2020 at 12:43, ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Hi All, > > I am somewhat confused about pod comments: > >

question on pod comments

2020-05-30 Thread ToddAndMargo via perl6-users
Hi All, I am somewhat confused about pod comments: https://docs.raku.org/language/syntax#Pod_comments Seems pretty straight forward. But when I look at https://github.com/tadzik/perl6-Config-INI/blob/master/lib/Config/INI.pm starting line 45, I see =begin pod =head1 NAME =head1 SYNOPSIS

Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
On 2020-05-16 14:48, William Michels via perl6-users wrote: Yes, ** stands for exponentiation Thank you!

Re: sqrt and Buf question

2020-05-16 Thread William Michels via perl6-users
100)^ 2000` > >> ((2 times 100) to the 2000 power? > > Point 1: exponentiation has a higher priority than multiplication. > > > > Point 2:https://rosettacode.org/wiki/Integer_roots > > Any chance of you answering the question directly? > > Is it (2 x 100)^ 2000 > >

Re: sqrt and Buf question

2020-05-16 Thread ToddAndMargo via perl6-users
the question directly? Is it (2 x 100)^ 2000 Or 2 x ( 100^ 2000 )2 times (100 to the 2000 power)? Your point 1 only applies if it is an exponent. Is the 2000 an exponent? Does ** stand for exponent?

Re: sqrt and Buf question

2020-05-14 Thread Peter Pentchev
On Thu, May 14, 2020 at 02:36:30PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-14 08:13, Bruce Gray wrote: > > > > > > > On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users > > > wrote: > > > > > > Hi All, > > > > > > 1) how do I get 40 or more digits out of sqrt? > > > >

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 05:51, Tobias Boege wrote: On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? Meaningful digits? Not possible as sqrt uses limited precision. I think the IEEE 754 doubles that I would suspect to be used internally

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 08:13, Bruce Gray wrote: On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? —snip— Use an Integer Root algorithm on ($number-you-want-the-root-of * 100 ** $number-of-digits-you-want), then shift the

Re: sqrt and Buf question

2020-05-14 Thread Bruce Gray
> On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users > wrote: > > Hi All, > > 1) how do I get 40 or more digits out of sqrt? —snip— Use an Integer Root algorithm on ($number-you-want-the-root-of * 100 ** $number-of-digits-you-want), then shift the decimal point of the result.

Re: sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
On 2020-05-14 05:51, Tobias Boege wrote: On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: Hi All, 1) how do I get 40 or more digits out of sqrt? Meaningful digits? In this instance, I do not care about meaningful. I only care about the noise. Just has to be repeatable. I may

Re: sqrt and Buf question

2020-05-14 Thread Tobias Boege
On Thu, 14 May 2020, ToddAndMargo via perl6-users wrote: > Hi All, > > 1) how do I get 40 or more digits out of sqrt? > Meaningful digits? Not possible as sqrt uses limited precision. I think the IEEE 754 doubles that I would suspect to be used internally are capped way below 40 significant

sqrt and Buf question

2020-05-14 Thread ToddAndMargo via perl6-users
Hi All, 1) how do I get 40 or more digits out of sqrt? 2) how to I assist those bytes to a 40 (or more) byte long Buf? This obviously does not work: my Num $x = 3.sqrt; my Buf $y = Buf.new($x) Type check failed in initializing element #0 to Buf; expected uint8 but got Num

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
Hi Timo, Thanks for the answer: > the liskov substitution principle I didn't knew about this principle. I'm now going down the rabbit hole. Is this always the case for all the derived classes in Raku? Best regards, David Santiago Timo Paulssen escreveu no dia terça, 11/02/2020 à(s) 13:32: > >

Re: Question about Blob and Buf

2020-02-11 Thread Brad Gilbert
The problem is that you are using ~ with an uninitialized Buf/Blob my Buf $read; $read ~ Buf.new; # Use of uninitialized value element of type Buf in string context. Note that it is not complaining about it being a Buf. It is complaining about it being uninitialized. If you

Re: Question about Blob and Buf

2020-02-11 Thread Timo Paulssen
On 11/02/2020 14:14, David Santiago wrote: > Awesome explanation! Thank you! > > BTW, >> my Blob $read = Buf.new; > Is it creating either a Blob or a Buf? > > Regards, > David Santiago Hi David, "my Blob $read" will define the variable $read to 1) only accept things that typecheck against

<    1   2   3   4   5   6   7   >