Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Trey Harris
If the issue is that you aren’t comfortable enough with Git¹, I assume as
part of the basic toolkit of a sysadmin you know how to generate a unified
diff patchfile (with `diff -ruN` or equivalent)?

If so, if you generate one and upload it attached to a GitHub issue, we can
figure out how to turn it into a PR rather trivially (and if I’m the first
to pick it up, I’ll include step-by-step instructions on how to do it as a
Git PR in the future).

—
¹ Though in searching through the email logs to see what familiarity you’d
shown with Git in the past, it seems like this is something that’s held you
back enough that learning it would likely pay large dividends in the future.

On Fri, Jan 17, 2020 at 14:56 Tom Browder  wrote:

> On Fri, Jan 17, 2020 at 1:44 PM ToddAndMargo via perl6-users
>  wrote:
> ...
> > Was this what you were referring to?
> >
> > https://github.com/Raku/doc/blob/master/CONTRIBUTING.md
>
> No, check this link:
>
>
> https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
>
> -Tom
>


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread ToddAndMargo via perl6-users

On 2020-01-17 11:55, Tom Browder wrote:

On Fri, Jan 17, 2020 at 1:44 PM ToddAndMargo via perl6-users
 wrote:
...

Was this what you were referring to?

https://github.com/Raku/doc/blob/master/CONTRIBUTING.md


No, check this link:

https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

-Tom



I have got some reading to do.  Thank you!


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Tom Browder
On Fri, Jan 17, 2020 at 1:44 PM ToddAndMargo via perl6-users
 wrote:
...
> Was this what you were referring to?
>
> https://github.com/Raku/doc/blob/master/CONTRIBUTING.md

No, check this link:

https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

-Tom


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread ToddAndMargo via perl6-users

On 2020-01-17 11:43, ToddAndMargo via perl6-users wrote:

On 2020-01-17 06:58, Tom Browder wrote:
On Fri, Jan 17, 2020 at 06:06 Todd Chester via perl6-users 
mailto:perl6-users@perl.org>> wrote:




    On 2020-01-17 00:12, Veesh Goldman wrote:
 > he's finally looked into making pull requests.

    Do you have a link to the pull requests for
    the documentation?  I'd like to add some examples
    to a few pages.


Todd, I don't think that link will help until you understand what 
actually you need to contribute a PR.


As I said before, I'll be happy to give you a step-by-step recipe for 
creating a PR for the docs after you decide on a clean directory to 
use for cloning the doc repository. I think you said you are too busy 
at the moment.


I am frighteningly busy at the moment.  But, a little
creative helps with the busy.  I was thinking of putting
is a pull for an example on one of the bitwise pages.



If you can't find the time now, okay. In any event, you can look at 
the Github help section and find out more about PRs. Better yet, go to 
the Git home page and check out their documentation (which includes 
videos). Website is:


https://git-scm.com

-Tom


I checked that link, but could only find a reference to
https://git-scm.com/docs/git-request-pull

Maybe I do not understand what a pull request is.  I
tough it was just writing a respectful letter like you
do on Bugzillas.  I am looking at current pull requests,
and that seems to also be the case.

Maybe you should send me over your How To before
I stick my foot in my mouth, again.

-T




Was this what you were referring to?

https://github.com/Raku/doc/blob/master/CONTRIBUTING.md


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread ToddAndMargo via perl6-users

On 2020-01-17 06:58, Tom Browder wrote:
On Fri, Jan 17, 2020 at 06:06 Todd Chester via perl6-users 
mailto:perl6-users@perl.org>> wrote:




On 2020-01-17 00:12, Veesh Goldman wrote:
 > he's finally looked into making pull requests.

Do you have a link to the pull requests for
the documentation?  I'd like to add some examples
to a few pages.


Todd, I don't think that link will help until you understand what 
actually you need to contribute a PR.


As I said before, I'll be happy to give you a step-by-step recipe for 
creating a PR for the docs after you decide on a clean directory to use 
for cloning the doc repository. I think you said you are too busy at the 
moment.


I am frighteningly busy at the moment.  But, a little
creative helps with the busy.  I was thinking of putting
is a pull for an example on one of the bitwise pages.



If you can't find the time now, okay. In any event, you can look at the 
Github help section and find out more about PRs. Better yet, go to the 
Git home page and check out their documentation (which includes videos). 
Website is:


https://git-scm.com

-Tom


I checked that link, but could only find a reference to
https://git-scm.com/docs/git-request-pull

Maybe I do not understand what a pull request is.  I
tough it was just writing a respectful letter like you
do on Bugzillas.  I am looking at current pull requests,
and that seems to also be the case.

Maybe you should send me over your How To before
I stick my foot in my mouth, again.

-T


--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread ToddAndMargo via perl6-users

On 2020-01-17 06:15, Shlomi Fish wrote:

Hi Todd,

On Fri, 17 Jan 2020 04:06:10 -0800
Todd Chester via perl6-users  wrote:


On 2020-01-17 00:12, Veesh Goldman wrote:

he's finally looked into making pull requests.


Do you have a link to the pull requests for
the documentation?  I'd like to add some examples
to a few pages.


See https://github.com/Raku/doc/pulls . Good luck!




Thank you!  For some reason I have all kinds of trouble
finding what I want on GIT, probably my google skills.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Tom Browder
On Fri, Jan 17, 2020 at 06:06 Todd Chester via perl6-users <
perl6-users@perl.org> wrote:

>
>
> On 2020-01-17 00:12, Veesh Goldman wrote:
> > he's finally looked into making pull requests.
>
> Do you have a link to the pull requests for
> the documentation?  I'd like to add some examples
> to a few pages.


Todd, I don't think that link will help until you understand what actually
you need to contribute a PR.

As I said before, I'll be happy to give you a step-by-step recipe for
creating a PR for the docs after you decide on a clean directory to use for
cloning the doc repository. I think you said you are too busy at the moment.

If you can't find the time now, okay. In any event, you can look at the
Github help section and find out more about PRs. Better yet, go to the Git
home page and check out their documentation (which includes videos).
Website is:

  https://git-scm.com

-Tom


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Shlomi Fish
Hi Todd,

On Fri, 17 Jan 2020 04:06:10 -0800
Todd Chester via perl6-users  wrote:

> On 2020-01-17 00:12, Veesh Goldman wrote:
> > he's finally looked into making pull requests.  
> 
> Do you have a link to the pull requests for
> the documentation?  I'd like to add some examples
> to a few pages.

See https://github.com/Raku/doc/pulls . Good luck!

-- 

Shlomi Fish   https://www.shlomifish.org/
https://github.com/shlomif/shlomif-computer-settings/ - my dotfiles

There’s no point in keeping an idea to yourself since there’s a 10 to 1 chance
that somebody already has it and will share it before you.
— http://www.shlomifish.org/humour.html

Please reply to list if it's a mailing list post - http://shlom.in/reply .


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Todd Chester via perl6-users




On 2020-01-17 00:12, Veesh Goldman wrote:

he's finally looked into making pull requests.


Do you have a link to the pull requests for
the documentation?  I'd like to add some examples
to a few pages.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Veesh Goldman
I just want to point out in Todd's credit that he both admitted that he
doesn't know how to use github, and that he's finally looked into making
pull requests.

On Fri, Jan 17, 2020 at 1:21 AM Elizabeth Mattijsen  wrote:

> > On 16 Jan 2020, at 21:13, ToddAndMargo via perl6-users <
> perl6-users@perl.org> wrote:
> > On 2020-01-16 12:09, Elizabeth Mattijsen wrote:
> >>> On 16 Jan 2020, at 20:29, Darren Duncan 
> wrote:
> >>> On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:
>  I wonder if this is how you treat your family as well.  If you do,
> then I feel sorry for your family.  And wouldn't be surprised if they
> abandoned you.
> >>> That is unnecessarily harsh and uncalled for Liz, the last sentence
> particularly.
> >> I'll give you that it may have been unnecessary harsh.  For which I
> apologize.
> >> Liz
> >
> > Thank you Liz.  Accepted.
> >
> > Can we be friends again?
>
> We were never friends.  Online acquaintance at best.  I guess in the
> current polarized United States, anybody who is not your enemy, is your
> friend.  It doesn't work like that for me.
>
>
> You might earn some respect with me.  But I doubt it.
>
>
> Liz


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Elizabeth Mattijsen
> On 16 Jan 2020, at 21:13, ToddAndMargo via perl6-users  
> wrote:
> On 2020-01-16 12:09, Elizabeth Mattijsen wrote:
>>> On 16 Jan 2020, at 20:29, Darren Duncan  wrote:
>>> On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:
 I wonder if this is how you treat your family as well.  If you do, then I 
 feel sorry for your family.  And wouldn't be surprised if they abandoned 
 you.
>>> That is unnecessarily harsh and uncalled for Liz, the last sentence 
>>> particularly.
>> I'll give you that it may have been unnecessary harsh.  For which I 
>> apologize.
>> Liz
> 
> Thank you Liz.  Accepted.
> 
> Can we be friends again?

We were never friends.  Online acquaintance at best.  I guess in the current 
polarized United States, anybody who is not your enemy, is your friend.  It 
doesn't work like that for me.


You might earn some respect with me.  But I doubt it.


Liz

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

Trey,

   I am wrong ALL THE TIME.  I have to apologize all
the time too.  I live with egg on my face constantly.
You get use to it.

   When I am in the wrong, I will bend over five way to
Sunday to apologize.

   If you decide to take offense where none is intended
and you have it explained to you, that is your problem,
not mine.

   My rights do not stop where your feeling begin.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Trey Harris
On Thu, Jan 16, 2020 at 15:04 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-16 11:00, Trey Harris wrote:
> and your apparent misapprehension that
> merely explaining away a statement that some took offense to, without
> any outward sign of contrition, inoculates you from any further offense.

>
[...]

Offense can not be given, only taken.


That is an execrable meme forwarded, I think, only by people who either
haven’t examined the notion closely, or else who feel they are immune from
offensive statements (they believe, by choice rather than circumstance) and
assume everyone else has that same luxury. It’s basically a perversion of
“sticks and stones”, which was never meant to be weaponized into
victim-blaming by the sources of offense—as in “but words will never hurt
*you*”—but as a comfort to the targets of offense.

In the context of online discussion words are all there is, so this meme is
essentially tantamount to a declaration that no statement made online can
have *any* emotional impact unless willingly chosen by the reader, which is
absurd. (Unless offense is somehow thought to be a singular emotional
reaction with the magical property of being entirely voluntarily to
experience.)

Some folks take offense out of anything.


But your prior statement of that meme should make this statement equivalent
to “there exist things which some folks take offense from”—which would be
an oddly meaningless position to take. As I assume you weren’t stating a
tautology for no reason, I take it you mean some folks are especially prone
to taking offense from things that reasonable people would find inoffensive.

But you can’t say on the one hand that offense can’t be given, only taken,
but on the other hand suggest that there are both validly offensive and
purely inoffensive statements. A spectrum of offensiveness can’t coexist
with the notion that offense is solely determined by the tetchiness of the
target.

On 2020-01-16 11:00, Trey Harris wrote:
> and your apparent misapprehension that
> merely explaining away a statement that some took offense to, without
> any outward sign of contrition, inoculates you from any further offense.

Contrition if I do something wrong first.  [...] After endless explaining
> what I meant, those still taking offense AFTER the explanation are the ones
> that need to be apologizing.


And your steadfast refusal—as Richard began this thread by observing—to
accept any admission of wrong is the reason people continue to take
offense. Wrong can exist absent intention. I could very sincerely mean it
when I say “the square root of 20 is 5”, and my error could have been
totally unintentional, but it’s still wrong. I don’t need to beat myself up
about it or flagellate myself in front of everyone who heard my mistake,
but I do still need to do at least the minimum of saying “oops, sorry” if I
made the statement in a context that required the response of others in
some way. And that’s in a context where offensiveness and other emotional
concerns are nearly absent.


> > The thing about /true/ contrition (and I haven’t read anything from you
> > on this that seems to amount even to lip-service of contrition) is that
> > you have to put up with a certain amount of what you may perceive as
> > sour grapes before complaining about it. You can welcome magnanimity,
> > but you can’t demand it. And until you do show true contrition, the
> > timer on when those grapes sour can’t even start.
> >
> > “What, I already apologized, won’t you just drop it?!” would already be
> > a bad look; “I have told you and others ENDLESSLY [that my behavior
> > wasn’t something I ever needed to apologize for in the first place]” is
> > quite a bit worse.
>
> My, my is not the sky a pretty shade of blue today?


You appear to be trying your damnedest to force a context in which you can
really make that become an offensive statement.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

On 2020-01-16 12:09, Elizabeth Mattijsen wrote:

On 16 Jan 2020, at 20:29, Darren Duncan  wrote:
On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:

I wonder if this is how you treat your family as well.  If you do, then I feel 
sorry for your family.  And wouldn't be surprised if they abandoned you.

That is unnecessarily harsh and uncalled for Liz, the last sentence 
particularly.


I'll give you that it may have been unnecessary harsh.  For which I apologize.


Liz



Thank you Liz.  Accepted.

Can we be friends again?

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

On 2020-01-16 12:09, ToddAndMargo via perl6-users wrote:

On 2020-01-16 11:29, Darren Duncan wrote:

On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:
I wonder if this is how you treat your family as well.  If you do, 
then I feel sorry for your family.  And wouldn't be surprised if they 
abandoned you.


That is unnecessarily harsh and uncalled for Liz, the last sentence 
particularly.


-- Darren Duncan


Not necessarily so.  I have thoroughly and endless
explained to her what was meant.  She knows I
did not call JJ a Dog.  That she continues
to accuse me of this is a conscious choice on her
part.  That is a moral issue.  Look up "false witness".


Hi Darren,

My bad.  I thought you were talking about me.
I do apologize for misunderstanding you.

:'(

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

On 2020-01-16 11:29, Darren Duncan wrote:

On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:
I wonder if this is how you treat your family as well.  If you do, 
then I feel sorry for your family.  And wouldn't be surprised if they 
abandoned you.


That is unnecessarily harsh and uncalled for Liz, the last sentence 
particularly.


-- Darren Duncan


Not necessarily so.  I have thoroughly and endless
explained to her what was meant.  She knows I
did not call JJ a Dog.  That she continues
to accuse me of this is a conscious choice on her
part.  That is a moral issue.  Look up "false witness".


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Elizabeth Mattijsen
> On 16 Jan 2020, at 20:29, Darren Duncan  wrote:
> On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:
>> I wonder if this is how you treat your family as well.  If you do, then I 
>> feel sorry for your family.  And wouldn't be surprised if they abandoned you.
> That is unnecessarily harsh and uncalled for Liz, the last sentence 
> particularly.

I'll give you that it may have been unnecessary harsh.  For which I apologize.


Liz

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

On 2020-01-16 11:00, Trey Harris wrote:
On Thu, Jan 16, 2020 at 12:19 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


As far as the Dog remark, I have told you and others
ENDLESSLY what that meant.  That you continue to
deliberately misrepresent me on this is a moral
issue on your part.


The issue is not, now, just the dog remark—if you and JJ agree that it 
was a previously-established in-joke, 


Hi Trey,

That was not a "previously-established in-joke", that was a
description of being over protective.

that /could be/ water under the 
bridge—though again, the issue of a lack of perspective here appears to 
be why you’re not understanding why it continues to be brought up: most 
readers will not be aware of such an in-joke, and will be (perhaps 
erroneously) offended on behalf of JJ if you don’t explain it /at the time/.


No; the issue is your ongoing response to being called out for the 
remark. Your histrionic reactions, such as “Oh Great And Mighty 
Gatekeeper of the Documentation!” 


That one WAS A JOKE.  It was gentle teasing and meant
with affection.

and your apparent misapprehension that 
merely explaining away a statement that some took offense to, without 
any outward sign of contrition, inoculates you from any further offense.


Contrition if I do something wrong first.  Offense can not
be given, only taken. Some folks take offense out of anything.
After endless explaining what I meant, those still taking
offense AFTER the explanation are the ones that need to
be apologizing.

The thing about /true/ contrition (and I haven’t read anything from you 
on this that seems to amount even to lip-service of contrition) is that 
you have to put up with a certain amount of what you may perceive as 
sour grapes before complaining about it. You can welcome magnanimity, 
but you can’t demand it. And until you do show true contrition, the 
timer on when those grapes sour can’t even start.


“What, I already apologized, won’t you just drop it?!” would already be 
a bad look; “I have told you and others ENDLESSLY [that my behavior 
wasn’t something I ever needed to apologize for in the first place]” is 
quite a bit worse.


My, my is not the sky a pretty shade of blue today?



Trey

