Thursday, August 3, 2017

Digest for comp.lang.c++@googlegroups.com - 19 updates in 5 topics

bitrex <bitrex@de.lete.earthlink.net>: Aug 03 05:16PM -0400

On 07/29/2017 09:24 AM, Mr Flibble wrote:
 
> Personally I like to blaspheme because I am a militant atheist and I
> like to grind the gears of the theistic fucktards.
 
> /Flibble
 
As an agnostic it's fun to grind the gears of militant atheists/cerebral
narcissists. Ooooh look at me, here I am and I've even read the
philosophical arguments by Dawkins et. al. as to why agnosticism is for
fucktards and I'm still a fucktard! Oooh ahh call me an idiot and all
the names, oh yes Daddy say all the naughty words lol
bitrex <bitrex@de.lete.earthlink.net>: Aug 03 05:20PM -0400

On 07/31/2017 03:39 AM, Öö Tiib wrote:
> Leigh, why some people seem to think that they behaving kook does somehow
> change anything in any direction in this world? It is just boring and aesthetically
> ugly ... and that is it.
 
Mommy didn't give enough attention.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 03 11:48PM +0100

On 03/08/2017 22:16, bitrex wrote:
> philosophical arguments by Dawkins et. al. as to why agnosticism is for
> fucktards and I'm still a fucktard! Oooh ahh call me an idiot and all
> the names, oh yes Daddy say all the naughty words lol
 
LOL.
 
As well as being a militant atheist I am also an agnostic it's just that
I know I can discount the existence of the Abrahamic god.
 
Also, I haven't read any of Dawkins's work as I am able to think for myself.
 
You have a lot to learn Padawan.
 
/Flibble
SG <s.gesemann@gmail.com>: Aug 03 01:56AM -0700

Am Mittwoch, 2. August 2017 18:14:54 UTC+2 schrieb Mr Flibble:
> On 02/08/2017 14:27, SG wrote:
 
> > Every variable of a non-primitive type in Java is a reference.
 
> Pointer not reference.
 
Not sure if you're trolling or not. In computer science terms, a
pointer *is* a kind of reference. The term reference is more general.
Daniel <danielaparker@gmail.com>: Aug 03 09:37AM -0700

On Wednesday, August 2, 2017 at 12:14:54 PM UTC-4, Mr Flibble wrote:
 
> Pointer not reference.
 
As Winston Churchill might have said, "Young man, that is the sort of
nonsense to which I must refer."
 
Daniel
Jerry Stuckle <jstucklex@attglobal.net>: Aug 03 02:14PM -0400

On 8/2/2017 12:14 PM, Mr Flibble wrote:
 
>> Every variable of a non-primitive type in Java is a reference.
 
> Pointer not reference.
 
> /Flibble
 
It is a reference. Java does not have pointers.
 
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Aug 03 08:25PM +0200

On 03.08.2017 20:14, Jerry Stuckle wrote:
 
>> Pointer not reference.
 
>> /Flibble
 
> It is a reference. Java does not have pointers.
 
The Java language specification uses both terms.
 
Incompetent Java programmers, of which there is an abundance, use only
"reference", and have the idiotic idea that Java does not have pointers.
They will argue that ad nauseam. I think not primarily because they're
unfamiliar with the specification of their chosen main programming
language (although there's that too, that they're incompetents) but
because they're /conformists/ at heart, and the group has decided on an
alternative reality, just like any religious or other conformists group.
 
 
Cheers! & hth.,
 
- Alf
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 03 07:33PM +0100

On 03/08/2017 17:37, Daniel wrote:
 
>> Pointer not reference.
 
> As Winston Churchill might have said, "Young man, that is the sort of
> nonsense to which I must refer."
 
Nonsense?
 
java.lang.NullPointerException
 
(A reference( value) is a pointer [JLS8, 4.3.1].)
 
Now GTFO.
 
