Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 6:28 PM, Larry Wall wrote:

On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote:
: On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:
: > > I am NOT asking it to limit my request to Infinity.
: >
: >Yes you are, implicitly. If you don't pass any parameter for
: >$limit, $limit will take the default value supplied by the
: >signature, i.e. Inf.
:
: True, but that is not what the manual says Inf is.  Lower in this
: thread I made a suggest addition to the wording of Inf.  Would
: you mind looking at it and offering your criticism?

Why do you want to burden the definition of what something *is* with
all the things you can *do* with it?  The former is tractable, while
the latter is not.

It seems to me that you are applying a different standard to human and
computer languages here.  In both human and computer languages, what
something *is* has little to do with what something *does*.  These are
different abstraction levels.  You're fine with this in English, so
trying to flatten out all the abstraction levels is tending to work
against your understanding of computer languages here, I suspect.

The word "knife" is a noun, but if I "knife" someone, I'm using a noun
(what the word is) as a verb (what the word can do).  Human language is
full of these borrowings of abstraction level, so much so that linguists
even have a name for them in general, the "emic vs etic" distinction.
In non-linguistic terms, "what you said vs what you really meant".
What it is, vs what it does.

Originally these were coined on the phonetic vs phonemic level, so we
see lots of places in English where the phonetics don't match up with
how they are used:

 The prince made some prints.

Here you pronounce those words identically on a phonetic level, but on
a higher phonemic level (or even on a morphophonemic level), "prince" is
only one morpheme, while "prints" is two morphemes "print" and the plural
"s".  But this etic/emic distinction works at higher levels as well:

 Here's a you-can-even-use-a-sentence-as-an-adjective example.

Here the etic description of "you-can-even-use-a-sentence-as-an-adjective"
is that of a sentence.  That's what it *is*.  But language is flexible
enough that I can choose (emically) to slot the whole sentence in as
a adjective.  That's what the sentence can *do*.  (Or that's what you
can do with a sentence, if you prefer.)  The fact that you can do this
takes nothing away from what a sentence *is*, because that's at a lower
abstraction level.

Going up the linguistic stack even further, every time you read a metaphor
in a poem (or in a newspaper article for that matter), you are using
your knowledge of English to realize that the poet (or reporter) is
relying on you, the Gentle Reader, to realize that the writer is
using a metaphor.  A metaphor is when you say one thing but mean
something else by it.  The words of a metaphor are what it "is", but
the meaning it produces in your brain is what it "does".

The fact that the $limit is using a particular value with a particular
representation in memory ("what the manual says Inf is") has almost
nothing to do with how we choose to use it metaphorically in an interface,
except insofar as it's extremely convenient to have a floating-point value
that happens to compare as larger than any integer you want to name.
That comparison is a thing that Inf can *do*, which is the abstraction level on
which the $limit API is working.  The fact that it can be used this way
is not at all contradictory to the description of what the Inf value *is*.

But the description of what it can do really belongs on the many places
where it can be used in various metaphorical ways, not in the definition
of what it is.  The floating-point Inf value really has no clue whatsoever
about all the ways it might be used.  It probably doesn't even realize
it can be compared with an integer.  :)

Larry




Hi Larry,

I really enjoyed the read.  Thank you!

Now in my personal life, I am really guilty of telling
bad jokes:

Two guys walked into a bar.
A third guy ducked.

This goes to your beautifully written example of the
writer expecting the reader to realize he is using a
metaphor.  It is up to the "victim" of my bad joke to
realize that "bar" has two meanings: a place
where alcoholic beverages are sold and a metal rod.

In programming and in other things mathematical, you
expect definitions to be literal.  You do not expect
metaphors.  The "literal" definition of Infinity is
what made me realize what was happening.  I will
explain more in a follow paragraphs.

Now I do adore the "words" method and use it frequently.
When I went to the manual to see if there was any other way
to use it, I was astonished at how they got from point A
to point B.  This is because I took the definition of Inf
in the manual literally.

Now look up the definition of Infinity, which is to
be taken literally

   https://en.wikipedia.org/wiki/Infinity
  Infinity (symbol: ∞) is 

RE: Could this be any more obscure?

2018-09-28 Thread Mark Devine
I guess I’m extra impressed with esoteric linguistic references.  Your replies 
were concise and I understood them pretty quickly.

Mark