—
(p.s.: I don’t know your gender identity,


I am an XY

but it reads to me like you’re 
overtly mansplaining here. But other than calling you out on it, I’m not 
going to go any farther into that particular minefield on a public list. 
Feel free to disagree but don’t bother doing so in a list reply: I won’t 
encourage such behavior by even reading it, so I’m going to assume any 
reply you make to this email is just responding to the remarks before 
this postscript. If you feel you really must respond to this, you can 
email me privately if you like, and I promise I’ll read it and reply. If 
I’m making an incorrect assumption about your gender identity—the “I 
have told you” remark is still enormously patronizing, even if it isn’t 
mansplaining.)




You know, if I wanted to, I could take offense to the above, but I do 
believe you mean well, so I won't.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Darren Duncan

On 2020-01-16 3:09 a.m., Elizabeth Mattijsen wrote:

I wonder if this is how you treat your family as well.  If you do, then I feel 
sorry for your family.  And wouldn't be surprised if they abandoned you.


That is unnecessarily harsh and uncalled for Liz, the last sentence 
particularly.

-- Darren Duncan


Re: Bug to report: cardinal called an integer

2020-01-16 Thread Darren Duncan

On 2020-01-16 9:22 a.m., ToddAndMargo via perl6-users wrote:

Since folks do not like the programming/math term
"carinal", it would be perfectly happy if the error
message was changed from:

This type cannot unbox to a native integer: P6opaque, Str

to

This type cannot unbox to a native unsigned integer: P6opaque, Str


I also believe the latter would work best for this. -- Darren Duncan


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Trey Harris
On Thu, Jan 16, 2020 at 12:19 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> As far as the Dog remark, I have told you and others
> ENDLESSLY what that meant.  That you continue to
> deliberately misrepresent me on this is a moral
> issue on your part.


The issue is not, now, just the dog remark—if you and JJ agree that it was
a previously-established in-joke, that *could be* water under the
bridge—though again, the issue of a lack of perspective here appears to be
why you’re not understanding why it continues to be brought up: most
readers will not be aware of such an in-joke, and will be (perhaps
erroneously) offended on behalf of JJ if you don’t explain it *at the time*.

No; the issue is your ongoing response to being called out for the remark.
Your histrionic reactions, such as “Oh Great And Mighty Gatekeeper of the
Documentation!” and your apparent misapprehension that merely explaining
away a statement that some took offense to, without any outward sign of
contrition, inoculates you from any further offense.

The thing about *true* contrition (and I haven’t read anything from you on
this that seems to amount even to lip-service of contrition) is that you
have to put up with a certain amount of what you may perceive as sour
grapes before complaining about it. You can welcome magnanimity, but you
can’t demand it. And until you do show true contrition, the timer on when
those grapes sour can’t even start.

“What, I already apologized, won’t you just drop it?!” would already be a
bad look; “I have told you and others ENDLESSLY [that my behavior wasn’t
something I ever needed to apologize for in the first place]” is quite a
bit worse.

Trey

—
(p.s.: I don’t know your gender identity, but it reads to me like you’re
overtly mansplaining here. But other than calling you out on it, I’m not
going to go any farther into that particular minefield on a public list.
Feel free to disagree but don’t bother doing so in a list reply: I won’t
encourage such behavior by even reading it, so I’m going to assume any
reply you make to this email is just responding to the remarks before this
postscript. If you feel you really must respond to this, you can email me
privately if you like, and I promise I’ll read it and reply. If I’m making
an incorrect assumption about your gender identity—the “I have told you”
remark is still enormously patronizing, even if it isn’t mansplaining.)

>


Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

On 2020-01-09 10:10, ToddAndMargo via perl6-users wrote:

Hi All,

A bug to report:

$ perl6 -v
This is Rakudo version 2019.07.1 built on MoarVM version 2019.07.1
implementing Perl 6.d.


$ p6 'my uint32 $c; $c = "ABC";'
This type cannot unbox to a native integer: P6opaque, Str
   in block  at -e line 1

"uint32" is not an "integer".  It is a cardinal.  If
they really want to use the word "integer" for cardinal,
they should change the wording to "unsigned integer".

Picky, picky, picky

:-)

-T


Hi All,

Since folks do not like the programming/math term
"carinal", it would be perfectly happy if the error
message was changed from:

This type cannot unbox to a native integer: P6opaque, Str

to

This type cannot unbox to a native unsigned integer: P6opaque, Str

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread ToddAndMargo via perl6-users

Hi Liz,

The Pull Request seems a much better route than the bug
reporter.  I went to the bug reporter as I am familiar
with such from Fedora and others where you can ask
for enhancements, etc. on the bug reporter.

As far as the Dog remark, I have told you and others
ENDLESSLY what that meant.  That you continue to
deliberately misrepresent me on this is a moral
issue on your part.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-16 Thread Elizabeth Mattijsen
> On 16 Jan 2020, at 02:24, ToddAndMargo via perl6-users  
> wrote:
> Programming is only part of my business.  I am a
> consultant to small business.  I do EVERYTHING, although
> I draw the line at stringing wire.  Fortunately, I have
> guys that will string wire for me.

Apparently you also draw the line at creating documentation Pull Requests.  Or 
do anything that is outside of your comfort zone.  You think you have "guys" 
doing that for you.  People on this mailing list are not your "guys" that you 
can tell what they need to do.  And then get angry when they don't.

I wonder if this is how you treat your family as well.  If you do, then I feel 
sorry for your family.  And wouldn't be surprised if they abandoned you.  If 
you don't, could you please treat the people on this mailing list even a 
*little* more as your family?


> I mainly spending
> my time troubleshooting endless issues with Windows,
> for which I would not have a job.

This definitely explains your mindset with regards to solving issues.  I call 
that "magic programming".  You're only looking for incantations and are 
collecting them so that you can try them out one at a time when you're asked to 
solve problems.  You appear incapable of creating a mental model of how things 
work, and how a particular kind of feature will influence other features and 
behaviour.  And want the people on this mailing list to aid you with creating 
new incantations.


> So when folks crap all over me, I am not allowed to complain
> about it?  Have you ONCE caught me responding by calling
> anyone names

The dog issue comes to mind.


> or implying they were incompetent?  The
> worst I have said it that someone is acting the way they
> do because they don't like me.

You make it very hard to be liked.  And this kind of response doesn't help.


> No offense is intended.  I often see things differently
> than others.  This does not mean I am dissing anyone.
> If I do not understand something or I do not think
> other understand me, I will continue to state my
> case.  This is normal give and take.

No, this is *not* normal give and take.  This is lacking in self-reflection.  
This is about not asking *yourself* why things are the way they are.  This is 
always about external influences affecting *you*.  This is about taking and 
*not* giving.


> And, by the way, respect is a two way street.

No.  It is not.  You need to *earn* respect.  You are *not* earning respect 
with most of the people on this mailing list with your behaviour.  No matter 
how much "respect" you *think* you are giving them.


> Ya, I was a real idiot.

Again, a sign that you are the centre of the universe and that everybody us 
against you.


And this email will probably be responded by: I like you a lot and I will wear 
you down.  Again. *sigh*


Liz

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 17:32, Tillman Peng wrote:
I in fact like to read Todd's every post. Because of his active posting, 
I know perl6 is there and still alive.


regards.



Thank you for that.

:-)


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Tillman Peng
I in fact like to read Todd's every post. Because of his active posting, 
I know perl6 is there and still alive.


regards.

on 2020/1/16 5:57, Richard Hainsworth wrote:

Todd,

Once again I find myself writing to you directly in response to a post 
of yours and asking again that you be respectful to others in this 
community. Striving for respect for everyone from everyone directly 
benefits us all.


And disrespect harms you: your long emails defending your points of view 
have no persuasive power because you refuse to listen or to change.


Further the self-aggrandising tone and disrespect to others are - to be 
quite blunt - also consistent with the word and phrases one might 
consider to be indicative of the intellectually challenged. It might be 
wise therefore to re-parse your responses before sending lest the 
readers of this list find their perceptions harden into belief.


You have asked in response to a previous thread that if you are 
disrespectful, that it be pointed out. So here goes.


On 15/01/2020 18:13, ToddAndMargo via perl6-users wrote:

On 2020-01-14 01:13, JJ Merelo wrote:


Never miss a good chance to bash documentation...


Guilty as charged?


No one has ever called the documentation perfect, but there is only one 
person who goes beyond the reasonable to vilify both the documentation 
and its volunteer creators.


Guilty as charged! (An indication of humility as well as humour on your 
part would have been to replace the '?' with ':)' or some such emoji)






    By the way, "C String" REQUIRES a nul at the end:
    an error in the NativeCall documentation.


No, it does not. And even if it did, it should better go to the C, 
not Raku, documentation


Your original complaint was that you had encountered a problem with '\0' 
on strings and you wanted that problem to be included in the Raku 
documentation.


a) Irrespective of whether null-ended strings are a part of C or an 
implementation detail, it is not a Raku problem. So of the two 
assertions that JJ made, one might be debatable within the context of a 
C-language based list, not a Raku list, and the second is True about 
reference materials in Raku,  but arguably the tutorial materials could 
be enhanced.


b) The way in which you present your point of view is 
counter-productive. I would agree with you that for irregular users of C 
working with some libraries, strings without '\0' terminations could 
trigger unexpected responses. It would be useful, therefore, if at an 
appropriate point in the NativeCall POD file, a comment is included to 
this effect.


c) You could provide a useful service to the Raku community by offering 
a PR (Github Pull Request) with a patch.


d) Within the NativeCall POD there is a fairly extended tutorial about 
interfacing to an Internet function in a C library. I wrote that part of 
the document, having myself worked hard to get the function to work. I 
documented my work, created a patch and offered it to the Perl 6 
community. I think it was my first patch. It was accepted. The 
documentation can be changed by newcomers. So long as the contributor is 
willing to LISTEN to requests for changes, as in grammar and spelling. 
Or in placing. By way of another example, I wrote a fairly long document 
about CompUnits, submitted a PR, which was not accepted. So be it. I 
understood the rationale for the rejection.




Oh Great And Mighty Gatekeeper of the Documentation!
This is plain disrespect. Calling JJ a dog was also disrespectful. 
Reversing a derogatory term for hyperbole is no less disrespectful.


You are in error.  The problem is the mistake in the
documentation
Several people have pointed out to you that they do not consider your 
interpretation of C to be definitive. Nor does it matter. What I could 
agree on (as said above) is that there are peculiarities of some 
versions of C that can trip the unwary, and that the TUTORIALS about an 
interface system, such as NativeCall, could include mention of the trap.

you won't fix


It is not JJ's job to FIX the documentation. He has provided substantial 
and significant contributions to the documentation system as a whole. I 
am profoundly grateful to JJ for his efforts.


You could also contribute to the community generated documentation by 
providing a PR.


And please do not refer to your own reference notes. If you do in this 
thread, I will not refrain, as I have done so far, in subjecting them to 
the sort of searing review they deserve.



and your misunderstand of
the C programming language.


Once again this is disrespectful. (In case English is your second 
language, I will not point out the grammatical error.) Since you were 
obviously not given any lessons in etiquette during your long life, 
perhaps a little pointer would be in order here. Rather than directly 
accusing someone of being in error, or of misunderstanding something, 
and thereby diminishing that person in a public forum, a less aggressive 
approach would be to say "I 

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 16:59, Peter Scott wrote:

On 1/15/2020 2:39 PM, ToddAndMargo via perl6-users wrote:

On 2020-01-15 14:18, Elizabeth Mattijsen wrote:

Thank you Richard for this long and thoughtful answer.

I have already given up on Todd, I'm glad to see others haven't 
(yet).  What will follow is probably a response that is either: a. 
everybody is against me, b. the Raku community won't listen, c. the 
various variations on those themes.  I sincerely hope that I'm wrong.


Liz


Hi Liz,

Richard has not liked me for a long time.

[...]

And I even like you too.  You help me with things
and you don't even like me. 


ToddAndMargo, you may be in the wrong line of business.  


Programming is only part of my business.  I am a
consultant to small business.  I do EVERYTHING, although
I draw the line at stringing wire.  Fortunately, I have
guys that will string wire for me.  I mainly spending
my time troubleshooting endless issues with Windows,
for which I would not have a job.


Programming a 
computer requires understanding the computer the way it is, not the way 
you would like it to be, and to make progress in that understanding you 
need to be able to understand what people are telling you.  The computer 
will not care whether you like it and it certainly neither likes nor 
dislikes you.  Succeeding in this endeavor requires that you replicate 
the computer's rigor within your mind; fuzziness in that understanding 
will result in failure.


Oh no fooling!  You have to be exact.  And also know when Raku
gets overly helpful (coerced)!

https://docs.raku.org/language/operators#prefix_+^
prefix +^

multi sub prefix:<+^>(Any --> Int:D)

Integer bitwise negation operator: Coerces the argument
to Int and does a bitwise negation on the result,
assuming two's complement.


Yet when people demonstrate for you the required rigor you repeatedly 
take issue with their assistance or attribute an emotional bias to it. 
Liking or disliking someone has no bearing on their prowess as a 
programmer.  


So when folks crap all over me, I am not allowed to complain
about it?  Have you ONCE caught me responding by calling
anyone names or implying they were incompetent?  The
worst I have said it that someone is acting the way they
do because they don't like me.

All that counts is that they understand the abstractions, 
and that is what people have been trying to help you with, but your 
comments suggest you see their assistance only through a like/dislike 
filter.  You're making this so difficult for yourself I think that 
programming is not a good choice of career for you.  Certainly you are 
not demonstrating how someone should behave in a community of developers 
to grow their skills while respecting the other members of the community.




Hi Peter,

No offense is intended.  I often see things differently
than others.  This does not mean I am dissing anyone.
If I do not understand something or I do not think
other understand me, I will continue to state my
case.  This is normal give and take.  And when I
am wrong, I will state such.

And, by the way, respect is a two way street.

I once had such remarks thrown at me on the Perl 5 group
for calling hashes Associative Arrays.  I like the term
because it wonderfully describes what is going on with
hashes.  And if you read any of my other posts, you know my favorite 
variable is the hash.  Luckily, I found an article

where Larry described why he chose the term hash.  That
quieted up the conversation, but no one apologized for all
the crap they threw at me beforehand.  Ya, I was a real idiot.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 16:47, Tom Browder wrote:
On Wed, Jan 15, 2020 at 18:38 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


On 2020-01-15 15:50, Laurent Rosenfeld via perl6-users wrote:
 > So, the way you behave with him is just nasty and evil. Please stop
 > doing that.

That is in your own head.


Todd, why can't you clone the doc repo and take just one doc chunk you 
think could be better, fix it, and submit a pull request?


-Tom



Hi Tom,

Well, because:

1) I don't know how, and
2) I am not that good at it (yet)

So I have tried posting what I find
to the bug reported, but I can't get past my
good e-friend JJ, so I gave up.  I can't
even get him to fix the C String error.

So I post them here.  JJ actually took the one
about the missing graphic.  Kind of surprised me.
Had I posted it to the bug reported, I believe it
would have been kicked out.

Primarily, I try to stick with helping people here
when I can and posting my keeper files when I
think it will help others.

I am currently working on a massive paper on NativeCall.
Should be done with it within the month. I even
include link in it to where to get help.  I also
discuss the relationship between C variables and Win
API call, so you can actually figure out how to use
NativeCall.

I will get better at this.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Peter Scott

On 1/15/2020 2:39 PM, ToddAndMargo via perl6-users wrote:

On 2020-01-15 14:18, Elizabeth Mattijsen wrote:

Thank you Richard for this long and thoughtful answer.

I have already given up on Todd, I'm glad to see others haven't 
(yet).  What will follow is probably a response that is either: a. 
everybody is against me, b. the Raku community won't listen, c. the 
various variations on those themes.  I sincerely hope that I'm wrong.


Liz


Hi Liz,

Richard has not liked me for a long time.

[...]

And I even like you too.  You help me with things
and you don't even like me. 


ToddAndMargo, you may be in the wrong line of business.  Programming a 
computer requires understanding the computer the way it is, not the way 
you would like it to be, and to make progress in that understanding you 
need to be able to understand what people are telling you.  The computer 
will not care whether you like it and it certainly neither likes nor 
dislikes you.  Succeeding in this endeavor requires that you replicate 
the computer's rigor within your mind; fuzziness in that understanding 
will result in failure.


Yet when people demonstrate for you the required rigor you repeatedly 
take issue with their assistance or attribute an emotional bias to it.  
Liking or disliking someone has no bearing on their prowess as a 
programmer.  All that counts is that they understand the abstractions, 
and that is what people have been trying to help you with, but your 
comments suggest you see their assistance only through a like/dislike 
filter.  You're making this so difficult for yourself I think that 
programming is not a good choice of career for you.  Certainly you are 
not demonstrating how someone should behave in a community of developers 
to grow their skills while respecting the other members of the community.


--
Peter Scott


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 15:36, Trey Harris wrote:
And there’s another example of exactly the sort of things Richard 
brought up.