/Flibble
Jerry Stuckle <jstucklex@attglobal.net>: Aug 03 03:22PM -0400

On 8/3/2017 2:25 PM, Alf P. Steinbach wrote:
> alternative reality, just like any religious or other conformists group.
 
> Cheers! & hth.,
 
> - Alf
 
Then please show how to define a pointer to an object in Java. And if
it is truly a pointer, show how you can use those pointers to do things
like step through an array by incrementing and decrementing them.
 
Also - just where in the Java documentation does it say it has pointers?
 
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
legalize+jeeves@mail.xmission.com (Richard): Aug 03 08:08PM

[Please do not mail me a copy of your followup]
 
SG <s.gesemann@gmail.com> spake the secret code
 
>> Pointer not reference.
 
>Not sure if you're trolling or not. In computer science terms, a
>pointer *is* a kind of reference. The term reference is more general.
 
I thought it was just standard Java terminology: primitive types and
reference types.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
woodbrian77@gmail.com: Aug 03 01:28PM -0700

On Thursday, August 3, 2017 at 1:25:45 PM UTC-5, Alf P. Steinbach wrote:
> language (although there's that too, that they're incompetents) but
> because they're /conformists/ at heart, and the group has decided on an
> alternative reality, just like any religious or other conformists group.
 
 
A good example of a thoughtful religious guy is Ben Shapiro.
And if you think he's simply a G-dly, intelligent, articulate
young man, you would be mistaken. He's also a great musician --
check out his tribute to Game of Thrones.
 
https://duckduckgo.com/?q=game+of+thrones+tribute+dailywire&atb=v72-1__&ia=
videos&iax=1&iai=WoSvVDQJGv4
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
David Brown <david.brown@hesbynett.no>: Aug 03 09:15AM +0200

On 03/08/17 01:13, red floyd wrote:
>> an address known at compile time.
 
> What about uaddr_t? I know it's probably not ISO standard, but I
> *THINK* it's POSIX....
 
Or better still, uintptr_t, which is part of <stdint.h> in C and
therefore part of C++.
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Aug 03 12:54PM +0100

On Thu, 03 Aug 2017 09:15:57 +0200
> > *THINK* it's POSIX....
 
> Or better still, uintptr_t, which is part of <stdint.h> in C and
> therefore part of C++.
 
That would be better, but templating a struct on an integer type to
represent a hardware address is subject to the difficulty that the
compiler knows that the underlying template type is an integer and, on
the face of it, is entitled to generate whatever rubbish it wants to
when that integer is cast to a pointer type and that pointer type is (as
here) dereferenced, because the dereferencing would break the strict
aliasing rule.
 
I say "on the face of it" because §3.10/10 of the standard refers to
"the _dynamic_ type of the object" and here the typing is static, so
until the reinterpret_cast is made there is no dynamic type. Maybe
therefore the compiler is obliged to assume that the dynamic type is
the type cast to: dunno.
 
In practice I suspect gcc and clang will accept this construct even
without the no-strict-aliasing flag.
 
Chris
David Brown <david.brown@hesbynett.no>: Aug 03 02:42PM +0200

On 03/08/17 13:54, Chris Vine wrote:
> when that integer is cast to a pointer type and that pointer type is (as
> here) dereferenced, because the dereferencing would break the strict
> aliasing rule.
 
That is, at best, a hypothetical interpretation. The standards say that
converting an integer type to a pointer or vice-versa is implementation
defined - with a footnote saying it is "intended to be consistent with
the addressing structure of the execution environment". The type
"uintptr_t" is defined as being able to hold any pointer-to-void, such
that when it is converted back to a pointer-to-void it will compare
equal to the original pointer. The code here uses "reinterpret_cast" -
the allows conversion back and forth between an integer representation
and a safely-derived pointer. Access via "volatile" is implementation
dependent, but guarantees certain things such as ordering and evaluation.
 