From: Brandon Allbery 
Sent: Friday, September 28, 2018 21:51
To: Mark Devine 
Cc: la...@wall.org; ToddAndMargo ; perl6-users 

Subject: Re: Could this be any more obscure?

I'm not sure it's any better than my attempt; it has that "people's eyes will 
glaze over" feel to it.

On Fri, Sep 28, 2018 at 9:50 PM Mark Devine 
mailto:m...@markdevine.com>> wrote:
Kudos to the Benevolent Dictator!

I'll have to loop over this a few times, but it's a blast...

Mark

-Original Message-
From: Larry Wall mailto:la...@wall.org>>
Sent: Friday, September 28, 2018 21:28
To: ToddAndMargo mailto:toddandma...@zoho.com>>
Cc: perl6-users@perl.org
Subject: Re: Could this be any more obscure?

On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote:
: On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:
: > > I am NOT asking it to limit my request to Infinity.
: >
: >Yes you are, implicitly. If you don't pass any parameter for
: >$limit, $limit will take the default value supplied by the
: >signature, i.e. Inf.
:
: True, but that is not what the manual says Inf is.  Lower in this
: thread I made a suggest addition to the wording of Inf.  Would
: you mind looking at it and offering your criticism?

Why do you want to burden the definition of what something *is* with all the 
things you can *do* with it?  The former is tractable, while the latter is not.

It seems to me that you are applying a different standard to human and computer 
languages here.  In both human and computer languages, what something *is* has 
little to do with what something *does*.  These are different abstraction 
levels.  You're fine with this in English, so trying to flatten out all the 
abstraction levels is tending to work against your understanding of computer 
languages here, I suspect.

The word "knife" is a noun, but if I "knife" someone, I'm using a noun (what 
the word is) as a verb (what the word can do).  Human language is full of these 
borrowings of abstraction level, so much so that linguists even have a name for 
them in general, the "emic vs etic" distinction.
In non-linguistic terms, "what you said vs what you really meant".
What it is, vs what it does.

Originally these were coined on the phonetic vs phonemic level, so we see lots 
of places in English where the phonetics don't match up with how they are used:

The prince made some prints.

Here you pronounce those words identically on a phonetic level, but on a higher 
phonemic level (or even on a morphophonemic level), "prince" is only one 
morpheme, while "prints" is two morphemes "print" and the plural "s".  But this 
etic/emic distinction works at higher levels as well:

Here's a you-can-even-use-a-sentence-as-an-adjective example.

Here the etic description of "you-can-even-use-a-sentence-as-an-adjective"
is that of a sentence.  That's what it *is*.  But language is flexible enough 
that I can choose (emically) to slot the whole sentence in as a adjective.  
That's what the sentence can *do*.  (Or that's what you can do with a sentence, 
if you prefer.)  The fact that you can do this takes nothing away from what a 
sentence *is*, because that's at a lower abstraction level.

Going up the linguistic stack even further, every time you read a metaphor in a 
poem (or in a newspaper article for that matter), you are using your knowledge 
of English to realize that the poet (or reporter) is relying on you, the Gentle 
Reader, to realize that the writer is using a metaphor.  A metaphor is when you 
say one thing but mean something else by it.  The words of a metaphor are what 
it "is", but the meaning it produces in your brain is what it "does".

The fact that the $limit is using a particular value with a particular 
representation in memory ("what the manual says Inf is") has almost nothing to 
do with how we choose to use it metaphorically in an interface, except insofar 
as it's extremely convenient to have a floating-point value that happens to 
compare as larger than any integer you want to name.
That comparison is a thing that Inf can *do*, which is the abstraction level on 
which the $limit API is working.  The fact that it can be used this way is not 
at all contradictory to the description of what the Inf value *is*.

But the description of what it can do really belongs on the many places where 
it can be used in various metaphorical ways, not in the definition of what it 
is.  The floating-point Inf value really has no clue whatsoever about all the 
ways it might be used.  It probably doesn't even realize it can be compared 
with an integer.  :)

Larry


--
brandon s allbery kf8nh
allber...@gmail.com


Re: Could this be any more obscure?

2018-09-28 Thread Brandon Allbery
I'm not sure it's any better than my attempt; it has that "people's eyes
will glaze over" feel to it.

On Fri, Sep 28, 2018 at 9:50 PM Mark Devine  wrote:

> Kudos to the Benevolent Dictator!
>
> I'll have to loop over this a few times, but it's a blast...
>
> Mark
>
> -Original Message-
> From: Larry Wall 
> Sent: Friday, September 28, 2018 21:28
> To: ToddAndMargo 
> Cc: perl6-users@perl.org
> Subject: Re: Could this be any more obscure?
>
> On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote:
> : On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:
> : > > I am NOT asking it to limit my request to Infinity.
> : >
> : >Yes you are, implicitly. If you don't pass any parameter for
> : >$limit, $limit will take the default value supplied by the
> : >signature, i.e. Inf.
> :
> : True, but that is not what the manual says Inf is.  Lower in this
> : thread I made a suggest addition to the wording of Inf.  Would
> : you mind looking at it and offering your criticism?
>
> Why do you want to burden the definition of what something *is* with all
> the things you can *do* with it?  The former is tractable, while the latter
> is not.
>
> It seems to me that you are applying a different standard to human and
> computer languages here.  In both human and computer languages, what
> something *is* has little to do with what something *does*.  These are
> different abstraction levels.  You're fine with this in English, so trying
> to flatten out all the abstraction levels is tending to work against your
> understanding of computer languages here, I suspect.
>
> The word "knife" is a noun, but if I "knife" someone, I'm using a noun
> (what the word is) as a verb (what the word can do).  Human language is
> full of these borrowings of abstraction level, so much so that linguists
> even have a name for them in general, the "emic vs etic" distinction.
> In non-linguistic terms, "what you said vs what you really meant".
> What it is, vs what it does.
>
> Originally these were coined on the phonetic vs phonemic level, so we see
> lots of places in English where the phonetics don't match up with how they
> are used:
>
> The prince made some prints.
>
> Here you pronounce those words identically on a phonetic level, but on a
> higher phonemic level (or even on a morphophonemic level), "prince" is only
> one morpheme, while "prints" is two morphemes "print" and the plural "s".
> But this etic/emic distinction works at higher levels as well:
>
> Here's a you-can-even-use-a-sentence-as-an-adjective example.
>
> Here the etic description of "you-can-even-use-a-sentence-as-an-adjective"
> is that of a sentence.  That's what it *is*.  But language is flexible
> enough that I can choose (emically) to slot the whole sentence in as a
> adjective.  That's what the sentence can *do*.  (Or that's what you can do
> with a sentence, if you prefer.)  The fact that you can do this takes
> nothing away from what a sentence *is*, because that's at a lower
> abstraction level.
>
> Going up the linguistic stack even further, every time you read a metaphor
> in a poem (or in a newspaper article for that matter), you are using your
> knowledge of English to realize that the poet (or reporter) is relying on
> you, the Gentle Reader, to realize that the writer is using a metaphor.  A
> metaphor is when you say one thing but mean something else by it.  The
> words of a metaphor are what it "is", but the meaning it produces in your
> brain is what it "does".
>
> The fact that the $limit is using a particular value with a particular
> representation in memory ("what the manual says Inf is") has almost nothing
> to do with how we choose to use it metaphorically in an interface, except
> insofar as it's extremely convenient to have a floating-point value that
> happens to compare as larger than any integer you want to name.
> That comparison is a thing that Inf can *do*, which is the abstraction
> level on which the $limit API is working.  The fact that it can be used
> this way is not at all contradictory to the description of what the Inf
> value *is*.
>
> But the description of what it can do really belongs on the many places
> where it can be used in various metaphorical ways, not in the definition of
> what it is.  The floating-point Inf value really has no clue whatsoever
> about all the ways it might be used.  It probably doesn't even realize it
> can be compared with an integer.  :)
>
> Larry
>


-- 
brandon s allbery kf8nh
allber...@gmail.com


RE: Could this be any more obscure?

2018-09-28 Thread Mark Devine
Kudos to the Benevolent Dictator!

I'll have to loop over this a few times, but it's a blast...

Mark

-Original Message-
From: Larry Wall  
Sent: Friday, September 28, 2018 21:28
To: ToddAndMargo 
Cc: perl6-users@perl.org
Subject: Re: Could this be any more obscure?

On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote:
: On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:
: > > I am NOT asking it to limit my request to Infinity.
: >
: >Yes you are, implicitly. If you don't pass any parameter for
: >$limit, $limit will take the default value supplied by the
: >signature, i.e. Inf.
: 
: True, but that is not what the manual says Inf is.  Lower in this
: thread I made a suggest addition to the wording of Inf.  Would
: you mind looking at it and offering your criticism?

