Re: lines :$nl-in question

2020-09-02 Thread Larry Wall
Lexically and grammatically, sure, but a lot of the time people are
thinking more on the semantic and pragmatic levels.  Pragmatically,
bus riders, prisoners, and conference listeners are all having something
inflicted upon them.  :)

Glo points out that verbs tend in the pragmatics direction anyway.
To "noun" something is to use that noun in it's usual pragmatic way,
"knife" being the example usually trotted out as noun being used as
a verb.  But it's also why we get grammatical opposites that mean the
same thing whenever the usual action of the object is removal.

I peeled the banana.   I unpeeled the banana.
I skinned the rabbit.  I unskinned the rabbit.
I cored the apple. I uncored the apple.

This pattern is still somewhat productive, at least as of the 20th century:

I pantsed my rival.I unpantsed my rival.

Note there has to be an underlying pragmatic assymetry where only one action
makes sense, or you can't do it.  These really are opposites:

I corked the bottle.   I uncorked the bottle.

Also of interest, if you knife someone, you are sticking a knife in, but
you wouldn't say that pulling the knife back out is "unknifing" them...

As for OT, everthing is OT here, since we're talking about Raku in a Perl 6
mailing list...  :)

Larry

On Wed, Sep 02, 2020 at 10:25:52AM -0400, Parrot Raiser wrote:
: Possibly OT, the "-er/-ee" boundary has become corrupted in recent usage.
:  I suppose "standees" in a bus might be tolerated, depending on your
: view of transit riders as active or passive, but when a jail-break
: occurs, the former prisoners should become "escapers", not "escapees".
: The  prison authorities are the escapees. Similarly, the attendees at
: a conference are the people on stage, being attended-to by the
: attendants sitting down below them.
: 
: 
: 
: On 9/1/20, Larry Wall  wrote:
: > On Sun, Aug 30, 2020 at 03:12:26PM -0700, yary wrote:
: > : I have a quibble there. 1st & 2nd sentences disagree slightly by going
: > from
: > : active to passive voice. "Caller, the one who calls" vs "object on which
: > : that method is being called"
: > :
: > : Suggestion for 2nd sentence "The invocant of a method would be the object
: > : calling the method" ... if that is correct!
: >
: > I don't think it much matters, because Tom and I originally picked
: > "invocant" precisely because it was the least-marked affix available with
: > respect to active/passive voice, so that you could run your mental model
: > either way, depending on whether you think the object itself does the
: > method or the calling context does the method on behalf of the object.
: > There is no single right answer here. C++ programmers will think of it
: > very differently from Smalltalk programmers.
: >
: > Larry
: >


Re: lines :$nl-in question

2020-09-02 Thread Parrot Raiser
Possibly OT, the "-er/-ee" boundary has become corrupted in recent usage.
 I suppose "standees" in a bus might be tolerated, depending on your
view of transit riders as active or passive, but when a jail-break
occurs, the former prisoners should become "escapers", not "escapees".
The  prison authorities are the escapees. Similarly, the attendees at
a conference are the people on stage, being attended-to by the
attendants sitting down below them.



On 9/1/20, Larry Wall  wrote:
> On Sun, Aug 30, 2020 at 03:12:26PM -0700, yary wrote:
> : I have a quibble there. 1st & 2nd sentences disagree slightly by going
> from
> : active to passive voice. "Caller, the one who calls" vs "object on which
> : that method is being called"
> :
> : Suggestion for 2nd sentence "The invocant of a method would be the object
> : calling the method" ... if that is correct!
>
> I don't think it much matters, because Tom and I originally picked
> "invocant" precisely because it was the least-marked affix available with
> respect to active/passive voice, so that you could run your mental model
> either way, depending on whether you think the object itself does the
> method or the calling context does the method on behalf of the object.
> There is no single right answer here. C++ programmers will think of it
> very differently from Smalltalk programmers.
>
> Larry
>


Re: lines :$nl-in question

2020-09-01 Thread Larry Wall
On Sun, Aug 30, 2020 at 03:12:26PM -0700, yary wrote:
: I have a quibble there. 1st & 2nd sentences disagree slightly by going from
: active to passive voice. "Caller, the one who calls" vs "object on which
: that method is being called"
: 
: Suggestion for 2nd sentence "The invocant of a method would be the object
: calling the method" ... if that is correct!