These combine to mean that a compiler would have to go to significant
lengths to prove that access via these RegisterModel types is not
technically defined behaviour, and then generate rubbish. And any
compiler that did not do the obvious thing when casting an integer to a
volatile pointer and then dereferencing it would by classified as
useless by embedded developers.
 
> the type cast to: dunno.
 
> In practice I suspect gcc and clang will accept this construct even
> without the no-strict-aliasing flag.
 
Well, indeed - any C++ compiler suitable for embedded development (and
where else do you need RegisterModel?) will work fine with this
construct, with any choice of flags or optimisation.
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Aug 03 06:05PM +0100

On Thu, 03 Aug 2017 14:42:40 +0200
> forth between an integer representation and a safely-derived
> pointer. Access via "volatile" is implementation dependent, but
> guarantees certain things such as ordering and evaluation.
 
What the standard says is that (i) converting a pointer value to integer
and then back to pointer value is required to work if the integer type
is large enough, (ii) uintptr_t (if available) is large enough, and
(iii) other mappings between pointers and integers are implementation
defined (and the text of the footnote in my version of the standard says
that the mapping "is intended to be unsurprising to those who know the
addressing structure of the underlying machine"). Volatile is not
relevant to this, but I agree with what you say about its meaning.
 
None of that is relevant to aliasing on dereferencing, which is not
hypothetical, whether "at best" or otherwise. As I said, what I find
unclear is how that operates in relation to a conversion from what
originates as a statically typed integer value rather than a pointer
value.
 
> compiler that did not do the obvious thing when casting an integer to
> a volatile pointer and then dereferencing it would by classified as
> useless by embedded developers.
 
Possibly, but the view could be taken that you should templatize on the
pointer type and not the integer type, as originally proposed.
 
I said that on the face of it a compiler appears "entitled" to generate
rubbish but in practice it is probably fine; and if not there are flags
to deal with it. You seem to be agreeing with me vigorously.
 
Chris
David Brown <david.brown@hesbynett.no>: Aug 03 08:58PM +0200

On 03/08/17 19:05, Chris Vine wrote:
 
> I said that on the face of it a compiler appears "entitled" to generate
> rubbish but in practice it is probably fine; and if not there are flags
> to deal with it. You seem to be agreeing with me vigorously.
 
I would put it a bit more solidly than that. A compiler /may/ appear
"entitled" to generate rubbish, depending on what it documents for its
implementation-defined behaviour, but in practice it /will/ be fine -
regardless of the flags.
 
("volatile" makes any aliasing issues irrelevant, if you are consistent
about only accessing the relevant data via volatile accesses, because
the compiler is required to make each read and write as directed in the
source code and can't "optimise away" accesses even if the aliasing
looks suspicious.)
 
Apart from that balance, I am agreeing with you.
red floyd <dont.bother@its.invalid>: Aug 03 01:17PM -0700

On 8/3/2017 12:15 AM, David Brown wrote:
>> *THINK* it's POSIX....
 
> Or better still, uintptr_t, which is part of <stdint.h> in C and
> therefore part of C++.
 
Damn, *THAT'S* the one I was thinking of.
ram@zedat.fu-berlin.de (Stefan Ram): Aug 03 09:08AM

>Every variable of a non-primitive type in Java is a reference.
 
In Java, the concept of a variable is not the same as the
concept of a reference.
 
A variable is a location of storage that has a type (JLS 8,
4.12). (It's like the concept of "object" in C.) If that
type is a reference type, the variable can /store/ a
reference( value). (JLS8, 4.1).
 
(A reference( value) is a pointer [JLS8, 4.3.1].)
 
JLS8 = Java Language Specification, Java SE 8 edition
Bo Persson <bop@gmb.dk>: Aug 03 10:26AM +0200

On 2017-08-02 20:10, rami18 wrote:
 
> Read this:
 
> Here is my political thoughts:
 
> Communism and hard socialism use Class Struggle
 
At last something on-topic for a C++ news group.
 
Do you have some specific problems in coding your class?
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: