Re: [External] : Re: basic conceptual model

2021-12-13 Thread John Rose
On 13 Dec 2021, at 19:05, Kevin Bourrillion wrote:

> …
> Yes, in general I am sure that I can't accomplish actual ground up
> non-cyclical definition-definitions here. I think it should suffice to be
> descriptive enough for the reader to course-correct their previous notions
> in this direction (provided they want to).

Yup, I see that’s how it’s working in there.
>
>
>> Saying “unit” is more mysterious.  You certainly don’t mean units of
>> measure, or functional programming unit types.  Are you meaning to imply
>> that it has no subparts which might also be termed units?
>
>
> Oh, I actually do not want to imply irreducibility at all. That all values
> have had that property in Java is a fact I would label as
> incidental-not-essential.,
>
> Glob, gob, blob, hunk, chunk, piece, .

In that case I claim unit has the wrong connotation, since it does (often) come 
with an expectation of irreducibility.  With that in mind I like the unassuming 
term “piece”, or those other words.  If you are still in thesaurus mode:

https://www.thesaurus.com/browse/portion

>
>
>
>> That’s OK as long as you have today’s primitives (which I like to call
>> “scalar primitives”) and of course references (which are also scalars).  By
>> “scalar” I mean an item of data that is not composed of further scalars.
>>
>
> A tangent, but there's enough math major still in me to object to this. :-)
> Scalars are scalar because they scale things! This would be more similar to
> a one-dimensional vector space than to a scalar  imho the best
> adjective for today's primitives is "primitive" and I'll plead my case
> about that soon too. :-)

Sure, that’s a good position for math majors like you and me.  And I’m sure 
you/they/we really squirm in the presence of discussions about “vector 
processing units” and “vector ISAs”.  But the squirm-worthy folks that define 
VPUs also use the term “scalar” to mean “the value that’s in a vector lane”, 
and they assuredly do not mean that “scalar” can be identified with 
“single-lane vector”.


Re: basic conceptual model

2021-12-13 Thread Kevin Bourrillion
>
> On 13 Dec 2021, at 18:40, John Rose wrote:
>


> > Another (more subtle) stress to your terminology is your assertion that
> a mutable variable “forgets” the previous value when a new value is
> stored.  That isn’t strictly correct in the case of race conditions.  Only
> a volatile variable reliably “forgets” its previous value in the presence
> of races.
>

Indeed there was a revision where "(modulo race conditions)" was there and
I'll put it back.


> You don’t actually define the term “value” but just illustrate it and
> make claims about it.  Maybe you have to do it that way…  Actually, you say
> it’s “unit of data”.  Referring to “data” as a known term (for readers who
> are programmers) is OK.
>

Yes, in general I am sure that I can't accomplish actual ground up
non-cyclical definition-definitions here. I think it should suffice to be
descriptive enough for the reader to course-correct their previous notions
in this direction (provided they want to).


> Saying “unit” is more mysterious.  You certainly don’t mean units of
> measure, or functional programming unit types.  Are you meaning to imply
> that it has no subparts which might also be termed units?


Oh, I actually do not want to imply irreducibility at all. That all values
have had that property in Java is a fact I would label as
incidental-not-essential.,

Glob, gob, blob, hunk, chunk, piece, .



> That’s OK as long as you have today’s primitives (which I like to call
> “scalar primitives”) and of course references (which are also scalars).  By
> “scalar” I mean an item of data that is not composed of further scalars.
>

A tangent, but there's enough math major still in me to object to this. :-)
Scalars are scalar because they scale things! This would be more similar to
a one-dimensional vector space than to a scalar  imho the best
adjective for today's primitives is "primitive" and I'll plead my case
about that soon too. :-)

-- 
Kevin Bourrillion | Java Librarian | Google, Inc. | kev...@google.com


Re: basic conceptual model