How about: “I feel like Richard has not liked me for a long time, and 
that there’s nothing I can do about it. I feel like I could say almost 
anything and he would find something offensive about it.” If you feel 
you must make such statements, frame them from their correct 
perspective—as coming from your feelings, not as objective fact—and drop 
the hyperbole (“I can say the sky is a lovely shade of blue”) and 
gamesmanship (“not anything I can do... but maybe wait him out”).




Richard and I have a history from other places and
not just here.  Trust me, he does not care for me.
And I did not waste a hundred words stating such.

You can't make everyone in the world like you.

By the way, we are currently corresponding off line
with each other.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Tom Browder
On Wed, Jan 15, 2020 at 18:38 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-15 15:50, Laurent Rosenfeld via perl6-users wrote:
> > So, the way you behave with him is just nasty and evil. Please stop
> > doing that.
>
> That is in your own head.


Todd, why can't you clone the doc repo and take just one doc chunk you
think could be better, fix it, and submit a pull request?

-Tom

>


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 15:50, Laurent Rosenfeld via perl6-users wrote:
So, the way you behave with him is just nasty and evil. Please stop 
doing that.


That is in your own head.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Laurent Rosenfeld via perl6-users
The point is really not whether people like you or don't, and also not
about whether you like specific  people or don't.

I don't know you (at least personally), you don't know me personally, and
nobody cares about whether I like you or whether you like me.

The whole point is about being polite, constructive, courteous, and
respectful with other people. I suspect you probably know what I mean, you
know, the Netiquette. We can disagree on one point (or on many points, for
that matter) and still listen to the other's arguments in good faith and
reply politely.

Consider the documentation issue. I remember what the documentation was
like 6 or 7 years ago when I really started working on Raku (or Perl 6 at
the time). Yes, it was quite bad. And I complained about this problem in
various tutorials I wrote in French at the time. But it has improved
tremendously since. And I strongly disagree with you on that: I think it is
quite good now. Certainly not perfect, but really much better.

Now, one thing you might be interested to know is that JJ Merelo launched
in August 2018 (at the Edinburgh Perl Conference) a project to improve the
Perl6/Raku documentation. I strongly suspect that he did that because he
found that there was a lot of opportunity for improvement (although I
briefly spoke with him at the time, we did not discuss his deep
motivations, but I would submit that he would not have done that if he
thought the documentation was completely OK). In the 18 months since that,
JJ has committed a lot or effort to improve the documentation. It is still
not perfect. But it has improved a lot, thanks to JJ's efforts, among
others. So, the way you behave with him is just nasty and evil. Please stop
doing that. JJ has contributed an immense service to the community. Please
stop bashing him, this is really awful behavior toward someone who has made
some much effort to improve it.

BTW; thank you, JJ, for that.




Le mer. 15 janv. 2020 à 23:39, ToddAndMargo via perl6-users <
perl6-users@perl.org> a écrit :

> On 2020-01-15 14:18, Elizabeth Mattijsen wrote:
> > Thank you Richard for this long and thoughtful answer.
> >
> > I have already given up on Todd, I'm glad to see others haven't (yet).
> What will follow is probably a response that is either: a. everybody is
> against me, b. the Raku community won't listen, c. the various variations
> on those themes.  I sincerely hope that I'm wrong.
> >
> > Liz
>
> Hi Liz,
>
> Richard has not liked me for a long time.  There
> is really not anything I can do about it but
> maybe wait him out.  I can say the sky is a lovely
> shade of blue and he would find something offensive
> in the remark.
>
>   "a. everybody is against me, b. the Raku
>   community won't listen, c. the various variations
>   on those themes"
>
> U.  I complain about the documentation and the
> difficulty in try to get it fixed.  The rest of Raku,
> I absolute adore and have said so, so many times
> that I fear I am being tiresome.
>
> And the "everybody is against me" remark is in your
> head.  I have NEVER said anything like this.  Complaining
> about the state of the documentation is not complaining
> that everyone is against me.
>
> And to add, I really like the folks on this group
> as well as thank them profusely when they help me.
> I am also starting to be able to return the favor and
> help others.
>
> And I even like you too.  You help me with things
> and you don't even like me.  That is a good character
> trait on your part.  I will wear you down eventually.
>
> Raku and the members of this group are awesome.
>
> -T
>


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 15:36, Trey Harris wrote:
artificially-hyperbolized reference to JJ helped anything after 
previously calling him a dog.


To anyone still misunderstanding this. "Guard Dog" is
a figure of speech.  It means he is over protective.
I DID NOT CALL HIM A DOG.  And JJ knew this.  I was
very clear about this.

JJ is a swell guy.  I have stated so a ton of times.
I personally like JJ.  Please no one try to create
strife between the two of us.

And JJ and I have jokes back and forth about what
kind of dogs the two of us would be.  He knew I
was not calling a dog.  (Golden Retrievers are
sweeter than Labs, by the way.)


Trey,

Thank you for your impassioned letter.  I will take
it to heart.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Trey Harris
On Wed, Jan 15, 2020 at 17:39 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-15 14:18, Elizabeth Mattijsen wrote:
> > Thank you Richard for this long and thoughtful answer.
> >
> > I have already given up on Todd, I'm glad to see others haven't (yet).
> What will follow is probably a response that is either: a. everybody is
> against me, b. the Raku community won't listen, c. the various variations
> on those themes.  I sincerely hope that I'm wrong.
> >
> > Liz
>
> Hi Liz,
>
> Richard has not liked me for a long time.  There
> is really not anything I can do about it but
> maybe wait him out.  I can say the sky is a lovely
> shade of blue and he would find something offensive
> in the remark.


And there’s another example of exactly the sort of things Richard brought
up.

How about: “I feel like Richard has not liked me for a long time, and that
there’s nothing I can do about it. I feel like I could say almost anything
and he would find something offensive about it.” If you feel you must make
such statements, frame them from their correct perspective—as coming from
your feelings, not as objective fact—and drop the hyperbole (“I can say the
sky is a lovely shade of blue”) and gamesmanship (“not anything I can do...
but maybe wait him out”).


>
>   "a. everybody is against me, b. the Raku
>   community won't listen, c. the various variations
>   on those themes"
>
> U.  I complain about the documentation and the
> difficulty in try to get it fixed.  The rest of Raku,
> I absolute adore and have said so, so many times
> that I fear I am being tiresome.
>
> And the "everybody is against me" remark is in your
> head.  I have NEVER said anything like this.  Complaining
> about the state of the documentation is not complaining
> that everyone is against me.


Again, you seem to be missing the matter of perspective. Stating, as
objective fact, that the documentation is in a poor state, is written
badly, “seems designed to confuse”, etc., can only be heard, by its
authors, as a judgment of them—the documentation did not just appear on
GitHub one day from nowhere.

>
And I even like you too.  You help me with things
> and you don't even like me.  That is a good character
> trait on your part.  I will wear you down eventually.


A statement like this, in this context, does not appear magnanimous as it
seems you meant it to be. It can only be so if you show some modicum of
contrition first, which you have not—you’ve simply stated as fact that you
have done nothing wrong.

I have not devoted the time or energy this time into pulling down and
grepping your emails as I did once before (since a data-based approach
didn’t appear to help then, why should I go to the effort?), but I’d in
general observe that you seem to: a) consistently state as bald fact your
impressions of the internal states of other people, and b) consistently
state as bald fact your own opinions without marking them as even
potentially wrong.

A few “I think that...”, “I’ve noticed that...”, “From reading X it seems
like...” would do a world of good here. Coming to grips with what IS simple
fact—that none of us have direct access to others’ mental states—and
adjusting your statements about others accordingly would do another world
of good.

No, I’m not talking about artificially puffing up your language; that would
help no more than your artificially-hyperbolized reference to JJ helped
anything after previously calling him a dog. I’m talking about a
perspective shift in your writing, thinking about the source of knowledge
and opinions you (believe) you have and stating that knowledge or opinion
acknowledging that basis, rather than writing yourself as the omniscient
narrator in all things.

Trey


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 15:05, Laurent Rosenfeld via perl6-users wrote:
I join with Liz and Tom to thank you, Richard, for this long and 
thoughtful answer.


Hi Laurent,

I can be long winded too.  Wait, it is okay for
Richard, but not for me?

Anyway, I will eventually wear you down and
we will become friends again.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

Richard,

Please put aside your personal distaste of me
when writing on this group.

Write me off line if you want to want to
vent.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 14:25, Tom Browder wrote:

On Wed, Jan 15, 2020 at 4:19 PM Elizabeth Mattijsen  wrote:


Thank you Richard for this long and thoughtful answer.


Amen, Liz!

-Tom (tbrowder)



With love and understanding, I will wear both you down
and we will become friends again.


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 13:57, Richard Hainsworth wrote:

Todd,

Once again I find myself writing to you directly in response to a post 
of yours and asking again that you be respectful to others in this 
community. Striving for respect for everyone from everyone directly 
benefits us all.


And disrespect harms you: your long emails defending your points of view 
have no persuasive power because you refuse to listen or to change.


Further the self-aggrandising tone and disrespect to others are - to be 
quite blunt - also consistent with the word and phrases one might 
consider to be indicative of the intellectually challenged. It might be 
wise therefore to re-parse your responses before sending lest the 
readers of this list find their perceptions harden into belief.


Richard,

   Are you tied to a chair and someone is forcing you
to listen to my eMails?  Do we need to call 911?  If you
do not like what I write, killfile me.

   You don't like me.  There is nothing I can do about that.
Please do not involve the rest of this group with your own
personal distaste of me or anyone else.

   And that post required that I lay out the specifications
of string in C.  Sorry it required so many words, but
it did.

   And, by the way, I'd never make you listen to my
eMail letter after tying you up.  I call Hong Kong on your
cell phone, over and over and over until you screamed.
Okay, Mr. Humor Impaired, tell me how offensive that joke
was.


You have asked in response to a previous thread that if you are 
disrespectful, that it be pointed out. So here goes.


On 15/01/2020 18:13, ToddAndMargo via perl6-users wrote:

On 2020-01-14 01:13, JJ Merelo wrote:


Never miss a good chance to bash documentation...


Guilty as charged?


No one has ever called the documentation perfect, but there is only one 
person who goes beyond the reasonable to vilify both the documentation 
and its volunteer creators.


Guilty as charged! (An indication of humility as well as humour on your 
part would have been to replace the '?' with ':)' or some such emoji)


As David Letterman use to say when folks complained about
his jokes "how much did you pay to listen to them".

I like JJ and was trying to lighten the mood.  If I
were to say the sky was a lovely shade of blue, you
find something offensive in it.






    By the way, "C String" REQUIRES a nul at the end:
    an error in the NativeCall documentation.


No, it does not. And even if it did, it should better go to the C, 
not Raku, documentation


Your original complaint was that you had encountered a problem with '\0' 
on strings and you wanted that problem to be included in the Raku 
documentation.


No fooling.



a) Irrespective of whether null-ended strings are a part of C or an 
implementation detail, it is not a Raku problem. So of the two 
assertions that JJ made, one might be debatable within the context of a 
C-language based list, not a Raku list, and the second is True about 
reference materials in Raku,  but arguably the tutorial materials could 
be enhanced.


Yes it is a problem if using the documentation sets you down
a bad path.  NativeCall interfaces with C, so you better
inform the read as to what those requirements are.  Not
give examples that do not work in practice.



b) The way in which you present your point of view is 
counter-productive. I would agree with you that for irregular users of C 
working with some libraries, strings without '\0' terminations could 
trigger unexpected responses. It would be useful, therefore, if at an 
appropriate point in the NativeCall POD file, a comment is included to 
this effect.


I would be fine with that.  This is how I write it in my
own documentation:

   Raku strings and “C” strings are two vastly different
   things.  A Raku string is a data “structure”.  By
   definition, a “C” string is an array of characters
   terminated with nul, chr(0) (0x00).  You have to
   convert Raku strings into a “C” string format usable
   by NativeCall:

   Use the following to convert to a "C" string and
   then tack a nul on the end:

   Note: if the function name has a “W” at the end, use UTF16

   UTF8:  my $L =  CArray[uint8].new("abcdefg".encode.list);
  $L[$L.elems] = 0;

   UTF16: my $M = CArray[uint16].new("abcdefg".encode.list);
  $M[$M.elems] = 0;

   Note: you can't use `push` as it is an "immutable 'List'"

   Note: a UTF C string is “little-endian”  meaning “ABC” is
 represented as  0x4200 (A), 0X4300 (B), 0X4400 (C),
 0x (nul)

I go on to give same subs to do the conversion for you.


c) You could provide a useful service to the Raku community by offering 
a PR (Github Pull Request) with a patch.


Got to get past JJ first.  Once he give approval, then I
would LOVE to contribute.

d) Within the NativeCall POD there is a fairly extended tutorial about 
interfacing to an Internet function in a C library. I wrote that part of 
the document, having myself worked hard to get the function to 

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Richard Hainsworth

Todd,

You just did exactly what Liz said you would do by writing 'Richard has 
not liked me for a long time'.


Do you not even re-read your own posts or have the self-awareness to 
recognise it? Really?


Does it matter whether or not 'I like you'? This list is not some place 
for social media types where the most important thing is whether 'she 
liked me' or not.


As to profuse thanks: it's can be very irritating to scroll to the end 
of long long long post only to find you have written 'thanks'. Try '+1' 
at the beginning.


You write below "That is a good character trait on your part.  I will 
wear you down eventually."


Sounds to me that you think we are idiots for helping you. And if you do 
'wear us down eventually', what does that mean? That will we stop 
replyng to you? or completely ignore you? or remove you from the email list?


Are any of those alternatively particularly attractive to you?

This hopefully will be the last time I respond to this thread.

I have replied to the other thread about cardinals because you raised a 
particularly interesting topic with some deep roots in mathematics and 
semiotics (though you may not have realised it). As I said below, you 
have a unique ability to ask questions. Perhaps what can be annoying is 
that you don't always listen to the answer.


Regards,

Richard

On 15/01/2020 22:39, ToddAndMargo via perl6-users wrote:

On 2020-01-15 14:18, Elizabeth Mattijsen wrote:

Thank you Richard for this long and thoughtful answer.

I have already given up on Todd, I'm glad to see others haven't 
(yet).  What will follow is probably a response that is either: a. 
everybody is against me, b. the Raku community won't listen, c. the 
various variations on those themes.  I sincerely hope that I'm wrong.


Liz


Hi Liz,

Richard has not liked me for a long time.  There
is really not anything I can do about it but
maybe wait him out.  I can say the sky is a lovely
shade of blue and he would find something offensive
in the remark.

 "a. everybody is against me, b. the Raku
 community won't listen, c. the various variations
 on those themes"

U.  I complain about the documentation and the
difficulty in try to get it fixed.  The rest of Raku,
I absolute adore and have said so, so many times
that I fear I am being tiresome.

And the "everybody is against me" remark is in your
head.  I have NEVER said anything like this.  Complaining
about the state of the documentation is not complaining
that everyone is against me.

And to add, I really like the folks on this group
as well as thank them profusely when they help me.
I am also starting to be able to return the favor and
help others.

And I even like you too.  You help me with things
and you don't even like me.  That is a good character
trait on your part.  I will wear you down eventually.

Raku and the members of this group are awesome.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Laurent Rosenfeld via perl6-users
I join with Liz and Tom to thank you, Richard, for this long and thoughtful
answer.



Le mer. 15 janv. 2020 à 22:57, Richard Hainsworth 
a écrit :