I don't think it much matters, because Tom and I originally picked
"invocant" precisely because it was the least-marked affix available with
respect to active/passive voice, so that you could run your mental model
either way, depending on whether you think the object itself does the
method or the calling context does the method on behalf of the object.
There is no single right answer here. C++ programmers will think of it
very differently from Smalltalk programmers.

Larry


Re: lines :$nl-in question

2020-09-01 Thread Richard Hainsworth

Some comments on the linguist contribution.

While 'invocant' and 'invoker' may be 'functionally equivalent', it 
seems to me that in fact 'invocant' is correct.


'Invocant' indicates a thing that invokes, and does not imply 
necessarily an intent. By analogy, we have 'defendant' in normal usage, 
someone for whom a defense is being made.


Since everything in Raku is an object, then being an object means that 
there are methods which can be called on the object. When a method is 
called on an object, as in '$some-string.IO.lines()', the method 'lines' 
is given the object '$some-string.IO' on which it has been called. It is 
the invocant.


Some form of intent would be needed for 'invoker'. By analogy, 
'defender' is used when an defenser is being made on behalf of someone 
else - the defendant.  So, in Raku, suppose we have some 'sub 
outputting' as in


sub ouputting ( $string,  )

and  = IO::lines();

Then it would seem to me that if '($string)' inside 'outputting' 
would make 'outputting' the invoker, and '$string' the invocant for 
'lines()'.


Regarding the difference between 'employer/employee' 'payer/payee': the 
relationship is one where the action is carried out by one entity - the 
subject - directly with respect to another - usually called the object. 
One person hires - the employer, who is doing it with an intent, and the 
other is being hired.


The relationship between 'defender/defendant' indicates the direction of 
the action is not from the defender to the defendant, but to something 
else, usually the court.


Naturally, there are bound to be exceptions, but the subtle distinctions 
between the suffixes '-er', '-ant', and '-ee', are worth preserving. 
Raku was specified by a linguist, and it is very much apparent.


On 30/08/2020 22:08, Stuckwisch, Matthew wrote:
So I guess I got included on this as the resident language professor 
:-) (although I probably should subscribe to p6 users at some point) I 
didn't see the whole thread in the e-mail I got copied in on, so 
apologizes if I repeat much.


I'll spare everyone all the linguistic details, but suffice it to say, 
invocant and invoker are functionally equivalent.  The former is a 
nominalized adjective, and the latter a noun proper.  They mean "the 
one that invokes (calls)".   We can use either, but I'd recommend we 
be very consistent.  Invocant seems to be the preferred, so let's use 
it exclusively. On the other side, we have invoked and invokee, which 
in English share a similar distinction (although nominalizing the 
former often sounds odd, and adjectifying the latter would probably be 
read as missing a genitive 's).


Summed up, we should avoid using invocant to refer to a method that's 
being called.  Generally, just calling it a "method" is sufficient, 
but if need be, I'd go with "the invoked method".  We probably can 
write documentation to avoid the formalisms altogether, though, by 
saying something to the effect of


> Opens the file [represented by the [calling] object] and returns its 
lines.


That's fairly simple and clear.  In an article about signatures, 
however, I think using the term is absolutely appropriate, and 
warrants defining it parenthetically inline as "the object that 
calls/invokes the associated method".  I get that using the word 
"call" muddies the water (the formal distinction that tchrist was 
getting at is that a sub has no invocant except perhaps a calling 
context, ie the "caller" — which a method also has), but we already 
did that by having methods use CALL-ME instead of INVOKE-ME :-) *


MSS


* Of course, the reason was to harmonize calls of all code, and the 
fluid nature of allowing transitive methods be used as subs and 
viceversa (method $invocant: @args and $invocant.) means that one 
term had to rule them all.



*From:* William 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-us...@perl.org>>; ToddAndMargo <mailto:toddandma...@zoho.com>>; Brad Gilbert <mailto:b2gi...@gmail.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. Invocant is used instead of caller because the
latter refers to the scope."

https://docs.raku.org/language/glossary#Invocant

At first blush, the definition at
https://docs.raku.org/language/glossary#Invocant contradicts the
definition given to us by Brad. English speaker will typically use the
following word pairs to denote 1. an actor and 2. a recipient of some
action. So we have the following:

Payer vs. Payee
Lessor vs. Les

Re: lines :$nl-in question

