Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > bunch of pedants

Reply
Thread Tools

bunch of pedants

 
 
Flash Gordon
Guest
Posts: n/a
 
      03-16-2008
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.

<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
>
> 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.
--
Flash Gordon
 
Reply With Quote
 
 
 
 
Kenny McCormack
Guest
Posts: n/a
 
      03-16-2008
In article <(E-Mail Removed)>,
Martin Ambuhl <(E-Mail Removed)> wrote:
>jacob navia wrote:
>> 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.


But not you.

 
Reply With Quote
 
 
 
 
Mark McIntyre
Guest
Posts: n/a
 
      03-16-2008
Malcolm McLean wrote:
>
> "Richard Heathfield" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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?


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


*Somewhere in the region of Redmond...
** gd&r
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      03-16-2008
santosh wrote:
> jacob navia wrote:
>
>> Personally I will not answer any more to falcolner and co. "C has no
>> stack" for them? Let it be.


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.

--
Mark McIntyre

CLC FAQ <http://c-faq.com/>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      03-16-2008
Malcolm McLean said:

>
> "Richard Heathfield" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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?


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

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      03-16-2008
On Mar 15, 9:53*pm, jacob navia <(E-Mail Removed)> wrote:
> 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.
 
Reply With Quote
 
Bartc
Guest
Posts: n/a
 
      03-16-2008

"jacob navia" <(E-Mail Removed)> wrote in message
news:fri94j$p8c$(E-Mail Removed)...
> 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.


--
Bart





 
Reply With Quote
 
Morris Dovey
Guest
Posts: n/a
 
      03-16-2008
jacob navia wrote:

> 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.

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/
 
Reply With Quote
 
Jack Klein
Guest
Posts: n/a
 
      03-16-2008
On Sun, 16 Mar 2008 07:18:02 +0000, Richard Heathfield
<(E-Mail Removed)> wrote in comp.lang.c:

> 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


[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
 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      03-16-2008
In article <5WaDj.24143$(E-Mail Removed)> ,
Bartc <(E-Mail Removed)> wrote:
>
>"jacob navia" <(E-Mail Removed)> wrote in message
>news:fri94j$p8c$(E-Mail Removed)...
>> 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.


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...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pedants, please help on integer types Keith Thompson C Programming 1 08-05-2012 09:56 PM
Re: Pedants, please help on integer types rudolf C Programming 0 08-05-2012 08:31 AM
Pedants jacob navia C Programming 121 07-03-2008 11:37 AM
Re:YOU ARE A BUNCH OF CHILDREN!!! The Poster Formerly Known as Kline Sphere MCSE 3 01-12-2005 05:26 PM
OK you pedants - what is the *exact* size of a 35mm image? Alan F Cross Digital Photography 5 08-05-2003 10:47 PM



Advertisments