> Todd,
>
> Once again I find myself writing to you directly in response to a post
> of yours and asking again that you be respectful to others in this
> community. Striving for respect for everyone from everyone directly
> benefits us all.
>
> And disrespect harms you: your long emails defending your points of view
> have no persuasive power because you refuse to listen or to change.
>
> Further the self-aggrandising tone and disrespect to others are - to be
> quite blunt - also consistent with the word and phrases one might
> consider to be indicative of the intellectually challenged. It might be
> wise therefore to re-parse your responses before sending lest the
> readers of this list find their perceptions harden into belief.
>
> You have asked in response to a previous thread that if you are
> disrespectful, that it be pointed out. So here goes.
>
> On 15/01/2020 18:13, ToddAndMargo via perl6-users wrote:
> > On 2020-01-14 01:13, JJ Merelo wrote:
> >
> >> Never miss a good chance to bash documentation...
> >
> > Guilty as charged?
>
> No one has ever called the documentation perfect, but there is only one
> person who goes beyond the reasonable to vilify both the documentation
> and its volunteer creators.
>
> Guilty as charged! (An indication of humility as well as humour on your
> part would have been to replace the '?' with ':)' or some such emoji)
>
> >
> >
> >> By the way, "C String" REQUIRES a nul at the end:
> >> an error in the NativeCall documentation.
> >
> >> No, it does not. And even if it did, it should better go to the C,
> >> not Raku, documentation
>
> Your original complaint was that you had encountered a problem with '\0'
> on strings and you wanted that problem to be included in the Raku
> documentation.
>
> a) Irrespective of whether null-ended strings are a part of C or an
> implementation detail, it is not a Raku problem. So of the two
> assertions that JJ made, one might be debatable within the context of a
> C-language based list, not a Raku list, and the second is True about
> reference materials in Raku,  but arguably the tutorial materials could
> be enhanced.
>
> b) The way in which you present your point of view is
> counter-productive. I would agree with you that for irregular users of C
> working with some libraries, strings without '\0' terminations could
> trigger unexpected responses. It would be useful, therefore, if at an
> appropriate point in the NativeCall POD file, a comment is included to
> this effect.
>
> c) You could provide a useful service to the Raku community by offering
> a PR (Github Pull Request) with a patch.
>
> d) Within the NativeCall POD there is a fairly extended tutorial about
> interfacing to an Internet function in a C library. I wrote that part of
> the document, having myself worked hard to get the function to work. I
> documented my work, created a patch and offered it to the Perl 6
> community. I think it was my first patch. It was accepted. The
> documentation can be changed by newcomers. So long as the contributor is
> willing to LISTEN to requests for changes, as in grammar and spelling.
> Or in placing. By way of another example, I wrote a fairly long document
> about CompUnits, submitted a PR, which was not accepted. So be it. I
> understood the rationale for the rejection.
>
> >
> > Oh Great And Mighty Gatekeeper of the Documentation!
> This is plain disrespect. Calling JJ a dog was also disrespectful.
> Reversing a derogatory term for hyperbole is no less disrespectful.
> >
> > You are in error.  The problem is the mistake in the
> > documentation
> Several people have pointed out to you that they do not consider your
> interpretation of C to be definitive. Nor does it matter. What I could
> agree on (as said above) is that there are peculiarities of some
> versions of C that can trip the unwary, and that the TUTORIALS about an
> interface system, such as NativeCall, could include mention of the trap.
> > you won't fix
>
> It is not JJ's job to FIX the documentation. He has provided substantial
> and significant contributions to the documentation system as a whole. I
> am profoundly grateful to JJ for his efforts.
>
> You could also contribute to the community generated documentation by
> providing a PR.
>
> And please do not refer to your own reference notes. If you do in this
> thread, I will not refrain, as I have done so far, in subjecting them to
> the sort of searing review they deserve.
>
> > and your misunderstand of
> > the C programming language.
>
> Once again this is disrespectful. (In case English is your second
> language, I will not point out the grammatical error.) Since you were
> obviously not given any lessons in etiquette during your long life,
> perhaps a little pointer would be in order here. Rather than directly
> accusing someone of being in error, or 

Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 14:18, Elizabeth Mattijsen wrote:

Thank you Richard for this long and thoughtful answer.

I have already given up on Todd, I'm glad to see others haven't (yet).  What 
will follow is probably a response that is either: a. everybody is against me, 
b. the Raku community won't listen, c. the various variations on those themes.  
I sincerely hope that I'm wrong.

Liz


Hi Liz,

Richard has not liked me for a long time.  There
is really not anything I can do about it but
maybe wait him out.  I can say the sky is a lovely
shade of blue and he would find something offensive
in the remark.

 "a. everybody is against me, b. the Raku
 community won't listen, c. the various variations
 on those themes"

U.  I complain about the documentation and the
difficulty in try to get it fixed.  The rest of Raku,
I absolute adore and have said so, so many times
that I fear I am being tiresome.

And the "everybody is against me" remark is in your
head.  I have NEVER said anything like this.  Complaining
about the state of the documentation is not complaining
that everyone is against me.

And to add, I really like the folks on this group
as well as thank them profusely when they help me.
I am also starting to be able to return the favor and
help others.

And I even like you too.  You help me with things
and you don't even like me.  That is a good character
trait on your part.  I will wear you down eventually.

Raku and the members of this group are awesome.

-T


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Tom Browder
On Wed, Jan 15, 2020 at 4:19 PM Elizabeth Mattijsen  wrote:
>
> Thank you Richard for this long and thoughtful answer.

Amen, Liz!

-Tom (tbrowder)


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Elizabeth Mattijsen
Thank you Richard for this long and thoughtful answer.

I have already given up on Todd, I'm glad to see others haven't (yet).  What 
will follow is probably a response that is either: a. everybody is against me, 
b. the Raku community won't listen, c. the various variations on those themes.  
I sincerely hope that I'm wrong.

Liz

> On 15 Jan 2020, at 22:57, Richard Hainsworth  wrote:
> 
> Todd,
> 
> Once again I find myself writing to you directly in response to a post of 
> yours and asking again that you be respectful to others in this community. 
> Striving for respect for everyone from everyone directly benefits us all.
> 
> And disrespect harms you: your long emails defending your points of view have 
> no persuasive power because you refuse to listen or to change.
> 
> Further the self-aggrandising tone and disrespect to others are - to be quite 
> blunt - also consistent with the word and phrases one might consider to be 
> indicative of the intellectually challenged. It might be wise therefore to 
> re-parse your responses before sending lest the readers of this list find 
> their perceptions harden into belief.
> 
> You have asked in response to a previous thread that if you are 
> disrespectful, that it be pointed out. So here goes.
> 
> On 15/01/2020 18:13, ToddAndMargo via perl6-users wrote:
>> On 2020-01-14 01:13, JJ Merelo wrote:
>> 
>>> Never miss a good chance to bash documentation...
>> 
>> Guilty as charged?
> 
> No one has ever called the documentation perfect, but there is only one 
> person who goes beyond the reasonable to vilify both the documentation and 
> its volunteer creators.
> 
> Guilty as charged! (An indication of humility as well as humour on your part 
> would have been to replace the '?' with ':)' or some such emoji)
> 
>> 
>> 
>>> By the way, "C String" REQUIRES a nul at the end:
>>> an error in the NativeCall documentation.
>> 
>>> No, it does not. And even if it did, it should better go to the C, not 
>>> Raku, documentation
> 
> Your original complaint was that you had encountered a problem with '\0' on 
> strings and you wanted that problem to be included in the Raku documentation.
> 
> a) Irrespective of whether null-ended strings are a part of C or an 
> implementation detail, it is not a Raku problem. So of the two assertions 
> that JJ made, one might be debatable within the context of a C-language based 
> list, not a Raku list, and the second is True about reference materials in 
> Raku,  but arguably the tutorial materials could be enhanced.
> 
> b) The way in which you present your point of view is counter-productive. I 
> would agree with you that for irregular users of C working with some 
> libraries, strings without '\0' terminations could trigger unexpected 
> responses. It would be useful, therefore, if at an appropriate point in the 
> NativeCall POD file, a comment is included to this effect.
> 
> c) You could provide a useful service to the Raku community by offering a PR 
> (Github Pull Request) with a patch.
> 
> d) Within the NativeCall POD there is a fairly extended tutorial about 
> interfacing to an Internet function in a C library. I wrote that part of the 
> document, having myself worked hard to get the function to work. I documented 
> my work, created a patch and offered it to the Perl 6 community. I think it 
> was my first patch. It was accepted. The documentation can be changed by 
> newcomers. So long as the contributor is willing to LISTEN to requests for 
> changes, as in grammar and spelling. Or in placing. By way of another 
> example, I wrote a fairly long document about CompUnits, submitted a PR, 
> which was not accepted. So be it. I understood the rationale for the 
> rejection.
> 
>> 
>> Oh Great And Mighty Gatekeeper of the Documentation!
> This is plain disrespect. Calling JJ a dog was also disrespectful. Reversing 
> a derogatory term for hyperbole is no less disrespectful.
>> 
>> You are in error.  The problem is the mistake in the
>> documentation
> Several people have pointed out to you that they do not consider your 
> interpretation of C to be definitive. Nor does it matter. What I could agree 
> on (as said above) is that there are peculiarities of some versions of C that 
> can trip the unwary, and that the TUTORIALS about an interface system, such 
> as NativeCall, could include mention of the trap.
>> you won't fix
> 
> It is not JJ's job to FIX the documentation. He has provided substantial and 
> significant contributions to the documentation system as a whole. I am 
> profoundly grateful to JJ for his efforts.
> 
> You could also contribute to the community generated documentation by 
> providing a PR.
> 
> And please do not refer to your own reference notes. If you do in this 
> thread, I will not refrain, as I have done so far, in subjecting them to the 
> sort of searing review they deserve.
> 
>> and your misunderstand of
>> the C programming language.
> 
> Once again this is disrespectful. (In 

Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Richard Hainsworth

Todd,

Once again I find myself writing to you directly in response to a post 
of yours and asking again that you be respectful to others in this 
community. Striving for respect for everyone from everyone directly 
benefits us all.


And disrespect harms you: your long emails defending your points of view 
have no persuasive power because you refuse to listen or to change.


Further the self-aggrandising tone and disrespect to others are - to be 
quite blunt - also consistent with the word and phrases one might 
consider to be indicative of the intellectually challenged. It might be 
wise therefore to re-parse your responses before sending lest the 
readers of this list find their perceptions harden into belief.


You have asked in response to a previous thread that if you are 
disrespectful, that it be pointed out. So here goes.


On 15/01/2020 18:13, ToddAndMargo via perl6-users wrote:

On 2020-01-14 01:13, JJ Merelo wrote:


Never miss a good chance to bash documentation...


Guilty as charged?


No one has ever called the documentation perfect, but there is only one 
person who goes beyond the reasonable to vilify both the documentation 
and its volunteer creators.


Guilty as charged! (An indication of humility as well as humour on your 
part would have been to replace the '?' with ':)' or some such emoji)






    By the way, "C String" REQUIRES a nul at the end:
    an error in the NativeCall documentation.


No, it does not. And even if it did, it should better go to the C, 
not Raku, documentation


Your original complaint was that you had encountered a problem with '\0' 
on strings and you wanted that problem to be included in the Raku 
documentation.


a) Irrespective of whether null-ended strings are a part of C or an 
implementation detail, it is not a Raku problem. So of the two 
assertions that JJ made, one might be debatable within the context of a 
C-language based list, not a Raku list, and the second is True about 
reference materials in Raku,  but arguably the tutorial materials could 
be enhanced.


b) The way in which you present your point of view is 
counter-productive. I would agree with you that for irregular users of C 
working with some libraries, strings without '\0' terminations could 
trigger unexpected responses. It would be useful, therefore, if at an 
appropriate point in the NativeCall POD file, a comment is included to 
this effect.


c) You could provide a useful service to the Raku community by offering 
a PR (Github Pull Request) with a patch.


d) Within the NativeCall POD there is a fairly extended tutorial about 
interfacing to an Internet function in a C library. I wrote that part of 
the document, having myself worked hard to get the function to work. I 
documented my work, created a patch and offered it to the Perl 6 
community. I think it was my first patch. It was accepted. The 
documentation can be changed by newcomers. So long as the contributor is 
willing to LISTEN to requests for changes, as in grammar and spelling. 
Or in placing. By way of another example, I wrote a fairly long document 
about CompUnits, submitted a PR, which was not accepted. So be it. I 
understood the rationale for the rejection.




Oh Great And Mighty Gatekeeper of the Documentation!
This is plain disrespect. Calling JJ a dog was also disrespectful. 
Reversing a derogatory term for hyperbole is no less disrespectful.


You are in error.  The problem is the mistake in the
documentation
Several people have pointed out to you that they do not consider your 
interpretation of C to be definitive. Nor does it matter. What I could 
agree on (as said above) is that there are peculiarities of some 
versions of C that can trip the unwary, and that the TUTORIALS about an 
interface system, such as NativeCall, could include mention of the trap.

you won't fix


It is not JJ's job to FIX the documentation. He has provided substantial 
and significant contributions to the documentation system as a whole. I 
am profoundly grateful to JJ for his efforts.


You could also contribute to the community generated documentation by 
providing a PR.


And please do not refer to your own reference notes. If you do in this 
thread, I will not refrain, as I have done so far, in subjecting them to 
the sort of searing review they deserve.



and your misunderstand of
the C programming language.


Once again this is disrespectful. (In case English is your second 
language, I will not point out the grammatical error.) Since you were 
obviously not given any lessons in etiquette during your long life, 
perhaps a little pointer would be in order here. Rather than directly 
accusing someone of being in error, or of misunderstanding something, 
and thereby diminishing that person in a public forum, a less aggressive 
approach would be to say "I don't think I agree with you" and then state 
the facts as you see them. In this way, if the person you are 
communicating with changes his/her mind to acknowledge you 

Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-13 23:11, Darren Duncan wrote:

Yes, a uint32 CAN represent a cardinal, but it can ALSO represent an 
ordinal or a nominal or various other things.


It would help me if you would show me some examples
of a uint would values were not whole nubmers
greater than or equal to zero
$_ >= 0



You tell me, take the following sequence:

     0, 1, 2, 3, 4, ...

Does that sequence denote cardinals, or ordinals, or both, or something 
else?


if $_ >= 0 and whole numbers, than it is a cardinal.  You
can call it something else if you please, like indexes, etc..


What high bit?  We're talking about mathematical definitions here, 
that's what you're quoting from Wikipedia.  Cardinals and ordinals and 
integers etc don't have "bits" in mathematics, never mind a high bit.


On paper, the high bit from the computer representation
is annotates by the minus sign.

In the computer, how the high bit is handled gives the
property of a cardinal or an integer.



Again, take the following:

     0, 1, 2, 3, 4, ...

I say that each of these is both a cardinal AND an integer.


No problem with that, until you get to the high bit.  Then
you have to treat them differently.


Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-15 10:13, ToddAndMargo via perl6-users wrote:

Note that "*lpData" can be a little endian four byte
DWORD cardial or a UTF16 array of WORDS.


And the UTF array of WORDS is also little endian.


Re: Bug to report: cardinal called an integer

2020-01-15 Thread ToddAndMargo via perl6-users

On 2020-01-14 01:13, JJ Merelo wrote:


Never miss a good chance to bash documentation...


Guilty as charged?



By the way, "C String" REQUIRES a nul at the end:
an error in the NativeCall documentation.


No, it does not. And even if it did, it should better go to the C, not 
Raku, documentation


Oh Great And Mighty Gatekeeper of the Documentation!

You are in error.  The problem is the mistake in the
documentation you won't fix and your misunderstand of
the C programming language.

INTERNATIONAL STANDARD ©ISO/IEC ISO/IEC 9899:201x
Programming languages — C
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

5.2.1 Character sets
:

  2 In a character constant or string literal, members
of the execution character set shall be
 represented
by corresponding members of the source character
set or by escape
 sequences consisting of the
backslash \ followed by one or more characters.
A byte with
 all bits set to 0, called the null
character, shall exist in the basic execution
character set; *it
 is used to terminate a character
string*.

7.1.1 Definitions of terms


  1  A string is a contiguous sequence of characters
 *terminated by and including the first null

 character*. The term multibyte string is
 sometimes used instead to emphasize special

 processing given to multibyte characters contained
 in the string or to avoid confusion
 with a wide
 string. A pointer to a string is a pointer to
 its initial (lowest addressed)
 character. The
 length of a string is the number of bytes
 preceding the null character and
 the value of a
 string is the sequence of the values of the
 contained characters, in order.


You are basically confusing a "String" with a "String literal".
They are two different things.  A String Literal can have
nuls in them that are part of the string literal.  And
with a string literal, you have to also keep track of the
length of the string literal.


In WinAPI, calls

https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsetvalueexw

a "string literal" is annotated as:
 const BYTE *lpData

And the byte count of such is
 DWORD  cbData

Note that "*lpData" can be a little endian four byte
DWORD cardial or a UTF16 array of WORDS.


A "C" string (not a string literal) would be

https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryvalueexw

LPCWSTR lpValueName

Are you able to see the difference between "const BYTE *lpData
plus DWORD cbData" and "LPCWSTR lpValueName"?  One is
a "String Literal" and the other one is "String".

"LPCWSTR lpValueName" does not need to know the length of the string 
because it expects to see a nul at the end.


Your holding on to NOT-A-BUG will mean that everyone
using the documentation will have to figure this all
out the hard way, as I did.

Oh great and exalted Gatekeeper, today you get a C-.
Minus for meanness.

Your favorite Golden Retriever,
-T


Re: Bug to report: cardinal called an integer

2020-01-14 Thread JJ Merelo
El mar., 14 ene. 2020 1:24, ToddAndMargo via perl6-users <
perl6-users@perl.org> escribió:

> On 2020-01-13 15:16, Laurent Rosenfeld via perl6-users wrote:
> > Your own record over the last years shows that you very often don't
> > understand documentation (and I actually sometimes wonder whether you're
> > even really interested in trying to understand it).
>
> Actually, I go there a lot and I tear my hair out.
> They are the antithesis of how Perl 5 wrote their
> documentation (the only part of Perl 5 I like better
> than Perl 6).
>