2020-08-31 Thread Stuckwisch, Matthew
So I guess I got included on this as the resident language professor :-) 
(although I probably should subscribe to p6 users at some point)  I didn't see 
the whole thread in the e-mail I got copied in on, so apologizes if I repeat 
much.

I'll spare everyone all the linguistic details, but suffice it to say, invocant 
and invoker are functionally equivalent.  The former is a nominalized 
adjective, and the latter a noun proper.  They mean "the one that invokes 
(calls)".   We can use either, but I'd recommend we be very consistent.  
Invocant seems to be the preferred, so let's use it exclusively.  On the other 
side, we have invoked and invokee, which in English share a similar distinction 
(although nominalizing the former often sounds odd, and adjectifying the latter 
would probably be read as missing a genitive 's).

Summed up, we should avoid using invocant to refer to a method that's being 
called.  Generally, just calling it a "method" is sufficient, but if need be, 
I'd go with "the invoked method".  We probably can write documentation to avoid 
the formalisms altogether, though, by saying something to the effect of

> Opens the file [represented by the [calling] object] and returns its lines.

That's fairly simple and clear.  In an article about signatures, however, I 
think using the term is absolutely appropriate, and warrants defining it 
parenthetically inline as "the object that calls/invokes the associated 
method".  I get that using the word "call" muddies the water (the formal 
distinction that tchrist was getting at is that a sub has no invocant except 
perhaps a calling context, ie the "caller" — which a method also has), but we 
already did that by having methods use CALL-ME instead of INVOKE-ME :-) *

MSS


* Of course, the reason was to harmonize calls of all code, and the fluid 
nature of allowing transitive methods be used as subs and viceversa (method 
$invocant: @args and $invocant.) means that one term had to rule them all.


From: William 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-us...@perl.org>>; 
ToddAndMargo mailto:toddandma...@zoho.com>>; Brad 
Gilbert mailto:b2gi...@gmail.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. Invocant is used instead of caller because the
latter refers to the scope."

https://docs.raku.org/language/glossary#Invocant

At first blush, the definition at
https://docs.raku.org/language/glossary#Invocant contradicts the
definition given to us by Brad. English speaker will typically use the
following word pairs to denote 1. an actor and 2. a recipient of some
action. So we have the following:

Payer vs. Payee
Lessor vs. Lessee
Employer vs. Employee

So going with the typical English usage above, the pattern would
continue with "Caller" vs "Callee" and "Invoker" vs
"Invokee/Invocant".  Therefore my humble reading of the definition
given by Brad, as well as a post authored by a certain TChrist on
StackExchange [1], suggests to me that "Invocant" is a synonym for
"Callee" (or the possibly-imaginary word "Invokee"). One can look at
the definition of "Invoker" online provided by Oracle with regards to
the Java programming language [2], to further distinguish "Invoker" vs
"Invocant".

HTH, Bill.

W. Michels, Ph.D.

[1] https://english.stackexchange.com/a/59070
[2] 
https://docs.oracle.com/javase/8/docs/api/index.html?javax/xml/ws/spi/Invoker.html


On Sun, Aug 30, 2020 at 9:54 AM yary 
mailto:not@gmail.com>> wrote:
>
> 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 
> mailto:perl6-us...@perl.org>> wrote:
>>
>> Inline:
>>
>> On Sun, Aug 30, 2020 at 12:49 AM Brad Gilbert 
>> mailto:b2gi...@gmail.com>> 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 the object that we are calling (aka invoking) a method on.
>>

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 <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-us...@perl.org>>; 
ToddAndMargo mailto:toddandma...@zoho.com>>; 
Brad Gilbert mailto:b2gi...@gmail.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. Invocant is used instead of caller because the
latter refers to the scope."

https://docs.raku.org/language/glossary#Invocant

At first blush, the definition at
https://docs.raku.org/language/glossary#Invocant contradicts the
definition given to us by Brad. English speaker will typically use the
following word pairs to denote 1. an actor and 2. a recipient of some
action. So we have the following:

Payer vs. Payee
Lessor vs. Lessee
Employer vs. Employee

So going with the typical English usage above, the pattern would
continue with "Caller" vs "Callee" and "Invoker" vs
"Invokee/Invocant".  Therefore my humble reading of the definition
given by Brad, as well as a post authored by a certain TChrist on
StackExchange [1], suggests to me that "Invocant" is a synonym for
"Callee" (or the possibly-imaginary word "Invokee"). One can look at
the definition of "Invoker" online provided by Oracle with regards to
the Java programming language [2], to further distinguish "Invoker" vs
"Invocant".

