C Standard Regarding Null Pointer Dereferencing

N

Nick Keighley

On Jul 26, 12:06 am, (e-mail address removed) (Richard Harter) wrote:
[/QUOTE]

and they used the same keyword for both.

Where does this response come from?

because it isn't so?

 Are you suggesting that casting
to 'void' was not an original issue but came later on?

what is "an original issue"

I don't think the standard gives any particular meaning to a cast to
void
 If so, this
sounds like a good history lesson worth reading.  I will try to find
it, since I could only "guess," above.

but that is nothing to do with the standard but only what certain
implementaions choose to do (particularly some older and more broken
lints). An implemention may issue a warning ("diagnostic" in
standardese) for anything it feels like.
Right...  So I'd also guess that you don't share my aesthetic
preference for how we could discard a 'void *' result with a single
keystroke,

what? What single keystroke discarded a void* value? Note that by
dereferencing a null pointer you've *already* committted UB. Thre is
in a sense no value to discard.

given such warning levels and compilers, and iff we (and
implementations) _did_ agree to the allowance of dereferencing a 'void
*'.  

the standard says it's undefined behaviour. If the implementaion
chooses to return a value that's still compliant. *Any* behaviour is
compliant with undefined behaviour. You might be confusing
implmentation with language definition.

I've used compilers that *did* return a value for *NULL. Usually the
contents of location zero.
I only really meant to suggest a usefulness similar to that of
casting to 'void'.

I'm not sure it *is* useful and I think ascribing a meaning to

(void) *NULL;

is simply stupid
 You have described one such situation where
warnings result from an implementation without casting to 'void'.

I regard such implementations as broken


--

If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders.
Instead, teach them to yearn for the vast and endless sea.
- A. de Saint-Exupery
 
S

Shao Miller

and they used the same keyword for both.
Sure they did. Later on, it would even be used inside parameter
lists.
because it isn't so?
The question might need clarification: How can I know that as well as
you know it?
what is "an original issue"
Maybe Richard can clarify. Otherwise, "original issue" means an issue
that was being considered at the time "When they were doing the
standard..."
I don't think the standard gives any particular meaning to a cast to
void
Well, in casting to 'void', 6.5.4,p4 converts a value to 'void' type.
6.2.5,p19 defines "The void type comprises an empty set of values..."
How do you convert a value to an empty set of values? You discard
it. 6.3.2.2,p1 goes on to describe how "a void expression" has no
value, but can nonetheless be cast to 'void', beyond the semantics for
cast operators (6.5.4,p4) describing converting a value. Then there's
the constraint 6.5.4,p2 which actually says "a void type". That seems
pretty particular to me.

It's interesting to think about what "If an expression of any other
type is evaluated as a void expression, its value or designator is
discarded" might mean. In cases where we call a function and discard
its value, might that be considered an expression of a non-'void' type
being evaluated as a void expression?
but that is nothing to do with the standard but only what certain
implementaions choose to do (particularly some older and more broken
lints). An implemention may issue a warning ("diagnostic" in
standardese) for anything it feels like.
Agreed.


what? What single keystroke discarded a void* value? Note that by
dereferencing a null pointer you've *already* committted UB. Thre is
in a sense no value to discard.
You might have confused "null pointer" with 'void *', here. You might
have also missed some posts. Briefly:

int main(void) {
int i = 5;
void *vp = &i;
*vp;
return 0;
}

'vp' has type 'void *'. The suggestion was that the unary '*' could
simply take that expression as an operand and yield a void expression,
since "If the operand has type ‘‘pointer to type’’, the result has
type ‘‘type’’." (6.5.3.2,p4) Thus the single keystroke '*' would be
equivalent to '(void)', for that very particular scenario.
the standard says it's undefined behaviour.
That statement was part of what was being discussed. Just to break it
down: It does not include the text "dereferencing a 'void *' is
undefined behaviour." If it did, then it would have "said" it's
undefined behaviour. It doesn't. People say that.

Now comes the undefined-behaviour-by-omission argument, but read again
"If the operand has type ‘‘pointer to type’’, the result has type
‘‘type’’." (6.5.3.2,p4) That readily appears to define the
behaviour. If the expression is '*E', and 'E' has type ‘‘pointer to
void’’, then constraints are met, the result has type ‘‘void’’, that's
a 'void' expression, so it's evaluated, evaluating 'E' does no harm
(it's just a value).

Now comes the doesn't-match-object-pointer-or-function-pointer
argument. But where is it stated that this is a requirement? It
isn't stated. Those are "if"s. The case of a 'void *' operand is
sufficiently covered by "If the operand has type ‘‘pointer to type’’,
the result has type ‘‘type’’." (6.5.3.2,p4). Then read "The void type
comprises an empty set of values..." (6.2.5,p19). Then read "The
(nonexistent) value of a void expression (an expression that has type
void) shall not be used in any way..." (6.3.2.2,p1).

Those were some of the arguments.
If the implementaion
chooses to return a value that's still compliant. *Any* behaviour is
compliant with undefined behaviour. You might be confusing
implmentation with language definition.
Well I specifically meant an allowance by interpreting our reading as
providing a definition other than "undefined behaviour." Yes an
implementation can define what they like, but that's not guaranteed to
be in the spirit of portability. :)
I've used compilers that *did* return a value for *NULL. Usually the
contents of location zero.
Now you've switched back over to a null pointer. Ok. :) It seems
that your compilers that did that used something other than '((void
*)0)' for their definition of 'NULL'. Possibly '((char *)0)'.
Otherwise, it would be hard to imagine a value for '*NULL'.
I'm not sure it *is* useful and I think ascribing a meaning to

   (void) *NULL;