Why do you want to burden the definition of what something *is* with all the 
things you can *do* with it?  The former is tractable, while the latter is not.

It seems to me that you are applying a different standard to human and computer 
languages here.  In both human and computer languages, what something *is* has 
little to do with what something *does*.  These are different abstraction 
levels.  You're fine with this in English, so trying to flatten out all the 
abstraction levels is tending to work against your understanding of computer 
languages here, I suspect.

The word "knife" is a noun, but if I "knife" someone, I'm using a noun (what 
the word is) as a verb (what the word can do).  Human language is full of these 
borrowings of abstraction level, so much so that linguists even have a name for 
them in general, the "emic vs etic" distinction.
In non-linguistic terms, "what you said vs what you really meant".
What it is, vs what it does.

Originally these were coined on the phonetic vs phonemic level, so we see lots 
of places in English where the phonetics don't match up with how they are used:

The prince made some prints.

Here you pronounce those words identically on a phonetic level, but on a higher 
phonemic level (or even on a morphophonemic level), "prince" is only one 
morpheme, while "prints" is two morphemes "print" and the plural "s".  But this 
etic/emic distinction works at higher levels as well:

Here's a you-can-even-use-a-sentence-as-an-adjective example.

Here the etic description of "you-can-even-use-a-sentence-as-an-adjective"
is that of a sentence.  That's what it *is*.  But language is flexible enough 
that I can choose (emically) to slot the whole sentence in as a adjective.  
That's what the sentence can *do*.  (Or that's what you can do with a sentence, 
if you prefer.)  The fact that you can do this takes nothing away from what a 
sentence *is*, because that's at a lower abstraction level.

Going up the linguistic stack even further, every time you read a metaphor in a 
poem (or in a newspaper article for that matter), you are using your knowledge 
of English to realize that the poet (or reporter) is relying on you, the Gentle 
Reader, to realize that the writer is using a metaphor.  A metaphor is when you 
say one thing but mean something else by it.  The words of a metaphor are what 
it "is", but the meaning it produces in your brain is what it "does".

The fact that the $limit is using a particular value with a particular 
representation in memory ("what the manual says Inf is") has almost nothing to 
do with how we choose to use it metaphorically in an interface, except insofar 
as it's extremely convenient to have a floating-point value that happens to 
compare as larger than any integer you want to name.
That comparison is a thing that Inf can *do*, which is the abstraction level on 
which the $limit API is working.  The fact that it can be used this way is not 
at all contradictory to the description of what the Inf value *is*.

But the description of what it can do really belongs on the many places where 
it can be used in various metaphorical ways, not in the definition of what it 
is.  The floating-point Inf value really has no clue whatsoever about all the 
ways it might be used.  It probably doesn't even realize it can be compared 
with an integer.  :)

Larry


Re: Could this be any more obscure?

2018-09-28 Thread Larry Wall
On Fri, Sep 28, 2018 at 03:50:31PM -0700, ToddAndMargo wrote:
: On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:
: > > I am NOT asking it to limit my request to Infinity.
: >
: >Yes you are, implicitly. If you don't pass any parameter for
: >$limit, $limit will take the default value supplied by the
: >signature, i.e. Inf.
: 
: True, but that is not what the manual says Inf is.  Lower in this
: thread I made a suggest addition to the wording of Inf.  Would
: you mind looking at it and offering your criticism?

Why do you want to burden the definition of what something *is* with
all the things you can *do* with it?  The former is tractable, while
the latter is not.

It seems to me that you are applying a different standard to human and
computer languages here.  In both human and computer languages, what
something *is* has little to do with what something *does*.  These are
different abstraction levels.  You're fine with this in English, so
trying to flatten out all the abstraction levels is tending to work
against your understanding of computer languages here, I suspect.

The word "knife" is a noun, but if I "knife" someone, I'm using a noun
(what the word is) as a verb (what the word can do).  Human language is
full of these borrowings of abstraction level, so much so that linguists
even have a name for them in general, the "emic vs etic" distinction.
In non-linguistic terms, "what you said vs what you really meant".
What it is, vs what it does.

Originally these were coined on the phonetic vs phonemic level, so we
see lots of places in English where the phonetics don't match up with
how they are used:

The prince made some prints.