HTH, Bill.

W. Michels, Ph.D.

[1] https://english.stackexchange.com/a/59070
[2] 
https://docs.oracle.com/javase/8/docs/api/index.html?javax/xml/ws/spi/Invoker.html



On Sun, Aug 30, 2020 at 9:54 AM yary <mailto:not@gmail.com>> wrote:


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 mailto:perl6-us...@perl.org>> wrote:


Inline:

On Sun, Aug 30, 2020 at 12:49 AM Brad Gilbert mailto:b2gi...@gmail.com>> 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 the object that we are calling (aka invoking) a method on.

Maybe we can meet Todd halfway?

>
> On Sat, Aug 29, 2020 at 6:39 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote:
>>
>> 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 --> Seq:D)
>> >>
>> >> Opens the invocant and returns its lines.


"Opens the invocant (i.e. the object being called) and returns its lines."

[Add text in parentheses above only once per method, when the word
'invocant' is first used].

Comments?

Best Regards, Bill.



On 2020-08-30 14:08, Stuckwisch, Matthew wrote:
So I guess I got included on this as the resident language professor :-) 
(although I probably should subscribe to p6 users at some point) I 
didn't see the whole thread in the e-mail I got copied in on, so 
apologizes if I repeat much.


I'll spare everyone all the linguistic details, but suffice it to say, 
invocant and invoker are functionally equivalent.  The former is a 
nominalized adjective, and the latter a noun proper.  They mean "the one 
that invokes (calls)".   We can use either, but I'd recommend we be very 
consistent.  Invocant seems to be the preferred, so let's use it 
exclusively. On the other side, we have invoked and invokee, which in 
English share a similar distinction (although nominalizing the former 
often sounds odd, and adjectifying the latter would probably be read as 
missing a genitive 's).


Summed up, we should avoid using invocant to refer to a method that's 
being called.  Generally, just calling it a "method" is sufficient, but 
if need be, I'd go with "the invoked method".  We probably can write 
documentation to avoid the formalisms altogether, though, by saying 
something to the effect of


 > Opens the file [represented by the [calling] object] and returns its 
lines.


That's fairly simple and clear.  In an article about signatures, 
howe

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 because the
> latter refers to the scope."


I have a quibble there. 1st & 2nd sentences disagree slightly by going from
active to passive voice. "Caller, the one who calls" vs "object on which
that method is being called"

Suggestion for 2nd sentence "The invocant of a method would be the object
calling the method" ... if that is correct!

On Sun, Aug 30, 2020 at 2:08 PM Stuckwisch, Matthew <
matthew-stuckwi...@utc.edu> wrote:

> So I guess I got included on this as the resident language professor :-)
> (although I probably should subscribe to p6 users at some point)  I
> didn't see the whole thread in the e-mail I got copied in on, so apologizes
> if I repeat much.
>
> I'll spare everyone all the linguistic details, but suffice it to say,
> invocant and invoker are functionally equivalent.  The former is a
> nominalized adjective, and the latter a noun proper.  They mean "the one
> that invokes (calls)".   We can use either, but I'd recommend we be very
> consistent.  Invocant seems to be the preferred, so let's use it
> exclusively.  On the other side, we have invoked and invokee, which in
> English share a similar distinction (although nominalizing the former often
> sounds odd, and adjectifying the latter would probably be read as missing a
> genitive 's).
>
> Summed up, we should avoid using invocant to refer to a method that's
> being called.  Generally, just calling it a "method" is sufficient, but if
> need be, I'd go with "the invoked method".  We probably can write
> documentation to avoid the formalisms altogether, though, by saying
> something to the effect of
>
> > Opens the file [represented by the [calling] object] and returns its
> lines.
>
> That's fairly simple and clear.  In an article about signatures, however,
> I think using the term is absolutely appropriate, and warrants defining it
> parenthetically inline as "the object that calls/invokes the associated
> method".  I get that using the word "call" muddies the water (the formal
> distinction that tchrist was getting at is that a sub has no invocant
> except perhaps a calling context, ie the "caller" — which a method also
> has), but we already did that by having methods use CALL-ME instead of
> INVOKE-ME :-) *
>
> MSS
>
>
> * Of course, the reason was to harmonize calls of all code, and the fluid
> nature of allowing transitive methods be used as subs and viceversa (method
> $invocant: @args and $invocant.) means that one 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
>
> 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 scope."
>
> https://docs.raku.org/language/glossary#Invocant
>
> At first blush, the definition at
> https://docs.raku.org/language/glossary#Invocant contradicts the
> definition given to us by Brad. English speaker will typically use the
> following word pairs to denote 1. an actor and 2. a recipient of some
> action. So we have the following:
>
> Payer vs. Payee
> Lessor vs. Lessee
> Employer vs. Employee
>
> So going with the typical English usage above, the pattern would
> continue with "Caller" vs "Callee" and "Invoker" vs
> "Invokee/Invocant".  Therefore my humble reading of the definition
> given by Brad, as well as a post authored by a certain TChrist on
> StackExchange [1], suggests to me that "Invocant" is a synonym for
> "Callee" (or the possibly-imaginary word "Invokee"). One can look at
> the definition of "Invoker" online provided by Oracle with regards to
> the Java programming language [2], to further distinguish "Invoker" vs
> "Invocant".
>
> HTH, Bill.
>
> W. Michels, Ph.D.
>
> [1] https://english.stackexchange.com/a/59070
> [2]
> https://docs.oracle.com/javase/8/docs/api/index.html?javax/xml/ws/spi/Invoker.html
>

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 scope."