is simply stupid
Ugh. I don't remember suggesting that. Maybe someone else did or
maybe you misunderstood something. Sorry.
I regard such implementations as broken
Or at least enthusiastic about informing the programmer that they
might be forgetting to check an important return value, such as:

int *foo;
foo = malloc(sizeof (int[100]));
if (!foo) /* ... */

being mistakenly, partially deleted to:

int *foo;
malloc(sizeof (int[100]));
if (!foo) /* ... */
 
B

blmblm

[ snip ]

[ snip ]
Sure, I understood why you said "claims to have" rather than "has" --
I do that myself when I don't really have any basis for knowing
about the truth of the claim. But I'm aware that for some people
"claims to have" is not just a statement of fact, but one that casts
doubt on the claim. So I try to make it clear that I'm not trying
to be insulting. People [*] aren't always logical!

[*] There could be exceptions. I'm not sure I've ever met one,
but with, what, over 6 billion people on the planet, who can say ...
I agree. I believe that people associating a claim of a claim with a
dispute for the latter claim will find their doubt-casting.

I don't understand what you mean by that sentence, but maybe it's
not very important.
That can
be reconditioned just as avoidance of "bad words" can be
reconditioned.

[ snip ]
I would not -- I would take the approach described above. But this
sort-of-advice should probably be taken with a big block of salt,
because it does make for a rather wordy and pedantic style, maybe,
and while that's pretty appropriate for me, maybe not so much for
the OP.
Agreed on "wordy and pedantic style."

Careful, there, who are you calling "wordy and pedantic" ....

Oh, maybe no one. (And even if you were, it would be true of me,
though a "smile when you say that, pardner" [*] would be in order.)
"Wordy and pedantic style" applies to _my_ posts _already_. :)

"You said it, not me" ? (But yeah, now that you mention it ....)

I'd better add a :), no?
It
will _continue_ to apply as more emotional lighteners and/or
neutralizers are sprinkled in.

"...who are you calling..." is another example of a perceived
attack. :S

Meaning "an example of perceiving an attack where none was meant"?
I have already requested that in general: stop perceiving
personal attacks where
there are none; even though a history of personal attacks in Usenet
might make this challenging. :S
[*] Possibly US-centric cultural reference to -- some movie from
long ago, I think. The point is that it's easier to be laughed
*with* than laughed *at*. If that doesn't make sense say so and
I'll try to clarify.
That cultural reference is familiar to me, outside of the U. S. A.
Agreed that the reference comes from that culture. :)

Nobody should be laughing when the subject is people's feelings being
hurt, in my opinion. It's a very serious matter. That is why there
aren't any smile tokens in that post. A smile token might encourage
laughter.

Well, yeah, but my point was that sometimes the same words can be
perceived either as an attack or an invitation to join in laughing
about shared foibles. In a text-only medium it can be hard to
tell the difference. Emoticons can be irritating when overused,
but sometimes they do help.

[ snip ]
Thanks for being polite. :)

I'm on my best behavior here because of the RH post that prompted
me to put in my two cents' worth. Also maybe a :).

[ snip ]
 
B

blmblm

Thank for your acknowledging that fluency in English is not sufficient
cause for awareness of the negative connotations you perceive. I
agree.

I think, though, that Seebs's remark about how it took him a while
may have less to do with the inherent difficulty of understanding
about connotations than with the fact that he's -- well, he's
said in other posts that he's something of an outlier on some
measures related to social skills. I'll let him explain further
if he wants to.
It's not an accusation. It's a claim that there is no supporting
reference to the text given.

But that also *might* be an accusation, of a sort -- if you
mean that no supporting evidence *exists*, rather than that no
supporting evidence *has been presented*. It's not clear to me
which of these meanings is intended, though admittedly the latter
might be somewhat more probable.

In any case, I agree with Seebs that in context "invented" is
difficult to interpret as anything *but* an insult.

How did we get into *this* mess .... You wrote in another post
the following:

That second paragraph -- I'm guessing that was your attempt
to clarify your meaning, but the use of "below" introduces at
least some ambiguity about whether it applies to the preceding
paragraph, and I'm just not sure what "additionally" means here.
(I'd have left it out.)

How would I reword ....

The first sentence could read "You state/imply a requirement ...."
And then you could go on to ask whether he can cite a reference
for this claim.
You can demonstrate otherwise. You can
choose to ignore (ie. "plonk"). Your knowledge that there _is_ text
to support your statements is not accessible to me. If you do not
include the references, the knowledge cannot be accessed. The
original post includes a great number of references. That was my
expectation for responses. That was my mistake. "Highest levels of
pedantry" was a mistake to request.

Oh no, I think in *THIS* group, asking for the highest level
of pedantry is not only thoroughly appropriate, given the local
culture, but might even be interpreted as something of an inside
joke. Sort of a :).
 