Here you pronounce those words identically on a phonetic level, but on
a higher phonemic level (or even on a morphophonemic level), "prince" is
only one morpheme, while "prints" is two morphemes "print" and the plural
"s".  But this etic/emic distinction works at higher levels as well:

Here's a you-can-even-use-a-sentence-as-an-adjective example.

Here the etic description of "you-can-even-use-a-sentence-as-an-adjective"
is that of a sentence.  That's what it *is*.  But language is flexible
enough that I can choose (emically) to slot the whole sentence in as
a adjective.  That's what the sentence can *do*.  (Or that's what you
can do with a sentence, if you prefer.)  The fact that you can do this
takes nothing away from what a sentence *is*, because that's at a lower
abstraction level.

Going up the linguistic stack even further, every time you read a metaphor
in a poem (or in a newspaper article for that matter), you are using
your knowledge of English to realize that the poet (or reporter) is
relying on you, the Gentle Reader, to realize that the writer is
using a metaphor.  A metaphor is when you say one thing but mean
something else by it.  The words of a metaphor are what it "is", but
the meaning it produces in your brain is what it "does".

The fact that the $limit is using a particular value with a particular
representation in memory ("what the manual says Inf is") has almost
nothing to do with how we choose to use it metaphorically in an interface,
except insofar as it's extremely convenient to have a floating-point value
that happens to compare as larger than any integer you want to name.
That comparison is a thing that Inf can *do*, which is the abstraction level on
which the $limit API is working.  The fact that it can be used this way
is not at all contradictory to the description of what the Inf value *is*.

But the description of what it can do really belongs on the many places
where it can be used in various metaphorical ways, not in the definition
of what it is.  The floating-point Inf value really has no clue whatsoever
about all the ways it might be used.  It probably doesn't even realize
it can be compared with an integer.  :)

Larry


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 4:36 PM, Curt Tilmes wrote:



On Fri, Sep 28, 2018 at 7:23 PM ToddAndMargo > wrote:


How about just:

       When used as an argument, the value Inf (Infinity)
       represents "without bound" or "no limit".

That would have certainly tipped me off


I think you are trying to tie its meaning as an argument to the value 
itself.  That isn't really how it works.

Inf is just the value higher than any other value.

Its interpretation as an argument is dependent on the routine it is an 
argument to.


For .words($limit), you could say that passing in Inf for a $llimit (the 
default) would keep making words with no limit.


In some other method,  it could have some other meaning.

I could say for my foo($x) function that passing in $x=Inf causes it to 
throw an Exception (or even  print out "yowza" or whatever.)  That's up 
to the way I want to use it for my function.


For a limit, it makes sense that if you count up to a value, that 
passing in Inf for that value would mean that you never reach it, since 
it the value is infinite.


Curt



H. More thinking required.

Thank you!


Re: Could this be any more obscure?

2018-09-28 Thread Curt Tilmes
On Fri, Sep 28, 2018 at 7:23 PM ToddAndMargo  wrote:

> How about just:
>
>   When used as an argument, the value Inf (Infinity)
>   represents "without bound" or "no limit".
>
> That would have certainly tipped me off
>

I think you are trying to tie its meaning as an argument to the value
itself.  That isn't really how it works.
Inf is just the value higher than any other value.

Its interpretation as an argument is dependent on the routine it is an
argument to.

For .words($limit), you could say that passing in Inf for a $llimit (the
default) would keep making words with no limit.

In some other method,  it could have some other meaning.

I could say for my foo($x) function that passing in $x=Inf causes it to
throw an Exception (or even  print out "yowza" or whatever.)  That's up to
the way I want to use it for my function.

For a limit, it makes sense that if you count up to a value, that passing
in Inf for that value would mean that you never reach it, since it the
value is infinite.

Curt


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 3:54 PM, Curt Tilmes wrote:

When used as an argument, the value Inf (Infinity)
         represents "without bound" or "no limit"


Thank you!

How about just:

 When used as an argument, the value Inf (Infinity)
 represents "without bound" or "no limit".

That would have certainly tipped me off

-T


Re: Could this be any more obscure?

2018-09-28 Thread Curt Tilmes
On Fri, Sep 28, 2018 at 6:49 PM ToddAndMargo  wrote:

> On 9/28/18 3:45 PM, ToddAndMargo wrote:
> >
> >   The value Inf (Infinity) represents "without bound" or
> >   "no limit" (meaning "all possible values") when used
> >   as an argument.
>
>
> Better written would be:
>
> When used as an argument, the value Inf (Infinity)
> represents "without bound" or "no limit", meaning
> "all possible values".
>

It doesn't really mean "all possible values".  It means a number that is
higher than any expressible number.

If you say 1000..Inf, it means numbers that start at 1000, and go up
forever, never ending.

It doesn't include things like 50, or 172, or 42, etc.  It certainly
doesn't mean "all possible values".

For words(Inf), it means you keep making words forever, but that isn't
because infinity is "all possible values", it is because you never reach
infinity.

Curt


Re: Could this be any more obscure?

2018-09-28 Thread Brandon Allbery
It only means that in some cases. Consider if you are writing code that
places items in a grid, and you support Inf as a grid coordinate meaning
"not on the grid" which might be represented differently or which might
place it at whatever edge of the grid is relevant (without forcing you to
know the size of the grid, so it's more useful in a general library).

There's no "think simple" that covers all the use cases. And "if it's not
think simple, then remove it" means you do extra work for no good reason
except to make the documentation happy.

On Fri, Sep 28, 2018 at 6:46 PM ToddAndMargo  wrote:

> On 9/28/18 10:37 AM, Brandon Allbery wrote:
> > We're going to have a problem if "infinity" is not allowed in the
> > presence of some programmers. "All values" can mean too many things in
> > too many situations. And I don't think using * works here, quite,
> > precisely because it can mean too many things.
>
> Agreed.
>
> I think the issue is with the wording of Inf:
>
> https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
>   The value Inf is an instance of Num and represents value that's
>   too large to represent in 64-bit double-precision floating
>   point number
>
> Looking at
> https://en.wikipedia.org/wiki/Infinity
> Infinity (symbol: ∞) is a concept describing something
> without any bound or larger than any natural number.
>
> "without any bound" is what Inf is being used for here.
> I see it as "larger than any natural number".  So I
> am probably the one at fault.
>
> When I read the manual, Perl Speak over rules common speak.
> So I was taking Inf's Perl defination literally.
>
> Proposed change for your criticism:
>
>   The value Inf (Infinity) represents "without bound" or
>   "no limit" (meaning "all possible values") when used
>   as an argument.
>
>   Inf when used as an instance of Num and represents a
>   value that's too large to represent in 64-bit double-precision
>   floating point number
>
> What do you think?
>
> -T
>


-- 
brandon s allbery kf8nh
allber...@gmail.com


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/27/18 12:40 AM, Laurent Rosenfeld via perl6-users wrote:

 > I am NOT asking it to limit my request to Infinity.

Yes you are, implicitly. If you don't pass any parameter for $limit, 
$limit will take the default value supplied by the signature, i.e. Inf.


True, but that is not what the manual says Inf is.  Lower in this
thread I made a suggest addition to the wording of Inf.  Would
you mind looking at it and offering your criticism?


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 3:45 PM, ToddAndMargo wrote:


  The value Inf (Infinity) represents "without bound" or
  "no limit" (meaning "all possible values") when used
  as an argument.



Better written would be:

   When used as an argument, the value Inf (Infinity)
   represents "without bound" or "no limit", meaning
   "all possible values".


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 10:37 AM, Brandon Allbery wrote:
We're going to have a problem if "infinity" is not allowed in the 
presence of some programmers. "All values" can mean too many things in 
too many situations. And I don't think using * works here, quite, 
precisely because it can mean too many things.


Agreed.

I think the issue is with the wording of Inf:

https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
 The value Inf is an instance of Num and represents value that's
 too large to represent in 64-bit double-precision floating
 point number

Looking at
https://en.wikipedia.org/wiki/Infinity
   Infinity (symbol: ∞) is a concept describing something
   without any bound or larger than any natural number.

"without any bound" is what Inf is being used for here.
I see it as "larger than any natural number".  So I
am probably the one at fault.

When I read the manual, Perl Speak over rules common speak.
So I was taking Inf's Perl defination literally.

Proposed change for your criticism:

 The value Inf (Infinity) represents "without bound" or
 "no limit" (meaning "all possible values") when used
 as an argument.

 Inf when used as an instance of Num and represents a
 value that's too large to represent in 64-bit double-precision
 floating point number

What do you think?

-T


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 12:34 PM, Curt Tilmes wrote:


On Fri, Sep 28, 2018 at 2:57 PM ToddAndMargo > wrote:


On 9/28/18 10:42 AM, Curt Tilmes wrote:
 > Indeed we do, we have a special value just for that -- Inf or ∞.

Inf or ∞ still means (to me) a number too large to represent.
But, I can't think of another way to say "all of them".


So if I was to ask you what limit I should use to make an iterator that 
created all of the numbers?


I could set the limit at 2:  1..2 and you would get 2 numbers.
I could set the limit at 1000: 1..1000 and you would get 1000 numbers.

If you wanted all the numbers, where would you stop?  What limit would 
you use?


We use ∞  :   Try this   .say for 1..∞
It will give you all the numbers starting with 1 that Perl is capable of 
making (it may take a while...)


Exactly the same for .words.

You can say .words(2) and you get at most 2 words, the limit is 2.
You can say .words(1000) and you get at most 1000 words, the limit is 1000.
(Note you can get less that 1000 -- it isn't saying how many words, it 
isn't a count.  It is a limit.  it is setting the limit it won't go past.)


If you don't want it to stop, you say .words(∞) or .words(Inf), or, 
since an infinite limit is the default, just .words() or .words.
and it won't stop no matter how many it has already given you until it 
reaches the end.


Curt




Hi Curt,

I absolutely understand.  I just don't like the wording of Inf
in this case.

https://en.wikipedia.org/wiki/Infinity
   Infinity (symbol: ∞) is a concept describing something
   without any bound or larger than any natural number.

"without any bound" is what it is being used for here.
I see it as "larger than any natural number".  So I
am probably the one at fault.

"Except" this is where I got Perl's definition of it:

https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
 The value Inf is an instance of Num and represents value that's
 too large to represent in 64-bit double-precision floating
 point number

So the manual is describing it as "larger than any natural
[Perl] number", not as "without any bound" .

Time for an RFE on
https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
to add "without any bound" to the verbiage.

Yes I am picking nits.

-T


Re: Could this be any more obscure?

2018-09-28 Thread Curt Tilmes
On Fri, Sep 28, 2018 at 2:57 PM ToddAndMargo  wrote:

> On 9/28/18 10:42 AM, Curt Tilmes wrote:
> > Indeed we do, we have a special value just for that -- Inf or ∞.
>
> Inf or ∞ still means (to me) a number too large to represent.
> But, I can't think of another way to say "all of them".
>

So if I was to ask you what limit I should use to make an iterator that
created all of the numbers?

I could set the limit at 2:  1..2 and you would get 2 numbers.
I could set the limit at 1000: 1..1000 and you would get 1000 numbers.

If you wanted all the numbers, where would you stop?  What limit would you
use?

We use ∞  :   Try this   .say for 1..∞
It will give you all the numbers starting with 1 that Perl is capable of
making (it may take a while...)

Exactly the same for .words.

You can say .words(2) and you get at most 2 words, the limit is 2.
You can say .words(1000) and you get at most 1000 words, the limit is 1000.
(Note you can get less that 1000 -- it isn't saying how many words, it
isn't a count.  It is a limit.  it is setting the limit it won't go past.)

If you don't want it to stop, you say .words(∞) or .words(Inf), or, since
an infinite limit is the default, just .words() or .words.
and it won't stop no matter how many it has already given you until it
reaches the end.

Curt


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/28/18 10:42 AM, Curt Tilmes wrote:

Indeed we do, we have a special value just for that -- Inf or ∞.


Inf or ∞ still means (to me) a number too large to represent.
But, I can't think of another way to say "all of them".


Re: Could this be any more obscure?

2018-09-28 Thread Curt Tilmes
On Fri, Sep 28, 2018 at 1:32 PM ToddAndMargo  wrote:

> So how am I suppose to enter that as a value?


You can enter it as just plain Inf, or, if you are up to it, my preferred
form:  ∞



> What it really means is "all of them".


It means infinite.

For the .words() method, you can pass in an optional $limit parameter.

If you pass in a 0, you don't get any words.  If you pass in a 2, you get 2
words,
if you pass in ∞, or Inf, or the limit is 'infinity'.  It doesn't stop
early.  Since that
is so often the case, it is the default, so if you don't say to limit the
words
before the end, you just get all of them.

"Inf" is just a poor way of stating "all words"
> as the default.  "A tremendously large numbers of words" is just
> a weird way of saying "all of them".
>

An infinite limit isn't "a very large number".  It is special.  You can
never
reach that limit, no matter how many words you parse.

And yes, I am blanking on how to best clean that up. We have no
> value (that I know of) for "all".'
>

Indeed we do, we have a special value just for that -- Inf or ∞.

Curt


Re: Could this be any more obscure?

2018-09-28 Thread Brandon Allbery
We're going to have a problem if "infinity" is not allowed in the presence
of some programmers. "All values" can mean too many things in too many
situations. And I don't think using * works here, quite, precisely because
it can mean too many things.

On Fri, Sep 28, 2018 at 1:32 PM ToddAndMargo  wrote:

> On 9/26/18 11:34 PM, JJ Merelo wrote:
> >
> >
> > El mié., 26 sept. 2018 a las 23:31, Laurent Rosenfeld via perl6-users
> > (mailto:perl6-users@perl.org>>) escribió:
> >
> > You can set a limit to the number of items (words) you want to
> > retrieve: you will get only the first $limit words.
> >
> > If you don't supply any limit, Inf can be thought as the default
> > value for the number of items, i.e. there is no limit and the
> > routine will return as many words as it can from the source input.
> >
> >
> > And this is one of the things I love Perl 6 for, its consistency.
> > Infinity is literally no limit. Using it meaning "no limit" is genius.
> > Not "0 in this case means no limit" or "-1 means no limit" or "this
> > constant meaning unavailable" or whatever. Infinity has no limit, we use
> > them as a parameter to imply that argument has no limit.
> >
> > Cheers
> >
> > JJ
>
>
> Hi JJ,
>
> The more I learn about Perl 6, the more I prefer it over Perl 5.
>
> To your list, I might add, everything starts counting from zero
> (Perl5 m/ starts at $1).  So no guessing!
>
> My problem with the default set to Inf is that Inf means a number
> too large for the numbers of bits allocated to the variable to
> handle.
>
> RTFM: https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
>   The value Inf is an instance of Num and represents value that's
>   too large to represent in 64-bit double-precision floating
>   point number (roughly, above 1.7976931348623158e308 for
>   positive Inf and below -1.7976931348623157e308 for negative Inf)
>   as well as returned from certain operations as defined by the
>   IEEE 754-2008 standard.
>
> So how am I suppose to enter that as a value?  What it really means
> is "all of them".  "Inf" is just a poor way of stating "all words"
> as the default.  "A tremendously large numbers of words" is just
> a weird way of saying "all of them".
>
> And yes, I am blanking on how to best clean that up. We have no
> value (that I know of) for "all".
>
> -T
>


-- 
brandon s allbery kf8nh
allber...@gmail.com


Re: Could this be any more obscure?

2018-09-28 Thread ToddAndMargo

On 9/26/18 11:34 PM, JJ Merelo wrote:



El mié., 26 sept. 2018 a las 23:31, Laurent Rosenfeld via perl6-users 
(mailto:perl6-users@perl.org>>) escribió:


You can set a limit to the number of items (words) you want to
retrieve: you will get only the first $limit words.

If you don't supply any limit, Inf can be thought as the default
value for the number of items, i.e. there is no limit and the
routine will return as many words as it can from the source input.


And this is one of the things I love Perl 6 for, its consistency. 
Infinity is literally no limit. Using it meaning "no limit" is genius. 
Not "0 in this case means no limit" or "-1 means no limit" or "this 
constant meaning unavailable" or whatever. Infinity has no limit, we use 
them as a parameter to imply that argument has no limit.


Cheers

JJ



Hi JJ,

The more I learn about Perl 6, the more I prefer it over Perl 5.

To your list, I might add, everything starts counting from zero
(Perl5 m/ starts at $1).  So no guessing!

My problem with the default set to Inf is that Inf means a number
too large for the numbers of bits allocated to the variable to
handle.

RTFM: https://docs.perl6.org/type/Num#index-entry-Inf_%28definition%29-Inf
 The value Inf is an instance of Num and represents value that's
 too large to represent in 64-bit double-precision floating
 point number (roughly, above 1.7976931348623158e308 for
 positive Inf and below -1.7976931348623157e308 for negative Inf)
 as well as returned from certain operations as defined by the
 IEEE 754-2008 standard.

So how am I suppose to enter that as a value?  What it really means
is "all of them".  "Inf" is just a poor way of stating "all words"
as the default.  "A tremendously large numbers of words" is just
a weird way of saying "all of them".

And yes, I am blanking on how to best clean that up. We have no
value (that I know of) for "all".

-T