comp.lang.c - 26 new messages in 6 topics - digest
comp.lang.c
http://groups.google.com/group/comp.lang.c?hl=en
Today's topics:
* Efficency and the standard library - 11 messages, 6 authors
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
* help: gcc compilation difference - 4 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/c99c680c6b425b26?hl=en
* usage of size_t - 4 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/19e0ad96d01b9898?hl=en
* C99 is widely used! - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/0ba05b02a32efc0a?hl=en
* Scope of a variable declared in for loop - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/1092f2f493d747d0?hl=en
* Any exit status without explicitely using return /exit - 1 messages, 1
author
http://groups.google.com/group/comp.lang.c/t/6e91ccafedde0c25?hl=en
==============================================================================
TOPIC: Efficency and the standard library
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
==============================================================================
== 1 of 11 ==
Date: Wed, Feb 24 2010 7:41 am
From: BruceS
On Feb 24, 8:09 am, Rob Kendrick <n...@rjek.com> wrote:
> On Wed, 24 Feb 2010 06:49:08 -0800 (PST)
>
> spinoza1111 <spinoza1...@yahoo.com> wrote:
> > On Feb 24, 11:07 am, Richard Heathfield <r...@see.sig.invalid> wrote:
> > > Peter Nilsson wrote:
> > > > Richard Heathfield <r...@see.sig.invalid> wrote:
> > > >> That's an easy one. It's because he's an idiot.
>
> > > > Is that considered to constitute a promising technical
> > > > argument (sic)?
>
> > > Not in the slightest. :-)
>
> > Fuck you, asshole. These newsgroups are not set up so that you and
> > Seebach can harass and label their contributors. If you can't behave,
> > leave.
>
> But it's clearly OK for you to label contributors.
>
> > And fuck you very much indeed, for I regard profanity as a far lesser
> > evil than the deliberate destruction of reputations in which you
> > engage, while claiming to defend Holy Fucking C, a piece of shit on
> > its last legs.
>
> I think that book reviews are a good way of destroying people's
> reputations. Like, say, the reviews for your and Herb's books on
> Amazon.
>
> B.
Wow! I didn't realize that spinoza1111 had written a book. I guess a
more diligent reading of clc would have revealed that, but I have to
admit to not having nearly enough time for that. Given the quality of
his posts here, both in terms of technical competence and in writing
style (not to mention his quick resort to vulgarity, vitriol, and
petty flames), I'm truly amazed that he's been published. My hat is
off to you, spinoza1111. You've proven by example that *anyone* can
write a book and get it published. You can't imagine how inspiring
that is.
== 2 of 11 ==
Date: Wed, Feb 24 2010 7:55 am
From: Richard Heathfield
spinoza1111 wrote:
> On Feb 24, 9:41 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>> Ian Collins wrote:
>>> Richard Heathfield wrote:
>>>> spinoza1111wrote:
>>>>> and follows the lead of most other
>>>>> compilers, which don't get "picky" by default.
>>>> Would that they did. Then the quality of software might improve a bit.
>>> Why should they?
>> Because in picky mode they often point out real code problems that they
>> don't point out in non-picky mode. The earlier you discover the bug, the
>> cheaper it is to fix it.
>
> Unless it's not a bug, in which case the picky mode is wasting time.
> For example, if it flags unused variables in stubbed code, it's
> wasting time.
Ah, a genuine technical point. And you *do* have a point. Personally,
however, if I have to choose between having too much diagnostic
information and too little, I'd rather have too much. It's easy to
filter out stuff I know is spurious, but impossible to make a decision
about something for which I don't have the data.
<snip>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 3 of 11 ==
Date: Wed, Feb 24 2010 7:57 am
From: Richard Heathfield
spinoza1111 wrote:
<snip>
> Microsoft may be aware that C99 is a disaster, since it was staffed by
> people without computer science preparation and driven by the greed of
> non-Microsoft vendors.
That is not Microsoft's opinion. Microsoft's opinion is that they will
not support C99 until enough paying customers ask for it. So far, that
hasn't happened.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 4 of 11 ==
Date: Wed, Feb 24 2010 7:58 am
From: Nick Keighley
On 24 Feb, 14:37, spinoza1111 <spinoza1...@yahoo.com> wrote:
> On Feb 24, 4:46 pm, Nick Keighley <nick_keighley_nos...@hotmail.com>
> > On 23 Feb, 16:52, Seebs <usenet-nos...@seebs.net> wrote:
> > > MS is not famous for great compiler work,
>
> > I thought these days they were. Apparently they "eat their own dog
> > food".
>
> That is correct. The phrase means "use software we are developing to
> develop your software so that we can find as many problems as
> possible."
I know. Though I thought it went deeper than that. It isn't just bug
finding bugs. If Excel, for instance, is written in C and compiled
with a MS compiler then the quality of Excel is partially determined
by the quality of the compiler. I bet the manager of the compiler
group pays attention when the Excel manager rings him! You also get a
virtuous circle (hopefully!) in that the compiler compiles itself.
<snip>
== 5 of 11 ==
Date: Wed, Feb 24 2010 7:58 am
From: Richard Heathfield
spinoza1111 wrote:
> On Feb 24, 2:25 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>> spinoza1111wrote:
>>
<snip>
>>> and follows the lead of most other
>>> compilers, which don't get "picky" by default.
>> Would that they did. Then the quality of software might improve a bit.
>
> Wouldn't a picky compiler complain about your use of pointer to void
> in your linked list tool?
Why would it do that?
<snip>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 6 of 11 ==
Date: Wed, Feb 24 2010 8:06 am
From: spinoza1111
On Feb 24, 11:41 pm, BruceS <bruce...@hotmail.com> wrote:
> On Feb 24, 8:09 am, Rob Kendrick <n...@rjek.com> wrote:
>
>
>
>
>
> > On Wed, 24 Feb 2010 06:49:08 -0800 (PST)
>
> >spinoza1111<spinoza1...@yahoo.com> wrote:
> > > On Feb 24, 11:07 am, Richard Heathfield <r...@see.sig.invalid> wrote:
> > > > Peter Nilsson wrote:
> > > > > Richard Heathfield <r...@see.sig.invalid> wrote:
> > > > >> That's an easy one. It's because he's an idiot.
>
> > > > > Is that considered to constitute a promising technical
> > > > > argument (sic)?
>
> > > > Not in the slightest. :-)
>
> > > Fuck you, asshole. These newsgroups are not set up so that you and
> > > Seebach can harass and label their contributors. If you can't behave,
> > > leave.
>
> > But it's clearly OK for you to label contributors.
>
> > > And fuck you very much indeed, for I regard profanity as a far lesser
> > > evil than the deliberate destruction of reputations in which you
> > > engage, while claiming to defend Holy Fucking C, a piece of shit on
> > > its last legs.
>
> > I think that book reviews are a good way of destroying people's
> > reputations. Like, say, the reviews for your and Herb's books on
> > Amazon.
>
> > B.
>
> Wow! I didn't realize thatspinoza1111had written a book. I guess a
> more diligent reading of clc would have revealed that, but I have to
> admit to not having nearly enough time for that. Given the quality of
> his posts here, both in terms of technical competence and in writing
> style (not to mention his quick resort to vulgarity, vitriol, and
> petty flames), I'm truly amazed that he's been published. My hat is
> off to you,spinoza1111. You've proven by example that *anyone* can
> write a book and get it published. You can't imagine how inspiring
> that is.
The real vulgarity is the treatment that I and many others have been
subjected to in this newsgroup. Others mistreated here include C
compiler developer Jacques Navia, who has attempted to use this
newsgroup, as I am, for technical discussion only to have his good
name dragged in the mud by two incompetent programmers here, Richard
Heathfield and Peter Seebach. The former has written a poorly-received
book with far more, and far more global, errors than Schildt, who is
being scapegoated here for the incompetence of the regulars. The
latter started the anti-Schildt canard by attacking his book when he
could not extort money from McGraw Hill, and has repeatedly posted
erroneous code, and Seebach is distinguished, if that is the word, by
having taken a grand total of zero classes in computer science at
university or thereafter.
Feminized males in corporations don't defend their reputations: this
is "disruptive". I defend mine.
Feminized, disempowered, weak and soft males have been taught by bimbo
feminism and the corporation to simply look the other way when evil
occurs whether here, in the corporate world, or in Palestine. They
reason that if someone's getting his ass kicked, he must have deserved
it. They reason that if someone fights back, he must be a terrorist.
You have poor reading comprehension indeed, because you have read one
or two posts and jumped to a conclusion. When I am treated with
dignity, collegiality, and respect, I respond in kind to people like
Professor Massengill and others right here. I conducted myself with
enough dignity, collegiality, respect and technical acumen to be
selected to assist John Nash with C at Princeton University.
However, I am quite past the point of showing patience with break-room
antics here: back-stabbing, childish name-calling insults, and
scapegoating others for errors we ALL make in a complex business.
And you can take it as read that I will fight fire with fire. I will
call people "names". The difference is my evidence. When I call Peter
Seebach an "incompetent" my evidence, if needs be in a court of law,
will be his attempt to simulate strlen() with a newbie's off by one
bug, his "replace %s" that replaces all percent signs, and his self-
confessed lack of ANY academic qualifications.
When I call Richard Heathfield a thug, I repeat my evidence of his
false "humility" unlinked to charity, his enabling of others'
bullying, his name-calling, and his lack of any substantive technical
contributions to this newsgroup other than break room programming
saws.
My book, "Build Your Own .Net Language and Compiler" is still selling
well and has in the past ranked among the top ten compiler books on
Amazon. It describes technology that is a complete mystery to the regs
here. I suggest you buy a copy: I can use your money, and it would be
a worthwhile investment on your part.
== 7 of 11 ==
Date: Wed, Feb 24 2010 8:11 am
From: spinoza1111
On Feb 24, 11:09 pm, Rob Kendrick <n...@rjek.com> wrote:
> On Wed, 24 Feb 2010 06:49:08 -0800 (PST)
>
> spinoza1111<spinoza1...@yahoo.com> wrote:
> > On Feb 24, 11:07 am, Richard Heathfield <r...@see.sig.invalid> wrote:
> > > Peter Nilsson wrote:
> > > > Richard Heathfield <r...@see.sig.invalid> wrote:
> > > >> That's an easy one. It's because he's an idiot.
>
> > > > Is that considered to constitute a promising technical
> > > > argument (sic)?
>
> > > Not in the slightest. :-)
>
> > Fuck you, asshole. These newsgroups are not set up so that you and
> > Seebach can harass and label their contributors. If you can't behave,
> > leave.
>
> But it's clearly OK for you to label contributors.
Yes, in self-defense. Verbal self-defense in fact is called freedom of
speech, and thoughtlessly equating an attack such as Heathfield
launched on me ten years ago in comp.programming with verbal self-
defense is stupid.
Yes, in collegial defense of decent, hard-working programmers like
Herb Schildt who was given a certain quantum of time by McGraw Hill to
do a "good enough" introduction to C for programmers who don't care
what main "should" return when their code compiles and runs: who was
admitted by Seebach et al. to be a "clear" writer where "clear" means
"understandable", "understandable" means "contributes to knowledge",
and "knowledge" is the justified belief in what is true (in such a way
that Herb's errors are instructive and easy to locate).
>
> > And fuck you very much indeed, for I regard profanity as a far lesser
> > evil than the deliberate destruction of reputations in which you
> > engage, while claiming to defend Holy Fucking C, a piece of shit on
> > its last legs.
>
> I think that book reviews are a good way of destroying people's
> reputations. Like, say, the reviews for your and Herb's books on
> Amazon.
Yes, and this insanity has got to stop. If I have to use profanity, so
be it.
>
> B.
== 8 of 11 ==
Date: Wed, Feb 24 2010 8:12 am
From: Rob Kendrick
On Wed, 24 Feb 2010 08:06:32 -0800 (PST)
spinoza1111 <spinoza1111@yahoo.com> wrote:
> My book, "Build Your Own .Net Language and Compiler" is still selling
> well and has in the past ranked among the top ten compiler books on
> Amazon. It describes technology that is a complete mystery to the regs
> here. I suggest you buy a copy: I can use your money, and it would be
> a worthwhile investment on your part.
Your book is deceptively named. It should be called "Build your own
toy language using Visual Basic .Net".
The reviews on Amazon for the book are enlightening reading, and I
suggest people take time out to take a peek at them. use the .com
site; the .co.uk site only has a single review, and that's from spinny
himself.
B.
== 9 of 11 ==
Date: Wed, Feb 24 2010 8:14 am
From: Rob Kendrick
On Wed, 24 Feb 2010 08:11:32 -0800 (PST)
spinoza1111 <spinoza1111@yahoo.com> wrote:
> > But it's clearly OK for you to label contributors.
>
> Yes, in self-defense. Verbal self-defense
I see. Perhaps you could try to be a bit more grown up and just walk
away rather than resorting to school playground language. Swearing at
people you disagree with is rarely the most effective way of getting
people to side with you.
> > I think that book reviews are a good way of destroying people's
> > reputations. Like, say, the reviews for your and Herb's books on
> > Amazon.
>
> Yes, and this insanity has got to stop. If I have to use profanity, so
> be it.
Are you suggesting that all the negative reviews there are some sort of
conspiracy?
B.
== 10 of 11 ==
Date: Wed, Feb 24 2010 8:17 am
From: Richard Heathfield
Nick Keighley wrote:
<snip>
> If Excel, for instance, is written in C and compiled
> with a MS compiler then the quality of Excel is partially determined
> by the quality of the compiler. I bet the manager of the compiler
> group pays attention when the Excel manager rings him!
I would imagine it's more the other way around. Steve Maguire recounts
how, many years ago, one of the Office programs (might have been Excel,
might have been Word, too lazy to look it up) had a great many
hard-coded 2s in it, which represented the size of an int. Perhaps they
knew in their hearts that they should be using sizeof(int), but they
knew in their heads that the compiler guys wouldn't want to break the
code by change the size of an int, would they now? And of course the
compiler guys *didn't* want to break the Office code. On the other hand,
though, they *did* want to respond to their wider customer feedback. So
they went ahead and made int 4 bytes, despite the screaming...
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 11 of 11 ==
Date: Wed, Feb 24 2010 8:25 am
From: santosh
Richard Heathfield <rjh@see.sig.invalid> writes:
> Nick Keighley wrote:
>
> <snip>
>
>> If Excel, for instance, is written in C and compiled
>> with a MS compiler then the quality of Excel is partially
>> determined by the quality of the compiler. I bet the manager of
>> the compiler group pays attention when the Excel manager rings
>> him!
>
> I would imagine it's more the other way around. Steve Maguire
> recounts how, many years ago, one of the Office programs (might
> have been Excel, might have been Word, too lazy to look it up) had
> a great many hard-coded 2s in it, which represented the size of an
> int. Perhaps they knew in their hearts that they should be using
> sizeof(int), but they knew in their heads that the compiler guys
> wouldn't want to break the code by change the size of an int, would
> they now? And of course the compiler guys *didn't* want to break
> the Office code. On the other hand, though, they *did* want to
> respond to their wider customer feedback. So they went ahead and
> made int 4 bytes, despite the screaming...
Apparently though, unsigned long is still 32 bits even under 64 bit
versions of Visual C. That's indeed a very strange choice, but I
guess there was a compelling reason for it.
==============================================================================
TOPIC: help: gcc compilation difference
http://groups.google.com/group/comp.lang.c/t/c99c680c6b425b26?hl=en
==============================================================================
== 1 of 4 ==
Date: Wed, Feb 24 2010 7:57 am
From: Ben Bacarisse
santosh <santosh.k83@gmail.com> writes:
> new <luvraghu@gmail.com> writes:
>
>> Richard,Keith and all thanks a ton for your replies.
>> I have one more question.
>> In the code if I add the following line:
>> ------------------------------------
>> z = s[p[0]]++; // say z is declared as int
>> ------------------------------------
>> what would be the value of z and how it is evaluated?
>>
>> Thanks a lot in advance.
>
> Since you don't initialise the s array, it's members could contain
> any garbage value, normally the value that was last written to the
> memory location. So by extension, we cannot say z contains any useful
> value after your assignment. In standard C parlance, it's value is
> indeterminate, and reading an indeterminate object, as in the RHS of
> your assignment statement, invokes undefined behaviour, again in the
> standard's terminology.
Is this really true? I don't think it is, at least not in the general
way that is often presented here. An indeterminate value is either a
valid value of the type or it is a trap representation. Thus, on
system with no trap representations for objects interpreted as having
type T, accessing an indeterminate value of type T must simply be
unspecified.
Now, in this case, s was of type char. 6.2.6.1 p5 which defines and
discusses trap representations states that:
Certain object representations need not represent a value of the
object type. If the stored value of an object has such a
representation and is read by an lvalue expression that does not
have character type, the behavior is undefined. If such a
representation is produced by a side effect that modifies all or any
part of the object by an lvalue expression that does not have
character type, the behavior is undefined. Such a representation is
called a trap representation.
I read that as forbidding UB when a trap representation is accessed
via an lvalue expression of type char which is the case here, is it
not?
Life would be simpler if such accesses were always undefined, but I
don't think that is how C is currently defined.
<snip>
--
Ben.
== 2 of 4 ==
Date: Wed, Feb 24 2010 8:08 am
From: Richard Heathfield
new wrote:
> Richard,Keith and all thanks a ton for your replies.
> I have one more question.
> In the code if I add the following line:
> ------------------------------------
> z = s[p[0]]++; // say z is declared as int
> ------------------------------------
> what would be the value of z and how it is evaluated?
Assuming p[0] has the value 'a', and assuming s['a'] has the value 0,
after the statement has been executed s['a'] will have the value 1, and
so will z. Which precise element of s is described by s['a'] depends on
the character set encoding on your implementation. For example, in ASCII
you'd be looking at s[97] if I remember rightly, whereas in EBCDIC you'd
be looking at s[129].
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 3 of 4 ==
Date: Wed, Feb 24 2010 8:19 am
From: santosh
Richard Heathfield <rjh@see.sig.invalid> writes:
> new wrote:
>> Richard,Keith and all thanks a ton for your replies.
>> I have one more question.
>> In the code if I add the following line:
>> ------------------------------------
>> z = s[p[0]]++; // say z is declared as int
>> ------------------------------------
>> what would be the value of z and how it is evaluated?
>
>
> Assuming p[0] has the value 'a', and assuming s['a'] has the value
> 0, after the statement has been executed s['a'] will have the value
> 1, and so will z. Which precise element of s is described by s['a']
> depends on the character set encoding on your implementation. For
> example, in ASCII you'd be looking at s[97] if I remember rightly,
> whereas in EBCDIC you'd be looking at s[129].
z will have the value 1 after the assignment? Won't it be zero, since
it's a post-increment?
== 4 of 4 ==
Date: Wed, Feb 24 2010 8:26 am
From: Richard Heathfield
santosh wrote:
<snip>
>
> z will have the value 1 after the assignment? Won't it be zero, since
> it's a post-increment?
Um, is it that time already? I have to go...
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
==============================================================================
TOPIC: usage of size_t
http://groups.google.com/group/comp.lang.c/t/19e0ad96d01b9898?hl=en
==============================================================================
== 1 of 4 ==
Date: Wed, Feb 24 2010 8:00 am
From: lacos@ludens.elte.hu (Ersek, Laszlo)
In article <hm397h$7hb$1@usenet01.boi.hp.com>, "Ed Vogel" <edward.vogel@hp_stopping_spam.com> writes:
> I worked on a C compiler for OpenVMS. On that system size_t is
> always 32-bits. By default., pointers were 32-bits, but one could compile
> (or use a #pragma) to make the size of pointers 64-bits. In that mode
> sizeof(void *) != sizeof(size_t).
Aah, great!
ludens$ cc /version
HP C V7.1-015 on OpenVMS Alpha V8.3
ludens$ help cc /pointer_size
CC
/POINTER_SIZE
/POINTER_SIZE=option
/NOPOINTER_SIZE (D)
Controls whether or not pointer-size features are enabled, and
whether pointers are 32 bits or 64 bits long.
The default is /NOPOINTER_SIZE, which disables pointer-size
features, such as the ability to use #pragma pointer_size, and
directs the compiler to assume that all pointers are 32-bit
pointers. This default represents no change over previous versions
of the compiler.
You must specify one of the following options:
SHORT The compiler assumes 32-bit pointers.
32 Same as SHORT.
LONG The compiler assumes 64-bit pointers.
64 Same as LONG.
Specifying /POINTER_SIZE=32 directs the compiler to assume that all
pointers are 32-bit pointers. But unlike the default of
/NOPOINTER_SIZE, /POINTER_SIZE=32 enables use of the #pragma
pointer_size long and #pragma pointer_size short preprocessor
directives to control pointer size throughout your program.
Specifying /POINTER_SIZE=64 directs the compiler to assume that all
pointers are 64-bit pointers, and also enables use of the #pragma
pointer_size directives.
ludens$ type siz.c
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
/* sorry for the stupid indentation */
return 0 <= fprintf(stdout, "%u %u\n", (unsigned)sizeof(void *),
(unsigned)sizeof(size_t)) && 0 == fflush(stdout) ? EXIT_SUCCESS
: EXIT_FAILURE;
}
ludens$ cc /standard=ansi89 /pointer_size=32 siz.c
ludens$ link siz.obj
ludens$ run siz
4 4
ludens$ cc /standard=ansi89 /pointer_size=64 siz.c
ludens$ link siz.obj
ludens$ run siz
8 4
The results are the same with /standard=c99.
Cheers,
lacos
== 2 of 4 ==
Date: Wed, Feb 24 2010 8:07 am
From: lacos@ludens.elte.hu (Ersek, Laszlo)
In article <Xt8Bokvz0a6x@ludens>, lacos@ludens.elte.hu (Ersek, Laszlo) writes:
> In article <hm397h$7hb$1@usenet01.boi.hp.com>,
> "Ed Vogel" <edward.vogel@hp_stopping_spam.com> writes:
^^ ^^^^
>> I worked on a C compiler for OpenVMS.
> HP C V7.1-015 on OpenVMS Alpha V8.3
So you worked on *the* C compiler for OpenVMS, then; I notice.
Thanks,
lacos
== 3 of 4 ==
Date: Wed, Feb 24 2010 8:23 am
From: spinoza1111
On Feb 24, 6:49 am, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-02-23, Richard Bos <ralt...@xs4all.nl> wrote:
>
> > And yet, I would prefer a novel written in English for literate readers
> > _not_ to eschew idioms. You should compare C to a Shaw play or a book by
> > Joyce. Do not write C as if you are Dr. Seuss - that's what BASIC is
> > for.
>
> I have to take some exception to this, because Dr. Seuss was actually an
> extremely skilled writer of English, even though many of his books don't
> make this obvious to casual observation.
>
> ... But the point is still valid. Idiomatic writing is used because it is
> clearer and more communicative, and yes, that does impose the cost of learning
> the idioms on the reader. It's still worth it.
But whose idioms shall we use? Hint: I wouldn't use yours, since you
simply don't appear to be a qualified programmer.
>
> -s
> --
> Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
== 4 of 4 ==
Date: Wed, Feb 24 2010 8:22 am
From: spinoza1111
On Feb 24, 1:11 am, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-02-23, gwowen <gwo...@gmail.com> wrote:
>
> > Or, alternatively, just drop the assumption that "code that doesn't
> > look like mine is neophyte code". How about judging the quality of
> > the coder by the robustness and correctness of the code, rather than
> > whether they use certain syntactic idioms.
>
> There isn't enough time in the world to give every piece of code the level
> of review you'd give to something you knew was written by, say,Nilges,
> or Bill Cunningham.
>
> In practice, heuristics are an EXTREMELY effective way to allocate scarce
> resources. The heuristic that certain kinds of quirky writing are a red
> flag that the rest of the code will likely contain weirdness, errors, or
> things that need careful re-reading to comprehend them, turns out to be
> stunningly effective.
Dear little Peter, we know that your brain and your null academic
preparation for your chosen trade comprise scarce resources. However,
we also know that it is in fact a mark of incompetence and unreason to
judge based on "shibboleth", where the pronunciation of the Semitic
word for "ear of corn" as a way for Hebrews to quicky judge friend
from foe.
But, I'm well aware that more and more programmers do this, because in
order to secure a cowed and complaisant work force to merely maintain
a cost center, companies will deliberately hire psychology majors such
as you, since you can be trusted to be a company man, and to take your
anger out on people you think constitute safe targets.
You have no independent body of knowledge, where break room saws and
making excuses for bugs constitute a language game, not knowledge...as
does tearing other people down to build yourself up.
>
> > True, this will require more thought, but occasionally using thought
> > rather than dogma is beneficial.
>
> It's nearly always beneficial. However, heuristics aren't dogma; they're just
> a first pass to quickly spot cases where it's likely to be necessary to spend
> extra time studying some code.
But let's take a look at your "heuristics". For example, you get all
flustered if you see Hungarian notation despite the fact that REAL
Hungarian notation, which was stolen and distorted by Charles Szymonyi
from IBM praxis invented in 1960, and you make a judgement, in fact,
not about code, but about a person: this isn't good methodology: it is
the ad hominem fallacy.
>
> -s
> --
> Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
==============================================================================
TOPIC: C99 is widely used!
http://groups.google.com/group/comp.lang.c/t/0ba05b02a32efc0a?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Feb 24 2010 8:02 am
From: jacob navia
gwowen a �crit :
> Here are my claims again:
> i) TI's widely used compiler does not support many features of C99.
> ii) Green Hills 4.2.4, another compiler used by far more people than
> will ever use lcc-win in its entire existence, does not support many
> features of C99.
Mmmm, lcc-win passed the million downloads a year ago. There are
thousands of downloads in a week... I would bet that an old
version of Green Hills doesn't have that kind of usage, since it
costs US$ 1500. Selling 1000/week would make 1.5 million US$ per
week in compiler sales, around 6 million/month...
Too much to be true.
But anyway, the discussion here was not that you can't
upgrade because US$ 1500 is too much for you. The fact
is that an upgrade path EXISTS and C99 is supported.
== 2 of 3 ==
Date: Wed, Feb 24 2010 8:04 am
From: Richard Heathfield
bartc wrote:
> Richard Heathfield wrote:
>> jacob navia wrote:
>>> One of the most often "arguments" against C99 in this group is that
>>> "There is no embedded system support", etc.
>>
>> One of the biggest flaws in your "argument" is that there is some kind
>> of anti-C99 campaign. There isn't. C99 is the de jure standard. When
>> it becomes the de facto standard, nobody will be more pleased than me,
>
> And of course the best way for that to happen is to deliberately avoid
> using
> C99 features, and recommend others to do the same, which is hardly
> incentive for compiler vendors to give C99 compatibility any priority,
> as there is no competitive reason to do so.
I avoid using C99-only features for hard-nosed pragmatic reasons of
portability. It is true that, when discussing C99 features with OPs, I
sometimes add caveats along the lines of "this won't work in C90, so
don't use it if your code needs to be C90-conforming", and I stand by
such advice. But if you're going to lay the failure of C99 at my door,
forget it. I'm simply not that influential. I know it, and realistically
I'm sure you know it too.
> If no-one should use C99 until every compiler for every platform in the
> world can support it 100% (not 99.9%, but 100%) then I just can't see
> how it
> can take off.
I don't think anyone is arguing that position, though. If the need for
C99 features outweighs the need for portability for C90, people will use
those features, and rightly so.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 3 of 3 ==
Date: Wed, Feb 24 2010 8:09 am
From: Rob Kendrick
On Wed, 24 Feb 2010 17:02:23 +0100
jacob navia <jacob@nospam.org> wrote:
> gwowen a écrit :
> > Here are my claims again:
> > i) TI's widely used compiler does not support many features of C99.
> > ii) Green Hills 4.2.4, another compiler used by far more people than
> > will ever use lcc-win in its entire existence, does not support many
> > features of C99.
>
> Mmmm, lcc-win passed the million downloads a year ago. There are
> thousands of downloads in a week... I would bet that an old
> version of Green Hills doesn't have that kind of usage,
I bet lcc-win doesn't, either. Or are you suggesting that everybody
who downloads it uses it, and only it?
B.
==============================================================================
TOPIC: Scope of a variable declared in for loop
http://groups.google.com/group/comp.lang.c/t/1092f2f493d747d0?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Feb 24 2010 8:14 am
From: jacob navia
Richard Heathfield a écrit :
> jacob navia wrote:
>> Keith Thompson a écrit :
>>> Michael Tsang <miklcct@gmail.com> writes:
>>>> Kenny McCormack wrote:
>>> [the usual]
>>>> C99 is not C?! READ THE STANDARD!
>>>> According to the standard:
>>> [snip]
>>>
>>> Don't worry about what Kenny says. He's lying.
>>>
>> Don't worry about Thomson, he is just obsolete.
>> He thinks anybody that doesn't agree with the C89 clique here
>> is lying...
>
> It would be lame to flame you for your spelling error, but it is common
> courtesy to get people's names right even if the rest of your spelling
> is shot all to pieces.
>
Well, I did not call him a jerk, as he did to me some time ago.
What a sin! Misspelling thompson's name...
> To call Keith Thompson "obsolete" is to introduce a belligerent tone
> into what ought to be a technical issue.
>
Yes. C89 is obsolete and Thompson with it.
> I doubt whether *anyone* here disputes that C99 is the de jure Standard.
> Anyone who pretends it's the de facto Standard needs to take a long hard
> look out there in the Real World, where only a very small percentage of
> C programmers actually use a 100% conforming C99 implementation.
>
There is only ONE fully conforming C++ 1998 implementation, 12 years
after that standard was printed.
So what?
C++98 is a "failed language"?
You and thompson go on diffusing misinformation. If you stay
with an obsolete standard you are obsolete. Period.
== 2 of 3 ==
Date: Wed, Feb 24 2010 8:25 am
From: Richard Heathfield
jacob navia wrote:
> Richard Heathfield a écrit :
>> jacob navia wrote:
>>> Keith Thompson a écrit :
>>>> Michael Tsang <miklcct@gmail.com> writes:
>>>>> Kenny McCormack wrote:
>>>> [the usual]
>>>>> C99 is not C?! READ THE STANDARD!
>>>>> According to the standard:
>>>> [snip]
>>>>
>>>> Don't worry about what Kenny says. He's lying.
>>>>
>>> Don't worry about Thomson, he is just obsolete.
>>> He thinks anybody that doesn't agree with the C89 clique here
>>> is lying...
>>
>> It would be lame to flame you for your spelling error, but it is
>> common courtesy to get people's names right even if the rest of your
>> spelling is shot all to pieces.
>>
>
> Well, I did not call him a jerk, as he did to me some time ago.
If you don't want to be called a jerk by bright people, don't behave
like one.
> What a sin! Misspelling thompson's name...
It's not a sin, but it is a discourtesy.
>
>> To call Keith Thompson "obsolete" is to introduce a belligerent tone
>> into what ought to be a technical issue.
>>
>
> Yes. C89 is obsolete
And yet it is widely (almost universally) implemented, and widely used.
> and Thompson with it.
You do yourself no favours by reducing a technical discussion to a
personality clash.
>> I doubt whether *anyone* here disputes that C99 is the de jure
>> Standard. Anyone who pretends it's the de facto Standard needs to take
>> a long hard look out there in the Real World, where only a very small
>> percentage of C programmers actually use a 100% conforming C99
>> implementation.
>
> There is only ONE fully conforming C++ 1998 implementation, 12 years
> after that standard was printed.
>
> So what?
>
> C++98 is a "failed language"?
Well, clearly it *has* failed to win hearts and minds over the "export"
feature. Nevertheless, AFAIAA C++98 (sans export) is the de facto C++
standard, and so it might be regarded as a resounding success.
> You and thompson go on diffusing misinformation. If you stay
> with an obsolete standard you are obsolete. Period.
You have just dismissed as obsolete a very, very large number of C
programmers. Let us hope for your sake that they don't hold that against
you when deciding which compiler to use on their next project.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
== 3 of 3 ==
Date: Wed, Feb 24 2010 8:25 am
From: Keith Thompson
Richard Heathfield <rjh@see.sig.invalid> writes:
> jacob navia wrote:
>> Keith Thompson a écrit :
>>> Michael Tsang <miklcct@gmail.com> writes:
>>>> Kenny McCormack wrote:
>>> [the usual]
>>>> C99 is not C?! READ THE STANDARD!
>>>> According to the standard:
>>> [snip]
>>>
>>> Don't worry about what Kenny says. He's lying.
>>>
>> Don't worry about Thomson, he is just obsolete.
>> He thinks anybody that doesn't agree with the C89 clique here
>> is lying...
>
> It would be lame to flame you for your spelling error, but it is
> common courtesy to get people's names right even if the rest of your
> spelling is shot all to pieces.
>
> To call Keith Thompson "obsolete" is to introduce a belligerent tone
> into what ought to be a technical issue.
To be fair, I introduced a belligerent tone myself when I called Kenny
a liar.
Though this doesn't justify jacob's latest insult against me.
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
==============================================================================
TOPIC: Any exit status without explicitely using return /exit
http://groups.google.com/group/comp.lang.c/t/6e91ccafedde0c25?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Feb 24 2010 8:22 am
From: Keith Thompson
pacman@kosh.dhis.org (Alan Curry) writes:
[...]
> Generally the return value you'll get from that program will be whatever
> value happened to be left over in the integer return register when the
> function reached its end. So it might even vary randomly between runs of the
> same compiler, even without changing anything. Don't do that.
Generally the return value will be garbage (assuming a C90
implementation). On some specific implementations that garbage
might happen to be "whatever value happened to be left over in the
integer return register when the function reached its end".
> If you compile in C99 mode (gcc -std=c99) it'll do the implicit
> return 0 from the end of main, consistently.
>
> One of the stupider C99 features, it's not provided unless you ask for it.
gcc doesn't provide it unless you ask for it. Other implementations
behave differently.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.c"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.c?hl=en
To unsubscribe from this group, send email to comp.lang.c+unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home