Never miss a good chance to bash documentation...

>
> > Your disdain for the documentation just confirms that.
>
> The documentation needs work.  Several involved in
> the documentation process have mentioned this in
> several places.  It is not like it is a secret.
> I have tried to contribute to it before, but I
> can't get past JJ.
>

I, the sole gatekeeper of documentation lore, banish you from ever entering
my realm. Vade retro!

I mean, really...

>
> And why do you think I am constantly find errors
> in the documentation.  Because I ignore them?
>
> By the way, "C String" REQUIRES a nul at the end:
> an error in the NativeCall documentation.
>

No, it does not. And even if it did, it should better go to the C, not
Raku, documentation

>
>
> > But since you
> > also explained very clearly times and again in the past that you don't
> > want to read books or tutorials either, I also wonder whether you're
> > interested in learning the language. I mean, *really* interested, to the
> > point of making *real* efforts in that direction.
>
> You have no idea what I go through.  You will if
> you ever get to see my paper on NativeCall and
> Win API.
>
>
> > The way you consistently mixed up uint and Uint in the last hours,
> > despite having been warned about this mistake, also shows a lack of
> > proper consideration for the documentation.
>
> Now that is a mystery to me.  The documentation for UInt
> does not mention uint.   But UInt and uint act exactly
> the same and have exactly the same properties.  But
> somehow they are different.  Since you know more than
> I about Raku, please teach me the different.
>
> Maybe I presume too much thinking this is yet another
> error/oversight in the documentation.  Neither UInt
> or uint even show up on
>
> https://docs.raku.org/images/type-graph-Numeric.svg
>
>
> >
> > The way you obstinately use the word  "cardinal" these last days also
> > shows it, since there is simply no such thing as cardinals in the Raku
> > types, subsets, or whatever, and, even though some languages have used
> > it in the past (and, yes, I have also used Modula-2 in a quite distant
> > past), "cardinal" is certainly NOT a common IT concept (I mean in the
> > way integer, unsigned integer, or float are common concepts, often
> > defined by CPU manufacturers). Granted, most people here probably have a
> > good understanding of the word "cardinal," but it's essentially a math
> > concept, and has no precise definition in a programming language, unless
> > of course the programming language in question does define it, which
> > Raku doesn't. Yes, cardinals may be loosely described as integers equal
> > to or larger than zero, but that doesn't make a definition and that
> > tells us nothing about their range or maximal value, or about the
> > methods that can be invoked on them, and so on.
>
> "cardinal" is a generic arithmetic and programming term.
> It does not denote how many bit or bytes or whose CPU
> calls what.  And it is only uncommon if you have not
> heard it before.  And with your programming experience,
> you should know the difference between generic
> programming terms and language specific terms.
>
> > So, please, stop using the word "cardinal,", which is just improper,
> > useless and essentially meaningless in the context of thee Raku
> > language. Please use the types, subsets and other concept properly
> > defined in Raku.
>
> Look at what I write closely.  When I use a generic term like cardinal,
> I always put the Raku term in parenthesis.  If
> this is not understandable to others, then it is a technical
> writing issue on my part, not an ignorance of the
> specifics any programming language.
>
> I have been doing a lot with NativeCall and WinAPI
> functions the last several weeks, so I have been
> using a lot of generic terms and have had to learn C++
> terms the hard way and how they map to Raku types.
> (This is all in my paper.)  NativeCalls documentation
> is almost, but not completely, useless.
>
> By the way DWORD is a form of cardinal and are best
> emulated as uint16.  You run into trouble with int16.
> Did you notice that I said "form of a"?
>
> I do the same thing with the generic term "Pointer", which
> by the way can mean a lot of things.  Not all pointers
> are C Pointers, such as Perl 5's "references", which is
> what the parenthesis are for.  So when you use the term
> "Pointer" you have to say what kind of pointer your
> 

Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 22:56, Darren Duncan wrote:
Brad is saying what I've been saying, while a uint CAN represent a 
cardinal number, one does NOT ALWAYS represent a cardinal number, so 
saying this only IS a cardinal number is WRONG. -- Darren Duncan


Hi Darren,

You are mixing specific data constructions with generic
arithmetic and programming terms.

The Raku uint series of natives and UInt in Raku
are all cardinals.  Raku and assembly code like
to call them "unsigned integers".  Other languages
freely use the term Cardinal.  Both names are the
same thing.  The difference is that one is quicker
to spell, that is all.  Pick which either name
your like.

Since Raku uses the term "unsigned integers" for the
family of numbers that cardinals belong to, it is
probably best to call them "unsigned integers" so as
to not cause the confusing/consternation I caused.

$ p6 'my UInt $c = -4;'
Type check failed in assignment to $c; expected UInt but
got Int (-4) in block  at -e line 1

You can get away with a standard uint as Raku will
flip the type on you on the fly.  It won't flip
a UInt as it is a subset.

Now if you want to talk specific data constructions:
an int8 is not an int16, even though both are
"generic term" integers.  And an uint16 is not a
uint32 even though the are all "generic
term" cardinals / unsigned integers, whichever
name you picked.

When you hear me say "cardinal", think he is talking
about a family of numbers, not a specific data
construction.

Oh and Raku has an unbounded by byte length cardinal
called a UInt.  Any byte length goes and way, way
past 64 bits if you want.  Now that is a machine
language abomination and I LOVE IT!  Damn Larry
is cleaver!

-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Darren Duncan

On 2020-01-12 11:32 p.m., ToddAndMargo via perl6-users wrote:

On 2020-01-12 20:03, Darren Duncan wrote:

A uint32 is NOT specifically a cardinal.


Since a uint32 ca not be negative or a fraction,
it is a cardinal.  Other operating system do call
them cardinals, such as Modula2. Pascal, C++ (I
think C too), Java, and so on and so forth.


Yes, a uint32 CAN represent a cardinal, but it can ALSO represent an ordinal or 
a nominal or various other things.


A uint32 is just as much an ordinal as a cardinal, so insisting on calling it 
a cardinal means the type can't be used as an ordinal, or a variety of other 
things.


https://www.dictionary.com/browse/ordinal-number
    ordinal number
    noun
    Also called ordinal numeral. any of the numbers that
    express degree, quality, or position in a series, as
    first, second, and third *(distinguished from cardinal
    number)*.

    Mathematics. a symbol denoting both the cardinal number
    and the ordering of a given set, being identical for
    two ordered sets having elements that can be placed
    into one-to-one correspondence, the correspondence
    preserving the order of the elements.

https://www.dictionary.com/browse/cardinal-number
    cardinal number
    noun
    Also called cardinal numeral. any of the numbers
    that express amount, as one, two, three, etc.
    *(distinguished from ordinal number)*.

No idea how you are mixing these two.  I can see
how yo would use a cardinal in programming to
denote an ordinal, if that is what you are getting at.


These are different semantics applied to the same representations.

You tell me, take the following sequence:

0, 1, 2, 3, 4, ...

Does that sequence denote cardinals, or ordinals, or both, or something else?

I would say both.  If you say it is only cardinals or only ordinals, then how do 
you determine that it is just one and not the other.


Calling this an unsigned integer (u int) is much more accurate as it doesn't 
presume a particular semantics such as that we are storing a count rather than 
a position for example, it says what we actually know, and no more.


I am sorry, I have no idea what you are trying to say.  I do not care if you 
call a cardinal an unsigned integer.  Just

don't call it an integer.  The high bit in a cardinal is
part of the number and denotes a negative number in an integer.


What high bit?  We're talking about mathematical definitions here, that's what 
you're quoting from Wikipedia.  Cardinals and ordinals and integers etc don't 
have "bits" in mathematics, never mind a high bit.


The way I see it, you are making the mistake of confusing mathematical concepts 
with possible representations for them in a computer.  A cardinal or ordinal or 
integer is a mathematical concept that is not defined in terms of bits.  Each of 
these has possible representations in a computer as a sequence of bits.  The 
same bit pattern that a uint32 holds can possibly represent either a cardinal or 
an ordinal but is not a cardinal or an ordinal itself.


You are also wrong on saying that the values one can store in a uint32 are not 
integers; they definitely ARE integers.  Every cardinal is an integer.


Where do you get that.  A cardinal can not be negative.  An
Integer can.  And the structure is even different:  the high
bit in an integer denote the sign of the integer; the high bit
in a cardinal is just a higher positive number.  So they
are not the same by any shake.


Again, take the following:

0, 1, 2, 3, 4, ...

I say that each of these is both a cardinal AND an integer.  True that a 
cardinal can not be negative, but both a cardinal and an integer CAN be 
positive, so any positive whole number IS an integer just as it also IS a cardinal.


-- Darren Duncan


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Darren Duncan
Brad is saying what I've been saying, while a uint CAN represent a cardinal 
number, one does NOT ALWAYS represent a cardinal number, so saying this only IS 
a cardinal number is WRONG. -- Darren Duncan


On 2020-01-13 12:56 p.m., Brad Gilbert wrote:

Ok looking into it, zero is inside of the set of cardinal numbers.

It is still wrong to call a uint a cardinal number.
It's just wrong for a different reason.

Looking through various definitions, a cardinal number is a number which 
represents a count of sets.


So a uint could be used to represent a cardinal number, but it could just as 
easily be a number that represents something other than a count.


If it is being used to index into a list it would be an ordinal number. (And so 
definitely not a cardinal number.)


Calling them cardinal numbers would imply something about them that may or may 
not be true.


If it is being used to store a bitmask, then it would be wrong to call it a 
cardinal, ordinal, or even a natural number.


It may also be wrong to call it an integer, but at least that is what CPU 
designers call it.


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 21:02, Aureliano Guedes wrote:
ToddAndMargo, this should handle any kind of columns separated data (or 
any table). If some column (commonly separated with a constant character 
as "\t", ";", "|", )  has different types (char, text, int, boolean, 
...) in a single column, then it should be treated as a character, but 
if it has only float (in all rows/lines) then the parser checks all rows 
for a same column (in this example case all them are float) and assign 
the column as float contain column.

Example:

NAME(long char);NICK(char);AGE(natural/positive
integer);HEIGHT(float m);WEIGHT(float kg)

John Lovegood;JoL;23;1.80;85.283

Marry Lockheart;Marry_L;35;1.68;63,125

You may see that the first line must be a header, all lines have 5 
fields separated by ";" and each field has a unique type (the 
specifications not aways be declared on the data or file).


How are you getting this data back?  In a buffer of
DWORDS that you have to cut up?  Or are they already
formatted for you?


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 21:02, Aureliano Guedes wrote:
ToddAndMargo, this should handle any kind of columns separated data (or 
any table). If some column (commonly separated with a constant character 
as "\t", ";", "|", )  has different types (char, text, int, boolean, 
...) in a single column, then it should be treated as a character, but 
if it has only float (in all rows/lines) then the parser checks all rows 
for a same column (in this example case all them are float) and assign 
the column as float contain column.

Example:

NAME(long char);NICK(char);AGE(natural/positive
integer);HEIGHT(float m);WEIGHT(float kg)

John Lovegood;JoL;23;1.80;85.283

Marry Lockheart;Marry_L;35;1.68;63,125

You may see that the first line must be a header, all lines have 5 
fields separated by ";" and each field has a unique type (the 
specifications not aways be declared on the data or file).






Consider an array of hashes:

my Str  $Name;
my Str  $NickName;
my uint $Age;
my num  $Height;
my num  $Weight;
my  @Members;

my %Person= ( Name=> $Name, NickName => $NickName, Age=> $Age, Height=> 
$Height, Weight=> $Weight );


Then you can use "push" to create an array of hashes on to @Members as 
you read in each member.


push @Members, %Person;


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Aureliano Guedes
ToddAndMargo, this should handle any kind of columns separated data (or any
table). If some column (commonly separated with a constant character as
"\t", ";", "|", )  has different types (char, text, int, boolean, ...)
in a single column, then it should be treated as a character, but if it has
only float (in all rows/lines) then the parser checks all rows for a same
column (in this example case all them are float) and assign the column as
float contain column.
Example:

NAME(long char);NICK(char);AGE(natural/positive integer);HEIGHT(float
m);WEIGHT(float kg)

John Lovegood;JoL;23;1.80;85.283

Marry Lockheart;Marry_L;35;1.68;63,125

You may see that the first line must be a header, all lines have 5 fields
separated by ";" and each field has a unique type (the specifications not
aways be declared on the data or file).


Paul Proacci, thank you for a lot. I agree with you. Then, float, integer,
boolean and char are the most commons and probably better to assign. But
persist the question, which is the best strategy to define with which type
assign some column?

On Mon, Jan 13, 2020 at 11:28 PM Paul Procacci  wrote:

> >> what is the best strategy?
>
> My general rule of thumb:
>
> If you control the value then you can pick whatever data type that has the
> largest number of bits to hold your largest value.[1]
> If you don't control the value, stick with an Int (or Uint).
>
> If you stick with Int you can later modify it to use more tailor made type
> as necessary, but Int is always going to be the safest bet.
>
> Hope this helps you.
>
> [1] I never use unsigned variants of integers where arithmetic may be
> involved do to overflow and use variants of signed integers instead
> whenever possible.
>
> On Mon, Jan 13, 2020 at 11:09 PM Aureliano Guedes <
> guedes.aureli...@gmail.com> wrote:
>
>> About the Raku typing, suppose I'll write a library to deal with data
>> frames/tables (as PDL - Perl(5) Data Language), something like
>> Pandas-Python or R.
>> After reading the file (csv; tsv ) I'd like that some routine
>> identifies the best type to fix each column (especially in cases like Unit,
>> unit, int, ) what is the best strategy?
>>
>> On Mon, Jan 13, 2020 at 10:51 PM ToddAndMargo via perl6-users <
>> perl6-users@perl.org> wrote:
>>
>>> >> On Mon, Jan 13, 2020 at 9:51 PM ToddAndMargo via perl6-users
>>> >> mailto:perl6-users@perl.org>> wrote:
>>> >>
>>> >> On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:
>>> >>  > On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:
>>> >>  >> And, no one is telling me percisely what the difference
>>> >>  >> between UInt and uint is other than one is a subset of
>>> >>  >> Int and the other is a native type.  They act exactly
>>> >>  >> the same.
>>> >>  >
>>> >>  > Hi All,
>>> >>  >
>>> >>  > Off line, Paul told me what the difference is
>>> >>  > between a UInt and a uint.
>>> >>  >
>>> >>  > uint is constrained:
>>> >>  >
>>> >>  >  p6 'my uint $c = 0x0; $c = $c +| 0x1;'
>>> >>  >  Cannot unbox 65 bit wide bigint into native integer
>>> >>  >   in block  at -e line 1
>>> >>  >
>>> >>  > UInt uses magic Larry Wall powder to remove the constraints
>>> >>  > from the variable.  (Same powder he uses to create nils.)
>>> >>  >
>>> >>  >  p6 'my UInt $c = 0x0; $c = $c +|
>>> >>  > 0x1F;
>>> say
>>> >> $c'
>>> >>  >
>>> 862718293348820473429344482784628181556388621521298319395315527974911
>>> >>  >
>>> >>  > Other than the constrains, they act exactly the same.
>>> >>  > Oh, and they are both (generic programming term) unsigned
>>> integers
>>> >>  > (cardinals)
>>> >>  >
>>> >>  > :-)
>>> >>  >
>>> >>  > -T
>>> >>
>>> >>
>>> >> And good luck, all you who told me to read the
>>> >> documentation, trying to find the constraints
>>> >> explanation in the documentation:
>>> >>
>>> >> https://docs.raku.org/type/UInt
>>> >>
>>> >> Have fun!
>>> >>
>>> >> But it does say "The UInt is defined as a subset of Int:"
>>> >> and Int is definitely constrained.
>>> >>
>>>
>>> On 2020-01-13 19:13, Paul Procacci wrote:
>>> >  >> trying to find the constraints explanation in the documentation:
>>> >
>>> > https://docs.raku.org/language/nativetypes
>>> >
>>> > "Raku offers a set of /native/ types with a fixed, and known,
>>> > representation in memory"
>>> > and
>>> > "However, these types do not necessarily have the size that is
>>> required
>>> > by the NativeCall 
>>> interface
>>> > (e.g., Raku's |int| can be 8 bytes but C's |int| is only 4 bytes)"
>>> >
>>> > Took me all of 30 seconds to find.  Obviously that page has much more
>>> > information to offer than just those couple of sentences, but ALL
>>> native
>>> > types are constrained by a certain number of bits.
>>>
>>>
>>> Hi 

Re: Bug to report: cardinal called an integer

2020-01-13 Thread Paul Procacci
>> what is the best strategy?

My general rule of thumb:

If you control the value then you can pick whatever data type that has the
largest number of bits to hold your largest value.[1]
If you don't control the value, stick with an Int (or Uint).

