bunch of pedants

J

jacob navia

The regulars go on denying that C uses a stack. They should
read this:

<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function;
in turn, the attractiveness of an implementation will depend heavily
on the ease with which a stack can be maintained.
<end quote>

This was written by an expert in C.

True, there is no mention of a stack in their bible
Fact is, there isn't any C implementations that don't use
a stack to store the automatic variables.

Up to now, this people are unable to put forward a single
example of an implementation that doesn't use a hardware
stack (maintained by a register in a contiguous memory
addressing space)

Their first "example" was ARM and some Risc processors.

I proved them wrong.

Then they started tripping with IBM mainframes. Nope, I showed
them the documentation of the IBM compilers for mainframes
where they describe the stack and its associated register (r13)

Then they started with the 8051. I showed them that that processor
has a stack (it has PUSH/POP instructions apparently) but it is
too small, so some compilers use an external stack.

Even if they have not a single example, they go on with bullshit of the
style "but an implementation *could* exist that... blah blah blah"

Facts are not important. The C standard does not mention a stack,
and that is it. It is possible then to throw at unaware people that
asks questions in this group sentences like
"C has no stack"
"There is no stack in C"

Since they have no arguments, they discuss with tricks like

1) After you have proved them yet another time wrong, they will
answer with the eternal sentence "The standard doesn't mention a
stack" and the discussion can start from the beginning

2) After you have proved that the machine XYZ DOES have a stack,
they say "But an implementation *could* exist" and the discussion
can start from the beginning.

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.
 
M

Martin Ambuhl

jacob said:
The regulars go on denying that C uses a stack.

Many regulars never bother with this question, never deny nor affirm
anything about C using a stack, and refuse to be part of your stupid
baiting game. Kudos to them; shame on you.
 
R

Richard Heathfield

jacob navia said:
The regulars go on denying that C uses a stack.

No, the "regulars" go on denying that the C language specification requires
the use of a stack, and this is perfectly true, because it doesn't. The
fact that most (or possibly even all) implementations do use a stack is
irrelevant. They could easily use some other data structure; the reason
they *don't* is that it doesn't appear to have any advantages over a
stack. But if someone discovers such an advantage, the C language won't
stop them from exploiting it. The stack is a bit like gravity. Most (or
possibly even all) C implementations operate in a gravitational field that
tends to accelerate them towards the centre of the Earth at around
9.8m/s/s. Nevertheless, nowhere in the C Standard will you find any such
*requirement* imposed on C implementations, which is just as well for the
future of space travel, right? In the same way, no *requirement* is
imposed on C implementations to use a stack.

They should read this:

<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function;
in turn, the attractiveness of an implementation will depend heavily
on the ease with which a stack can be maintained.
<end quote>

This was written by an expert in C.

Nevertheless, it is not normative text.

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

If you read what we wrote, instead of what you think we're writing, that
would make a big difference to these discussions.
Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.

Good. The sooner you drop these ridiculous claims, the better for all
concerned.
 
W

WANG Cong

On Sun, 16 Mar 2008 05:53:30 +0100,jacob navia wrote:
The regulars go on denying that C uses a stack. They should read this:

<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function; in
turn, the attractiveness of an implementation will depend heavily on the
ease with which a stack can be maintained. <end quote>

This was written by an expert in C.

True, there is no mention of a stack in their bible Fact is, there isn't
any C implementations that don't use a stack to store the automatic
variables.

Up to now, this people are unable to put forward a single example of an
implementation that doesn't use a hardware stack (maintained by a
register in a contiguous memory addressing space)

Their first "example" was ARM and some Risc processors.

I proved them wrong.

Then they started tripping with IBM mainframes. Nope, I showed them the
documentation of the IBM compilers for mainframes where they describe
the stack and its associated register (r13)

Then they started with the 8051. I showed them that that processor has a
stack (it has PUSH/POP instructions apparently) but it is too small, so
some compilers use an external stack.


Thank you for these provings.
Even if they have not a single example, they go on with bullshit of the
style "but an implementation *could* exist that... blah blah blah"

Facts are not important. The C standard does not mention a stack, and
that is it. It is possible then to throw at unaware people that asks
questions in this group sentences like "C has no stack"
"There is no stack in C"