2021-12-13 Thread John Rose
Two more thoughts:  You could get away with saying “indivisible unit”; I think 
that would convey much of what you mean.  Also, a footnote drawing the reader’s 
attention to native hardware types (long, byte, float, reference) would make it 
clear that a Java computation is meant to “bottom out” in operations on units 
of data familiar to assembly programmers.  They are indivisible units, but even 
more important, their operations are natural to real computers.

On 13 Dec 2021, at 18:40, John Rose wrote:

> I have some comments.  Since the doc invites directly stuck-on comments, I’ve 
> requested edit permission, as that seems necessary for me to stick on a 
> comment.
>
> Some free-floating notes:
>
> Good use of “freely copyable” as a concept.  There’s a tough case, happily 
> not relevant to Java, of linear types (IIRC Rust has them) where a value is 
> freely copyable, but only to the extent that the source forgets the value 
> after the sink gets it.  Accounting for that would stress your terminology.
>
> Another (more subtle) stress to your terminology is your assertion that a 
> mutable variable “forgets” the previous value when a new value is stored.  
> That isn’t strictly correct in the case of race conditions.  Only a volatile 
> variable reliably “forgets” its previous value in the presence of races.
>
> You don’t actually define the term “value” but just illustrate it and make 
> claims about it.  Maybe you have to do it that way…  Actually, you say it’s 
> “unit of data”.  Referring to “data” as a known term (for readers who are 
> programmers) is OK.
>
> Saying “unit” is more mysterious.  You certainly don’t mean units of measure, 
> or functional programming unit types.  Are you meaning to imply that it has 
> no subparts which might also be termed units?  That’s OK as long as you have 
> today’s primitives (which I like to call “scalar primitives”) and of course 
> references (which are also scalars).  By “scalar” I mean an item of data that 
> is not composed of further scalars.


Re: basic conceptual model

2021-12-13 Thread John Rose
I have some comments.  Since the doc invites directly stuck-on comments, I’ve 
requested edit permission, as that seems necessary for me to stick on a comment.

Some free-floating notes:

Good use of “freely copyable” as a concept.  There’s a tough case, happily not 
relevant to Java, of linear types (IIRC Rust has them) where a value is freely 
copyable, but only to the extent that the source forgets the value after the 
sink gets it.  Accounting for that would stress your terminology.

Another (more subtle) stress to your terminology is your assertion that a 
mutable variable “forgets” the previous value when a new value is stored.  That 
isn’t strictly correct in the case of race conditions.  Only a volatile 
variable reliably “forgets” its previous value in the presence of races.

You don’t actually define the term “value” but just illustrate it and make 
claims about it.  Maybe you have to do it that way…  Actually, you say it’s 
“unit of data”.  Referring to “data” as a known term (for readers who are 
programmers) is OK.

Saying “unit” is more mysterious.  You certainly don’t mean units of measure, 
or functional programming unit types.  Are you meaning to imply that it has no 
subparts which might also be termed units?  That’s OK as long as you have 
today’s primitives (which I like to call “scalar primitives”) and of course 
references (which are also scalars).  By “scalar” I mean an item of data that 
is not composed of further scalars.


basic conceptual model

2021-12-13 Thread Kevin Bourrillion
Hi,

So I've been threatening for a long time that I've been hard at work
writing up a coherent conceptual model for "how data looks/works inside a
running Java program today". I have a few purposes for it, but one is to
form a basis for explaining "and now here's precisely what parts Valhalla
will change and how".

*Data in Java programs: a basic conceptual model*


This model comes filtered through a particular set of perceptions and
biases. It's just *a* documented model and isn't trying to be a *the*. As
such, you don't have to agree with all of it, but it would still be very
helpful to know if it is inconsistent or confusing or ill-founded, or if
you just see a way it could be better. I'll gladly add comment access on
request.

The next document (whenever that is) will try to examine various options
for adjusting that particular model to accommodate Valhalla.

-- 
Kevin Bourrillion | Java Librarian | Google, Inc. | kev...@google.com