If you stick with Int you can later modify it to use more tailor made type
as necessary, but Int is always going to be the safest bet.

Hope this helps you.

[1] I never use unsigned variants of integers where arithmetic may be
involved do to overflow and use variants of signed integers instead
whenever possible.

On Mon, Jan 13, 2020 at 11:09 PM Aureliano Guedes <
guedes.aureli...@gmail.com> wrote:

> About the Raku typing, suppose I'll write a library to deal with data
> frames/tables (as PDL - Perl(5) Data Language), something like
> Pandas-Python or R.
> After reading the file (csv; tsv ) I'd like that some routine
> identifies the best type to fix each column (especially in cases like Unit,
> unit, int, ) what is the best strategy?
>
> On Mon, Jan 13, 2020 at 10:51 PM ToddAndMargo via perl6-users <
> perl6-users@perl.org> wrote:
>
>> >> On Mon, Jan 13, 2020 at 9:51 PM ToddAndMargo via perl6-users
>> >> mailto:perl6-users@perl.org>> wrote:
>> >>
>> >> On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:
>> >>  > On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:
>> >>  >> And, no one is telling me percisely what the difference
>> >>  >> between UInt and uint is other than one is a subset of
>> >>  >> Int and the other is a native type.  They act exactly
>> >>  >> the same.
>> >>  >
>> >>  > Hi All,
>> >>  >
>> >>  > Off line, Paul told me what the difference is
>> >>  > between a UInt and a uint.
>> >>  >
>> >>  > uint is constrained:
>> >>  >
>> >>  >  p6 'my uint $c = 0x0; $c = $c +| 0x1;'
>> >>  >  Cannot unbox 65 bit wide bigint into native integer
>> >>  >   in block  at -e line 1
>> >>  >
>> >>  > UInt uses magic Larry Wall powder to remove the constraints
>> >>  > from the variable.  (Same powder he uses to create nils.)
>> >>  >
>> >>  >  p6 'my UInt $c = 0x0; $c = $c +|
>> >>  > 0x1F;
>> say
>> >> $c'
>> >>  >
>> 862718293348820473429344482784628181556388621521298319395315527974911
>> >>  >
>> >>  > Other than the constrains, they act exactly the same.
>> >>  > Oh, and they are both (generic programming term) unsigned
>> integers
>> >>  > (cardinals)
>> >>  >
>> >>  > :-)
>> >>  >
>> >>  > -T
>> >>
>> >>
>> >> And good luck, all you who told me to read the
>> >> documentation, trying to find the constraints
>> >> explanation in the documentation:
>> >>
>> >> https://docs.raku.org/type/UInt
>> >>
>> >> Have fun!
>> >>
>> >> But it does say "The UInt is defined as a subset of Int:"
>> >> and Int is definitely constrained.
>> >>
>>
>> On 2020-01-13 19:13, Paul Procacci wrote:
>> >  >> trying to find the constraints explanation in the documentation:
>> >
>> > https://docs.raku.org/language/nativetypes
>> >
>> > "Raku offers a set of /native/ types with a fixed, and known,
>> > representation in memory"
>> > and
>> > "However, these types do not necessarily have the size that is required
>> > by the NativeCall 
>> interface
>> > (e.g., Raku's |int| can be 8 bytes but C's |int| is only 4 bytes)"
>> >
>> > Took me all of 30 seconds to find.  Obviously that page has much more
>> > information to offer than just those couple of sentences, but ALL
>> native
>> > types are constrained by a certain number of bits.
>>
>>
>> Hi Paul,
>>
>> For those of you who were no privy to Paul and my
>> offline discussion, he must have wrote me 10
>> times trying to explain things to me before
>> I got it.  He is a real mensch.
>>
>> 30 seconds!  Yikes!  I never found it.
>>
>> https://docs.raku.org/type/UInt
>> should have stated that directly, but did not.
>>
>> And to add injury,
>>
>> https://docs.raku.org/language/nativetypes
>>  "Raku offers a set of /native/ types with a fixed,
>>  and known, representation in memory"
>>
>> Did not state who they were.  Sort of like when I
>> want the  salt, I always reach for the pepper!
>>
>> The state of the documentation drives me  ...
>>
>>  AAHH! 
>>
>> -T
>>
>
>
> --
> Aureliano Guedes
> skype: aureliano.guedes
> contato:  (11) 94292-6110
> whatsapp +5511942926110
>


-- 
__

:(){ :|:& };:


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 20:09, Aureliano Guedes wrote:
About the Raku typing, suppose I'll write a library to deal with data 
frames/tables (as PDL - Perl(5) Data Language), something like 
Pandas-Python or R.
After reading the file (csv; tsv ) I'd like that some routine 
identifies the best type to fix each column (especially in cases like 
Unit, unit, int, ) what is the best strategy?



Would you give us an example of what the data looks like?


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Aureliano Guedes
About the Raku typing, suppose I'll write a library to deal with data
frames/tables (as PDL - Perl(5) Data Language), something like
Pandas-Python or R.
After reading the file (csv; tsv ) I'd like that some routine
identifies the best type to fix each column (especially in cases like Unit,
unit, int, ) what is the best strategy?

On Mon, Jan 13, 2020 at 10:51 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> >> On Mon, Jan 13, 2020 at 9:51 PM ToddAndMargo via perl6-users
> >> mailto:perl6-users@perl.org>> wrote:
> >>
> >> On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:
> >>  > On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:
> >>  >> And, no one is telling me percisely what the difference
> >>  >> between UInt and uint is other than one is a subset of
> >>  >> Int and the other is a native type.  They act exactly
> >>  >> the same.
> >>  >
> >>  > Hi All,
> >>  >
> >>  > Off line, Paul told me what the difference is
> >>  > between a UInt and a uint.
> >>  >
> >>  > uint is constrained:
> >>  >
> >>  >  p6 'my uint $c = 0x0; $c = $c +| 0x1;'
> >>  >  Cannot unbox 65 bit wide bigint into native integer
> >>  >   in block  at -e line 1
> >>  >
> >>  > UInt uses magic Larry Wall powder to remove the constraints
> >>  > from the variable.  (Same powder he uses to create nils.)
> >>  >
> >>  >  p6 'my UInt $c = 0x0; $c = $c +|
> >>  > 0x1F; say
> >> $c'
> >>  >
> 862718293348820473429344482784628181556388621521298319395315527974911
> >>  >
> >>  > Other than the constrains, they act exactly the same.
> >>  > Oh, and they are both (generic programming term) unsigned
> integers
> >>  > (cardinals)
> >>  >
> >>  > :-)
> >>  >
> >>  > -T
> >>
> >>
> >> And good luck, all you who told me to read the
> >> documentation, trying to find the constraints
> >> explanation in the documentation:
> >>
> >> https://docs.raku.org/type/UInt
> >>
> >> Have fun!
> >>
> >> But it does say "The UInt is defined as a subset of Int:"
> >> and Int is definitely constrained.
> >>
>
> On 2020-01-13 19:13, Paul Procacci wrote:
> >  >> trying to find the constraints explanation in the documentation:
> >
> > https://docs.raku.org/language/nativetypes
> >
> > "Raku offers a set of /native/ types with a fixed, and known,
> > representation in memory"
> > and
> > "However, these types do not necessarily have the size that is required
> > by the NativeCall  interface
> > (e.g., Raku's |int| can be 8 bytes but C's |int| is only 4 bytes)"
> >
> > Took me all of 30 seconds to find.  Obviously that page has much more
> > information to offer than just those couple of sentences, but ALL native
> > types are constrained by a certain number of bits.
>
>
> Hi Paul,
>
> For those of you who were no privy to Paul and my
> offline discussion, he must have wrote me 10
> times trying to explain things to me before
> I got it.  He is a real mensch.
>
> 30 seconds!  Yikes!  I never found it.
>
> https://docs.raku.org/type/UInt
> should have stated that directly, but did not.
>
> And to add injury,
>
> https://docs.raku.org/language/nativetypes
>  "Raku offers a set of /native/ types with a fixed,
>  and known, representation in memory"
>
> Did not state who they were.  Sort of like when I
> want the  salt, I always reach for the pepper!
>
> The state of the documentation drives me  ...
>
>  AAHH! 
>
> -T
>


-- 
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users
On Mon, Jan 13, 2020 at 9:51 PM ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:
 > On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:
 >> And, no one is telling me percisely what the difference
 >> between UInt and uint is other than one is a subset of
 >> Int and the other is a native type.  They act exactly
 >> the same.
 >
 > Hi All,
 >
 > Off line, Paul told me what the difference is
 > between a UInt and a uint.
 >
 > uint is constrained:
 >
 >  p6 'my uint $c = 0x0; $c = $c +| 0x1;'
 >  Cannot unbox 65 bit wide bigint into native integer
 >   in block  at -e line 1
 >
 > UInt uses magic Larry Wall powder to remove the constraints
 > from the variable.  (Same powder he uses to create nils.)
 >
 >  p6 'my UInt $c = 0x0; $c = $c +|
 > 0x1F; say
$c'
 > 862718293348820473429344482784628181556388621521298319395315527974911
 >
 > Other than the constrains, they act exactly the same.
 > Oh, and they are both (generic programming term) unsigned integers
 > (cardinals)
 >
 > :-)
 >
 > -T


And good luck, all you who told me to read the
documentation, trying to find the constraints
explanation in the documentation:

https://docs.raku.org/type/UInt

Have fun!

But it does say "The UInt is defined as a subset of Int:"
and Int is definitely constrained.



On 2020-01-13 19:13, Paul Procacci wrote:

 >> trying to find the constraints explanation in the documentation:

https://docs.raku.org/language/nativetypes

"Raku offers a set of /native/ types with a fixed, and known, 
representation in memory"

and
"However, these types do not necessarily have the size that is required 
by the NativeCall  interface 
(e.g., Raku's |int| can be 8 bytes but C's |int| is only 4 bytes)"


Took me all of 30 seconds to find.  Obviously that page has much more 
information to offer than just those couple of sentences, but ALL native 
types are constrained by a certain number of bits.



Hi Paul,

For those of you who were no privy to Paul and my
offline discussion, he must have wrote me 10
times trying to explain things to me before
I got it.  He is a real mensch.

30 seconds!  Yikes!  I never found it.

https://docs.raku.org/type/UInt
should have stated that directly, but did not.

And to add injury,

https://docs.raku.org/language/nativetypes
"Raku offers a set of /native/ types with a fixed,
and known, representation in memory"

Did not state who they were.  Sort of like when I
want the  salt, I always reach for the pepper!

The state of the documentation drives me  ...

 AAHH! 

-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Paul Procacci
 >> trying to find the constraints explanation in the documentation:

https://docs.raku.org/language/nativetypes

"Raku offers a set of *native* types with a fixed, and known,
representation in memory"
and
"However, these types do not necessarily have the size that is required by
the NativeCall  interface (e.g.,
Raku's int can be 8 bytes but C's int is only 4 bytes)"

Took me all of 30 seconds to find.  Obviously that page has much more
information to offer than just those couple of sentences, but ALL native
types are constrained by a certain number of bits.

On Mon, Jan 13, 2020 at 9:51 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:
> > On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:
> >> And, no one is telling me percisely what the difference
> >> between UInt and uint is other than one is a subset of
> >> Int and the other is a native type.  They act exactly
> >> the same.
> >
> > Hi All,
> >
> > Off line, Paul told me what the difference is
> > between a UInt and a uint.
> >
> > uint is constrained:
> >
> >  p6 'my uint $c = 0x0; $c = $c +| 0x1;'
> >  Cannot unbox 65 bit wide bigint into native integer
> >   in block  at -e line 1
> >
> > UInt uses magic Larry Wall powder to remove the constraints
> > from the variable.  (Same powder he uses to create nils.)
> >
> >  p6 'my UInt $c = 0x0; $c = $c +|
> > 0x1F; say $c'
> > 862718293348820473429344482784628181556388621521298319395315527974911
> >
> > Other than the constrains, they act exactly the same.
> > Oh, and they are both (generic programming term) unsigned integers
> > (cardinals)
> >
> > :-)
> >
> > -T
>
>
> And good luck, all you who told me to read the
> documentation, trying to find the constraints
> explanation in the documentation:
>
> https://docs.raku.org/type/UInt
>
> Have fun!
>
> But it does say "The UInt is defined as a subset of Int:"
> and Int is definitely constrained.
>
>
>
> -T
>


-- 
__

:(){ :|:& };:


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 18:46, ToddAndMargo via perl6-users wrote:

On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:

And, no one is telling me percisely what the difference
between UInt and uint is other than one is a subset of
Int and the other is a native type.  They act exactly
the same.


Hi All,

Off line, Paul told me what the difference is
between a UInt and a uint.

uint is constrained:

     p6 'my uint $c = 0x0; $c = $c +| 0x1;'
     Cannot unbox 65 bit wide bigint into native integer
  in block  at -e line 1

UInt uses magic Larry Wall powder to remove the constraints
from the variable.  (Same powder he uses to create nils.)

     p6 'my UInt $c = 0x0; $c = $c +| 
0x1F; say $c'   
862718293348820473429344482784628181556388621521298319395315527974911


Other than the constrains, they act exactly the same.
Oh, and they are both (generic programming term) unsigned integers 
(cardinals)


:-)

-T



And good luck, all you who told me to read the
documentation, trying to find the constraints
explanation in the documentation:

https://docs.raku.org/type/UInt

Have fun!

But it does say "The UInt is defined as a subset of Int:"
and Int is definitely constrained.



-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 17:13, ToddAndMargo via perl6-users wrote:

And, no one is telling me percisely what the difference
between UInt and uint is other than one is a subset of
Int and the other is a native type.  They act exactly
the same.


Hi All,

Off line, Paul told me what the difference is
between a UInt and a uint.

uint is constrained:

p6 'my uint $c = 0x0; $c = $c +| 0x1;'
Cannot unbox 65 bit wide bigint into native integer
 in block  at -e line 1

UInt uses magic Larry Wall powder to remove the constraints
from the variable.  (Same powder he uses to create nils.)

p6 'my UInt $c = 0x0; $c = $c +| 
0x1F; say $c' 
  862718293348820473429344482784628181556388621521298319395315527974911


Other than the constrains, they act exactly the same.
Oh, and they are both (generic programming term) unsigned integers 
(cardinals)


:-)

-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 16:58, The Sidhekin wrote:
On Tue, Jan 14, 2020 at 1:25 AM ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


On 2020-01-13 15:16, Laurent Rosenfeld via perl6-users wrote:
 > The way you consistently mixed up uint and Uint in the last hours,
 > despite having been warned about this mistake, also shows a lack of
 > proper consideration for the documentation.

Now that is a mystery to me.  The documentation for UInt
does not mention uint.   But UInt and uint act exactly
the same and have exactly the same properties.


   See, this is exactly what I'm talking about: "Documentation is easier 
to understand if you read what it says, and not what you expect it to say."


   Documentation does not say UInt and uint act exactly the same and 
have exactly the same properties.


   That's your expectation.

   Ignore your expectations.  Read what the documentation says, not what 
you expect it to say.


   It'll make more sense.


Eirik



Hi Eirik,

I can't find anything in the documentation other than native types for 
uint.  Do you have a link?  I would love one

of those flow charts where it shows what is a member of.

"Expectation"?  You mean experience.  And they act exactly
they way I expect them too.  UInt and uint act *exactly*
alike when I use them.

And, no one is telling me percisely what the difference
between UInt and uint is other than one is a subset of
Int and the other is a native type.  They act exactly
the same.  Tell where I am wrong?

-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread The Sidhekin
On Tue, Jan 14, 2020 at 1:25 AM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 15:16, Laurent Rosenfeld via perl6-users wrote:
> > The way you consistently mixed up uint and Uint in the last hours,
> > despite having been warned about this mistake, also shows a lack of
> > proper consideration for the documentation.
>
> Now that is a mystery to me.  The documentation for UInt
> does not mention uint.   But UInt and uint act exactly
> the same and have exactly the same properties.


  See, this is exactly what I'm talking about: "Documentation is easier to
understand if you read what it says, and not what you expect it to say."

  Documentation does not say UInt and uint act exactly the same and have
exactly the same properties.

  That's your expectation.

  Ignore your expectations.  Read what the documentation says, not what you
expect it to say.

  It'll make more sense.


Eirik


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 15:16, Laurent Rosenfeld via perl6-users wrote:
Your own record over the last years shows that you very often don't 
understand documentation (and I actually sometimes wonder whether you're 
even really interested in trying to understand it).


Actually, I go there a lot and I tear my hair out.
They are the antithesis of how Perl 5 wrote their
documentation (the only part of Perl 5 I like better
than Perl 6).

Your disdain for the documentation just confirms that. 


The documentation needs work.  Several involved in
the documentation process have mentioned this in
several places.  It is not like it is a secret.
I have tried to contribute to it before, but I
can't get past JJ.

And why do you think I am constantly find errors
in the documentation.  Because I ignore them?

By the way, "C String" REQUIRES a nul at the end:
an error in the NativeCall documentation.


But since you 
also explained very clearly times and again in the past that you don't 
want to read books or tutorials either, I also wonder whether you're 
interested in learning the language. I mean, *really* interested, to the 
point of making *real* efforts in that direction.


You have no idea what I go through.  You will if
you ever get to see my paper on NativeCall and
Win API.


The way you consistently mixed up uint and Uint in the last hours, 
despite having been warned about this mistake, also shows a lack of 
proper consideration for the documentation.


Now that is a mystery to me.  The documentation for UInt
does not mention uint.   But UInt and uint act exactly
the same and have exactly the same properties.  But
somehow they are different.  Since you know more than
I about Raku, please teach me the different.

Maybe I presume too much thinking this is yet another
error/oversight in the documentation.  Neither UInt
or uint even show up on

https://docs.raku.org/images/type-graph-Numeric.svg




The way you obstinately use the word  "cardinal" these last days also 
shows it, since there is simply no such thing as cardinals in the Raku 
types, subsets, or whatever, and, even though some languages have used 
it in the past (and, yes, I have also used Modula-2 in a quite distant 
past), "cardinal" is certainly NOT a common IT concept (I mean in the 
way integer, unsigned integer, or float are common concepts, often 
defined by CPU manufacturers). Granted, most people here probably have a 
good understanding of the word "cardinal," but it's essentially a math 
concept, and has no precise definition in a programming language, unless 
of course the programming language in question does define it, which 
Raku doesn't. Yes, cardinals may be loosely described as integers equal 
to or larger than zero, but that doesn't make a definition and that 
tells us nothing about their range or maximal value, or about the 
methods that can be invoked on them, and so on.


"cardinal" is a generic arithmetic and programming term.
It does not denote how many bit or bytes or whose CPU
calls what.  And it is only uncommon if you have not
heard it before.  And with your programming experience,
you should know the difference between generic
programming terms and language specific terms.

So, please, stop using the word "cardinal,", which is just improper, 
useless and essentially meaningless in the context of thee Raku 
language. Please use the types, subsets and other concept properly 
defined in Raku.


Look at what I write closely.  When I use a generic term like cardinal, 
I always put the Raku term in parenthesis.  If

this is not understandable to others, then it is a technical
writing issue on my part, not an ignorance of the
specifics any programming language.

I have been doing a lot with NativeCall and WinAPI
functions the last several weeks, so I have been
using a lot of generic terms and have had to learn C++
terms the hard way and how they map to Raku types.
(This is all in my paper.)  NativeCalls documentation
is almost, but not completely, useless.

By the way DWORD is a form of cardinal and are best
emulated as uint16.  You run into trouble with int16.
Did you notice that I said "form of a"?

I do the same thing with the generic term "Pointer", which
by the way can mean a lot of things.  Not all pointers
are C Pointers, such as Perl 5's "references", which is
what the parenthesis are for.  So when you use the term
"Pointer" you have to say what kind of pointer your
are talking about.

This conversation reminds me of one I had with the Perl 5
folks.  I prefer to call hashes, "associative arrays".
I got told how ignorant I was and how much I did not
understand the Perl.  A quote from Larry himself
ended that: he piked "hash" because it was easier to
write (fewer letters).



Sorry, I really don't mean to be blunt, but you should try harder to 
learn from what knowledgeable people tell you. Most of those who 
answered you know better.


Regards,
Laurent.



Many thanks,
-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Laurent Rosenfeld via perl6-users
> What makes you think I did not understand the documentation?

Your own record over the last years shows that you very often don't
understand documentation (and I actually sometimes wonder whether you're
even really interested in trying to understand it).

Your disdain for the documentation just confirms that. But since you also
explained very clearly times and again in the past that you don't want to
read books or tutorials either, I also wonder whether you're interested in
learning the language. I mean, *really* interested, to the point of making
*real* efforts in that direction.

The way you consistently mixed up uint and Uint in the last hours, despite
having been warned about this mistake, also shows a lack of proper
consideration for the documentation.

The way you obstinately use the word  "cardinal" these last days also shows
it, since there is simply no such thing as cardinals in the Raku types,
subsets, or whatever, and, even though some languages have used it in the
past (and, yes, I have also used Modula-2 in a quite distant past),
"cardinal" is certainly NOT a common IT concept (I mean in the way integer,
unsigned integer, or float are common concepts, often defined by CPU
manufacturers). Granted, most people here probably have a good
understanding of the word "cardinal," but it's essentially a math concept,
and has no precise definition in a programming language, unless of course
the programming language in question does define it, which Raku doesn't.
Yes, cardinals may be loosely described as integers equal to or larger than
zero, but that doesn't make a definition and that tells us nothing about
their range or maximal value, or about the methods that can be invoked on
them, and so on.

So, please, stop using the word "cardinal,", which is just improper,
useless and essentially meaningless in the context of thee Raku language.
Please use the types, subsets and other concept properly defined in Raku.

Sorry, I really don't mean to be blunt, but you should try harder to learn
from what knowledgeable people tell you. Most of those who answered you
know better.

Regards,
Laurent.


Le lun. 13 janv. 2020 à 22:45, ToddAndMargo via perl6-users <
perl6-users@perl.org> a écrit :

> On 2020-01-13 12:43, The Sidhekin wrote:
>
>
>
> On Mon, Jan 13, 2020 at 8:51 PM ToddAndMargo via perl6-users <
> perl6-users@perl.org> wrote:
>
>> On 2020-01-13 11:10, ToddAndMargo via perl6-users wrote:
>> >
>> > https://docs.raku.org/type/UInt
>> > Subset UInt
>> > Unsigned integer (arbitrary-precision)
>> > The UInt is defined as a subset of Int:
>> > my subset UInt of Int where {not .defined or $_ >= 0};
>> > Consequently, it cannot be instantiated or subclassed;
>> > however, that shouldn't affect most normal uses
>>
>> Trivia:
>>
>> In https://docs.raku.org/type/UInt, a cardinal (uint)
>> is a subset
>>
>
>   Nope.  Case matters.  It's mixed case "UInt" (not "uint") that's a
> subset.
>
>
> Absolutely!  uint belongs to UInt
>
>
>
>> In https://docs.raku.org/language/nativetypes, a
>> cardinal (unit) gets their own "native type".
>>
>
>   … whereas (lower case) "uint" is a native type.
>
>   Documentation is easier to understand if you read what it says, and not
> what you expect it to say.
>
>
> Eirik
>
>
> Hi Erik,
>
> "uint" belongs to "UInt".  The error message should tell me one
> of the other.  I prefer "unit", but will compromise on "UInt".
> The ONLY beef I have is with the error message.
>
> What makes you think I did not understand the documentation?
> Perhaps it is you who does not understand me?
>
> Oh this is interesting:
> https://docs.perl6.org/type/UInt  (the raku one is missing the graphic)
>
> "The UInt is defined as a subset of Int:" but does not show on
> the graph.
>
> UInt --> Any --> Mu , but no "Int"
>
> Perhaps better stated would be
> UInt --> Int --> Any --> Numeric --> Mu
>
> I may have Mu and Numeric reversed
>
>
>
> Documentation is a thankless task  and those that do
> it are never appreciated.
>
> -T
>
>
>
>
>
>
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>
>


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

  
  
On 2020-01-13 14:22, The Sidhekin
  wrote:


  Your use of the term "uint" in reference
to "UInt" is what makes me think so.
  
  
    uint and UInt are different types –
conceptually related, but with no type relation between them –
the document on UInt tells you nothing about uint.


You are correct there

https://docs.raku.org/type/UInt

does not use the term "uint". But the examples go on to use UInt as
a
uint. H. Maybe the documentation needs a little polish.
UInt and uint have the exact same properties.


  
  
    So when you say "a cardinal (uint) is a
subset", this is not taken from the cited documentation, and
appears to be taken from your own misapprehension.
  
  
  


Neither UInt or unit appears on the chart:
https://docs.raku.org/images/type-graph-Numeric.svg



And I have noticed that a lot of folks have taken my use of the
generic
arithmetic and programming term of cardinal way out of context.

-T
  



Re: Bug to report: cardinal called an integer

2020-01-13 Thread The Sidhekin
On Mon, Jan 13, 2020 at 10:46 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 12:43, The Sidhekin wrote:
>
> On Mon, Jan 13, 2020 at 8:51 PM ToddAndMargo via perl6-users <
> perl6-users@perl.org> wrote:
>
>> In https://docs.raku.org/type/UInt, a cardinal (uint)
>> is a subset
>>
>
>   Nope.  Case matters.  It's mixed case "UInt" (not "uint") that's a
> subset.
>
>
> What makes you think I did not understand the documentation?
> Perhaps it is you who does not understand me?
>

  Your use of the term "uint" in reference to "UInt" is what makes me think
so.

  uint and UInt are different types – conceptually related, but with no
type relation between them – the document on UInt tells you nothing about
uint.

  So when you say "a cardinal (uint) is a subset", this is not taken from
the cited documentation, and appears to be taken from your own
misapprehension.


Eirik


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

  
  
On 2020-01-13 12:43, The Sidhekin
  wrote:


  
  




  On Mon, Jan 13, 2020 at 8:51
PM ToddAndMargo via perl6-users 
wrote:
  
  On 2020-01-13 11:10,
ToddAndMargo via perl6-users wrote:
> 
> https://docs.raku.org/type/UInt
>     Subset UInt
>     Unsigned integer (arbitrary-precision)
>     The UInt is defined as a subset of Int:
> 
   my subset UInt of Int where {not .defined or $_ >= 0};
> 
   Consequently, it cannot be instantiated or subclassed;
>     however, that shouldn't affect most normal uses

Trivia:

In https://docs.raku.org/type/UInt,
a cardinal (uint)
is a subset
  
  
  
    Nope.  Case matters.  It's mixed case "UInt" (not
"uint") that's a subset.
  

  


Absolutely!  uint belongs to UInt


  

   
  
In https://docs.raku.org/language/nativetypes,
a
cardinal (unit) gets their own "native type".
  
  
  
    … whereas (lower case) "uint" is a native type.
  
  
    Documentation is easier to understand if you read what
it says, and not what you expect it to say.
  
  
  
  
  
  Eirik
  

  


Hi Erik,

"uint" belongs to "UInt".  The error message should tell me one
of the other.  I prefer "unit", but will compromise on "UInt".
The ONLY beef I have is with the error message.

What makes you think I did not understand the documentation?
Perhaps it is you who does not understand me?  

Oh this is interesting:
https://docs.perl6.org/type/UInt  (the raku one is missing the
graphic)

"The UInt is defined as a subset of Int:"
but does not show on 
the graph.

UInt --> Any --> Mu , but no "Int"

Perhaps better stated would be
UInt --> Int --> Any --> Numeric --> Mu

I may have Mu and Numeric reversed



Documentation is a thankless task  and those that do
it are never appreciated.

-T







-- 
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
  



Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 12:56, Brad Gilbert wrote:

Ok looking into it, zero is inside of the set of cardinal numbers.

It is still wrong to call a uint a cardinal number.
It's just wrong for a different reason.

Looking through various definitions, a cardinal number is a number which 
represents a count of sets.


"count of sets" is going to far with the definition.  "Counting
number" is all a cardinal /unsigned integer is.



So a uint could be used to represent a cardinal number, but it could 
just as easily be a number that represents something other than a count.


If it is being used to index into a list it would be an ordinal number. 
(And so definitely not a cardinal number.)


Calling them cardinal numbers would imply something about them that may 
or may not be true.


The same would apply to calling it an unsigned integer.  You
are drilling down too far.



If it is being used to store a bitmask, then it would be wrong to call 
it a cardinal, ordinal, or even a natural number.


How so?  It is a collection of bits that counting numbers.

And you'd want to use a cardinal in a bit mask as the high
bit is not hijacked for the sign.

It may also be wrong to call it an integer, but at least that is what 
CPU designers call it.




Hi Brad,

When I use the term "cardinal" I am using the generic
arithmetic and programming term.  We call it a "uint"
is Raku.  Each computer language has it own set of
requirements and limitations for such.  I mean nothing
more or nothing less.

My only beef is with the error message.  I would like
the message changed to more accuracy reflect the
issue:

   This type cannot unbox to a native integer
to
   This type cannot unbox to subset UInt

or really pushing it:

   This type cannot unbox to native unsigned integer

The error is that athe variable is not a "native
integer", it is a native "unsigned integer".  This is
clearly stated at:

https://docs.raku.org/language/nativetypes

int   Equivalent to Int (with limited range)

uint  Equivalent to Int (with limited range) with
  the unsigned trait


-T


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Brad Gilbert
Ok looking into it, zero is inside of the set of cardinal numbers.

It is still wrong to call a uint a cardinal number.
It's just wrong for a different reason.

Looking through various definitions, a cardinal number is a number which
represents a count of sets.

So a uint could be used to represent a cardinal number, but it could just
as easily be a number that represents something other than a count.

If it is being used to index into a list it would be an ordinal number.
(And so definitely not a cardinal number.)

Calling them cardinal numbers would imply something about them that may or
may not be true.

If it is being used to store a bitmask, then it would be wrong to call it a
cardinal, ordinal, or even a natural number.

It may also be wrong to call it an integer, but at least that is what CPU
designers call it.


On Mon, Jan 13, 2020 at 1:51 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 11:10, ToddAndMargo via perl6-users wrote:
> >
> > https://docs.raku.org/type/UInt
> > Subset UInt
> > Unsigned integer (arbitrary-precision)
> > The UInt is defined as a subset of Int:
> > my subset UInt of Int where {not .defined or $_ >= 0};
> > Consequently, it cannot be instantiated or subclassed;
> > however, that shouldn't affect most normal uses
>
> Trivia:
>
> In https://docs.raku.org/type/UInt, a cardinal (uint)
> is a subset
>
> In https://docs.raku.org/language/nativetypes, a
> cardinal (unit) gets their own "native type".
>
> Life in the documentation lane!
>
> :-)
>


Re: Bug to report: cardinal called an integer

2020-01-13 Thread The Sidhekin
On Mon, Jan 13, 2020 at 8:51 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-13 11:10, ToddAndMargo via perl6-users wrote:
> >
> > https://docs.raku.org/type/UInt
> > Subset UInt
> > Unsigned integer (arbitrary-precision)
> > The UInt is defined as a subset of Int:
> > my subset UInt of Int where {not .defined or $_ >= 0};
> > Consequently, it cannot be instantiated or subclassed;
> > however, that shouldn't affect most normal uses
>
> Trivia:
>
> In https://docs.raku.org/type/UInt, a cardinal (uint)
> is a subset
>

  Nope.  Case matters.  It's mixed case "UInt" (not "uint") that's a subset.


> In https://docs.raku.org/language/nativetypes, a
> cardinal (unit) gets their own "native type".
>

  … whereas (lower case) "uint" is a native type.

  Documentation is easier to understand if you read what it says, and not
what you expect it to say.


Eirik


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 11:10, ToddAndMargo via perl6-users wrote:


https://docs.raku.org/type/UInt
    Subset UInt
    Unsigned integer (arbitrary-precision)
    The UInt is defined as a subset of Int:
    my subset UInt of Int where {not .defined or $_ >= 0};
    Consequently, it cannot be instantiated or subclassed;
    however, that shouldn't affect most normal uses


Trivia:

In https://docs.raku.org/type/UInt, a cardinal (uint)
is a subset

In https://docs.raku.org/language/nativetypes, a
cardinal (unit) gets their own "native type".

Life in the documentation lane!

:-)


Re: Bug to report: cardinal called an integer

2020-01-13 Thread ToddAndMargo via perl6-users

On 2020-01-13 06:17, Brad Gilbert wrote:

According to the description you copied, a cardinal can never be zero.

     any of the numbers
     that express amount, as one, two, three, etc.

So it is more accurate to call it an integer.


Hi Brad,

Are you referring to "any of the numbers that express
amount, as one, two, three, etc."?  Zero and twelve
for that matter are covered by both the "Counting"
part and the "etc." part.  And by the way, I don't
care if you call them cardinals, unsigned integers,
counting numbers, or whatever are long as the
description is correct,

A "Counting Number" starts at zero.  It just can't
be a fraction or less than zero.

I think what is happening here is the way Raku declares
their Roles, Classes, Types, and Subsets:

https://docs.raku.org/type/Real
role Real
   Non-complex number
   role Real does Numeric { ... }
   Common role for non-Complex numbers.


https://docs.raku.org/type/Int
   class Int
   Integer (arbitrary-precision)
   class Int is Cool does Real { }
   Int objects store integral numbers of arbitrary size. Ints are 
immutable.



