Storgae durations

J

jacob navia

Keith said:
I suspect both Flash and I made the same mistake: assuming that atan2
is new in C99 (it isn't; C90 has it), and ... drum roll please ...
forgetting to use the "-lm" option.

D'oh!

(But I've *already* read the FAQ!)

Well, it happens EACH time I restart compiling under
Unix after a fewmonths vacation from it.

I have told many times here that this is brain-dead!

WHY should we have to add the math library to the
command line?

It should be included by default!
 
J

jacob navia

Flash Gordon wrote:
...

That's very odd. Can you tell me which feature of C99 it fails to
implement correctly to make that fail?


It builds on my CentOS Linux system with gcc 3.2.3, both in C90
conforming mode and in the closest thing gcc has to a c99 conforming
mode. In C90 mode it gives a warning message about control reaching
the end of a non-void function, but it still compiles, links, and
executes correctly.

On my Irix 6.5 system, using gcc 3.3, it gives the warning for both
C90 and C99, but still compiles and executes correctly. The Irix mips4
compiler has no problem either, despite being only a C90 compiler (in
the version we have installed). It makes a remark about the missing
return statement, but still compiles, links, and executes the program
properly.

Mr Gordon was trying to be too clever...
It is perfectly legal program and will compile everywhere.
 
J

James Kuyper

jacob said:
Well, it happens EACH time I restart compiling under
Unix after a fewmonths vacation from it.

I have told many times here that this is brain-dead!

WHY should we have to add the math library to the
command line?

It should be included by default!

The standard says nothing about this. What command line options, if any,
that you have to give to a compiler to make it fully conform to the
standard is the implementor's decision, not the standard's. There are
some compilers for which "-lm" is supported only for backwards
compatibility with existing make files and build scripts - it doesn't
actually do anything.

The fact that it is not the default on many systems is mainly a
historical artifact. Many programs make no use whatsoever of the math
library. In the past, the extra time required to search the math
libraries for symbols that the developer knew weren't going to be used
was unacceptable. The C99 math library is a lot larger than the C90 one,
but computers are so much faster now that this is no longer a
significant issue on most systems.
 
S

s0suk3

(e-mail address removed) said:





See? You still don't understand what evidence is.

Perhaps I don't understand /your/ personal definition of "evidence."
<snip>


Well, you have talked about /your/ observations of C99 installations. [i.e. none]
And that's perfect. But not everybody has the same observations as
you, so you can't say the same thing about all C programmers by basing
on those observations.

Yes, I know. You seem to have failed yet again to grasp the essential
point, which is that IF C99 were as prevalent as you say, I'd have
expected to see, personally, AT LEAST one or two C99 installations out
there. The fact that I haven't does not prove that C99 is not prevalent,
but it does suggest to me that it's very, very, very unlikely indeed. And
those who have had similar non-encounters are going to think the same way..

No, it only suggests that you work on weird places where things aren't
ported to.
Yes, I did, because - as I have explained before - if it doesn't conform to
C99, it isn't a C99 implementation. Duh. This is so blindingly obvious I
can't believe you still don't get it.

I can't believe you still don't get that your opinion isn't universal.
WAKE UP RICHARD.
The same "private terminology" is used by practically everyone here,

Yes, but clc isn't the whole world.
and
newbies normally pick it up without any trouble.

Of course, newbies will pick up whatever you tell them--because
they're newbies.
Learn faster. It will prove to be useful knowledge, because lots of other
people here use a great many of the same words and phrases I do in pretty
much the same way that I do (not because they've copied me but because
I've copied them).

I'd rather not becaome a clc zealot.
Your conclusion is that C99 is dominant. Mine is that it is practically
non-existent.

No, my conclusion was that, according to your reported observations,
C99 wasn't very common in the environment where you've worked. It has
little to do with C99 being or not being dominant.
My background includes consultancies at a number of UK banks and insurance
companies, a number of software houses, an airline, and a couple of
startups. If what you claim about C99 dominance is true, I would have
expected to see DOZENS of C99 installations.

What kinds of systems do they use that C99 isn't available there?
No, it isn't, so it doesn't.

Umm...

It is, so it does.
We are. Your definition is useless, since it includes bananas, cough
medicine, the Suez Crisis, and the Metropolitan District of South
Humberside.

I've never said anything like that. Could you please provide a quote
from one of my posts where I say that my definition includes bananas,
cough medicine, the Suez Crisis, and the Metropolitan District of
South Humberside?
This demonstrates (a) that your experience of the C programming community
is insufficiently broad for your comments to be taken seriously,

No, because the experience of someone as a C programmer has nothing to
do with the number of C installations they've seen, as I explained
below.
and (b)
that even in your limited experience, C90 is twice as prevalent as C99.

If your definition of "prevalent" is "the standard for which one has
seen more installations."

I agree, but their experience of C as it is used in the community cannot
help but be limited if they've only ever seen two C99 installations. For
one thing, it means that they've only worked at one site with one other C
programmer, or perhaps at two sites where in each case they were the
*only* C programmer.

I don't know what you mean by "site." If you mean something like
"place" or "project," then this isn't so: one can often use the same
implementation in most projects and places.
Someone in your position cannot have the faintest
idea of what is prevalent in the C community.

As this thread demonstrates, someone in my position has a better idea
of what is prevalent in the C community than someone who has worked at
a number of UK banks and insurance companies, a number of software
houses, an airline, and a couple of startups.
Agreed, but the fact that he hasn't seen any others indicates that he's
working alone without any other C programmers around him, in which case he
is not in a position to judge the prevalence or otherwise of C99.

What makes you think that using only one implementation indicates that
someone is working alone? In a project in the Windows environment, for
example, it's common to see the whole team using MSVC.
Presumably you, on your C99 installation, type faster than your two C90
colleagues. Or perhaps you write the new stuff, and they fix your bugs?
That's not "new C development" for them, just maintenance of brand new
code. (It is of course only a guess - but if it *is* true, they may well
have to remove your C99isms in order to get the code to compile.)

Who said that I have two C90 colleages? You talk as if every person in
the world would use a different C implementation.
No, it's just pathetic.

In the context of this discussion, yes. But you're the one who keeps
worshipping personal expiriences. Moreover, you snipped the part that
*wasn't* pathetic: "but it shows that the fact that there are more
installations of compilers for a particular standard doesn't imply
that most new development takes place using that standard."

But, like Twink has mentioned, your whole modus operandi involves
snipping the relevant parts that prove you wrong. He's got you spot
on! :)

You seem to fail to understand the difference between "defend the claim"
and "prove the claim".

In fact, you fail to understand a lot of things. Are you still at college?

No, I simply live at planet Earth.
But like I said, I'm certain that in this case [people who disagree with
me] not just that noisy bunch the ones who disagree with you.

Given your background of being certain, on little or no evidence, of things
that simply aren't true, I'm not surprised.

You haven't been able to demonstrate that it isn't true.

<snip>

Sebastian
 
S

s0suk3

If we don't have any clue about what you mean by "many" then your
statement is worthless. My experience suggests that there are not "many"
C99 implementations.

Well, that only shows that your experience is similar to Richard's:
you've only worked on weird places where things aren't ported to.
So how many of those implementations will build the following C99
program and execute it correctly:

#include <stdio.h>
#include <math.h>

int main(void)
{
    printf("%f\n",atan2(1,1));

}

The nearest thing I have to a C99 implementation certainly does not.

To save you some trouble I'll let you know that it does not build on Linux.

I was able to build it in Linux with GCC:

$ cat atan2test.c
#include <stdio.h>
#include <math.h>

int main(void) { printf("%f\n", atan2(1, 1)); }
$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ gcc -std=c99 atan2test.c
$ ./a.out
0.785398
$
So what did you mean by "many" above? 1% of installed C implementations,
1% of available C99 implementations or what?

It would certainly be difficult to make a research to get an accurate
percent. From what I can see, though, there *are* "many"--or at least
many enough.
The evidence presented by James for a start.

Let's review the presumed evidence:

"A quick Google Groups search gives an estimated 880 uses of "C99
implementation" across all newsgroups. Among the first 100 hits, the
only ones that I could find using that term to refer to an
implementation which falls short of being fully conforming are by you
and jacob navia. A large fraction of those hits involve arguments
about that very issue, in this newsgroup."

We have established that the first sentence, despite the
misunderstanding about the quotation marks, is right. The second
sentence proves that he isn't able to find stuff since, among those
very first 100 hits, there *are* people other than me and Jacob Navia
who have used the mentioned term to refer to an implementation which
falls short of being fully conforming. Here is the counter-example:

http://groups.google.com/group/comp.lang.c/msg/3d764bc633d9b1db?

(Someone named E. Robert Tisdale starts a thread about transitioning
to C99, saying that at his workplace they have very good C99
compilers. Then someone named Mac responds to him asking whether he's
sure that those implementations he's referring to are actually C99
comforming. E. Robert Tisdale responds to this by saying: "I don't
even know of *any* implementation that actually claims C 89/90
compliance (conformance) let alone C 99 compliance.")
In that case all of the evidence for all current scientific theories is
completely irrelevant because the decent scientist who obtain it know it
does not actually prove anything just suggests that the theories are
correct.

The evidences for those theories you're referring to are probably more
believable and accurate than the presumed evidences you've claimed to
have. But I don't know what theories you're talking about, so that
hardly relates to this case.
Quote from the gcc info pages, "gnu89  GNU dialect of ISO C90..."
Quote from the gcc info pages, "c99... ISO C99. Note that this standard
is not yet fully supported...", so they explicitly state it is not full
support.

Yes, we've already agreed on that.
Quote from the gcc info pages, "gnu99...   GNU dialect of ISO C99. When
C99 is fully implemented in GCC, this will become the default."

There you are, quotes supporting what gnu89 is, what gnu99 is, and the
reason that gnu99 is not the default.

Yes, well, like I said, I take my words back if they actually say
that.
They also say that various bits of it are broken as you well know, and
how can something be considered not-broken if part of it is broken?

If a tower has a broken brick, is that tower broken?
Then there is the simple program above which is C99 and fails to build
under gcc on Linux. How can it not be broken if a simple C99 fails to build?

Why did it fail for you? I already showed that it built fine on my
machine.
[...] You said
"Given that most people starting to write new apps don't actually have
a C99 implementation,"
Which is, let's admit it, gibberish.
No, it's simply true.
False.
Hmm. Microsoft Visual Studio is probably the most used C compiler on
Windows and it does not even *attempt* to come close to C99.
But it isn't the only C compiler on Windows.
No, just the most common by a very long way. So it is almost certainly
the compiler most commonly used when developing new C application on
Windows. So it not conforming to C99 is very strong evidence that you
are wrong.
First you say "No [it isn't the only C compiler on Windows], just the
most common by a very long way." And then you say that I'm wrong. Your
above paragraph contradicts itself.
I'll be clearer as you could not understand what I wrote. MS VCC is by
far the most used Windows C compiler, so whether it is the *only*
compiler is irrelevant to what most new C development is done in. MS VCC
has NO support for C99. Therefore most new C development on Windows is
NOT done in C99. This is a strong piece of evidence (but not the only
evidence) that most new C development is not done in C99.
You forgot the words "in Windows" in that last sentence.
No, I didn't. A piece of evidence on the state of one part of a field is
evidence of the state of all of the field. The more areas of the field
you have evidence from the more confident you can be about the state of
the entire field.
No, because most C new development in Windows doesn't constitute most
new C development in general.

It is a large area of the field. Another large area is embedded
development. So that is two large areas where C99 is definitely by far
in the minority.

In the first, perhaps, As for the second, it's hard to see how
embedded systems is a large area of the field, though I'll take your
word and others' for it.
It is a large sample. Add to that another large area, namely GNU, where
the GNU coding standards state:
   "1989 Standard C is widespread enough now that it is ok to use its
features in new programs."

   "1999 Standard C is not widespread yet, so please do not require its
features in programs."

I presume that only applies to GNU's own development, not to user
development under GNU tools.
Then there is embedded SW development.



We were talking about what C development is actually done in. The
availability of compilers which are not much used does not affect this.

It does affect it, since the availability of other compilers means
that some work, though not the majority of work, is done in those
other compilers.
You are using the presence of C99 compilers for Windows as evidence that
most development is done in C99.

No. We already established that, because of MSVC being the most widely
used compiler on Windows, and because of it not supporting C99, most C
development _under Windows_ was probably not done in C99. What most C
development _in general_ is done in is another matter.
As you have admitted that most Windows
development is done in a compiler that does NOT support C99 that part of
your refutation is clearly wrong. Other parts have been addressed
else-where in this thread.

My refutation to Richard's claim that most people don't have a C99
implementation has little to do with most Windows development being
done in a compiler that doesn't support C99, since that doesn't mean
they don't actually have one.
Your failure to understand the term is relevant because it has presented
you from recognising that some has been presented.

Let's--again--quote the dictionary:

"that which tends to prove or disprove something; ground for belief;
proof."

According to the dictionary, you haven't presented any evidence.
If the handle of a mug is broken then the mug is broken.

If a tower has a broken brick, is that tower broken? If the sea has a
broken oxygen atom, is the sea broken?
The status page
states parts of gcc are broken with respect to C99 so gcc is broken with
respect to C99. You have seen the page which states that parts are
broken, and it even uses that specific word.

The accurateness of the rest of that paragraph depends on which of our
analogies concerning the word "broken" is most accurate.
So says the person who knows what C implementations are used on the
bases of a massive sample of three?

Anyway, it is rather hard to escape knowledge of K&R as a C programmer.
Do a google search for "C Programming Language" without the quotes and
you hit it.

I've heard it's a good book, but it describes a past standard.
Some compilers come with a copy of the 2nd edition.

Ask in most places for recommendations of books and someone is likely to
point in that direction.

Ask any old-time C programmer (and new programmers do ask old-time
programmers) and the chances are you will be pointed in that direction.

Eye-witness evidence, I've met far more people who have heard of
Kernighan and Ritchie than have heard of the C standard.

Not very useful evidence, since someone that programs in a language
without even being aware of the existence of a standard for that
language isn't much of a programmer anyway.
I don't see a correlation because most of the good developers I have
come across outside this group had not heard of C99.

I don't see how a developer can be a good developer without being
aware of the current standard for the language he/she's programming in
(unless, of course, he/she is not a C developer)
Experience suggests that more people have heard of K&R than have heard
of C99.

Correction: /Your/ experience suggests that.
Where did I say that K&R was the *only* book they know?

Sorry for getting that wrong. I just assumed that, since they don't
know about the standard for the language they're programming in, they
had only limited knowledge about C.
Well, let me count the pieces of kit in this house with embedded SW...
Well, I can think of 20 pieces of kit in this house that definitely have
embedded SW, a lot of those pieces of kit (for example this PC) have
more than one processor and more than one piece of embedded SW (graphics
card has a processor and embedded SW, so does the sound card, the HW,
the DVD drive...).

Still, I think the Linux machine from where you posted this has a lot
of more C work in it.
It covers a wider range than your experience (I used more than three
different C implementations there) so is more relevant than your
experience. Remember that you have used your experience in argument with
Richard.

First, the experience of someone as a C programmer has nothing to do
with the number of implementations one has used. Second, it has
nothing to do with what most C development takes place on.

I've yet to find one that cannot be made to fully conform.

That's what I said: a C90 + extensions compiler (e.g., GCC) will
probably support C90 anyway.
I've yet to
find one that with all extensions enabled is not closer to fully
conforming the gcc ever comes to conforming to C99.

Then you haven't done much finding work yet.
So you claim that something vaguely close to conforming to C99 is a C99
implementation but something very close to conforming to C90 (which with
a simple switch becomes fully conforming) is not a C90 implementation?

No, I didn't claim that. Your claim was that by your presumed
definition of mine for a Cxx compiler is that C90 is used, which is
not only wrong but also unrelated to whether a C90 + extensions
compiler is a C90 compiler or not.
If gcc in *any* mode counts as being a C99 implementation by your rules,
then all implementations in their C90+extensions modes are C90
implementations.

If C90+extensions compilers don't count as C90 implementations (unless
full C90 conformance is enabled) then gcc can't be a C99 implementation
as it is even further away from conformance. Also remember that a lot of
extensions don't affect conformance.

Well, like I said, most C90 + extensions compilers will probably
support C90 anyway, so this isn't usually an issue.

It means that all those people using C90+extensions are not using C99.

Yes, people using X are not using Y.
The only other argumens you have given are that:
   C99 is the current standard.
   Your personal experience.

No, I have given many more even only in this post. You, on the other
hand, have

o evidences, many many evidences (where are those evidences?)
o James presented some evidence (but it was wrong, as shown above)
You have shown that your personal experience is limited (you have only
come across 3 implementations)

As explained before, someone's experience as a C programmer has
nothing to do with the number of implementations that person has used.
and C99 being the current standard proves
nothing about how much it is used.

I haven't said that it is used only because it is the current
standard.
Most of the rest of the compilers around are not C99 compilers.

But there are.
No, but it is the most common mode.

You yourself have said that most people use the -ansi option.

Well, the experienced people here recommend using the -ansi -pedentic
switches which put it in to fully C90 conforming mode. So we now have a
sample from beginner to experienced almost all using C90 or C90+extensions.

I've also seen experienced people here recommend -std=c99.
I was not talking about people who care about portability since, for
reasons already explained, the majority of them will *not* use C99
because most compilers do not conform to the C99 standard.

Yes, but I was saying that C99 is more portable than C90 + extensions.
It does when you remember the other bits earlier in the post about why
most people use C90+extensions.

...none of which was true.

You have been told a lot of things which are indicative and give an
outward sign, some of which you could verify independently. You have
been told a lot of things that would be helpful to most people in
forming a conclusion or judgement.

Were you really replying to that "Exactly" statement above?
A more complete quote which you have already been given is, "variable
length arrays    broken". This being an extract from a table of
features. If the handle of a mug is broken then the mug is broken.

If the sea has a broken oxygen atom, is the sea broken? If the sky has
a broken cloud, is the sky broken?
Well, that shows you that there are far more C90 implementations than
C99 implementations. Therefore C90 is far more portable than C99.

Yes, though I wouldn't say "far."
Therefore people who really care about portability will have to stick to
C90.

IF they need more portability than C99 offers, which isn't normally
the case.
It does. I've now even provided some very simple code that demonstrates
that it is broken.

And I've provided a compilation process that shows that it isn't.
OK, so you need a hearing aid as well as new glasses.

Non sequitur.
All of which are more likely to lead you to having a C90 implementation
that a C99 implementation.

No, only the fourth.
It means that nothing else is available to those developers. That is
what management specifying something means.

In that sense, management specifying a compiler could even lead to
having a K&R C compiler and nothing else (i.e., it has nothing to do
with specific C standards.)
I explicitly did NOT say they were looking for a C90 compiler. The
ENTIRE POINT is that you DON'T need to be aware of ANY version of the C
standard to end up with a C90 implementation. Therefore most people WILL
end up with a C90 implementation.

No, because people don't just "end up" with compilers; they *choose*
they're compilers.
I talked about choosing a compiler for reasons other than wanting
conformance to a particular version of the standard. Unless you can show
some statistical correlation between conformance to versions of the
standard and another desirable attribute then it is effectively random
which standard will be supported with a distribution very skewed towards
C90 implementations due to simple numbers.

But that randomly selected compiler might not be free, though, which
was the point in the first place anyway.

Stop talking rubbish.

I'm not. If they're not aware of free implementations, it has to with
whether they're using a C99 compiler, just as whether they're using a
C90 compiler, and so too whether they're using any other kind of
compiler.
You don't need to be aware of standards *or* free
compilers to use a compiler. You just need a compiler, and the odds are
it will be a C90 compiler.

Sure, if you're don't even care what you're programming in. I do.
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



           ^^^


You keep saying you never claimed that Richard's work IS for embedded
systems. I have never said you claimed Richard's work IS for embedded
systems. I have pointed out that you assumed the OPPOSITE, that
Richard's work is NOT for embedded systems. You just quoted both those
things above.

No, I claimed neither that I assumed that Richard's work IS for
embedded systems, nor that I assumed that Richard's work is NOT for
embedded systems. In fact, I never even mentioned the words "embedded
systems" when talking about this.
What Richard's customers use his code for is entirely relevant to what
will be acceptable.

Yes, and given that I didn't know what they used his code for I could
only speak _in general_.
I was pointing out that you are assuming things about his customer base
and that you can only make claims about C99 being acceptable by making
those assumptions.

But I didn't make those assumptions,.
  your assumptions are wrong.If Richard has 10 customers and one of them
wants his code for embedded systems then your assumptions are wrong. If
one of his customers insists on using Microsoft Visual Studio (not
uncommon for Windows development) then your assumptions are wrong. If
Richard's code is doing Maths and he uses the C99 atan2 function and his
customers are using gcc on Linux then You assumed a *lot* about his
customers when you claimed that C99 was acceptable.

The first two cases are too specific. The third, regarding the atan2
function, was proven to work on Linux with gcc. And no, I did not
assume anything, I simply spoke in general.
<snip>

Since you are basing your argument on very limited experience and refuse
to accept anything contrary to your preconceived notions I don't see the
point in continuing this.

You don't know about my experience.
I've snipped a lot of the rubbish you were
talking. Feel free to have the last word.

I hope I did. I'm glad to see you've finally given up in holding this
absurd position.

Sebastian
 
V

vippstar

Well, it happens EACH time I restart compiling under
Unix after a fewmonths vacation from it.

I have told many times here that this is brain-dead!

WHY should we have to add the math library to the
command line?

It should be included by default!

Just alias gcc to gcc -lm.
Having an option to include the math library is IMHO a lot better than
having an option to exclude the math library.
 
J

jacob navia

Just alias gcc to gcc -lm.
Having an option to include the math library is IMHO a lot better than
having an option to exclude the math library.

Why you would want to exclude the math library?

If you do not use it, nothing will be linked in into
your program. What could be the point of doing that?
 
J

James Kuyper

Well, that only shows that your experience is similar to Richard's:
you've only worked on weird places where things aren't ported to.

You can dismiss any arbitrarily large number of places as weird, if that
makes you happy. But you'll have to add a few more to the list. I also
have never worked on any computer anywhere where there was a compiler
installed which fully conforms to the C99 standard.

We think that the phrase "C99 implementation" is inherently restricted
to such implementations, and that it has to be modified by adding things
like "nearly conforming" to make it apply to any larger set of
compilers; you apparently consider this redundant. You believe that "C99
implementation" applies to a much larger set of compilers than we do; I
presume that you would insist that we must add "fully conforming" in
order to convey the meaning we believe the phrase to have even without
that addition.

However, regardless of whether or not you accept that "fully conforming"
is redundant with "C99 implementation", can we at least agree that
installations of fully conforming C99 implementations are rare?

....
Let's review the presumed evidence:

"A quick Google Groups search gives an estimated 880 uses of "C99
implementation" across all newsgroups. Among the first 100 hits, the
only ones that I could find using that term to refer to an
implementation which falls short of being fully conforming are by you
and jacob navia. A large fraction of those hits involve arguments
about that very issue, in this newsgroup."

We have established that the first sentence, despite the
misunderstanding about the quotation marks, is right. The second
sentence proves that he isn't able to find stuff since, among those
very first 100 hits, there *are* people other than me and Jacob Navia
who have used the mentioned term to refer to an implementation which
falls short of being fully conforming. Here is the counter-example:

http://groups.google.com/group/comp.lang.c/msg/3d764bc633d9b1db?

(Someone named E. Robert Tisdale starts a thread about transitioning
to C99, saying that at his workplace they have very good C99
compilers. Then someone named Mac responds to him asking whether he's
sure that those implementations he's referring to are actually C99
comforming. E. Robert Tisdale responds to this by saying: "I don't
even know of *any* implementation that actually claims C 89/90
compliance (conformance) let alone C 99 compliance.")

The debate is about the meaning of "C99 implementation", not "C99
compiler". With hundreds of messages to review, I focused only on the
use of the term whose meaning was being debated, and did not waste my
time looking at uses of other, similar phrases. Furthermore, "pretty
good C99 compiler" is arguably comparable to "nearly conforming C99
implementation", a phrase that I use routinely despite the fact that I
believe that "C99 implementation", when used without modifiers, should
only be used to refer to a fully conforming implementation. I don't see
this as a counter-example. It's at best ambiguous, and you have to
stretch things quite a bit to make it that.

....
The evidences for those theories you're referring to are probably more
believable and accurate than the presumed evidences you've claimed to
have. But I don't know what theories you're talking about, so that
hardly relates to this case.

His point is not about those the details of those theories, but about
the approach to evaluating evidence that was used when evaluating their
truth. Rejecting evidence just because it isn't absolute proof would
require ignoring all evidence, because evidence can never prove
anything, it can only justify considering something to be more or less
likely to be true. The evidence I've collected isn't proof, but it is
highly suggestive; the number of different people I've found using "C99
implementation" in contexts that require it to mean "fully conforming"
is relatively small, but it is still much greater than the number of
different people who've used it in contexts that make it clear that they
consider "nearly conforming" implementations to also qualify.

....
In the first, perhaps, As for the second, it's hard to see how
embedded systems is a large area of the field, though I'll take your
word and others' for it.

Embedded systems are both vastly more numerous than desktop systems
(even if you only consider the embedded systems that are installed
inside desktop systems), and they have a much wider variety. Their
typically small memory sizes gives C a substantial advantage over other
high-level languages. Why should you have any doubt about embedded
applications being a large portion of the C programming world?

....
Not very useful evidence, since someone that programs in a language
without even being aware of the existence of a standard for that
language isn't much of a programmer anyway.

By that standard, most programming is done by people who you would
consider to not be much of a programmer. I'm not disagreeing - just an
observation.
 
J

James Kuyper

Perhaps I don't understand /your/ personal definition of "evidence."

It's not particularly personal. You haven't explained adequately what
"supplying evidence" means to you, such that what he's done fails to
qualify. If you could give an example of "supplying evidence", that
might help us understand how you are misunderstanding the term.

....
Yes, but clc isn't the whole world.

True, but it is highly representative of that very tiny fraction of the
world that is ever likely to use the phrase "C99 implementation". In
fact, a noticeable fraction of that tiny group of people probably post here.

....
What kinds of systems do they use that C99 isn't available there?

In this context, "isn't available" can be interpreted in two different
way. One meaning is that it is not installed, and that is all that
Richard Heathfield is saying. The other meaning is "could not be
installed, even if the owners wanted it to be". I just wanted to make
sure that you weren't misinterpreting his statement as implying that C99
was unavailable in the second sense.

....
I've never said anything like that. Could you please provide a quote
from one of my posts where I say that my definition includes bananas,
cough medicine, the Suez Crisis, and the Metropolitan District of
South Humberside?

Do any of those fully conform to the C99 standard? The only requirement
you've specified for applicability of the phrase "C99 implementation" is
that fully conforming to the C99 standard is NOT required. If you have
any additional requirements, you've yet to specify them.

Understand, I fully realize that you do have additional requirements;
but until you specify what they are, it's impossible to seriously
discuss with you what "C99 implementation" means.
If your definition of "prevalent" is "the standard for which one has
seen more installations."

It doesn't define prevalence, but it's a reasonable piece of evidence in
support of prevalence.

....
As this thread demonstrates, someone in my position has a better idea
of what is prevalent in the C community than someone who has worked at
a number of UK banks and insurance companies, a number of software
houses, an airline, and a couple of startups.

Actually, to those of use who know better, it demonstrates precisely the
opposite.
 
J

James Kuyper

jacob said:
(e-mail address removed) wrote: ....

Why you would want to exclude the math library?

If you do not use it, nothing will be linked in into
your program. What could be the point of doing that?

To avoid the linker wasting time looking through the math library. This
is a much smaller issue than it used to be, and I wouldn't consider it
very important any more, but it is a real issue, and it used to be a
very important one (which is why the -lm option was created in the first
place).
 
R

Richard Bos

(e-mail address removed) wrote:

_Twelve hundred_ lines!? Can you double-act idiots please learn to snip?

Furrfu.

Richard
 
K

Keith Thompson

Perhaps I don't understand /your/ personal definition of "evidence."

Richard has told you about his personal experience. Apparently that's
not "evidence" as you use the word. (As I use the word, and as I
think most people use the word, it is evidence, though it's not
proof.) What would be "evidence"? Does Richard have to take you on a
personal guided tour of every site he's worked at?

(And you're ignoring the distinction between an implementation and an
installation.

[...]
Umm...

It is, so it does.

You are expecting the rest of us to accept your definition of "C99
implementation", a definition that gcc apparently satisfies. You are
perfectly well aware, since it's been explained to you countless
times, that many of us use a different definition of "C99
implementation", one that gcc does not satisfy. Why should we accept
your definition without question when you're unwilling even to
acknowledge the one we use?

Ok, just for now, let's drop the phrase "C99 implementation" and try
to define a few terms unambiguously. Some of the boundary cases will
be a bit vague.

A "C99-specific feature" is a feature that's part of the C99 standard
but not part of the C90 standard. (I'm ignoring the few features that
were added in the 1995 amendment.)

The "language" includes both the language and library features defined
by the standard (primarily in sections 6 and 7, respectively, but
including all normative portions of the standard).

I'll assume that minor bugs don't cause an implementation to fail to
conform to a given standard, but outright failures to implement a
given language feature, or to implement it correctly, do cause it to
fail. The boundary here is admittedly vague.

A "full C99 implementation" is an implementation that fully conforms
to the C99 standard, that correctly implements *all* C99-specific
features as well as the C90-based core of the language.

A "nearly full C99 implementation" is an implementation that
implements most of the C99 standard, but that fails to conform due to
some C99-specific features that either aren't implemented or aren't
implemented correctly. It correctly implements the intersection of
C90 and C99, i.e., it will properly handle any code that is valid in
both C90 and C99.

A "partial C99 implementation" is an implementation that only
partially conforms to the C99 standard. As above, it fully implements
the intersection of C90 and C99. In addition, it implements only a
few C99-specific features. For example, a C90 compiler that also
supports // comments, long long, and mixed declarations and
statements, but no other C99-specific features, is a "partial C99
implementation". The boundary between "partial" and "nearly full" is
not well defined.

A "full C90 implementation" is an implementation that fully conforms to the
C90 standard.

I won't provide definitions for "nearly full" or "partial" C90
implementations at this time.

Are you with me so far? Note again that I'm very deliberately
avoiding the phrase "C99 implementation". For purposes of this
article, I'm not interested in debating what that phrase means, or
what any other phrase means; I prefer to explore the question of what
kinds of implementations actually exist in the real world. I ask you
to accept, at least for purposes of this immediate discussion, the
definitions I've provided above.

I believe the following statements to be accurate. I am not at this
time offering evidence to support them, but I'll ask for your opinion
on whether they're accurate.

There are a large number of full C90 implementations in widespread
use. In some cases, you might need to specify certain options (e.g.,
command-line options) to cause an implementation to behave as a full
C90 implementation. The vast majority of C implementations are able
to behave as full C90 implementations with proper settings.

There are probably nearly as many partial C99 implementations as there
are full C90 implementations. For example, I suspect that most full
C90 implementations are capable of accepting // comments with
appropriate settings (not the same settings used for full C90
conformance).

Depending on where you draw the line, there are a substantial number
of nearly full C99 implementations. gcc is one example; it does not
fully conform to the C99 standard, but it comes fairly close. lcc-win
is another example; the most recent information I have is that there
are still a couple of C99-specific features that it doesn't yet
implement.

There are very few full C99 implementations, and the few that do exist
are not sufficiently widespread that a programmer may reasonably
assume that such an implementation will be available on all systems on
which he needs to work. For example, the computer on which I'm typing
this has gcc 4.2.3 installed on it; it does not have any full C99
implementation. (In my personal opinion, this is quite unfortunate; I
truly wish that full C99 implementations were much more common than
they currently are.)

Do you agree with the above statements? If not, can you specifically
tell us on what points you disagree?
 
F

Flash Gordon

I hope I did. I'm glad to see you've finally given up in holding this
absurd position.

I never stated that I was giving up on my position, which is perfectly
reasonable. I said you could have the last word. Very different things.
Why do you think I used the word "rubbish" to describe what you wrote?
 
J

J. F. Lemaire

On Wednesday 27 August 2008 18:56, Keith Thompson wrote:

[...]
Do you agree with the above statements? If not, can you specifically
tell us on what points you disagree?

Has (e-mail address removed) made such an outstanding contribution to this
newsgroup that people are so eager to know exactly what he thinks?
Frankly, who cares?
 
N

Nick Keighley

On Wednesday 27 August 2008 18:56, Keith Thompson wrote:

[...]
Do you agree with the above statements?  If not, can you specifically
tell us on what points you disagree?

Has (e-mail address removed) made such an outstanding contribution to this
newsgroup that people are so eager to know exactly what he thinks?
Frankly, who cares?

it's for the sake of the Lurkers. The poor things might think he knew
what he was talking about.
 
J

J. F. Lemaire

On Wednesday 27 August 2008 18:56, Keith Thompson wrote:

[...]
Do you agree with the above statements?  If not, can you
specifically tell us on what points you disagree?

Has (e-mail address removed) made such an outstanding contribution to this
newsgroup that people are so eager to know exactly what he thinks?
Frankly, who cares?

it's for the sake of the Lurkers. The poor things might think he knew
what he was talking about.

I'm afraid you might be right. Oh boy.
 
S

s0suk3

(e-mail address removed) said:


Actually, I spend most of my time in places where portability is rated very
highly. But even if I didn't, I'd still expect to have seen at least one
or two C99 installations at some point over the last few years, if C99
were as prevalent as you claim. But I haven't, and I consider this to be
good evidence that you're wrong. It's not conclusive evidence, of course,
but your case is not helped by the fact that another experienced C
programmer has added that he hasn't ever come across a C99 installation in
the field either. What's more, I don't think anyone here has actually said
that they *have* come across a C99 installation. Presumably *someone* has,
and perhaps they just haven't got around to mentioning it yet - but if C99
were the dominant C dialect in new development, I'd have expected a lot of
people to pitch in and say "yeah, we use EDG at work" or "5 VisualAge
installations on our site", or whatever it is. Wouldn't you?

I do have heard people say things like that (although not those
specific implementations). Our experiences simply disagree.
<grin> That isn't the problem. The problem is that you can't believe that
*your* opinion is not universal.

I actually do believe that. That's why I've acknowledged what you've
said about your experiences and background. However, I do not
acknowledge that those experiences reflect what's true in all places,
or even in general.
I'm awake, and I'm using the term "C99 implementation" in the obvious way,
the way that most people I know who use it, use it. I only know of two
people who don't use the term the same way I do, and you're one of them.

Well, perhaps it's OK to use it that way with your buddies. But what's
obvious to you and your buddies isn't obvious to everyone.

Not *all* newbies, it seems.

Regardless of whether I'm a newbie or not, I don't pick up whatever
someone tells me, unless it seems reasonable and logical.
I'm not asking you to become a zealot of any kind. I'm just asking you to
make more of an effort to communicate effectively.

The present communication problem isn't because of lack of effort;
it's because of terminology disagreement.

Of course it has plenty to do with that. Do the math.

Or perform this thought experiment. There is a large quantity of coloured
beads in a bag, but you don't know how many. (Arbitrary conditions
restrict you from examining more than one at a time, so you can't just
pour all the beads out on the floor. You are, however, assured that the
beads are thoroughly mixed.) Someone tells you most of the beads are red,
but he admits that a few are green. (No other colours need be considered.)
You pull one out. It's green. You pull another one out. It's green. You
pull another one out. It's green. And another - green. And more - green,
green, green, green, green, green, green. How many do you have to pull out
before you realise that your informant is talking nonsense?

That's a serious question. How many? Clearly it would be unfair to reject
his hypothesis after seeing just one. Or two. Or even four or five. That
might just be how the beads fall. But how many green beads must you see
before you reject the hypothesis that red beads are prevalent? Do the
math.

I can't see which colors of beads you're relating to which C standards
(or aren't you?), so I can't answer in relation to C standards.
However, it would depend on the size of the bag containing the beads,
on how many other colors of beads there are in the bag, and perhaps on
other factors in the given situation. With this in mind, the answer is
very arbitrary: it could be 5, 20, 100, etc. Who knows!

Also, there are many things to consider when it comes to C standards
that don't apply to a bag of beads, such as the popularity of
supported platforms. For example, a program that can be compiled under
three embedded systems isn't more portable than a program that can be
compiled under three different UNIX variants.
For C99 to be "available" on a particular computer, there are two
requirements, one of which depends on the other:

(1) a C99 implementation (by which I mean an implementation of C that
conforms to ISO/IEC 9899:1999) must exist for the platform;
(2) a copy of that implementation must have been installed on that
computer, or at least on a computer to which that one has access and which
allows remote compilation. This is what I mean by "C99 installation".

Even in cases where (1) is the case, (2) is sufficiently rare that I've
never seen it happen, not even on sites where "everything's a PC running
Windows" or "everything's a PC running Linux".

Well, we've now been introduced to yet another term to which you give
a different meaning: "available".
gcc does *not* conform to ISO/IEC 9899:1999, much as you might like to
pretend otherwise.

I've never pretended otherwise.
No, and I didn't say you had, but you *have* said that you consider
something that doesn't conform to C99 to be a C99 implementation. None of
the items in that bizarre list conform to C99. Nevertheless, by /your/
definition of "C99 implementation", they all qualify.

No, they don't, at least neither by your definition, nor by my
definition.
We're not talking about your experience as a C programmer. We're talking
about your experience of the C programming community, the community about
which you make such confident claims.

Well, the experience of someone regarding the C programming community
involves that person's experience as a C programmer. However, even the
experience of someone regarding the C programming community has
nothing to do with the number of Cxx installations that that person
has seen.
Are you saying that you define "prevalent" as "the standard for which one
has seen least installations"? Because that's how it's coming across.

No. Much more important points about the prevalence of a C standard
include which one the C community thinks is the most prevalent, or
which one they use. C90 is still prevalent, but the fact that there
are more implementations for it is not one of the (important) reasons
why it is so. Instead, there's for example the fact that it's been
around for much more time (the double as C99?).
Come back in twenty years, when you've got some real world experience.

Did you know not everybody uses the same terminology as yours?
In which case that's a whole team's worth of MSVC installations. If it's a
time of five, and they each have a copy of MSVC, that's five MSVC
installations. Do you still not realise this?

Yes, but not five different Cxx installations (un1ess you want to
introduce yet another personal term of yours).
(Note that MSVC conforms to C90, but not to C99, and note that MSVC has a
huge mindshare in the Windows-based C programming community. It is used
for a vast proportion of new C development on Windows.)



s/implementation/installation/

Let's not make of this a more Perlish world, shall we? :)
- if I'm using MSVC on my computer, you
can't be using MSVC on my computer. You can, however, be using MSVC on
*your* computer. Sheesh, why do we have to explain everything to you six
times over?

Because you create your own definitions for your terms. Perhaps you
should introduce a new English dialect!
No, I'm merely the one who keeps saying that you can't ignore personal
experience. You, on the one hand, don't have any to speak of, which is
presumably why you are seeking to ignore its importance.

Actually, I haven't told you enough about my experience in order for
you to say that I don't have any to speak of. I simply think that
talking about it in contexts like this is just pathetic--as you said.
I agree, but as I've already explained, the almost total ABSENCE of
installations of compilers for a particular standard doesn't bode well
either!

Correction: the almost total ABSENCE of installations of compilers for
a particular standard AT YOUR WORKPLACES doesn't bode well either.

This implies that new development at your workplaces doesn't take
place using that standard. This has, however, little to do with what
goes on the rest of the world.
You're already in an extraordinarily weak position. Relying on idiots like
Twink will only weaken it further.

I'm not relying on him (and I'm not judging him as an "idiot", though
you two may have your issues). I'm just echoing something truthful and
revealing that he said.

Sebastian
 
S

s0suk3

On Wednesday 27 August 2008 18:56, Keith Thompson wrote:

[...]
Do you agree with the above statements? If not, can you specifically
tell us on what points you disagree?

Has (e-mail address removed) made such an outstanding contribution to this
newsgroup that people are so eager to know exactly what he thinks?
Frankly, who cares?

Nobody--at least not in this ng where I don't know anybody. However,
it's not a matter of caring or blindly believing in anyone. The same
applies to Richard Heathfield, Flash Gordon, Keith Thompson, etc., and
I presume they all know it. It's about how things are actually like in
the real world.

Sebastian
 
J

jameskuyper

Well, perhaps it's OK to use it that way with your buddies. But what's
obvious to you and your buddies isn't obvious to everyone.

Since you're one of the only two people we know of who uses the term
in any other fashion, I don't think it's appropriate to worry about
the possibility of being misunderstood. We've got many other more
plausible concerns to worry about.

....
I can't see which colors of beads you're relating to which C standards
(or aren't you?), so I can't answer in relation to C standards.


He didn't specify, but the simplest fit to his previous arguments
would be

red :: installations of compilers have a mode fully conforming to C90
and another mode fully conforming to C99

green :: installations of compilers that have a mode which conforms
fully to C90, but no mode fully conforming to C99
However, it would depend on the size of the bag containing the beads,
on how many other colors of beads there are in the bag, and perhaps on
other factors in the given situation. With this in mind, the answer is
very arbitrary: it could be 5, 20, 100, etc. Who knows!

Actually, statistically, the answer is pretty much the same,
regardless of the size of the bag, so long as the bag is much bigger
than the sample size. And that's exactly what you've suggested: that
Heathfield's exposure must have been to a sample of installations much
smaller than the total number of installations out there.
Also, there are many things to consider when it comes to C standards
that don't apply to a bag of beads, such as the popularity of
supported platforms.

That's covered by the fact that he's talking about installations
rather than implementations. A more popular implementation will
generally have more installations than a less popular one.

Well, we've now been introduced to yet another term to which you give
a different meaning: "available".

It's a perfectly ordinary meaning for the term, in widespread use.

....
No, they don't, at least neither by your definition, nor by my
definition.

As far as I know, you haven't provided your definition, so Richard
Heathfield is incorrect in claiming to know that these things fit your
definition. The only thing we know for sure about your definition is
that it does not require full conformance with C99; a fact that is
consistent with Richard's assertion, but does not justiify his
assertion.

....
Did you know not everybody uses the same terminology as yours?

What he's saying is that by the time you've had twenty year's
experience, you will recognize this usage of the term "site" as
commonplace, even if not universal.

....
Yes, but not five different Cxx installations (un1ess you want to
introduce yet another personal term of yours).

There's nothing personal about using the term "installation" to refer
to a particular piece of software installed on a particular computer,
so that if the same compiler is installed on five different computers,
it constitutes five different installations. This is the normal,
commonplace meaning of the term, and if you understand it differently,
you're the one inventing a "personal" language, Not Richard
Heathfield.

....
....
Actually, I haven't told you enough about my experience in order for
you to say that I don't have any to speak of. I simply think that
talking about it in contexts like this is just pathetic--as you said.

Actually, you have. You've said that you worked only on a tiny number
of different C installations. Even if you had many years of experience
on those installations, that only implies depth of experience; you are
clearly severely lacking in breadth of experience. It is precisely
breadth of experience which is most relevant to this discussion. Most
of the people who've been disagreeing with you have done so based upon
experience VERY much broader than your own.
 
S

s0suk3

(e-mail address removed) said:


I don't claim that my experience is universal. On the other hand, I find it
hard to accept that the C99 star has gone supernova without at least a few
respected clc regulars having noticed. If it were "usual" for new C
development to be carried out using C99 implementations, I'd have expected
at least some of these people to be aware of the fact: Chris Torek, Keith
Thompson, Martin Ambuhl, Richard Bos, John Bode, David Thompson, "pete",
James Kuyper, Ian Collins, Ben Bacarisse, "santosh", Eric Sosman, Harald
van Dijk, Richard Tobin, Nick Keighley, Jack Klein, "Willem", Richard
Harter, Dave Vandervies, Randy Howard, Dann Corbit (no particular order,
but all of them have been active in comp.lang.c whilst this discussion has
been ongoing). The silence is deafening.

Well, except maybe for Keith Thompson, James Kuyper, and Randy Howard,
none of them have agreed with your opinion either. santosh and Ben
Bacarisse have posted in this thread, but IIRC they've only said
objective stuff. Anyway, this is just a small number of people;
nothing that can prove much.
It's OK to use the term that way with anyone, because that's what it means.
It is you, not me, who use the term in a non-canonical way.

For it to be canonical, it would have to be widely accepted as such.
I've seen no sign of acceptance for the way you suggest, other than in
this discussion.

There is actually very little disagreement on what "C99 implementation"
means. Almost everyone who has expressed an opinion agrees that it means
an implementation that conforms to C99.

Have you really heard the opinion of *everyone* in the world who has
expressed an opinion? So far you've just talked about your opinion and
the one of the people in clc.
Sure. What I'm getting at is how we use the evidence before us to decide
which of two things is more common.


No, the spec says that you don't know how big the bag is (this is an
accurate parallel because we don't know in advance how many C compiler
installations we'll come across in the future).

Exactly. And that's exactly why we haven't been able to bring up any
strong evidence, and probably never will--at least not just by
discussing it.
The spec says "no other colours need be considered", so there are exactly
two colours being considered.

But there *are* other colors, right? We were considering only two
colors because our informant only gave information about two. But in
order two make an accurate decision regarding our informant's
hypothesis, we do need to consider what other colors there are in the
bag, or at least how many other colors. Otherwise we can only make
wild guesses.
Okay, let's take those figures. For C99 installations - sorry, red beads -
to be "most", they would certainly have to constitute at least half the
bead population (given that there is only one other colour available). At
the limit, let's say exactly a half. The probability that you would see 5
straight green beads under those circumstances is 0.03125 (one in 32). Not
great odds, are they? Would you bet on a horse at 31-1? I wouldn't.

If we pull 20 straight green beads, the odds are 0.00000095367431640625, or
over a million to one against red beads constituting at least half the
population. (That is, if red beads did constitute at least half the
population, and we tried the experiment 1048576 times, we'd expect to get
20 straight green beads on only one of those occasions.) Would you bet on
a horse at 1048575-1?

Perhaps we've gotten a bit out of context, but I don't recall claiming
that most C installations were C99 installations. What I said was that
most C development (or at least new development) was in C99.
That's precisely what we're talking about - installations. The relative
popularity of C90 and C99 can reasonably be measured in terms of the
number of (in-use) installations conforming to each of those standards.

Well, perhaps, but there's no way to know which installations everyone
has.

A program that can be compiled under all six is likely to be more portable
than both.

Yes, but not much more than the one that can be compiled under the
three UNIX variants.

Then it isn't a C99 implementation.

By your definition of C99 implementation.
Aha! What *is* your definition of "C99 implementation"?

A compiler that implements C99 (modulo minor bugs and failures, even
though the implementors might be aware of them). So our definitions
are not so different after all.
It also involves that person's experience of other C programmers. If you've
only come across three C installations ever, I am forced to deduce that
your involvement with other C programmers is necessarily limited.
Nevertheless, even within those three installations that you've come
across, two of them are C90 installations, right? So even in your own
experience, C90 is more common than C99.

Again, only if your definition of "common" in this context is "the
standard for which one has seen the most installations." IMO, that's a
rather irrelevant matter. Much more relevant is for example which one
is *actually* used.
I disagree. I'm not saying the correlation is necessarily a direct one, for
there are surely other factors (comp.lang.c being one of them). But there
is certainly a connection. I'm more likely to believe a claim of C99
prevalence from someone who has been around a bit and whose experience I
respect than I am to believe someone who has only ever come across three C
compiler installations in his entire career.

Well, as pointed out before, I don't think blindly believing in
someone is a very wise thing to do. It's rather about considering
someone's information and evaluating it's level of logic.
I rest my case.

Perhaps I misused the term. The dictionary defines it as

1. widespread; of wide extent or occurrence; in general use or
acceptance.
2. having the superiority or ascendancy.

I meant the first.

Sebastian
 

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,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top