https://docs.raku.org/language/glossary#Invocant

At first blush, the definition at
https://docs.raku.org/language/glossary#Invocant contradicts the
definition given to us by Brad. English speaker will typically use the
following word pairs to denote 1. an actor and 2. a recipient of some
action. So we have the following:

Payer vs. Payee
Lessor vs. Lessee
Employer vs. Employee

So going with the typical English usage above, the pattern would
continue with "Caller" vs "Callee" and "Invoker" vs
"Invokee/Invocant".  Therefore my humble reading of the definition
given by Brad, as well as a post authored by a certain TChrist on
StackExchange [1], suggests to me that "Invocant" is a synonym for
"Callee" (or the possibly-imaginary word "Invokee"). One can look at
the definition of "Invoker" online provided by Oracle with regards to
the Java programming language [2], to further distinguish "Invoker" vs
"Invocant".

HTH, Bill.

W. Michels, Ph.D.

[1] https://english.stackexchange.com/a/59070
[2] 
https://docs.oracle.com/javase/8/docs/api/index.html?javax/xml/ws/spi/Invoker.html


On Sun, Aug 30, 2020 at 9:54 AM yary  wrote:
>
> 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 
>  wrote:
>>
>> 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 it is used in the Raku 
>> > docs.
>> >
>> > It is the object that we are calling (aka invoking) a method on.
>>
>> Maybe we can meet Todd halfway?
>>
>> >
>> > On Sat, Aug 29, 2020 at 6:39 PM ToddAndMargo via perl6-users 
>> >  wrote:
>> >>
>> >> 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 --> Seq:D)
>> >> >>
>> >> >> Opens the invocant and returns its lines.
>>
>>
>> "Opens the invocant (i.e. the object being called) and returns its lines."
>>
>> [Add text in parentheses above only once per method, when the word
>> 'invocant' is first used].
>>
>> Comments?
>>
>> Best Regards, Bill.


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  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 the object that we are calling (aka invoking) a method on.
>
> Maybe we can meet Todd halfway?
>
> >
> > On Sat, Aug 29, 2020 at 6:39 PM ToddAndMargo via perl6-users <
> perl6-us...@perl.org> wrote:
> >>
> >> 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 --> Seq:D)
> >> >>
> >> >> Opens the invocant and returns its lines.
>
>
> "Opens the invocant (i.e. the object being called) and returns its lines."
>
> [Add text in parentheses above only once per method, when the word
> 'invocant' is first used].
>
> Comments?
>
> Best Regards, Bill.
>


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 it is used in the Raku 
> docs.
>
> It is the object that we are calling (aka invoking) a method on.

Maybe we can meet Todd halfway?

>
> On Sat, Aug 29, 2020 at 6:39 PM ToddAndMargo via perl6-users 
>  wrote:
>>
>> 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 --> Seq:D)
>> >>
>> >> Opens the invocant and returns its lines.


"Opens the invocant (i.e. the object being called) and returns its lines."

[Add text in parentheses above only once per method, when the word
'invocant' is first used].

Comments?

Best Regards, Bill.


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
https://docs.raku.org/language/glossary#index-entry-Colon_Pair

which also says that putting a bunch of those together creates a "colon
list"

It also has a link to Adverb https://docs.raku.org/language/glossary#Adverb

which shows how colon pairs can be used to set named arguments–when used
that way, a colon pair is also called an "adverbial pair."

-y


On Sun, Aug 30, 2020 at 2:50 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
>
> >> 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 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 the same base name $foo
> >
> > :$foo also does the same thing as an argument
> >
> >  my $foo = 1;
> >
> >  bar( :$foo )
> >  bar( :foo($foo) )
> >  bar( foo => $foo )
> >
> > Note that forms with : can be outside of the signature
> >
> >  bar( ) :$foo
> >  bar( ) :foo($foo)
>
>
> Follow up questions:
>
> 1) what is the exact name used to describe these critters?
>
> 2) is there a manual page on them?


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 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 the same base name $foo


:$foo also does the same thing as an argument

     my $foo = 1;

     bar( :$foo )
     bar( :foo($foo) )
     bar( foo => $foo )

Note that forms with : can be outside of the signature

     bar( ) :$foo
     bar( ) :foo($foo)



Follow up questions:

1) what is the exact name used to describe these critters?

2) is there a manual page on them?


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 "invocant" is not even in the dictionary


Not true, Todd. Took me 5 seconds to find:

https://www.merriam-webster.com/dictionary/invocant


Definition of /invocant/



Here is where I looked:

https://duckduckgo.com/?q=defination+invocant=ffab=definition

I did not scroll down far enough to the merrian webster
hit.  Folks kept thinking I misspelled "innocent"

https://www.merriam-webster.com/dictionary/invocant
 History and Etymology for invocant
 Latin invocant-, invocans, present participle of
 invocare to invoke

Which was right in line with what Brad said.

:-)

-T


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 the object that we are calling (aka invoking) a method on.


Great explanation. It is in the Latin dictionary.
Thank you!


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


Not true, Todd. Took me 5 seconds to find:

https://www.merriam-webster.com/dictionary/invocant


   Definition of /invocant/

*: *one that invokes


(esoteric or requiring special knowledge)?


And whilst we there:


   Definition of /funny/

 (Entry 1 of 2)

1a *: *affording light mirth and laughter *: *amusing 
 His account of the 
war came in bits and pieces, sometimes bloody, sometimes funny.— Robert 
Penn Warren
b *: *seeking or intended to amuse *: *facetious 
 Don't take him so 
seriously; he was just being funny.
2 *: *differing from the ordinary in a suspicious, perplexing, quaint, 
or eccentric way *: *peculiar 
 My car has been 
making a funny noise. —often used as a sentence modifierFunny, things 
didn't turn out the way we planned.
3 *: *involving trickery or deception told his prisoner not to try 
anything funny


Which is not the same as 'esoteric'

So operators are a 'funny' sort of function, is an apt use of the word 
'funny'. But "operators are an 'esoteric' sort of function" does not work.


 “Anyone who can only think of one way to spell a
 word obviously lacks imagination.”
    -- Mark Twain

I do have to look at it twice when I see it, but I do figure
it out.  So is okay with me.


which returns
 an IO::Handle,




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 method on.