B

blmblm

(Maybe if I put the "OT" in parentheses rather than brackets it
will survive better. It appears that GG's posting interface
strips off tags in brackets. Anyone know why that might have
seemed like a good idea??)


[ snip ]
I'm not a stalker. Seebach unleashed a cybernetic mob on Herb Schildt
a number of years ago in order to advance himself in a career for
which Seebach is just not qualified, and I examined Seebach's attack
to find it to be garbage. My article about this matter was accepted
for publication in the competently moderated and prestigious group
comp.risks. The moderator was then spammed by the sort of cybernetic
mob Seebach had marshaled against Schildt and printed an apology for
accepting my article,

Why? If he was right to accept your article, why not print(?)
a defense instead? It seems to me that you're contradicting
yourself here -- the moderation is competent, and yet the moderator
succumbed to pressure?
but then accepted a second article on an
unrelated topic (the California payroll system crisis).

Yes, I noticed that one, and .... You know, it's possible that my
reaction was influenced more than it should have been by the name
of the author, but aside from drawing attention to an interesting
item in the mainstream press, the post seemed to me to be, hm,
long on speculation and short on content appropriate to the venue.

My two cents' worth. I notice the next two issues of the digest
have contained some responses that -- eh, anyone who reads your
post should probably read those too. Just sayin'.

[ snip ]
 
B

blmblm

[ snip ]
Actually, it is quite US centric of you to use ugly phrases such as
"you are coming across as", which imply that the group knows the
person better than he knows himself.

Oh? In my usage, "you are coming across as" means "you are being
perceived as" -- and really, isn't that something about which
the perceivers (the group) *do* know more than the perceived
(the person)? Does it mean something else in your usage?

You might notice also that I said "*to me* [emphasis added] you
are coming across as", so indeed it would seem to me that I'm
making claims only about my own perceptions rather than those of
some nebulous group, and surely I do know more about those?

Is my intended meaning clearer? Would it have been less offensive
if phrased another way? if so, perhaps you can suggest another
wording that doesn't involve phrases you find ugly.
It's a way of criticising a
person, and evading the matter he raises which is overused in
corporations in the US.

It's a lazy way of justifying sloppy thinking and self-centered
hermeneutics, at worse.

I see you are still quite the female enabler of male bullying. You
pour honey on people merely to attract the fire ants.

That's a metaphor, my dear. I teach English.

And apparently you're still being patronizing.

(So much for my attempt to be on my best behavior in this thread.
Sigh.)

[ snip ]
 
S

Seebs

I think, though, that Seebs's remark about how it took him a while
may have less to do with the inherent difficulty of understanding
about connotations than with the fact that he's -- well, he's
said in other posts that he's something of an outlier on some
measures related to social skills. I'll let him explain further
if he wants to.

I'm autistic. Not "severely", or whatever, but enough that I had to be
explicitly told that connotations existed, and I still couldn't understand
most of the implication logic until someone told me about Gricean
maxims.
But that also *might* be an accusation, of a sort -- if you
mean that no supporting evidence *exists*, rather than that no
supporting evidence *has been presented*. It's not clear to me
which of these meanings is intended, though admittedly the latter
might be somewhat more probable.

"Invented" implies that the supporting evidence does not *exist*. If it
were extant, but unpresented, you wouldn't be inventing it.
Oh no, I think in *THIS* group, asking for the highest level
of pedantry is not only thoroughly appropriate, given the local
culture, but might even be interpreted as something of an inside
joke. Sort of a :).

Yes.

And for what it's worth, I did, as I recall, point to the statements that
the lack of a definition shows undefined behavior, which is the point that
was apparently missing. If we are told that:

* If A, then the result is X.
* If B, then the result is Y.

this means that, if !(A||B), the behavior is undefined, because no definition
was provided, and in the absence of a definition, things are undefined.

-s
 
S

Shao Miller

In regards to:

int two_d_array[10][10];
two_d_array[0][20] = 1;

The problem is that the Standard should define unambiguously what
that object is in each of the various different circumstances;
unfortunately, it doesn't.
It would be nice if it did; agreed. We have section 3.14 (there's
something familiar about that number), point 1:

"object

1 region of data storage in the execution environment, the contents of
which can represent
values

2 NOTE When referenced, an object may be interpreted as having a
particular type; see 6.3.2.1."

In 6.3.2.1,p3, we see "...If the array object has register storage
class, the behavior is undefined" which suggests that array objects
needn't even be addressable, but an implementation could choose to
provide some definition. It might be tricky to imagine array
subscripting in terms of the equivalence to pointer arithmetic in such
a case, since it might be tricky to imagine a pointer pointing into a
register. :)

In 7.20.3,p1 for 'malloc' and family reads, "...Each such allocation
shall yield a pointer to an object disjoint from any other object..."
and a bit before that "...used to access such an object or an array of
such objects..." :) 7.30.3.3,p2 describes 'malloc' to allocate space
for "...an object whose size is is specified..." whereas 7.20.3.1,p2
describes 'calloc' to allocate space "...for an array of...objects..."

Back to 6.5.6,p7, pointer arithmetic on a pointer to a single object
is defined to be the same as if that object is an array object with
one element of that object's type. So for any pointer 'p', we can
point one-past with 'p + 1' without overflow.

For object(s) with "allocated" "storage duration" (6.2.4,p1), we have
no declared type but only "effective type" (6.5,p6). The text also
reads that the effective type for an object can change, which is
similar to the notion that a union is an object whose type depends on
which member is used to modify a value within that object. The text
also reads that copying into an object via treatment of that object as
an array of character type is valid. This implies copying _from_ some
other object, so it also implies that an object can validly be read as
an array of character type.

Putting this all together, it seems that:
- All objects may be considered as array objects with one element for
pointer arithmetic
- The notion of an object is simply a region of data storage where
there are values possible
- You need an effective type to _interpret_ such possible values
- You need an effective type to _access_ (read/modify) such possible
values, _or_ you can read an object as an array of character type
- We need some interpretation of "number of elements" for pointer
arithmetic, but we are guaranteed >= 1. We could interpret:
(a) based on effective type of the region of data storage, or
(b) based on declared type, but this latter interpretation would
make pointer arithmetic undefined for data regions with "allocated"
storage duration, or
(c) based on declared type if available, otherwise effective type.
That might seem odd, but hey. :)

It might be debatable what the declared type of the object pointed-to
by 'two_d_array[0]' is, since the declaration declares 'two_d_array',
doesn't declare any objects of pointer type. :)

For 'sizeof', 'two_d_array[0]' has type 'int[10]'. Regardless of non-
evaluation, consider that the semantics of evaluation suggest
'two_d_array[0]' being equivalent to '(*((two_d_array) + (0)))'. We
have 'two_d_array' become 'int(*)[10]', we'd add 0, then we'd
dereference to yield type 'int[10]'.

For '&', we have the equivalence of '&(*((two_d_array) + (0)))' where
neither '&' nor '*' are part of the evaluation. So we are left with
'((two_d_array) + (0))'. That would yield a result with type 'int(*)
[10]'. So the pointed-to type for the object could be considered
'int[10]', but we're the operand to '&', so we don't care.

For anything else, 'two_d_array[0]' or '(*((two_d_array) + (0)))'
yields the same type as for 'sizeof', 'int[10]'. But this isn't a
pointer type. :) 'int[10]' cannot point into an object, since it's an
array type. A further subscript operator requires a pointer operand,
by constraint 6.5.2.1,p1. Fortunately, the result "decays" into 'int
*' and satisfies the constraint.

But after all of this pedantry, what was the declared type for the
region of storage (object) we might associate with "being pointed
into" by 'two_d_array[0]'? Is it 'int[10]' or 'int'? If it's the
former, which sure looks like the declaration, then we should require
a pointer with type 'int(*)[10]' to get at it. But we can get two
different kinds of pointers from 'two_d_array[0]'. One for '&' with
type 'int(*)[10]'. One for everything else with type 'int *'.

Ugh. :)
In practice, implementations are not going to add code to play
bounds-cop on you when you are clearly well within program-owned
memory. My own view, therefore, is that the behaviour is undefined in
theory but well-defined in practice.  [snip]

I mostly agree, but intra-function or intra-translation-unit
alias analysis is an important exception.  These cases may
very well manifest unde{sir,fin}ed behavior upon such usage.
Exactly! So if we treat the object caused into existence (heh) by
'int two_d_array[10][10];' for the subject of pointer arithmetic as a
single object, it's an array object. If we treat the space as
multiple objects, where are the boundaries drawn? At sub-arrays (each
'int[10]')? At elements (each 'int')? We can copy the whole space as
array of 'char' and we might expect that to be well-defined. How does
our use of 'char *' in such a copy work? Could we run out-of-bounds
at object boundaries we've drawn at a sub-array level?

It seems to me that C's model for objects in the abstract machine are
rather typeless and that the types and operations of the code
"project" types and values onto these objects. Is that a fair
interpretation?
 
N

Nick Keighley

[...]  Your knowledge that there _is_ text
to support your statements is not accessible to me.  If you do not
include the references, the knowledge cannot be accessed.  The
original post includes a great number of references.  That was my
expectation for responses.  That was my mistake.  "Highest levels of
pedantry" was a mistake to request.

Oh no, I think in *THIS* group, asking for the highest level
of pedantry is not only thoroughly appropriate, given the local
culture, but might even be interpreted as something of an inside
joke.  Sort of a :).

old clc quote:

in comp.lang.c, the very people most capable of making the inference
are those least likely to make it. This newsgroup considers pedantry
to be an art form.
Richard Heathfield


 
B

blmblm

I'm autistic. Not "severely", or whatever, but enough that I had to be
explicitly told that connotations existed, and I still couldn't understand
most of the implication logic until someone told me about Gricean
maxims.

You mentioned those (Gricean maxims) before, and now I'm curious ....