Yes, the C99 standard doesn't even leave a word about stack.
Stack is the implementation's thing, beyond the standard's defination.
Since they have no arguments, they discuss with tricks like

1) After you have proved them yet another time wrong, they will
answer with the eternal sentence "The standard doesn't mention a
stack" and the discussion can start from the beginning

2) After you have proved that the machine XYZ DOES have a stack,
they say "But an implementation *could* exist" and the discussion
can start from the beginning.

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.

I would say standard C doesn't define the concept of stack, at least now,
although nearly all implementations do.

Please don't play word games.
 
W

William Pursell

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Starting a new thread on the topic is hardly reflective
of your decision that the discussion is a waste of time.
It appears to be the exact opposite, in fact.
 
K

Keith Thompson

jacob navia said:
The regulars go on denying that C uses a stack. They should
read this:

<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function;
in turn, the attractiveness of an implementation will depend heavily
on the ease with which a stack can be maintained.
<end quote>

This was written by an expert in C.

And it wasn't worth your time either to identify the expert (it's from
a paper written by Johnson and Ritchie) or to mention that it was
published 30 years ago.
True, there is no mention of a stack in their bible
Fact is, there isn't any C implementations that don't use
a stack to store the automatic variables.

Up to now, this people are unable to put forward a single
example of an implementation that doesn't use a hardware
stack (maintained by a register in a contiguous memory
addressing space)
[...]

Then they started tripping with IBM mainframes. Nope, I showed
them the documentation of the IBM compilers for mainframes
where they describe the stack and its associated register (r13)

I read the excerpt you posted from the documentation for *one* C
compiler for *one* operating system on *one* IBM mainframe. It did
not state that the "stack frames" are allocated contiguously, and
another poster stated that in fact they are not. There's your
example.

[...]
Even if they have not a single example, they go on with bullshit of the
style "but an implementation *could* exist that... blah blah blah"

How is it "bullshit"? Do you claim that such an implementation could
not possibly exist? (I don't expect a straight answer to that
question.)
Facts are not important. The C standard does not mention a stack,
and that is it.

The fact that the C standard does not mention a stack is important
(but apparently not to you).
It is possible then to throw at unaware people that
asks questions in this group sentences like
"C has no stack"
"There is no stack in C"

I've addressed this in another thread.

[snip]
I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Then why did you start a new thread?
Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.

I am not CBFalconer. Please do not try to put his words in my mouth,
or mine in his. I do not say this to criticize him, or even
necessarily to disagree with him, but to refute your apparent belief
that everyone who disagrees with you must be making the same
arguments.
 
M

Malcolm McLean

Richard Heathfield said:
Most (or
possibly even all) C implementations operate in a gravitational field that
tends to accelerate them towards the centre of the Earth at around
9.8m/s/s. Nevertheless, nowhere in the C Standard will you find any such
*requirement* imposed on C implementations, which is just as well for the
future of space travel, right?
Er, wasn't a Mars Rover stuck because of a buffer overrun in its C code?
 
H

Harald van Dijk

Since they have no arguments, they discuss with tricks like

1) After you have proved them yet another time wrong, they will
answer with the eternal sentence "The standard doesn't mention a
stack" and the discussion can start from the beginning

That is a bogus argument. I've seen only one person try to use that. He
shouldn't have, but you're wrong for ignoring everybody else because of
it too.
2) After you have proved that the machine XYZ DOES have a stack,
they say "But an implementation *could* exist" and the discussion
can start from the beginning.

No, not "an implementation *could* exist", but "an implementation *does*
exist". A specific implementation has been mentioned that doesn't use a
stack, unless by stack you mean something different from what the OP
meant in the thread you should've responded to.
 
S

santosh

jacob said:
The regulars go on denying that C uses a stack. They should
read this:

C does not need to use a hardware stack, which was most probably
what "CJ" meant, and the responses given for his statement were
perfectly appropriate, until you decided to start another flamefest.
<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function;
in turn, the attractiveness of an implementation will depend heavily
on the ease with which a stack can be maintained.
<end quote>

Note the crucial word: *suggest* . Not mandate.

Facts are not important. The C standard does not mention a stack,
and that is it. It is possible then to throw at unaware people that
asks questions in this group sentences like
"C has no stack"
"There is no stack in C"