On Sat, Aug 29, 2020 at 6:39 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> 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 --> Seq:D)
> >>
> >> Opens the invocant and returns its lines.
> >>
> >> The behavior is equivalent to opening the file specified
> >> by the invocant, forwarding the :$chomp, :$enc,
> >> and :$nl-in arguments to IO::Handle.open, then calling
> >> IO::Handle.lines on that handle, forwarding any of the
> >> remaining arguments to that method, and returning the
> >> resultant Seq.
> >>
> >> And if I am not pushing it, what is `|c`?
> >>
> >> [...]
> >> I do not understand
> >
> > The description of this method says that it shall do two things:
> >
> >- open the invocant path (IIRC you like to use the phrase
> >  "what is fed into it" instead of "invocant")
>
> What ???  Okay, you know me.
>
> You do realize "invocant" is not even in the dictionary
> (esoteric or requiring special knowledge)?
>
>   “Anyone who can only think of one way to spell a
>   word obviously lacks imagination.”
>  -- Mark Twain
>
> I do have to look at it twice when I see it, but I do figure
> it out.  So is okay with me.
>
> > which returns
> >  an IO::Handle,
> >
> >- then call the lines method on this IO::Handle, resulting
> >  in a sequence of lines (Seq in Raku), and it should return
> >  this same Seq value.
> >
> > The lines method on an IO::Path does the same as the lines method on an
> > IO::Handle, except that it has to open the path before to get a handle.
> >
> > The arguments to the IO::Path.lines method therefore split into two
> groups:
> >
> >- :$chomp, :$enc, :$nl-in which are passed on to the open call
> >  in the first bullet point above,
> >
> >- all the remaining arguments, whatever they are, are *captured*
> >  by the syntax |c and will be forwarded to the IO::Handle.lines
> >  call in the second bullet point above.
> >
> > The |c is a so-called capture parameter [1]. It is used in a signature
> > (what you stubbornly call "cryptogram") when a method wants to inspect
> > some (or none) of the arguments it got but keep all the others in a
> > black box, named c here. The capture black box allows forwarding these
> > extra arguments to some other call. The point is that the IO::Path.lines
> > method does not need to know which arguments the target IO::Handle.lines
> > method accepts. It only needs to take everything in and pass it on.
> >
> > It follows that you read about the meaning of the individual arguments or
> > which arguments it makes sense to pass to IO::Path.lines in the
> documentation
> > pages for the IO::Handle.open and IO::Handle.lines methods, which are
> linked
> > to in the text. Really, everything that IO::Path.lines does is
> redistribute
> > its arguments to two other method calls.
> >
> > The documentation of lines does not tell you that |c is a capture
> parameter,
> > but it described what it is used for with the slide-in
> >
> >[...] forwarding any of the remaining arguments to that method [...]
> >
> > in the paragraph you quoted. The connection of that slide-in with the
> > "|c thing" is a matter of text comprehension.
> >
> > Best,
> > Tobias
> >
> > [1] https://docs.raku.org/type/Signature#Capture_parameters
> >
>
> Hi Tobias,
>
> That was a wonderful explanation.  I am writing it down!
> Thank you!
>
> -T
>
> I will probably forget the term "Signature" several more
> times.  :'(
>


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 the same base name $foo

:$foo also does the same thing as an argument

my $foo = 1;

bar( :$foo )
bar( :foo($foo) )
bar( foo => $foo )

Note that forms with : can be outside of the signature

bar( ) :$foo
bar( ) :foo($foo)

On Sat, Aug 29, 2020 at 9:05 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> 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 of the syntax used
> > by :$chomp, :$enc, and :$nl-in?
> >
> > Many thanks,
> > -T
>
> And if you would not mind, what is the official name
> of variables that begin with ":"
>


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 of the syntax used
by :$chomp, :$enc, and :$nl-in?

Many thanks,
-T


And if you would not mind, what is the official name
of variables that begin with ":"


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 thanks,
-T


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 --> Seq:D)

Opens the invocant and returns its lines.

The behavior is equivalent to opening the file specified
by the invocant, forwarding the :$chomp, :$enc,
and :$nl-in arguments to IO::Handle.open, then calling
IO::Handle.lines on that handle, forwarding any of the
remaining arguments to that method, and returning the
resultant Seq.

And if I am not pushing it, what is `|c`?

[...]
I do not understand


The description of this method says that it shall do two things:

   - open the invocant path (IIRC you like to use the phrase
 "what is fed into it" instead of "invocant") 


What ???  Okay, you know me.

You do realize "invocant" is not even in the dictionary
(esoteric or requiring special knowledge)?

 “Anyone who can only think of one way to spell a
 word obviously lacks imagination.”
-- Mark Twain

I do have to look at it twice when I see it, but I do figure
it out.  So is okay with me.


which returns
 an IO::Handle,

   - then call the lines method on this IO::Handle, resulting
 in a sequence of lines (Seq in Raku), and it should return
 this same Seq value.

The lines method on an IO::Path does the same as the lines method on an
IO::Handle, except that it has to open the path before to get a handle.

The arguments to the IO::Path.lines method therefore split into two groups:

   - :$chomp, :$enc, :$nl-in which are passed on to the open call
 in the first bullet point above,

   - all the remaining arguments, whatever they are, are *captured*
 by the syntax |c and will be forwarded to the IO::Handle.lines
 call in the second bullet point above.

The |c is a so-called capture parameter [1]. It is used in a signature
(what you stubbornly call "cryptogram") when a method wants to inspect
some (or none) of the arguments it got but keep all the others in a
black box, named c here. The capture black box allows forwarding these
extra arguments to some other call. The point is that the IO::Path.lines
method does not need to know which arguments the target IO::Handle.lines
method accepts. It only needs to take everything in and pass it on.

It follows that you read about the meaning of the individual arguments or
which arguments it makes sense to pass to IO::Path.lines in the documentation
pages for the IO::Handle.open and IO::Handle.lines methods, which are linked
to in the text. Really, everything that IO::Path.lines does is redistribute
its arguments to two other method calls.

The documentation of lines does not tell you that |c is a capture parameter,
but it described what it is used for with the slide-in

   [...] forwarding any of the remaining arguments to that method [...]

in the paragraph you quoted. The connection of that slide-in with the
"|c thing" is a matter of text comprehension.

Best,
Tobias

[1] https://docs.raku.org/type/Signature#Capture_parameters



Hi Tobias,

That was a wonderful explanation.  I am writing it down!
Thank you!

-T

I will probably forget the term "Signature" several more
times.  :'(


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 invocant and returns its lines.
> 
>The behavior is equivalent to opening the file specified
>by the invocant, forwarding the :$chomp, :$enc,
>and :$nl-in arguments to IO::Handle.open, then calling
>IO::Handle.lines on that handle, forwarding any of the
>remaining arguments to that method, and returning the
>resultant Seq.
> 
> And if I am not pushing it, what is `|c`?
> 
> [...]
> I do not understand

The description of this method says that it shall do two things:

  - open the invocant path (IIRC you like to use the phrase
"what is fed into it" instead of "invocant") which returns
an IO::Handle,

  - then call the lines method on this IO::Handle, resulting
in a sequence of lines (Seq in Raku), and it should return
this same Seq value.

The lines method on an IO::Path does the same as the lines method on an
IO::Handle, except that it has to open the path before to get a handle.

The arguments to the IO::Path.lines method therefore split into two groups:

  - :$chomp, :$enc, :$nl-in which are passed on to the open call
in the first bullet point above,

  - all the remaining arguments, whatever they are, are *captured*
by the syntax |c and will be forwarded to the IO::Handle.lines
call in the second bullet point above.

The |c is a so-called capture parameter [1]. It is used in a signature
(what you stubbornly call "cryptogram") when a method wants to inspect
some (or none) of the arguments it got but keep all the others in a
black box, named c here. The capture black box allows forwarding these
extra arguments to some other call. The point is that the IO::Path.lines
method does not need to know which arguments the target IO::Handle.lines
method accepts. It only needs to take everything in and pass it on.

It follows that you read about the meaning of the individual arguments or
which arguments it makes sense to pass to IO::Path.lines in the documentation
pages for the IO::Handle.open and IO::Handle.lines methods, which are linked
to in the text. Really, everything that IO::Path.lines does is redistribute
its arguments to two other method calls.

The documentation of lines does not tell you that |c is a capture parameter,
but it described what it is used for with the slide-in

  [...] forwarding any of the remaining arguments to that method [...]

in the paragraph you quoted. The connection of that slide-in with the
"|c thing" is a matter of text comprehension.

Best,
Tobias

[1] https://docs.raku.org/type/Signature#Capture_parameters

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


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 t's up?
)

|c slurps the remaining arguments into c and passese those arguments to the
lines method of IO::Handle.

On Fri, Aug 28, 2020 at 9:18 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> 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 equivalent to opening the file specified
> by the invocant, forwarding the :$chomp, :$enc,
> and :$nl-in arguments to IO::Handle.open, then calling
> IO::Handle.lines on that handle, forwarding any of the
> remaining arguments to that method, and returning the
> resultant Seq.
>
> What exactly is and how exactly do you use `:$nl-in`
>
> And if I am not pushing it, what is `|c`?
>
> I am confused,
> -T
>


-- 
__

:(){ :|:& };:


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 equivalent to opening the file specified
   by the invocant, forwarding the :$chomp, :$enc,
   and :$nl-in arguments to IO::Handle.open, then calling
   IO::Handle.lines on that handle, forwarding any of the
   remaining arguments to that method, and returning the
   resultant Seq.

What exactly is and how exactly do you use `:$nl-in`

And if I am not pushing it, what is `|c`?

I am confused,
-T