https://docs.raku.org/type/UInt
   Subset UInt
   Unsigned integer (arbitrary-precision)
   The UInt is defined as a subset of Int:
   my subset UInt of Int where {not .defined or $_ >= 0};
   Consequently, it cannot be instantiated or subclassed;
   however, that shouldn't affect most normal uses

This would make the cardinal type of UInt an "Int"
with "Restrictions".  It also frees the high bit
for usage in the number.

This perfectly follows:
https://www.mathopenref.com/cardinal.html
   Cardinal numbers (also called whole numbers, natural
   numbers, or counting numbers) are those used to count
   physical objects in the real world, such as

  0, 1, 2, 3, 4 .

   They are integers that can be zero or positive. They
   assume that the things being counted are not divisible.
   So we can have 4 cars, but never 3½ cars.

   Formally, counting numbers are the set of all
   non-negative integers.

   Cardinal numbers are also called counting numbers.
   ["$_ >= 0" from Raku]


So is Raku, a cardinal, called UInt in Raku, is a "subset
of Int" and a member of Int who is a member of Real.

No problem with any of that.  My ONLY problem is with the
error message.

What would make me happy would be if the error message
was changed from:

   This type cannot unbox to a native integer
to
   This type cannot unbox to subset UInt

-T


Now if we really, really wanted to make this thread annoying,
we would question why does Int belongs to Real:

https://www.mathopenref.com/real-number.html

  A real number is a value that represents any quantity
  along a number line. Because they lie on a number
  line, their size can be compared. You can say one
  is greater or less than another, and do arithmetic
  with them.

In other words, they can be fractions.  Integers can not.
But I am not going down that road.  Raku has it all perfectly
figured out.

And Real has a nice error message:
$ p6 'my Real $r; $r = "XYZ";'
Type check failed in assignment to $r; expected Real
but got Str ("XYZ") in block  at -e line 1


Re: Bug to report: cardinal called an integer

2020-01-13 Thread Brad Gilbert
According to the description you copied, a cardinal can never be zero.

any of the numbers
that express amount, as one, two, three, etc.

So it is more accurate to call it an integer.

On Mon, Jan 13, 2020 at 1:32 AM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 2020-01-12 20:03, Darren Duncan wrote:
> > On 2020-01-09 10:10 a.m., ToddAndMargo via perl6-users wrote:
> >> A bug to report:
> >>
> >> $ p6 'my uint32 $c; $c = "ABC";'
> >> This type cannot unbox to a native integer: P6opaque, Str
> >>in block  at -e line 1
> >>
> >> "uint32" is not an "integer".  It is a cardinal.  If
> >> they really want to use the word "integer" for cardinal,
> >> they should change the wording to "unsigned integer".
> >>
> >> Picky, picky, picky
> >
> > ToddAndMargo, you are wrong on this.
> >
> > A uint32 is NOT specifically a cardinal.
>
> Hi Darren,
>
> Since a uint32 ca not be negative or a fraction,
> it is a cardinal.  Other operating system do call
> them cardinals, such as Modula2. Pascal, C++ (I
> think C too), Java, and so on and so forth.
>
> > At best you can say it can be characterized by a cardinal or be
> > isomorphic to one.
>
> https://www.dictionary.com/browse/isomorphism
> isomorphism
>  noun
>  Mathematics. a one-to-one relation onto the map
>  between two sets, which preserves the relations
>  existing between elements in its domain.
>
> I am not following what you are getting at.
>
> > A uint32 is just as much an ordinal as a cardinal, so insisting on
> > calling it a cardinal means the type can't be used as an ordinal, or a
> > variety of other things.
>
> https://www.dictionary.com/browse/ordinal-number
> ordinal number
> noun
> Also called ordinal numeral. any of the numbers that
> express degree, quality, or position in a series, as
> first, second, and third *(distinguished from cardinal
> number)*.
>
> Mathematics. a symbol denoting both the cardinal number
> and the ordering of a given set, being identical for
> two ordered sets having elements that can be placed
> into one-to-one correspondence, the correspondence
> preserving the order of the elements.
>
> https://www.dictionary.com/browse/cardinal-number
> cardinal number
> noun
> Also called cardinal numeral. any of the numbers
> that express amount, as one, two, three, etc.
> *(distinguished from ordinal number)*.
>
> No idea how you are mixing these two.  I can see
> how yo would use a cardinal in programming to
> denote an ordinal, if that is what you are getting at.
>
>
> > Calling this an unsigned integer (u int) is much more accurate as it
> > doesn't presume a particular semantics such as that we are storing a
> > count rather than a position for example, it says what we actually know,
> > and no more.
>
> I am sorry, I have no idea what you are trying to say.  I do not care if
> you call a cardinal an unsigned integer.  Just
> don't call it an integer.  The high bit in a cardinal is
> part of the number and denotes a negative number in an integer.
>
> >
> > You are also wrong on saying that the values one can store in a uint32
> > are not integers; they definitely ARE integers.  Every cardinal is an
> > integer.
>
> Where do you get that.  A cardinal can not be negative.  An
> Integer can.  And the structure is even different:  the high
> bit in an integer denote the sign of the integer; the high bit
> in a cardinal is just a higher positive number.  So they
> are not the same by any shake.
>
>
> > If you want to be precise, calling a uint32 an "unsigned integer" or
> > "cardinal" is inaccurate in the same way that calling it an "integer"
> > is.
>
> Perfectly accurate.  Unsigned integer and a cardinal are
> exactly the same thing.   The only difference is the
> amount of letter you need to use to describe them.
> Sort of like "associative array" and "hash"
>
> > In either case, the variable can only hold a proper subset of
> > either type, not all of them.  If you're calling integer wrong then one
> > will have to call the type something like "integers in the range
> > 0..^2**32".
> >
> > -- Darren Duncan
>
> The difference between a cardinal and an integer is
> the high bit.  Both are whole numbers.  An integer
> can be negative.  A cardinal can not.
>
> If you are going to error out something, say the proper
> variable type you are error out on.  Cardinal or unsigned
> integer, I don't care which you call a cardinal.  Whatever
> floats your boat.  Both descriptions are correct.  Just
> be correct.
>
> -T
>
> p.s. in assembly, they call a cardinal an unsigned integer.
>


Re: Bug to report: cardinal called an integer

2020-01-12 Thread ToddAndMargo via perl6-users

On 2020-01-12 23:20, WFB wrote:

Hi Todd,

For years, I have been playing around with programming stuff. I never 
stumbled across the term "cardinal". Its obvious that I am not an native 
English speaker and it does not hurt to learn new stuff. But, you makes 
it harder to understand your problems if you not use the common jargon.


Regards,
Wolfgang


Hi Wolfgang,

I am aware that the term might be obscure to some.
That is why I always say (uint) or unsigned integer to
make sure everyone knows what I am talking about.
I will continue to do so.

The term is quite common in Pascal and Modula2.
I have even seen it in C++.

Here are some examples for you:

C++
https://www.boost.org/doc/libs/1_71_0/libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html

A numeric type Cardinal representing integer numbers with
a numeric set: {0,1,2,3,4,5,6,7,8,9} and range: [0,9] (
no modulo-arithmetic here)

Modula2:
https://www.modula2.org/tutor/chapter3.php

The simple types are INTEGER, CARDINAL,
REAL, BOOLEAN, and CHAR.

Ada (does not use the term, but their tutorials do)
https://en.wikibooks.org/wiki/Ada_Programming/All_Chapters

Unsigned Integers (unsigned, CARDINAL)

If you were to stumble across ALL the various
programming languages, you'd probably go insane,
so it is understandable that you would not have
heard the term.  In our Publik Skools, they use the
term "counting numbers", probably because they
want to avoid snickering about red birds and to
maintains the USA standing as the second worst
education system in the industrial world.

:-)

-T


Re: Bug to report: cardinal called an integer

2020-01-12 Thread ToddAndMargo via perl6-users

On 2020-01-12 20:03, Darren Duncan wrote:

On 2020-01-09 10:10 a.m., ToddAndMargo via perl6-users wrote:

A bug to report:

$ p6 'my uint32 $c; $c = "ABC";'
This type cannot unbox to a native integer: P6opaque, Str
   in block  at -e line 1

"uint32" is not an "integer".  It is a cardinal.  If
they really want to use the word "integer" for cardinal,
they should change the wording to "unsigned integer".

Picky, picky, picky


ToddAndMargo, you are wrong on this.

A uint32 is NOT specifically a cardinal.


Hi Darren,

Since a uint32 ca not be negative or a fraction,
it is a cardinal.  Other operating system do call
them cardinals, such as Modula2. Pascal, C++ (I
think C too), Java, and so on and so forth.

At best you can say it can be characterized by a cardinal or be 
isomorphic to one.


https://www.dictionary.com/browse/isomorphism
isomorphism
noun
Mathematics. a one-to-one relation onto the map
between two sets, which preserves the relations
existing between elements in its domain.

I am not following what you are getting at.

A uint32 is just as much an ordinal as a cardinal, so insisting on 
calling it a cardinal means the type can't be used as an ordinal, or a 
variety of other things.


https://www.dictionary.com/browse/ordinal-number
   ordinal number
   noun
   Also called ordinal numeral. any of the numbers that
   express degree, quality, or position in a series, as
   first, second, and third *(distinguished from cardinal
   number)*.

   Mathematics. a symbol denoting both the cardinal number
   and the ordering of a given set, being identical for
   two ordered sets having elements that can be placed
   into one-to-one correspondence, the correspondence
   preserving the order of the elements.

https://www.dictionary.com/browse/cardinal-number
   cardinal number
   noun
   Also called cardinal numeral. any of the numbers
   that express amount, as one, two, three, etc.
   *(distinguished from ordinal number)*.

No idea how you are mixing these two.  I can see
how yo would use a cardinal in programming to
denote an ordinal, if that is what you are getting at.


Calling this an unsigned integer (u int) is much more accurate as it 
doesn't presume a particular semantics such as that we are storing a 
count rather than a position for example, it says what we actually know, 
and no more.


I am sorry, I have no idea what you are trying to say.  I do not care if 
you call a cardinal an unsigned integer.  Just

don't call it an integer.  The high bit in a cardinal is
part of the number and denotes a negative number in an integer.



You are also wrong on saying that the values one can store in a uint32 
are not integers; they definitely ARE integers.  Every cardinal is an 
integer.


Where do you get that.  A cardinal can not be negative.  An
Integer can.  And the structure is even different:  the high
bit in an integer denote the sign of the integer; the high bit
in a cardinal is just a higher positive number.  So they
are not the same by any shake.


If you want to be precise, calling a uint32 an "unsigned integer" or 
"cardinal" is inaccurate in the same way that calling it an "integer" 
is.  


Perfectly accurate.  Unsigned integer and a cardinal are
exactly the same thing.   The only difference is the
amount of letter you need to use to describe them.
Sort of like "associative array" and "hash"

In either case, the variable can only hold a proper subset of 
either type, not all of them.  If you're calling integer wrong then one 
will have to call the type something like "integers in the range 
0..^2**32".


-- Darren Duncan


The difference between a cardinal and an integer is
the high bit.  Both are whole numbers.  An integer
can be negative.  A cardinal can not.

If you are going to error out something, say the proper
variable type you are error out on.  Cardinal or unsigned
integer, I don't care which you call a cardinal.  Whatever
floats your boat.  Both descriptions are correct.  Just
be correct.

-T

p.s. in assembly, they call a cardinal an unsigned integer.


Re: Bug to report: cardinal called an integer

2020-01-12 Thread WFB
Hi Todd,

For years, I have been playing around with programming stuff. I never
stumbled across the term "cardinal". Its obvious that I am not an native
English speaker and it does not hurt to learn new stuff. But, you makes it
harder to understand your problems if you not use the common jargon.

Regards,
Wolfgang

On Mon, 13 Jan 2020 at 05:03, Darren Duncan  wrote:

> On 2020-01-09 10:10 a.m., ToddAndMargo via perl6-users wrote:
> > A bug to report:
> >
> > $ p6 'my uint32 $c; $c = "ABC";'
> > This type cannot unbox to a native integer: P6opaque, Str
> >in block  at -e line 1
> >
> > "uint32" is not an "integer".  It is a cardinal.  If
> > they really want to use the word "integer" for cardinal,
> > they should change the wording to "unsigned integer".
> >
> > Picky, picky, picky
>
> ToddAndMargo, you are wrong on this.
>
> A uint32 is NOT specifically a cardinal.
>
> At best you can say it can be characterized by a cardinal or be isomorphic
> to one.
>
> A uint32 is just as much an ordinal as a cardinal, so insisting on calling
> it a
> cardinal means the type can't be used as an ordinal, or a variety of other
> things.
>
> Calling this an unsigned integer (u int) is much more accurate as it
> doesn't
> presume a particular semantics such as that we are storing a count rather
> than a
> position for example, it says what we actually know, and no more.
>
> You are also wrong on saying that the values one can store in a uint32 are
> not
> integers; they definitely ARE integers.  Every cardinal is an integer.
>
> If you want to be precise, calling a uint32 an "unsigned integer" or
> "cardinal"
> is inaccurate in the same way that calling it an "integer" is.  In either
> case,
> the variable can only hold a proper subset of either type, not all of
> them.  If
> you're calling integer wrong then one will have to call the type something
> like
> "integers in the range 0..^2**32".
>
> -- Darren Duncan
>


Re: Bug to report: cardinal called an integer

2020-01-12 Thread Darren Duncan

On 2020-01-09 10:10 a.m., ToddAndMargo via perl6-users wrote:

A bug to report:

$ p6 'my uint32 $c; $c = "ABC";'
This type cannot unbox to a native integer: P6opaque, Str
   in block  at -e line 1

"uint32" is not an "integer".  It is a cardinal.  If
they really want to use the word "integer" for cardinal,
they should change the wording to "unsigned integer".

Picky, picky, picky


ToddAndMargo, you are wrong on this.

A uint32 is NOT specifically a cardinal.

At best you can say it can be characterized by a cardinal or be isomorphic to 
one.

A uint32 is just as much an ordinal as a cardinal, so insisting on calling it a 
cardinal means the type can't be used as an ordinal, or a variety of other things.


Calling this an unsigned integer (u int) is much more accurate as it doesn't 
presume a particular semantics such as that we are storing a count rather than a 
position for example, it says what we actually know, and no more.


You are also wrong on saying that the values one can store in a uint32 are not 
integers; they definitely ARE integers.  Every cardinal is an integer.


If you want to be precise, calling a uint32 an "unsigned integer" or "cardinal" 
is inaccurate in the same way that calling it an "integer" is.  In either case, 
the variable can only hold a proper subset of either type, not all of them.  If 
you're calling integer wrong then one will have to call the type something like 
"integers in the range 0..^2**32".


-- Darren Duncan


Re: Bug to report: cardinal called an integer

2020-01-12 Thread ToddAndMargo via perl6-users




Here is one reason why you do these to to be
distinct from each other.  In Win API calls to the
registry, REG_DWORDs are all cardinals, not
integers:


Here is a link to the graphicsthat did not come out:

https://social.msdn.microsoft.com/Forums/getfile/1525734


Re: Bug to report: cardinal called an integer

2020-01-12 Thread ToddAndMargo via perl6-users

  
  
On 2020-01-12 09:18, Marcel Timmerman
  wrote:


  
  On 1/9/20 7:10 PM, ToddAndMargo via
perl6-users wrote:
  
   'my
uint32 $c; $c = "ABC";'
  The error shows that you cannot assign a string to an int (This
type cannot unbox to a native integer: P6opaque, Str)
  
  You can do the following to get it right;
  
  'p6  -e 'my uint32 $c; $c = 0xABC;''
  
  

Hi Marcel,

That you for the tip!  I have been using Hex numbers
a lot lately.

Here is a workaround to assign the value of a cardinal ($c)
to an integer ($x):

p6 'my uint32 $c = 0xFFAA; my int32 $x = $c +| 0x; say $c.base(16);'

FFAA


Back on subject.

The intent of my posting was not to correct a
mistake in my code, but to demonstrate a mistake
in the description of the returned error.

Cardinals or unsigned integers, whatever you want to
call them, are not the same thing.  The error description
called a cardinal and integer.

Here is one reason why you do these to to be
distinct from each other.  In Win API calls to the
registry, REG_DWORDs are all cardinals, not
integers:



And having the error properly describe the variables
involved helps you troubleshoot your booboo's.

-T
  



Re: Bug to report: cardinal called an integer

2020-01-12 Thread Marcel Timmerman

On 1/9/20 7:10 PM, ToddAndMargo via perl6-users wrote:

'my uint32 $c; $c = "ABC";'
The error shows that you cannot assign a string to an int (*This type 
cannot unbox to a native integer: P6opaque, Str*)


You can do the following to get it right;

'p6  -e 'my uint32 $c; $c = 0xABC;''