Well, I stopped after the first few paragraphs of the Wikipedia
article. Maybe I'm not *that* curious. :) Still, interesting.
Interesting, too, to think about how some people can only (but
can!) acquire by conscious study what others pick up without
thinking about it.

(Your explanation was just what I had in mind, by the way --
but I didn't feel like I could or should attempt it myself.)
"Invented" implies that the supporting evidence does not *exist*. If it
were extant, but unpresented, you wouldn't be inventing it.

Yes, yes .... I think I didn't make my meaning clear. When I said
"that also *might* be an accusation, of a sort", I was referring to
the quoted sentence immediately above ("It's a claim that ...."),
which I think could be parsed two ways. I'm not sure how to explain
this, but maybe using { } as grouping brackets .... :

"It's a claim that there is no supporting reference to {the text
given}."

versus

"It's a claim that there is no {supporting reference to the text}
given."

The second simply says that no evidence has been given; the first
rather implies that no such evidence exists.

I'm probably not explaining this very well and indeed may not have
it entirely clear in my head. But maybe this clarifies just a bit.

[ snip ]
 
S

spinoza1111

[ snip ]




Actually, it is quite US centric of you to use ugly phrases such as
"you are coming across as", which imply that the group knows the
person better than he knows himself.

Oh?  In my usage, "you are coming across as" means "you are being
perceived as" -- and really, isn't that something about which
the perceivers (the group) *do* know more than the perceived
(the person)?  Does it mean something else in your usage?

What is group knowledge? Is it something superior in all cases, or
even in most cases, than the knowledge of an individual? And can it be
greater than the sum of its parts? Can a group composed of inferior
knowers know more than a good knower? Is what they produce even
knowledge, or more like a text such as wikipedia? And isn't their
knowledge/text in large measure itself measured by its fecundity, eg.,
its production of new knowers who as such are individuals? And isn't
it the case that while you folks might have "the tongues of men and
angels" on your hard drives, most of you are bone stupid and getting
more so?


You might notice also that I said "*to me* [emphasis added] you
are coming across as", so indeed it would seem to me that I'm
making claims only about my own perceptions rather than those of
some nebulous group, and surely I do know more about those?

I think you've lost touch with your ability to have a genuine
perception because education and socialization, for example the
dissertation review process, makes us mistrust genuine perception. I
think you use crude if explicit markers to judge texts.
Is my intended meaning clearer?  Would it have been less offensive
if phrased another way?  if so, perhaps you can suggest another
wording that doesn't involve phrases you find ugly.

You are metaphorically a nurse in a torture chamber. Your question is
how you can continue to stay within parameters you've normed, not how
you can change.
And apparently you're still being patronizing.  

Does that mean "speaking or writing as if I were not a member of a
predefined class"? It seems to me, dear heart, that you've learned to
classify incoming texts according to broad and crude rules whose
crudity is masked by their high level. You're here to supplement the
bonehead errors of technicians in English while acknowledging their
"technical skills", evidence for which diminishes each year.

Therefore, you are prepared to see bonehead English, and girlie
writing, the latter characterized by your accurate orthography and
grammar. When I put the boot in, you're at a loss and ready to Call
Security, since like the Savage in Brave New World, I don't fit the
categories.

(So much for my attempt to be on my best behavior in this thread.
Sigh.)

[ snip ]
 
S

spinoza1111

(Maybe if I put the "OT" in parentheses rather than brackets it
will survive better.  It appears that GG's posting interface
strips off tags in brackets.  Anyone know why that might have
seemed like a good idea??)


[ snip ]
I'm not a stalker. Seebach unleashed a cybernetic mob on Herb Schildt
a number of years ago in order to advance himself in a career for
which Seebach is just not qualified, and I examined Seebach's attack
to find it to be garbage. My article about this matter was accepted
for publication in the competently moderated and prestigious group
comp.risks. The moderator was then spammed by the sort of cybernetic
mob Seebach had marshaled against Schildt and printed an apology for
accepting my article,

Why?  If he was right to accept your article, why not print(?)
a defense instead?  It seems to me that you're contradicting
yourself here -- the moderation is competent, and yet the moderator
succumbed to pressure?

Not a contradiction, an indication of the pressures Peter is under. I
dropped the matter after exchanging email in private with Peter
because I respect him and his time commitment. He has always treated
me with a decency and respect I don't see many people showing here.
Yes, I noticed that one, and ....  You know, it's possible that my
reaction was influenced more than it should have been by the name
of the author, but aside from drawing attention to an interesting
item in the mainstream press, the post seemed to me to be, hm,
long on speculation and short on content appropriate to the venue.

Peter welcomes speculation from experienced people in the field for
the speculation is a guide to further research. I WROTE a sequential
file payroll system in the 1970s and felt my speculations were for
this reason valuable, and he agreed. I saw managers claim that
"because" mainframe files were on disk, this meant that the programs
accessed records randomly when the actual software consisted of IBM
1401 code reading records sequentially under 360 emulation.

My two cents' worth.  I notice the next two issues of the digest
have contained some responses that -- eh, anyone who reads your
post should probably read those too.  Just sayin'.

The responses are further speculation by people who were probably
managers and actually believed that because it's on disk it's accessed
randomly in all cases. There was just as much managerial bullshit in
the 1970s as there is today.

I'm saying the California IT manager doesn't know any more than I do
about what's going on in the guts of the software, and he's quoting an
enormous cost to be able to pay consultants (who won't be affected by
the pay cut) to come in, read code, and find out. It's speculative,
but also a key question. Most programmers spend quite a lot of time in
reading code to find out what's going on.

Furthermore, a payroll system lends itself naturally to sequential
processing since everyone back in the 1960s needed to be cut a check
at the same time. It would have been less and not more efficient to
process records randomly, since this would have been disk read head
motion all over creation for each employee. The optimal processing was
to do what's called a "join" based on the key, and most programmers
then and now did not and do not know how to do this.

To implement Schwarzenegger's diktat, we have to know where gross pay
"is" in this calculation, and it's dollars to donuts that it is in
several places. It's probably in different files for different classes
of employees. Worse, there may be software hacks to CHANGE gross pay
inside the gross to net calculation, not inserted fraudulently, but in
a scenario where the 1960s programmer was under pressure to change
gross pay for a set of employees defined by a rule.

It was in fact on Risks that I pointed out in 2003 that even in the
case of modern data base systems, the user perceives the system as an
escape from the Turing machine, with its unpredictably "halting
problem" and the consequent problem that we don't know what software
will do, to a flat and "simple" world of pure data, which CEOs think
they can handle. The joker in modern data base, as I pointed out in my
2003 Risks post on the Bush administration's TIA program, is that
business rules and stored procedures can be used by either lazy or
overpressured programmers to change the meaning of data fields such as
"gross pay" in the same secret way as was done inside Cobol or
assembler code of old.

You wish to label this "speculation", go ahead. I call it imagination.
 
B

blmblm

[ snip ]
What is group knowledge? Is it something superior in all cases, or
even in most cases, than the knowledge of an individual? And can it be
greater than the sum of its parts? Can a group composed of inferior
knowers know more than a good knower? Is what they produce even
knowledge, or more like a text such as wikipedia? And isn't their
knowledge/text in large measure itself measured by its fecundity, eg.,
its production of new knowers who as such are individuals? And isn't
it the case that while you folks might have "the tongues of men and
angels" on your hard drives, most of you are bone stupid and getting
more so?

Are there answers to my questions in that paragraph somewhere?
You might notice also that I said "*to me* [emphasis added] you
are coming across as", so indeed it would seem to me that I'm
making claims only about my own perceptions rather than those of
some nebulous group, and surely I do know more about those?

I think you've lost touch with your ability to have a genuine
perception because education and socialization, for example the
dissertation review process, makes us mistrust genuine perception. I
think you use crude if explicit markers to judge texts.

I have no idea what you mean by the first sentence, but at least
you have the courtesy to preface it with "I think".

The second sentence -- eh, in some ways it's a fair cop, though
I'd claim that I'm aware that I assign more weight to trivia than
maybe I should and try to account for that in forming overall
opinions.
You are metaphorically a nurse in a torture chamber. Your question is
how you can continue to stay within parameters you've normed, not how
you can change.

So what you found ugly was *what* I said, rather than *how* I said
it? That wasn't clear from "ugly phrase".

I'm mildly curious about whether there is some variant of English
in which all of Shao's remarks would be interpreted as he apparently
intended them -- one in which neither "claims" nor "invented" have
the negative connotations they have most of the people who have
commented here.

[ snip ]
Does that mean "speaking or writing as if I were not a member of a
predefined class"?

No. (That is a meaning of "patronizing" of which I am unaware.)

It means addressing me as "my dear", and "dear heart", which
I perceive as being talked down to. Perhaps those terms also have
some meaning in your usage that's different from what they in context
have in mine.
It seems to me, dear heart, that you've learned to
classify incoming texts according to broad and crude rules whose
crudity is masked by their high level.

Point addressed above.

[ snip ]
 
B

blmblm

(Maybe if I put the "OT" in parentheses rather than brackets it
will survive better. It appears that GG's posting interface
strips off tags in brackets. Anyone know why that might have
seemed like a good idea??)

spinoza1111 said:
On Jul 29, 9:16 pm, (e-mail address removed) (Richard Harter) wrote:
On Jul 25, 3:29=A0am, Seebs <[email protected]> wrote:

[ snip ]
I'm not a stalker. Seebach unleashed a cybernetic mob on Herb Schildt
a number of years ago in order to advance himself in a career for
which Seebach is just not qualified, and I examined Seebach's attack
to find it to be garbage. My article about this matter was accepted
for publication in the competently moderated and prestigious group
comp.risks. The moderator was then spammed by the sort of cybernetic
mob Seebach had marshaled against Schildt and printed an apology for
accepting my article,

Why? If he was right to accept your article, why not print(?)
a defense instead? It seems to me that you're contradicting
yourself here -- the moderation is competent, and yet the moderator
succumbed to pressure?

Not a contradiction, an indication of the pressures Peter is under. I
dropped the matter after exchanging email in private with Peter
because I respect him and his time commitment. He has always treated
me with a decency and respect I don't see many people showing here.

His experience with you may be different from that of those who
post here, and that may be a factor.
Peter welcomes speculation from experienced people in the field for
the speculation is a guide to further research. I WROTE a sequential
file payroll system in the 1970s and felt my speculations were for
this reason valuable, and he agreed.

Was there any suggestion, in the e-mail exchanged with PGN, that
you explicitly mention this experience in your post? I think it
might have helped me assess your remarks more accurately, and indeed
reading through the post one more time, I think maybe I *was* unduly
harsh.

The one point where I'm still confused, though, is why you claim
NP completeness for an operation that it seems to me is no worse
than order-N-squared, with N being the number of employees. (NP
completeness might be involved if one needed to consider all subsets
of the set of employees, but I'm not thinking of why that would be
necessary if the goal is to process many "change this employee's
salary" requests, even if only sequential reading of the data is
possible.)
I saw managers claim that
"because" mainframe files were on disk, this meant that the programs
accessed records randomly when the actual software consisted of IBM
1401 code reading records sequentially under 360 emulation.



The responses are further speculation by people who were probably
managers and actually believed that because it's on disk it's accessed
randomly in all cases. There was just as much managerial bullshit in
the 1970s as there is today.

If what you suspect about the background of the responders is true,
why were *their* posts accepted? I've looked over those responses
again, by the way, and everyone making a point about the underlying
technology seems to me to have relevant experience.
I'm saying the California IT manager doesn't know any more than I do
about what's going on in the guts of the software, and he's quoting an
enormous cost to be able to pay consultants (who won't be affected by
the pay cut) to come in, read code, and find out. It's speculative,
but also a key question. Most programmers spend quite a lot of time in
reading code to find out what's going on.

Furthermore, a payroll system lends itself naturally to sequential
processing since everyone back in the 1960s needed to be cut a check
at the same time. It would have been less and not more efficient to
process records randomly, since this would have been disk read head
motion all over creation for each employee. The optimal processing was
to do what's called a "join" based on the key, and most programmers
then and now did not and do not know how to do this.

To implement Schwarzenegger's diktat, we have to know where gross pay
"is" in this calculation, and it's dollars to donuts that it is in
several places. It's probably in different files for different classes
of employees. Worse, there may be software hacks to CHANGE gross pay
inside the gross to net calculation, not inserted fraudulently, but in
a scenario where the 1960s programmer was under pressure to change
gross pay for a set of employees defined by a rule.

It was in fact on Risks that I pointed out in 2003 that even in the
case of modern data base systems, the user perceives the system as an
escape from the Turing machine, with its unpredictably "halting
problem" and the consequent problem that we don't know what software
will do, to a flat and "simple" world of pure data, which CEOs think
they can handle. The joker in modern data base, as I pointed out in my
2003 Risks post on the Bush administration's TIA program, is that
business rules and stored procedures can be used by either lazy or
overpressured programmers to change the meaning of data fields such as
"gross pay" in the same secret way as was done inside Cobol or
assembler code of old.

You wish to label this "speculation", go ahead. I call it imagination.

Where to draw the line between informed speculation (which is,
and IMO should be, welcome in comp.risks) and wild guesses (which
IMO should not be) is probably to some extent a matter of opinion.
In this case it appears that I may have initially drawn it in
the wrong place, which I regret.
 
K

Keith Thompson

Where to draw the line between informed speculation (which is,
and IMO should be, welcome in comp.risks) and wild guesses (which
IMO should not be) is probably to some extent a matter of opinion.
In this case it appears that I may have initially drawn it in
the wrong place, which I regret.

And I suggest, yet again, that "the wrong place" is comp.lang.c.

Yes, I see the "(OT)" in the subject, but ...
 
S

Shao Miller

Sure, I understood why you said "claims to have" rather than "has" --
I do that myself when I don't really have any basis for knowing
about the truth of the claim.  But I'm aware that for some people
"claims to have" is not just a statement of fact, but one that casts
doubt on the claim.  So I try to make it clear that I'm not trying
to be insulting.  People [*] aren't always logical!  
[*] There could be exceptions.  I'm not sure I've ever met one,
but with, what, over 6 billion people on the planet, who can say ...
I agree.  I believe that people associating a claim of a claim with a
dispute for the latter claim will find their doubt-casting.  

I don't understand what you mean by that sentence, but maybe it's
not very important.
If I say "So-and-so claims such-and-such," that very statement is a
claim just as much as so-and-so's claim of such-and-such.

If one perceives a negative connotation, I find it likely that it is
due to their conditioning; sometimes cultural, sometimes personal.
Experiences cause conditioning. A connotation isn't explicit, so
where does it come from?: A conditioned voice in the reader's head.
It says (very quickly), "I recognize that word in this context. It
implies that there is doubt about the truth of what so-and-so stated."

I'd rather not drop the plain English "claims to have" from my typing
because some people associate such with doubt-casting, but I have
enough respect for others to do so. :)
Meaning "an example of perceiving an attack where none was meant"?
No, I didn't mean that. You are correct; none was meant. But the
intention is not accessible to you, it belongs to the author and only
the author knows the truth of their intent. A point that might or
might not be worth taking away is that if we have some overlap in our
frames of reference, we can hopefully communicate more effectively.
"We are typing to one another" != "Someone is calling someone else
wordy or a liar." :) My impression from your posts is that you agree.
 
K

Keith Thompson

[103 lines deleted]

I believe that the e-mail address under which spinoza1111 posts
works. If you want to have a debate with him, I suggest you do
so by e-mail. Even with "(OT)" in the subject, I can think of no
reasonable justification for doing so in this newsgroup.

*Please* stop feeding the troll.
 
S

Shao Miller

I think, though, that Seebs's remark about how it took him a while
may have less to do with the inherent difficulty of understanding
about connotations than with the fact that he's -- well, he's
said in other posts that he's something of an outlier on some
measures related to social skills.  I'll let him explain further
if he wants to.


But that also *might* be an accusation, of a sort -- if you
mean that no supporting evidence *exists*, rather than that no
supporting evidence *has been presented*.  It's not clear to me
which of these meanings is intended, though admittedly the latter
might be somewhat more probable.
The original text goes:
---
Where I might say "invented" below, I additionally mean, "or have not
cited a reference which supports."
---
You might have missed a post. It was apparently July 25th, 2010 at
5:42 pm, whatever that means.
In any case, I agree with Seebs that in context "invented" is
difficult to interpret as anything *but* an insult.
Well read what it says again, if you'd enjoy. Read the
aforementioned, possibly-missed post, if you'd enjoy.
How did we get into *this* mess ....  You wrote in another post
the following:


That second paragraph -- I'm guessing that was your attempt
to clarify your meaning, but the use of "below" introduces at
least some ambiguity about whether it applies to the preceding
paragraph, and I'm just not sure what "additionally" means here.
(I'd have left it out.)
In the aforementioned, possibly-missed post, I typed:
---
I had hoped that that was clear when I added to what I meant by
"invented." When I first wrote "invented" and thought about it, I
thought, "that's too harsh." Hopefully that can put to rest the
argument regarding familiarity with English speakers' use of English.
I added the additional meaning to try to help to clarify what was
meant. I did not scroll up and type it out as high as I meant to,
before the first use of "invented." It appears that even the
additional meaning was not enough to clarify.
---
Now perhaps you can see why it's important to be tolerant. A trivial
mistake leads to an ambiguity. It's really not easy to type and
review inside the 11-row box that Google gives for posting via a web
page interface.

Invented. Made up. Prove it. How so? I don't see it. Oh yeah?
Where does that come from?

Look at Peter's original post:
---
We agreed that it's possible that that text might be imprecise, and
might need to be addressed, did we not? But it's also possible that
it's precise, and there is no undefined behaviour until casting to
'(void)'.
Would you agree?

No. It is adequately precise, adequately clear, and the undefined
behavior
is unambiguous.

-s
---
Fine. He doesn't agree. So I probe:
---
No. It is adequately precise, adequately clear, and the undefined behavior
is unambiguous.

Thank you for your opinion. I would have also appreciated some
reasoning, in order to help to convince myself of this. The opinion
is appreciated regardless of the lack of reasoning. Poll-wise,
dereferencing a null pointer is undefined behaviour during
evaluation. Reason-wise, it's still incomplete, for me.
---
Then he provides reasoning. I perceive some statements that lack
accessible substance from what's been presented in the discussion thus
far. So "invented" seemed pretty appropriate to me. How else could
it be considered shared reasoning if all parties cannot access the
substance? The term might have been harsh, so I attempted to clarify
within the parentheses. Then he says "invented" is an insult and he
also chooses to ignore my direct posts ever after. I apologize, to no
avail. Others offer agreement with the usage being insulting. Fine.
An experience in what is and what is not civil discussion by the
beliefs of some people, while trying to discuss C.
How would I reword ....

The first sentence could read "You state/imply a requirement ...."
And then you could go on to ask whether he can cite a reference
for this claim.
Right. Fine.
 
S

Shao Miller

"Invented" implies that the supporting evidence does not *exist*.  If it
were extant, but unpresented, you wouldn't be inventing it.
Existence versus presentation, you say. Well then understand what
happens when reality is bounded by what's shared. Presentation
defines what exists. Your bounds were not my expected bounds. Very
simple. That doesn't mean I'm calling you a liar, it means "it's not
present."
And for what it's worth, I did, as I recall, point to the statements that
the lack of a definition shows undefined behavior, which is the point that
was apparently missing.  If we are told that:

* If A, then the result is X.
* If B, then the result is Y.

this means that, if !(A||B), the behavior is undefined, because no definition
was provided, and in the absence of a definition, things are undefined.
You did not point to statements in the C Standard draft regarding this
(which is, of course, 4,p2) but you did make those statements. I
never disputed those statements. What I did claim was that it was
_defined_ by the C Standard draft, and I offered how.

That's fine.
 
S

Squeamizh

And apparently you're still being patronizing.  

(So much for my attempt to be on my best behavior in this thread.
Sigh.)

Stop the presses! who knew spinoza would act like a jackass yet again?

Well at least you've confined Cirque du B.L. to just this thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,091
Messages
2,570,605
Members
47,225
Latest member
DarrinWhit

Latest Threads

Top