In the context of what CJ meant (i.e. that C imposed the requirement of
a contiguous hardware stack), the answers were perfectly appropriate.

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.

So you need to start another thread simply to say you won't discuss this
further?

Jacob, I don't think newbies are so stupid that they need some sort
of "rescuing" by you. The vast majority of newbies are not even
concerned with the stack. Those who ask specific questions (like CJ)
are given the appropriate response. No one is saying "C has no stack".
In fact Keith was written several excellent posts on the matter that
elucidate the issue more clearly than you or I could. Why don't you
give this a rest?
 
F

Flash Gordon

jacob navia wrote, On 16/03/08 04:53:
The regulars go on denying that C uses a stack. They should
read this:

In the thread in question the OP asked if C "insisted" on a stack. The
only meaning of "insisted" that I can conceive of applying in the
question is that the use of a stack is mandated.
<begin quote>
Any function in C may be recursive
(without special declaration) and most possess several "automatic"
variables local to each invocation. These characteristics suggest
strongly that a stack must be used to store the automatic variables,
caller's return point, and saved registers local to each function;
in turn, the attractiveness of an implementation will depend heavily
on the ease with which a stack can be maintained.
<end quote>

"suggest strongly" is a *much* weaker claim than "insist". In fact, by
definition, a suggestion is not a mandated requirement.
This was written by an expert in C.

Yes, and it agrees with the position taken by everyone but you at the
start of the thread you are commenting on. If it disagreed it would say
something like, "requre that a stack be used" rather than "strongly
suggest that a stack be used".
True, there is no mention of a stack in their bible
Fact is, there isn't any C implementations that don't use
a stack to store the automatic variables.

There are implementations where the processors HW stack is not used but
instead a second stack using an ordinary index register is used. So
using the term "the stack" is at the very least misleading on
implementations with a contiguous block of memory being used to
implement a stack which is independent from the HW stack of the
processor. In fact, using the HW stack on the TMS320C25 as the "C stack"
would not be possible because it is only 8 words deep! This is a
separate point from whether C requires a stack, since it is recognisably
a stack, just not *the* stack on the processor.

I decided that it is a waste of time to discuss with them. They just
repeat their bullshit without caring about what you answer to them

Personally I will not answer any more to falcolner and co. "C has no
stack" for them? Let it be.

If you actually read what was written instead of assuming what people
are going to write life would be easier.
 
K

Kenny McCormack

Many regulars never bother with this question, never deny nor affirm
anything about C using a stack, and refuse to be part of your stupid
baiting game. Kudos to them; shame on you.

But not you.
 
M

Mark McIntyre

Malcolm said:
Er, wasn't a Mars Rover stuck because of a buffer overrun in its C code?

Yeah, but that problem was caused by a black hole*, which has no gravity
as such.


*Somewhere in the region of Redmond...
** gd&r
 
M

Mark McIntyre

If only this were true...
Why don't you give this a rest?

Because, as far as I can tell, he appears to be obsessed and to believe
that everyone has it in for him. I was going to offer a more formal
clinical description but its not worth the flamefest and insults that
would ensue.
 
R

Richard Heathfield

Malcolm McLean said:
Er, wasn't a Mars Rover stuck because of a buffer overrun in its C code?

All the more reason to promulgate techniques by which buffer overruns can
be prevented.
 
K

Kaz Kylheku

Up to now, this people are unable to put forward a single
example of an implementation that doesn't use a hardware
stack (maintained by a register in a contiguous memory
addressing space)

You're insanely obsessed about this stack thing.
The C standard does not mention a stack,
and that is it. It is possible then to throw at unaware people that
asks questions in this group sentences like
"C has no stack"
"There is no stack in C"

If you use ``stack'' to refer to anything in C, that is wrong, since
whatever you are giving that name to doesn't precisely coincide with
the stack.

C has automatic storage, whose concept more broadly encompasses the
state of the data processor. In actual implementations, automatic
storage is implemented not only using the stack but also other storage
areas such as registers, or even immediate operands within the machine
code.

A statement like ``the function arguments are stored in the stack'' is
only correct if ``stack'' is redefined as a synonym for ``automatic
storage'', which is a bad idea, since you need that word to refer to
the machine-specific structure.

It's a terrible idea to take a word with an existing meaning and then
redefine it to have another meaning for something that is closely-
related. Even worse is to then use the two meanings interchangeably in
the same context.
Let it be.

So that's what, ten paragraphs of letting it be? Good grief.
 
B

Bartc

jacob navia said:
The regulars go on denying that C uses a stack. They should
read this:

The regulars are technically correct. But being technically correct is not
always helpful.

The problem is, someone posts a question about C and X, but X is not a term
in the standard, so immediately it is denied that X is possible at all. End
of post.

Rather than seeing that X is actually meaningful in the context of practical
implementations, and to which there may be a number of helpful replies.

Or, maybe X is some assumption which cannot be true of 100% of C
implementations, so the poster is wrong. End of post.

In fact X may be true on most implementations -- or at least on 100% of the
implementations the poster is interested in -- and again there may be useful
replies to be made. After all someone may spend their entire working life on
a system where X is true and they may well be interested in questions about
X, where X is still general enough for this newsgroup.
 
M

Morris Dovey

jacob said:
Then they started tripping with IBM mainframes. Nope, I showed
them the documentation of the IBM compilers for mainframes
where they describe the stack and its associated register (r13)

Admittedly, it's been a while since I wrote assembler for an IBM
mainframe, but R13 had no push/pop capability. By convention (and
only by convention) is was used to point to an area of storage
(called a "SAVEAREA") retrieved by making a system call via
programed interrupt (issuing an SVC) using code generated by a
GETMAIN macro invocation. That system call was approximately
analogous to a malloc() call.

Unless there has been an addition to the control store microcode
to implement a push/pop capability, any "stack" on that
architecture is purely a software construct - meaning that there
is a "stack" capability to exactly the same degree that my old
Z80 system had a floating-point capability.

If anyone on CLC has enough personal experience (or can look at a
dump of an actual program), I'd be interested in learning exactly
how this stack has been implemented. If it's too far from
"topical" to post here, I'd welcome an e-mail.
 
J

Jack Klein

jacob navia said:


No, the "regulars" go on denying that the C language specification requires
the use of a stack, and this is perfectly true, because it doesn't. The
fact that most (or possibly even all) implementations do use a stack is

[snip]

Definitely not all. As for recursion, there are implementations for
platforms where you must take the (admittedly non-standard) step of
specifically marking a recursive function in the source, which causes
the compiler to generate hideously expensive code to handle automatic
objects in the function.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 
K

Kenny McCormack

The regulars are technically correct. But being technically correct is not
always helpful.

That statement, while undoubtedly true, is not the accepted dogma in
this group. Here, people believe that being correct is a) all that
matters and b) approved behavior, no matter how irrelevant that position
makes them.

I assume that the jerks here behave the same way in other fora in which
they participate. And I often note just how far they would get,
behaving like this, either in a real world help-oriented forum (such as
the help board for a real, commercial product) or, even more on-point,
in a forum associated with their work. The answer is, not very far; I
know this from experience, as I often (intentionally, as a test) inject
a bit of Usenet into it and see what kinds of reactions I get. Believe
me, the regs here wouldn't survive a minute in the real world (a point
often made by my esteemed colleagues).
The problem is, someone posts a question about C and X, but X is not a term
in the standard, so immediately it is denied that X is possible at all. End
of post.

(rest of very good, insightful, post clipped, but not forgotten)

The real problem is that, by now, we all understand that use of the
"S word" in this newsgroup enflames the passions of the regulars. In
much the same way as using, say, the "N word" does in other contexts, or
the "C word" in yet others. Jacob knows this - he knows perfectly well
how inflamatory the use of that word is here. Yet he persists.

Does this mean I think he is wrong to do so? Of course not. There is
no reason that use of such a simple English word should cause such panic
and havoc. Yet we know that it does. At some point, in social
development, blame starts shifting from the people who unreasonably take
offense at words, to those using those words, such that, after
sufficient time, we all assume that it is the person doing the enflaming
who is to be blamed, rather than those who get enflamed. Such is life.

I'm still trying to figure out just who, among the pantheon of Usenet
Flame Warriors (see the URL given in other threads), best typifies
Jacob. Haven't quite figured it out yet...
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top