Tuesday, April 6, 2010

comp.lang.c - 26 new messages in 6 topics - digest

comp.lang.c
http://groups.google.com/group/comp.lang.c?hl=en

comp.lang.c@googlegroups.com

Today's topics:

* C the complete nonsense - 19 messages, 8 authors
http://groups.google.com/group/comp.lang.c/t/fee08dfa5e4cbaaa?hl=en
* Automake question - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/1bd9fbb34f7874b5?hl=en
* Cryptic Syntax - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/3c0bd77fdf5ec98c?hl=en
* Blonde C jokes - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/ad1c486bad884e91?hl=en
* In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense" - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
* #if 0?0?0:0:0 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/b75e40e1094105ba?hl=en

==============================================================================
TOPIC: C the complete nonsense
http://groups.google.com/group/comp.lang.c/t/fee08dfa5e4cbaaa?hl=en
==============================================================================

== 1 of 19 ==
Date: Tues, Apr 6 2010 2:27 am
From: spinoza1111


On Apr 6, 4:28 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
> spinoza1111 wrote:
>
> <snip>
>
> > Based on finding 6 errors and inflating them to only 20,
> > you've made an absurd generalization.
>
> Random quote from CTCR 2nd edition. This one is from p154:
>
> "The argc parameter holds the number of arguments on the command line
> and is an integer. It is always at least 1 because the name of the
> program qualifies as the first argument."
>
> This is wrong. It is perfectly legal for argc to be 0 and argv[argc] to
> be a null pointer, and it's not even terribly difficult to do.

Prints one with a command line with no arguments BEYOND the name of
the command:

#include "stdio.h"
int main(int argc, char *argv)
{
printf("%d\n", argc);
}

Prints "0 0":

#include "stdio.h"
int main(int argc, char *argv)
{
argc = 0;
argv = 0;
printf("%d %d\n", argc, argv);
}

Sure, it's easy (especially, apparently, for you and Peter) to mess
up, but working programmers as opposed to corporate drones and casual
workers with too much time on their hands need to know the normed
case, which is that argc is going to be one when there are no
arguments other than the name of the command. This is because C, as
elsewhere, is a bit messed up in counting arguments, and includes the
name of the module. This is in turn because C was designed for
programming a command line interface which is pretty much out of date.

K & R were showing off their knowledge that zero is a number, and
admittedly, IBM in the 1960s and in Fortran had obscured this fact by
one-origin indexing. This was refreshing and enlightening at the time
but it's been FORTY YEARS since then, and today thinking of computing
as a series of commands on a Teletype is an absurd model.

You are as usual maliciously lying and will face the man in the grey
wig if you keep it up.
>
> Since we're on that page anyway, here are two more errors, this time to
> do with argv:
>
> "The argv parameter is a pointer to an array of character pointers. Each
> element in this array points to a command line argument."
>
> Firstly, it's actually a pointer to *the first element of* an array of
> character pointers. Terminology is especially important in a tutorial!

Utterly absurd. Will you PLEASE just crawl back to whatever rock you
crawled out of? In ordinary metalanguage, the first position
represents the array as a whole.

> Secondly, argv[argc] is an element in the array which does not point to
> a command line argument.

Oh gee you're so smart, aren't you. Heathfield, stop grandstanding;
you look like a fool.
>
> <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

== 2 of 19 ==
Date: Tues, Apr 6 2010 2:33 am
From: spinoza1111


On Apr 6, 3:49 pm, Phil Carmody <thefatphil_demun...@yahoo.co.uk>
wrote:
> Keith Thompson <ks...@mib.org> writes:
> > Malcolm McLean <malcolm.mcle...@btinternet.com> writes:
>
> [SNIP - countering PS's C:TCN]
>
> > As long as I'm posting I'll mention that
> >     The "heap" is a DOS term...
> > is a perfectly correct statement.  It doesn't necessarily imply
> > that it's *only* a DOS term.  It also happens to be a Unix term,
> > and a Windows term, and a Symbian term, and so forth (and yes,
> > an updated version of the web page should probably clarify that).
> > The point is that it isn't a C term.
>
> When I first learnt C, it was being called the "free store" or

Incorrect use of the participle "learnt" for the past tense of to
learn.

> something so similar my memory cannot distinguish it. Given that
> the 'heap' isn't structurally or algorithmically a 'heap', I always
> wondered why a less baggage-laden term wasn't more popular.

Actually, the primitive structure Herb was talking about is indeed a
"heap" in an abstract sense and in contrast to the stack. The stack
contains small and fixed length values. When a value (a struct or
array) doesn't fit, we use an address in a free store. OO practice was
based on this.

I first saw the usage of "heap" in Saul Rosen's 1968 collection of
papers on early software. A computer scientist who actually programs
narrates what she's doing in ways that may seem to uneducated mere
programmers as incorrect, but I prefer her definitions.

Scientists know what a word means. Little technicians rely on
"terminology".

>
> This is probably an issue for a.f.c, though.
>
> Phil
> --
> I find the easiest thing to do is to k/f myself and just troll away
> -- David Melville on r.a.s.f1

== 3 of 19 ==
Date: Tues, Apr 6 2010 2:40 am
From: Richard Heathfield


spinoza1111 wrote:

<snip>

> If you would just blank the site, I can then go into wikipedia as an
> anonymous ip address and quite properly remove the section of the
> article on Schildt that continues to damage his reputation.

That's the big problem with Wikipedia - any bozo can edit it, and many
bozos do. Fortunately, Seebs isn't about to "blank the site" any time soon.

Random quote from CTCR2e. This one's from pages 510-511.

Example

This program uses the system time to randomly initialize the rand()
function by using srand():

#include "stdio.h"
#include "stdlib.h"
#include "time.h"

/* Seed rand with the system time
and display the first 10 numbers.
*/
void main(void)
{
int i, stime;
long ltime;

/* get the current calendar time */
ltime = time(NULL);
stime = (unsigned) ltime/2;
srand(stime);
for(i=0; i<10; i++) printf("%d ", rand());
}

Here are the problems I can see at a quick glance:

1) incorrect claim about behaviour of program;
2) unwise use of quotes rather than angle-brackets for standard headers;
3) using the wrong return type for main;
4) using a long int instead of a time_t to accept the return value from
time();
5) assigning an unsigned int value to an int object;
6) passing an int value to srand(), which expects an unsigned int;
7) failing to terminate a text stream;
8) failing to return a value from main.

When I tried to compile this code, Borland C rejected it (and refused to
produce an object file or an executable image) on the grounds that the
return type of main was wrong. When I told it not to be quite so fussy,
I got the following results on three successive runs of the program:

Run 1: 13044 19141 284 32137 28152 23678 16250 10654 12234 27596

Run 2: 13044 19141 284 32137 28152 23678 16250 10654 12234 27596

Run 3: 13044 19141 284 32137 28152 23678 16250 10654 12234 27596

It doesn't take a genius to work out why.

<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


== 4 of 19 ==
Date: Tues, Apr 6 2010 2:42 am
From: spinoza1111


On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-06, Richard Heathfield <r...@see.sig.invalid> wrote:
>
> > spinoza1111 wrote:
> >> I shall rejoin this discussion prematurely
> > Prediction fulfilled. (See Message-ID:
> ><quqdnVofP5fuDSXWnZ2dnUVZ7sSdn...@bt.com> for details.)
>
> I think that's shooting fish in a barrel territory.
>
> > I see no attacks on Malcolm's credibility in this thread. I do see some
> > fairly hefty attacks on his argument, but that's only because his
> > argument is broken.
>
> And also a bit of concern about why he would jump in and make silly
> claims ("it's a tutorial, not a reference" -- HUH?!).

Don't start in on Malcolm, please. You've done enough damage.
>
> >> Peter, the issue here isn't Schildt's book. It is "C: the Complete
> >> Nonsense", not "C: the Complete Reference".
> > The one is a commentary on the other. Therefore, both are relevant to
> > the thread.
>
> Yes.  The commentary can only be evaluated in terms of the thing commented
> on.

Wrong. The commentary is absurd.
>
> > If on specific errata he is right, it adds up to a proper critique,
> > unless there are a significant number of specific errata that he got
> > wrong. This you have failed to demonstrate.
>
> I think there's certainly a meaningful sense in which it's not a
> "proper critique"; if I went to someone for a professional-quality
> book review, and got back C:TCN, I'd be upset.
>
> But as things posted on the internet for free roughly 15 years ago go,
> it's not bad.
>
> >> I will take responsibility for
> >> repairing wikipedia
> > No wonder it has such a bad reputation, if people like you are
> > "repairing" it. But I thought you'd been banned from "repairing" Wikipedia?
>
> Well, yes.  The purpose of this whole thing seems to be that the Wikipedia
> admins chose to accept the C:TCN page as sufficient evidence that the
> "controversy" section deserved to be there.  Thus, if Nilges can get enough
> people to argue that C:TCN isn't a very good critique...  nothing happens.
>
> Because the underlying point isn't anything to do with C:TCN.  It's that

It has everything to do with CTCN.

> the page is an *example* of the general category of "reputable C experts who

You are not a reputable C expert.

You have not published on C (please respond if you can with articles
on C only that I have missed).

You have shown yourself to be an incompetent C coder who fails to
write structured code and makes newbie errors in the last three
months.

Your only known confederates are Clive Feather, a nasty piece of work,
and Richard Heathfield, a nasty piece of work.

You have zero experience in the use of C outside of unix.

> have served on the committee pan Schildt's work".  Clive's commentary would

You paid your way in. I believe you did so as resume padding. You have
admitted padding your online resume to make it appear that you have
worked for Apple Computer since 1987 and are a venture capitalist for
them.

> do just as well.  For that matter, even if C:TCN went away, it wouldn't
> change the fact that I'm quite clearly on the record as stating that the
> book is junk that I would never inflict on someone trying to learn C.

Yes, but nobody would care.

>
> If people really care, hey, I can always do a proper critique.  I've got
> another ~15 years of writing and programming experience to draw on since
> the days when I wrote C:TCN.  That said...
>
> If I were to write such a page today, based on the 4th edition, it would have
> fewer nitpicking errors, but I could do a much better job of explaining in
> detail, and presenting effectively, the case that the remaining errors both
> conceptual and technical are serious enough to utterly dispel any notion
> that the book ought to be used to learn from.  I know a lot more about
> writing, and about how to teach people about computers, and about C, than I
> did back in ~1995 or so.  My impressions of Schildt's work have not changed
> for the better.

Nobody would trust you. I think Ben should do this. And I believe he
would discover that he needs to learn more about Microsoft to do a job
according to his high standards, and would give up halfway through.
>
> -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!

== 5 of 19 ==
Date: Tues, Apr 6 2010 2:50 am
From: Richard Heathfield


spinoza1111 wrote:
> On Apr 6, 4:28 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>> spinoza1111 wrote:
>>
>> <snip>
>>
>>> Based on finding 6 errors and inflating them to only 20,
>>> you've made an absurd generalization.
>> Random quote from CTCR 2nd edition. This one is from p154:
>>
>> "The argc parameter holds the number of arguments on the command line
>> and is an integer. It is always at least 1 because the name of the
>> program qualifies as the first argument."
>>
>> This is wrong. It is perfectly legal for argc to be 0 and argv[argc] to
>> be a null pointer, and it's not even terribly difficult to do.
>
> Prints one with a command line with no arguments BEYOND the name of
> the command:

Huh? That makes no sense at all.

>
> #include "stdio.h"
> int main(int argc, char *argv)
> {
> printf("%d\n", argc);
> }
>
> Prints "0 0":

No, it prints the value of argc. So, if there are no arguments, it will
print 0, not 0 0.

>
> #include "stdio.h"
> int main(int argc, char *argv)
> {
> argc = 0;
> argv = 0;
> printf("%d %d\n", argc, argv);
> }
>
> Sure, it's easy (especially, apparently, for you and Peter) to mess
> up,

You misunderstand. It's Schildt who messed up, by making an incorrect
claim that argc is always >= 1.

<nonsense snipped>

Let's play the random game again. P298 of CTCR2e:

int fflush(FILE *stream);

Description

If stream is associated with a file open for writing, a call to fflush()
physically writes to the file the contents of the output buffer. If
stream points to an input file, the contents of the input buffer are
cleared. In either case, the file remains open.

Problems: firstly, the fflush() function doesn't physically write
anything. What it does is to deliver any unwritten data for that stream
to the host environment. It is the host environment that physically
writes the data... at a time of its choosing! There is no guarantee
that, on return from fflush(), the data have been written, even if no
error occurred. Secondly, the behaviour of fflush() when passed a FILE *
that is associated with an "input file" is undefined.

--
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 19 ==
Date: Tues, Apr 6 2010 2:53 am
From: Walter Banks


spinoza1111 wrote:

> , you'd know that the author is
> not in charge of the cover material.

The text content of the cover is part of the galleys sent
to the author for fact checking and approval.


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---


== 7 of 19 ==
Date: Tues, Apr 6 2010 2:58 am
From: Colonel Harlan Sanders


On Tue, 6 Apr 2010 01:43:11 -0700 (PDT), spinoza1111
<spinoza1111@yahoo.com> wrote:

>On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:

>> I think there's certainly a meaningful sense in which it's not a
>> "proper critique"; if I went to someone for a professional-quality
>> book review, and got back C:TCN, I'd be upset.
>
>Very good. We're making progress. OK, you have write access to the
>post. I will drop the matter if you replace it by a blank post, or
>something saying "withdrawn". You do not need to apologize therein to
>Herb, you do not need to apologize for the damage you've done to me,
>and you do not need to notify me of your action.
>>
>> But as things posted on the internet for free roughly 15 years ago go,
>> it's not bad.
>
>I do not accept arguments of this form. "My classmates are stupid
>therefore I am smart" is not a valid inference. Furthermore, viral
>replication of the claims, scattered over many different sites, is the
>problem.

I think he's apologising for not demolishing CTCR more thoroughly. Not
for doing so incorrectly.

-- You seem to really believe that Seebs wrote a web page 15 years
ago, then used his Jedi power to hypnotise the world into believing
it. And that you can break this spell by bullying, threatening and
screaming at him to delete the page.

>If you would just blank the site, I can then go into wikipedia as an
>anonymous ip address and quite properly remove the section of the
>article on Schildt that continues to damage his reputation.

And it will be reverted a few minutes later, as the last 500 times you
tried to do this.

Because, even if you did manage to get rid of Seebs' page (which I'd
lay loooong odds against), the statements you are so het up about are
supported by other sources:

from http://en.wikipedia.org/wiki/Herbert_Schildt
>Reception
>
>Schildt's books have a reputation for being written in
>a clear style that is very easy to understand.[1]
>However, their technical accuracy has been criticized.
>Peter Seebach, a former voting member of ISO C
>committee and moderator of the Usenet group
>comp.lang.c.moderated, alleges that Schildt's C: The
>Complete Reference contains code with beginner's
>mistakes and statements suggesting the wrong idea.[1]
>Schildt's The Annotated ANSI C Standard was similarly
>criticized by Clive Feather, who is also an ISO C
>committee member, and by Steve Summit, author of the C
>FAQ.[2][3]

So before you can think about censoring this section you would have to
target Feather and Summit and get them to amend their critiques.
Ain't going to happen. Feather made his opinions clear some months ago
when you started this insane crusade.

By the way, the current threads you are generating here are producing
more support to the "Schildt is crap" side of the argument.

If anyone feels inclined to compile relevant posts into a webpage
these can be cited more readily than Usenet posts and can be added to
the References section of the wiki page.


By the way,

On Sun, 4 Apr 2010 05:05:21 -0700 (PDT), spinoza1111
<spinoza1111@yahoo.com> wrote:
>I will stop posting and reading until Sunday 11 April China time.

Another bare-faced lie, a promise broken less than two days later.
You will go ballistic if anyone questions your word, yet over and over
you demonstrate it is worth nothing.

== 8 of 19 ==
Date: Tues, Apr 6 2010 2:58 am
From: James Harris


On 6 Apr, 09:43, spinoza1111 <spinoza1...@yahoo.com> wrote:
> On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:

...

> > I think there's certainly a meaningful sense in which it's not a
> > "proper critique"; if I went to someone for a professional-quality
> > book review, and got back C:TCN, I'd be upset.
>
> Very good. We're making progress. OK, you have write access to the
> post. I will drop the matter if you replace it by a blank post, or
> something saying "withdrawn". You do not need to apologize therein to
> Herb, you do not need to apologize for the damage you've done to me,
> and you do not need to notify me of your action.

...

> If you would just blank the site, I can then go into wikipedia as an
> anonymous ip address and quite properly remove the section of the
> article on Schildt that continues to damage his reputation.

Weren't you "banned" from Wikipedia for making inappropriate edits
including under anonymous IP addresses?

Please don't even consider removing what you call "the section of the
article on Schildt that continues to damage his reputation." Apart
from Peter Seebach's comments the "section" refers to two other
sources of criticism. Even if Peter does what you request - and I hope
he does not - that would be no mandate for you to remove references to
other criticism.

...

> > If I were to write such a page today, based on the 4th edition, it would have
> > fewer nitpicking errors, but I could do a much better job of explaining in
> > detail, and presenting effectively, the case that the remaining errors both
> > conceptual and technical are serious enough to utterly dispel any notion
> > that the book ought to be used to learn from.  I know a lot more about
> > writing, and about how to teach people about computers, and about C, than I
> > did back in ~1995 or so.  My impressions of Schildt's work have not changed
> > for the better.
>
> You can do that, of course. However, to do an acceptable job, you need
> to provide all of what you think are errors, and you have to be
> prepared to have to defend your document. It appears to me that you do
> not have enough academic experience in this type of interchange to
> know how time-consuming this would be for you. I think it would be
> better for you to return to school and learn the trade you profess.

An update to Peter's criticism would be beneficial. As he himself
recognises there are ways it could be improved such as by removing
nitpicking errors. Time has moved on but for a 15-year old document
it's not bad.

If you are an academic, Edward, you should recognise the value of
assertion and criticism. The presence of both serves to produce a
better-informed readership. Notwithstanding my view that the critical
page of Peter's would benefit from an update, ISTM that the Wikipedia
article is balanced as it stands. I don't understand what's motivating
your desire to change it.

James


== 9 of 19 ==
Date: Tues, Apr 6 2010 2:59 am
From: spinoza1111


On Apr 6, 3:06 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
> On Apr 5, 5:48 am, Keith Thompson <ks...@mib.org> wrote:

... snip snip snippy snip: you nasty little clerks are right as you
often are, on something trivial: I need to snippety snip more ...


> However, a literate person knows how to disambiguate "is", as do
> literate OO programmers, who use "is-a" to show subset in inheritance
> as opposed to "has-a" to show reference to an object, and "==" in C
> Sharp in Java to show identity.

Error: change in to or.

Snip snip snippety snip
I need to get wise, and I need to get hip,
And follow the trivial rules
That have lighted fools
The way to dusty death
Sorta like Macbeth.

You know the old play.
Glamis, then Cawdor, then the buttered Scone:
But what's little noticed and lesser known,
Is Macbeth's foolish logic...he's brainsick.
I mean, those bitches on the heath-field
Crones that call to Richard in his lonely room,
Prophesied he should be Cawdor, and he wuz:
So what does the kilted Jocko do?
He kilts Duncan like a scuz!

This sort of subhumanity
We see here, and it's a tragedy:
For 6 errata don't make your case
Any more than you prove jackshit when a mess you makes
Out of argc
And also argv.

Macbeth wanted the throne, to sit his arse upon the throne,
Before he met Heathfield's grannies and aunties in th' gloam.
Likewise Seebach plucks at prophesies and dreams
To pretend he's competent, and at night he screams.


== 10 of 19 ==
Date: Tues, Apr 6 2010 3:02 am
From: spinoza1111


On Apr 6, 5:53 pm, Walter Banks <wal...@bytecraft.com> wrote:
> spinoza1111 wrote:
> > , you'd know that the author is
> > not in charge of the cover material.
>
> The text content of the cover is part of the galleys sent
> to the author for fact checking and approval.

That is correct: Apress did that for me. However, in many situations,
it's too much "time" (especially in a larger company than Apress, like
McGraw Hill) to make the change on deadline.
>
> --- news://freenews.netfront.net/ - complaints: n...@netfront.net ---

== 11 of 19 ==
Date: Tues, Apr 6 2010 3:05 am
From: Richard Heathfield


spinoza1111 wrote:
> On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:
>> On 2010-04-06, Richard Heathfield <r...@see.sig.invalid> wrote:
>>
>>> spinoza1111 wrote:
>>>> I shall rejoin this discussion prematurely
>>> Prediction fulfilled. (See Message-ID:
>>> <quqdnVofP5fuDSXWnZ2dnUVZ7sSdn...@bt.com> for details.)
>> I think that's shooting fish in a barrel territory.
>>
>>> I see no attacks on Malcolm's credibility in this thread. I do see some
>>> fairly hefty attacks on his argument, but that's only because his
>>> argument is broken.
>> And also a bit of concern about why he would jump in and make silly
>> claims ("it's a tutorial, not a reference" -- HUH?!).
>
> Don't start in on Malcolm, please. You've done enough damage.
>>>> Peter, the issue here isn't Schildt's book. It is "C: the Complete
>>>> Nonsense", not "C: the Complete Reference".
>>> The one is a commentary on the other. Therefore, both are relevant to
>>> the thread.
>> Yes. The commentary can only be evaluated in terms of the thing commented
>> on.
>
> Wrong. The commentary is absurd.
>>> If on specific errata he is right, it adds up to a proper critique,
>>> unless there are a significant number of specific errata that he got
>>> wrong. This you have failed to demonstrate.
>> I think there's certainly a meaningful sense in which it's not a
>> "proper critique"; if I went to someone for a professional-quality
>> book review, and got back C:TCN, I'd be upset.
>>
>> But as things posted on the internet for free roughly 15 years ago go,
>> it's not bad.
>>
>>>> I will take responsibility for
>>>> repairing wikipedia
>>> No wonder it has such a bad reputation, if people like you are
>>> "repairing" it. But I thought you'd been banned from "repairing" Wikipedia?
>> Well, yes. The purpose of this whole thing seems to be that the Wikipedia
>> admins chose to accept the C:TCN page as sufficient evidence that the
>> "controversy" section deserved to be there. Thus, if Nilges can get enough
>> people to argue that C:TCN isn't a very good critique... nothing happens.
>>
>> Because the underlying point isn't anything to do with C:TCN. It's that
>
> It has everything to do with CTCN.
>
>> the page is an *example* of the general category of "reputable C experts who
>
> You are not a reputable C expert.
>
> You have not published on C (please respond if you can with articles
> on C only that I have missed).

As usual, you are wrong. Peter Seebach wrote the recursion and C99
chapters of "C Unleashed". If you would care to check the errata for
those chapters, you will find a total of seven mistakes by Seebs. Please
feel free to use these very serious errors as ammunition in your
campaign of personal destruction.

<nonsense snipped>

Oh yes, it's time to play the random game again.

CTCR2e, Herbert Schildt, p152:

For example, consider the function print_upper(), which prints its
string argument in uppercase:

#include "stdio.h"
#include "ctype.h"

void print_upper(char *string);

void main(void)
{
char s[80];

gets(s);
print_upper(s);
}

/* Print a string in uppercase. */
void print_upper(char *string)
{
register int t;

for(t=0; string[t]; ++t) {
string[t] = toupper(string[t]);
putchar(string[t]);
}
}

After my usual plea with the compiler not to be too fussy about void
main, I fed the program a file (redirected to stdin) that consisted
entirely of upper case characters, and the program responded by
crashing, without producing any output.

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


== 12 of 19 ==
Date: Tues, Apr 6 2010 3:37 am
From: James Harris


On 6 Apr, 10:42, spinoza1111 <spinoza1...@yahoo.com> wrote:
> On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:

...

> > the page is an *example* of the general category of "reputable C experts who
>
> You are not a reputable C expert.
>
> You have not published on C (please respond if you can with articles
> on C only that I have missed).
>
> You have shown yourself to be an incompetent C coder who fails to
> write structured code and makes newbie errors in the last three
> months.
>
> Your only known confederates are Clive Feather, a nasty piece of work,
> and Richard Heathfield, a nasty piece of work.

"A nasty piece of work"! Is this one of those irregular definitions
such as

"I am forthright"
"You are abusive"
"He is a nasty piece of work"

Or is it a term which you use for those who disagree with you.
Perhaps: for those who disagree with you and for whom you are running
out of arguments to counter.

I've noticed that Richard has been making comments on the issues with
pieces of code in an edition of the book. And thanks to you bringing
the matter up in this thread some minor and some fairly serious
criticisms have been levelled at Schildt's work. The main problem with
your argument, ISTM, is that you haven't made an effective defence of
his code.

In fact you seem to focus on personal attacks on others. By doing so I
would say that you are showing yourself to be "a nasty piece of
work." (My definition, this time.)

> You have zero experience in the use of C outside of unix.

Are you unable to see that, even if true, this is irrelevant? If
something is misleading it is misleading no matter who says so.
Continually attacking or challenging where people come from is
immaterial if the points they are maing are valid.

If the points are wrong then say so, and say why. To waffle on about
who people knew or what their background is is irrelevant when the
issues are plain, unambiguous and open to discussion which is the case
here.

James


== 13 of 19 ==
Date: Tues, Apr 6 2010 3:43 am
From: spinoza1111


On Apr 6, 5:58 pm, James Harris <james.harri...@googlemail.com> wrote:
> On 6 Apr, 09:43, spinoza1111 <spinoza1...@yahoo.com> wrote:
>
> > On Apr 6, 3:26 pm, Seebs <usenet-nos...@seebs.net> wrote:
>
> ...
>
> > > I think there's certainly a meaningful sense in which it's not a
> > > "proper critique"; if I went to someone for a professional-quality
> > > book review, and got back C:TCN, I'd be upset.
>
> > Very good. We're making progress. OK, you have write access to the
> > post. I will drop the matter if you replace it by a blank post, or
> > something saying "withdrawn". You do not need to apologize therein to
> > Herb, you do not need to apologize for the damage you've done to me,
> > and you do not need to notify me of your action.
>
> ...
>
> > If you would just blank the site, I can then go into wikipedia as an
> > anonymous ip address and quite properly remove the section of the
> > article on Schildt that continues to damage his reputation.
>
> Weren't you "banned" from Wikipedia for making inappropriate edits
> including under anonymous IP addresses?

That's correct. And you can find a full discussion of this between
myself and someone who at least appears to be Jimmy Wales, wikipedia's
founder, at http://spinoza1111.wordpress.com/2010/01/06/wikipedias-racist-bullying-redux/.

The fact is that in 2006, wikipedia drove out educated contributors
and replaced them by convenience store clerk types who applied rules
without subject matter knowledge. This is well known and is confirmed
by many former contributors.

In my case I was with the encouragement of the informal moderator of
changes to the Kant page (a uni prof) making contributions, but my
experience in teaching philosophy in various capacities since 1973 is
that to TEACH philosophy you must DO philosophy. This bothered
somebody called amerindianarts and he started edit warring my changes.

I was like, kemosabe, up yours because I don't suffer fools gladly.
However, today's techno-peasants (cf. Jaron Lanier, You Are Not a
Gadget) are taught to grin and shuffle, so I was tagged as a bad
nigra.

Several bigshots, perhaps Wales, would like me to come back little
Sheba in order to get free content. Unfortunately I make my living at
teaching among other things philosophy, so why be a cow when the milk
is free (or something like that). Wales et al. want me to subject
myself to a Stalinist show trial in which I like Bukharin humbly admit
my failings. Which I sure won't.

It is also said that I was "banned" from a local placeblog. What
happened was that (1) I was made a moderator by the big cheese. (2)
Other moderators, disturbed by my literacy and the fact that based on
original graphics I posted, I became "artist of the month" with a one
man show in a local gallery, started disrupting "my" group. (3) I
invited them to perform an aerial reproductive maneuver. (4) My
privileges were reduced by the big cheese. (5) I left since this was a
waste of time.

>
> Please don't even consider removing what you call "the section of the
> article on Schildt that continues to damage his reputation." Apart
> from Peter Seebach's comments the "section" refers to two other
> sources of criticism. Even if Peter does what you request - and I hope
> he does not - that would be no mandate for you to remove references to
> other criticism.

Excuse me, don't bore me with things I already know. The fact is that
before January of last year, the Schildt article, which was created to
trash the guy, was in serious violation of Biographies of Living
Persons, wikipedia's own policy. I changed it as a "blocked" user and
that change has been effective ever since. If Peter simply blanks CTCN
I can go back and get the Reception section changed.

The Reception section mischaracterises Seebach as "a former voting
member of ISO C committee and moderator of the Usenet group
comp.lang.c.moderated". The fact is, as he has himself confirmed, he
paid his way onto the ISO committee and as a moderator, he does no
work, allowing all posts through. But if we can get CTCN removed from
the Internet, this will make our case for the removal of the Reception
section.

It's not really appropriate that Schildt has a wikipedia biography in
the first place, since being a hard working computer author and
musician is not by itself significant enough. Dan Appleman has
published extensively on programming, is one of the nicest guys I'd
care to know, was slashdotted, and is currently a technology columnist
for the San Francisco Chronicle, but does not merit a wikipedia
biography. The Schildt biography was created, and sourced solely on
Seebach's attack on CTCR (and Feather's attack on C: the Annotated
Standard, a copycat crime), in order to pad the anti-Schildt "case".

Nobody's going to create a wikipedia article about me despite the fact
that I'm a hard working author and teacher and a good looking, sexy
guy, unless they wish to immortalize "Nilgewater" as a term of art;
but this was tried, I complained, and the entry disappeared into thin
air.

Private people who work hard, whether Schildt, Kathy Sierra, or Kim
Pring (a Miss Utah lampooned in Hustler) have a right under the UN
Declaration of Human Rights and the Ninth Amendment to the US
Constitution insofar as the latter applies to PRIVACY. As it is, even
defending them as I do (I got the Sierra article repaired as well as a
"blocked" user) can cause them further anxiety. That is why I am
asking Peter Seebach to be a man for a change, and blank CTCN. This
matter will end.

>
> ...
>
> > > If I were to write such a page today, based on the 4th edition, it would have
> > > fewer nitpicking errors, but I could do a much better job of explaining in
> > > detail, and presenting effectively, the case that the remaining errors both
> > > conceptual and technical are serious enough to utterly dispel any notion
> > > that the book ought to be used to learn from.  I know a lot more about
> > > writing, and about how to teach people about computers, and about C, than I
> > > did back in ~1995 or so.  My impressions of Schildt's work have not changed
> > > for the better.
>
> > You can do that, of course. However, to do an acceptable job, you need
> > to provide all of what you think are errors, and you have to be
> > prepared to have to defend your document. It appears to me that you do
> > not have enough academic experience in this type of interchange to
> > know how time-consuming this would be for you. I think it would be
> > better for you to return to school and learn the trade you profess.
>
> An update to Peter's criticism would be beneficial. As he himself
> recognises there are ways it could be improved such as by removing
> nitpicking errors. Time has moved on but for a 15-year old document
> it's not bad.
>
> If you are an academic, Edward, you should recognise the value of
> assertion and criticism.

I am only an adjunct and free market academic. However, I have I think
a better sense of what "criticism" really is, based on teaching
logic.

It isn't inferring from finding 6 errata to a global charge that you
know will be replicated and amplified on the internet in the fallacy
of composition.

> The presence of both serves to produce a
> better-informed readership. Notwithstanding my view that the critical
> page of Peter's would benefit from an update, ISTM that the Wikipedia
> article is balanced as it stands. I don't understand what's motivating
> your desire to change it.

Such a Reception section could be made of most computer authors. Many
C programmers hate K & R. Shouldn't we give them a section in the
article on Kernighan? A coworker laughed at the title of The Art of
Computer Programming, since, he said, it's not an art. Shouldn't
ignorant people have a section in the Knuth article?

OF COURSE NOT, because Wikipedia's own Biographies of Living Persons
policy forbids gratuitous assaults on both people who are (in the
distinction made by the US Supreme Court in the case of Flynt v
Robertson) "public figures" and "private figures", with a higher, not
a lesser, standard for private figures.

The Wyoming lawyer Gerry Spence in fact lost a case in which he
defended a Utah beauty queen who was lampooned as giving blow jobs in
Hustler. I feel, however, his reasoning in this case was sound: it was
that private people who are for a temporary and special reason in the
public eye do not thereby become true public figures. A beauty queen
looks better in a bikini than I do as a computer author, but we're
both essentially private figures who for that reason deserve a higher
standard of care.

This is because mere employability is more important to most private
individuals, and these gratuitous "mean kids" attacks on Kim Pring,
Kathy Sierra, et al. harm their standing in their community and that
of their family members.

>
> James

== 14 of 19 ==
Date: Tues, Apr 6 2010 3:59 am
From: Richard Harnden


On 06/04/2010 11:43, spinoza1111 wrote:
> [...] The fact is, as he [Seebs] has himself confirmed, he
> paid his way onto the ISO committee [...]

So did Schildt. So what?


== 15 of 19 ==
Date: Tues, Apr 6 2010 4:13 am
From: Richard Heathfield


spinoza1111 wrote:

<nonsense snipped>

> I was like, kemosabe, up yours because I don't suffer fools gladly.

That must make it very difficult to live with yourself.

<nonsense snipped>

>
> It isn't inferring from finding 6 errata to a global charge that you
> know will be replicated and amplified on the internet in the fallacy
> of composition.

Let's play the random game again.

Schildt's CTCR2e, p138. Note that the opening comment is Schildt's, not
mine!

/* Display powers of the numbers 1 through 10.
Note: even though this is a correct program,
some compilers will issue a warning message
concerning the argument to the functions
table() and show(). If this happens, just
ignore it.
*/

#include "stdio.h"
#include "stdlib.h"

int pwr(int a, int b);
void table(int p[4][10]);
void show(int p[4][10]);

void main(void)
{
int *p;

p = malloc(40*sizeof(int));

if(!p) {
printf("memory request failed\n");
exit(1);
}

/* here, p is simply a pointer */
table(p);
show(p);
}

/* Build the table of powers. */
void table(int p[4][10]); /* now the compiler has an array
to work with */
{
register int i,j;
for(j=1; j<11; j++)
for(i=1; i<5; i++) p[i][j] = pwr(j, i);
}

/* Display the table of integer powers. */
void show(int p[4][10]) /* now the compiler has an array
to work with */
{
register int i,j;

printf("%10s %10s %10s %10s\n",
"N", "N^2", "N^3", "N^4");

for(j=1; j<11; j++) {
for(i=1; i<5; i++) printf("%10d ", p[i][j]);
printf("\n");
}
}

/* Raise an integer to the specified power. */
pwr(int a, int b)
{
register int t=1;

for(; b; b--) t = t*a;
return t;
}

Okay, let's take it from the top:

1) the comment is wrong in claiming that the program is correct;
2) the comment contains unwise advice to ignore a useful warning;
3) the standard headers are unwisely enclosed in quotation marks
rather than angle-brackets;
4) the return type of main is wrong;
5) the program passes a non-portable value to exit();
6) the program passes an int * to a function expecting int p[4][10]
(this problem occurs twice on two consecutive lines);
7) a function takes a parameter of type int [4][10] (i.e. but
then attempts to access several elements that don't exist:
[0][10], [1][10], [2][10], [3][10], and [4][0] through [4][10];
8) another function does precisely the same thing.

I decided *not* to point out two other issues, one of them a matter of
robustness and the other having regard to efficiency, on the grounds
that this is supposed to be tutorial code for beginners - i.e. I
recognise the validity of the "one mountain at a time" technique.

<nonsense snipped>

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


== 16 of 19 ==
Date: Tues, Apr 6 2010 4:15 am
From: Richard Heathfield


Richard Harnden wrote:
> On 06/04/2010 11:43, spinoza1111 wrote:
>> [...] The fact is, as he [Seebs] has himself confirmed, he
>> paid his way onto the ISO committee [...]
>
> So did Schildt.

So did every member of the ISO C Committee, as far as I am aware. It's a
bit like getting on the train - you're supposed to have a ticket first.

> So what?

Indeed.

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


== 17 of 19 ==
Date: Tues, Apr 6 2010 4:27 am
From: Richard Heathfield


Phil Carmody wrote:

<snip>

> I've previously been utterly content that I have no copies of
> any edition of this book, for obvious reasons. However, you
> having turned it into a game have reversed that, and I have a
> nasty feeling if I see one on the cheap, I'll not be able to
> resist...

Oh, I'm sorry about that. But we have yet to turn it into a *drinking
game*, as Seebs originally suggested.

Let's play the game again:

Schildt's CTCR2e, p502:

Example

This function converts the number entered at the keyboard into its
absolute value:

#include "stdlib.h"

long int get_labs()
{
char num[80];

gets(num)

return labs(atol(num));
}

Actually, of course, it does no such thing, because it won't compile.


I find it fascinating that I haven't yet had to search through the book
looking for errors. I just open it at random, and bang! there's another
one. I do have to do a /little/ work, though, because I'm trying to
avoid posting any for which either Schildt has already posted an
acknowledgement and correction or Seebs has already posted a critique.
Schildt's Web site does contain an Errata section, but it has no entries
for CTCR, so that's that - but I do have to keep checking Seebs's site.
<sigh>

Those of you who have started looking forward in macabre glee to my next
random Schildt bug will have to wait a few days, however, as my current
schedule makes it difficult to get to Usenet except at the weekends (for
a mildly bizarre definition of "weekends"). And no, I'm not planning on
taking CTCR on the train with me...

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


== 18 of 19 ==
Date: Tues, Apr 6 2010 4:46 am
From: Tim Streater


In article <WOqdnUVJp80riibWnZ2dnUVZ8o1i4p2d@bt.com>,
Richard Heathfield <rjh@see.sig.invalid> wrote:

> Richard Harnden wrote:
> > On 06/04/2010 11:43, spinoza1111 wrote:
> >> [...] The fact is, as he [Seebs] has himself confirmed, he
> >> paid his way onto the ISO committee [...]
> >
> > So did Schildt.
>
> So did every member of the ISO C Committee, as far as I am aware. It's a
> bit like getting on the train - you're supposed to have a ticket first.
>
> > So what?
>
> Indeed.

Ad hominem attacks are all that Spinny has left. He keeps being trumped
by the facts and tries to squirm out of it each time.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689


== 19 of 19 ==
Date: Tues, Apr 6 2010 5:17 am
From: Malcolm McLean


On 6 Apr, 08:26, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-06, Richard Heathfield <r...@see.sig.invalid> wrote:
>
> > I see no attacks on Malcolm's credibility in this thread. I do see some
> > fairly hefty attacks on his argument, but that's only because his
> > argument is broken.
>
> And also a bit of concern about why he would jump in and make silly
> claims ("it's a tutorial, not a reference" -- HUH?!).
>
I haven't actually read the book. However that's the impression I
gain. I think that "the book tries to be both a tutorial and a
reference" might be a valid criticism. But you don't actually make
that criticism.
>
> Yes.  The commentary can only be evaluated in terms of the thing commented
> on.
>
Whilst there are some things we cannot tell, for instance if you
happened to misquote Schildt there would be no way of knowing about it
without going to the original, you can tell whether a commentary is
trying to be balanced or not, or whether some of the points it makes
are fair, without actually seeing the original. Which is what I've
done.
>
> I think there's certainly a meaningful sense in which it's not a
> "proper critique"; if I went to someone for a professional-quality
> book review, and got back C:TCN, I'd be upset.
>
You said it. It's very unprofessional to make bug reports in a
sneering tone, so "C: the complete nonsense" is no good as an errata
page. However it's not a review. Slamming reviews are acceptable, but
they can't consist entirely or mainly of nitpicks, especially when the
book is over 700 pages long. When half of the nitpicks aren't even
right, the credibiility of the critique goes down even further.
However "C: the complete nonsense is a bad webpage" isn't the
same as "C: the complete reference is a good book". It is possible to
make a bad criticism of a bad book.

==============================================================================
TOPIC: Automake question
http://groups.google.com/group/comp.lang.c/t/1bd9fbb34f7874b5?hl=en
==============================================================================

== 1 of 1 ==
Date: Tues, Apr 6 2010 2:33 am
From: jarek


Hi!

I have a c/c++ project where I'm using .cpp files generated by esnacc
from .asn files.
In Makefile.am have:

---------------------------------
AM_CFLAGS = -Wall -g

bin_PROGRAMS = myprog

myprog_SOURCES = main.cpp protocol.h protocol.cpp

myprog_CPPFLAGS = -I/usr/local/include/esnacc/c++

myprog_LDADD = -lc++asn1
----------------------------------

To create protocol.h and protocol.cpp a have to issue:

esnacc -C protocol.asn

How can I write Makefile.am to do it automatically ?

Best regards
Jarek

==============================================================================
TOPIC: Cryptic Syntax
http://groups.google.com/group/comp.lang.c/t/3c0bd77fdf5ec98c?hl=en
==============================================================================

== 1 of 2 ==
Date: Tues, Apr 6 2010 3:16 am
From: "Rod Pemberton"


"Ben Bacarisse" <ben.usenet@bsb.me.uk> wrote in message
news:0.f930c6af8049673f21dc.20100320233915GMT.87d3yyftr0.fsf@bsb.me.uk...
> "Rod Pemberton" <do_not_have@havenone.cmm> writes:
> > "Ben Bacarisse" <ben.usenet@bsb.me.uk> wrote in message
> >
news:0.19d8b59b1bcde19e8cb0.20100320182519GMT.87r5neg8a8.fsf@bsb.me.uk...
> >> "Rod Pemberton" <do_not_have@havenone.cmm> writes:
> >>
> >> > By placing a * in front: *(int(*)()) the * dereferences the
> >> > function pointer, i.e., it calls the "function"
> >>
> >> Not true or at least a little misleading. In standard C (i.e. after
> >> K&R C) a function called though a pointer.
> >
> > Ok, it was you who said this was old code a couple posts earlier, yes?
> > So,
> > why are you now describing in terms of standard C? ... And, using that
> > to
> > declare "misleading"?
>
> Yes, I said the code might be old but even if it is it is still valid
> today. The only thing that is a little misleading is your statement
> that the * calls the function.

That's true for old code. It's an error without it, for old code. How is
that misleading? You're describing in terms of the "modern" meaning, and
saying _not_ that the old meaning is misleading or no longer applies, but
that *my* statement is misleading... How warped is that?

> The function will be called with or
> without the dereference.
>

In modern code, yes, the dereference is superfluous. Old code, no. It must
be dereferenced for old code.

> The example given pointlessly turned
> the function pointer into a function.

It wasn't pointless. It was needed at one point in time. It also presents
a cleaner model of dereferencing.

> No, technically it has to be converted back to a pointer. Odd, I
> know, and not what used to happen in K&R C. In K&R C the left-most *
> is required.

See...

> One reason why I think your explanation could mislead people learning
> standard C is that it does not help to explain why
>
> (puts)("text");
> (*puts)("text");
> (**puts)("text");
> (***puts)("text");
>
> are all valid function call expressions (well, statements consisting
> of a valid function call expression).

Who would code anything other than the first line for standard C? There is
no need to dereference a function pointer (or function) in standard C. If
students are being taught that, they won't either. Who cares if the example
dereferenced lines above are syntactically valid? The IOCCC has many
examples of syntactically valid C code too. Many are completely unreadable
by humans. So, your point seem moot to me - a solution in search of a
problem.

For pre-standard C, the last three are errors since puts is a function, not
pointer to a function. The second would work for pre-standard C if a
function pointer, and not a function like puts, was being dereferenced. So,
no one using pre-standard C would code the last two lines.

> >> and that function is automatically
> >> turned back into a pointer for the call to happen.
> >
> > Feel free to cite... (any C spec. or H&S will do.) I believe this to
> > be dependent on the implementation.
>
> 6.3.2.1 paragraph 4 and 6.5.2.2 paragraph 1 in C99 are the most
> important. C90 has the same wording.
>

Well, it is in H&S 3rd... So, I guess it's not that important. Old code
with functions and single dereferenced function pointers work with the "new"
model.


Rod Pemberton

== 2 of 2 ==
Date: Tues, Apr 6 2010 3:19 am
From: Richard Heathfield


Rod Pemberton wrote:

<snip>

> [The asterisk in (*fptr)()] also presents
> a cleaner model of dereferencing.

<aol>
Absolutely.
</aol>

<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

==============================================================================
TOPIC: Blonde C jokes
http://groups.google.com/group/comp.lang.c/t/ad1c486bad884e91?hl=en
==============================================================================

== 1 of 2 ==
Date: Tues, Apr 6 2010 4:18 am
From: blmblm@myrealbox.com


In article <23dbe7e1-aa62-45d4-8df3-ecb29a4d8d07@22g2000vbg.googlegroups.com>,
REH <spamjunk@stny.rr.com> wrote:
> On Apr 5, 2:37 pm, "bartc" <ba...@freeuk.com> wrote:
> > "Richard Heathfield" <r...@see.sig.invalid> wrote in message
> >
> > news:CJydnfg9j8gBcyTWnZ2dnUVZ8jVi4p2d@bt.com...
> >
> > > Ersek, Laszlo wrote:
> > >> On Mon, 5 Apr 2010, Richard Heathfield wrote:
> >
> > >>> Daniel Giaimo wrote:
> >
> > >>>> Plenty of people use "her", or alternate between "him" and "her" when
> > >>>> they are referring to a person of either gender.
> >
> > >>> Yes. Ignorance is rife. Or perhaps ignorance /are/ rife.

:-) (Since Richard is being so cagy about what he means here, I won't
give it away either. But I'm glad of the support, so to speak.)

> > >> Care to elaborate?
> >
> > > Not in a C group, no.
> >
> > There've already been half-a-dozen exchanges which have nothing to do with
> > C, why stop now when other people are also curious?
> >
>
> I thought that might have been a joke (i.e., Ada).
>

Ada?? What am I not getting ....

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.


== 2 of 2 ==
Date: Tues, Apr 6 2010 4:44 am
From: Tim Streater


In article <820jk3F6maU1@mid.individual.net>,
blmblm@myrealbox.com <blmblm@myrealbox.com> wrote:

> In article <23dbe7e1-aa62-45d4-8df3-ecb29a4d8d07@22g2000vbg.googlegroups.com>,
> REH <spamjunk@stny.rr.com> wrote:
> > On Apr 5, 2:37 pm, "bartc" <ba...@freeuk.com> wrote:
> > > "Richard Heathfield" <r...@see.sig.invalid> wrote in message
> > >
> > > news:CJydnfg9j8gBcyTWnZ2dnUVZ8jVi4p2d@bt.com...
> > >
> > > > Ersek, Laszlo wrote:
> > > >> On Mon, 5 Apr 2010, Richard Heathfield wrote:
> > >
> > > >>> Daniel Giaimo wrote:
> > >
> > > >>>> Plenty of people use "her", or alternate between "him" and "her" when
> > > >>>> they are referring to a person of either gender.
> > >
> > > >>> Yes. Ignorance is rife. Or perhaps ignorance /are/ rife.
>
> :-) (Since Richard is being so cagy about what he means here, I won't
> give it away either. But I'm glad of the support, so to speak.)
>
> > > >> Care to elaborate?
> > >
> > > > Not in a C group, no.
> > >
> > > There've already been half-a-dozen exchanges which have nothing to do with
> > > C, why stop now when other people are also curious?
> > >
> >
> > I thought that might have been a joke (i.e., Ada).
> >
>
> Ada?? What am I not getting ....

Perhaps he meant "(e.g., Ada)".

Unless he feels that all jokes are Ada, but that seems unlikely.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689

==============================================================================
TOPIC: In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense"
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
==============================================================================

== 1 of 1 ==
Date: Tues, Apr 6 2010 4:34 am
From: blmblm@myrealbox.com


In article <deded072-7ce6-4d74-9db4-c3a0d81a5d00@10g2000yqq.googlegroups.com>,
spinoza1111 <spinoza1111@yahoo.com> wrote:
> On Apr 6, 12:27 am, blm...@myrealbox.com <blm...@myrealbox.com> wrote:
> > In article <f68bd6a2-795b-4d8b-92b1-dbfb8a3a0...@r18g2000yqd.googlegroups.com>,
> >
> > spinoza1111 <spinoza1...@yahoo.com> wrote:
> > > The text is on wordpress at
> >
> > >http://spinoza1111.wordpress.com/2010/04/03/in-the-matter-of-herb-sch...
> >
> > > For your convenience in making comments, here is the same text in
> > > ASCII format.
> >
> > FSVO "ASCII" (i.e., not the 7-bit version).
>
> At this point, blm, you are grasping at straws.

No, just nitpicking. I do that. <shrug>

[ snip ]

> > > p. 53
> >
> > > printf("%f", sizeof f);
> > > printf("%d", sizeof(int));
> >
> > > Seebach: "Clearly wrong; sizeof is not a double or float. It is also
> > > not an int; it is an unsigned integral type, thus, one of unsigned
> > > char, unsigned short,unsigned int, or unsigned long."
> >
> > > "The only safe way to do this is: printf("%lu", (unsigned long)
> > > sizeof(int)); while this is larger, a clear explanation of why it is
> > > required will go a long way towards helping people understand C."
> >
> > > Although I do not know why Herb used %f and %d format codes, he did
> > > know, as Seebach seems not to, that all ints are floats and all floats
> > > are doubles in well-structured languages.
> >
> > On many systems, of course, integers and floating-point values
> > are represented differently. In that sense, ints are *not*
> > floats, and even a claim that any int can be represented as,
> > or converted to, a float depends on the relative sizes of the
> > two types; if they are the same (as for example they are in Java
> > [*]), there will be some values that can be exactly represented
> > as ints but not as floats.
>
> That is correct. However, a competent programmer will treat the
> mathematical relationship of integer to real number as having
> precedence over implementations where there can be integer RESULTS
> (not, as you claim, integers) that cannot be represented as floats.

I have no idea what distinction you're trying to make here (between
"integer RESULTS" and "integers"). Of course I'm aware that in the
world of mathematics the integers are a subset of the real numbers.
However, when I write "int" I do not mean an integer as it exists
in the world of mathematics, but an instance of the C data type
"int", and when I write "float" I do not mean a real number,
but an instance of the C data type "float".

Competent programmers will be aware of the ways in which numeric
types in programming languages differ from numbers as they exist
in the world of mathematics. There *may* be some programming
languages in which there are no important differences, but there
are also many programming languages in which the differences
are significant. For example, beginners are often startled by
the behavior of the following C code:

float f;
for (f = 0.0; f != 1.0; f += 0.1) {
printf("%g\n", f);
}

Similar code can be written in Java, and it behaves similarly.

> Also, I am afraid that a "competent" programmer in America means
> someone like Stallman, Ted Nelson, or myself. I do not class myself
> with such geniuses except in one regard. This is that each of us
> learned mathematics before we had access to a computer, and this
> taught the absolute lexical priority of mathematics (and human needs)
> over the limitations of computers, including bit precision.

I'm not sure I understand what you mean here, but ignoring the very
real (ha) differences between numbers as they exist in mathematics
and numbers as they are represented in computer hardware does
not strike me as consistent with being a competent programmer.

(For what it's worth, I also learned most of what I know about
mathematics before having access to a computer. I'm not sure
whether I'd be a better programmer, or a worse one, if that had
not been the case.)

[ snip ]

> > > Page 163
> >
> > > Schildt: "You may also declare main() as void if it does not return a
> > > value."
> >
> > > Seebach: "Specifically untrue. ANSI mandates two declarations for
> > > main, and says that main may have declarations compatible with those.
> > > Both return int."

[ snip ]

> > It may be that all(?) of the ways of invoking a program in a
> > Windows environment ignore its return value. This is not the
> > case in all operating systems:
> >
> > Command shells for UNIX-like systems may (usually do?) provide
> > access to the return value via an environment variable, and some
> > shell scripts make use of it. Other mechanisms for invoking
> > programs (e.g., fork/exec*/waitpid) also provide access to the
> > return code.
> >
> > And didn't JCL for the venerable IBM OS/VS operating system(s) use
> > the value returned by a called program to control execution flow?
> > That's how I remember it anyway.
> >
> > To me it seems like good practice to write code that complies with
> > the requirements of as many environments as possible. <shrug>
>
> This is the best explanation I've seen of the main() quibble, but it
> remains a quibble.
>
> It is true that it would be great to expect that ANY C program with a
> main() (eg., most) would return something that could be trusted by ANY
> shell script to mean failure or success...in the unix and linux world,
> based as that world is on plugging together reusable software
> components.
>
> However, not all of us regard unix-linux as the zenith of
> accomplishment. In fact, Jaron "You Are Not a Gadget" Lanier is quite
> amusing on this subject.
>
> He points out two related facts based on wide experience, wider and
> deeper than anyone's here including my own:
>
> * Since 1990 all Pop music is retro. There's a Sixties "sound", a
> Seventies "sound" (get down!) and even an Eighties "sound", but today
> to have a distinct "sound" is "lame" and "sucks" because as here,
> people are afraid to try to live outside what Lanier calls the "hive
> mind".
>
> * The two most notable achievements of the coder kiddies of this same
> era? Linux and wikipedia. And what is Linux? Uh, a rewrite of unix
> based on a 1989 textbook on something called minix, which I used to
> own. And what is Wikipedia? An encyclopedia which is trustworthy only
> on hard science and which is based on the theft of intellectual
> property of virtual and unwitting slaves, edited by convenience store
> clerks, which may be tax fraud.

Are you quoting here, or paraphrasing? Not that it matters much,
I suppose.

> Therefore, I don't think that a language such as C should be designed
> around the needs of an out of date OS.

Whatever you think of the design of C, or of the design of UNIX (and I
would not claim that either represents the last word in its domain),
it seems to me that a book that claims to be a reference on C should
describe the language as it actually exists, including whatever the
standard says about the return value from main().

> Furthermore, it's bad practice
> to assume without good reason that the main() return means anything at
> all.

Well, I suppose it's bad practice in general to assume that all programs
were written by competent programmers. Other than that, what's your
point?

[ snip ]

> Sorry. I italicised the Adorno quote at wordpress as you now know.

Only by your saying so here. I have not followed the link to the
version of your critique posted there.

[ snip ]

> > [ snip ]
> >
> > > occurring?
> >
> > but you remembered to double the "r" this time ....
>
> Do me the courtesy of not patronizing me, dear blm.

Not so much patronizing [*] as describing how I first started to
suspect that this might not be your writing.

[*] Snide, maybe. Fair cop.

> You are nothing
> more than a low level computer instructor as I was,

Am I? I've been deliberately cagy about my actual job title [*],
so why assume that it's the lowest one that would allow me to
say truthfully that I teach undergraduate CS classes?

[*] For reasons that seem good to me, some of which can perhaps
be inferred from my signature below, particularly the part about
not speaking for my employers.

> but your literacy
> has the usual low upper bound. You are posting dishonestly as is
> Julienne because you're afraid to take an unpopular view in a
> newsgroup which turns upon and brutalizes women posters when they
> disagree with the normalized deviance of the ng.

Does this have something to do with the current discussion? (Yes,
I'm being a bit snide here too.)

As for being afraid -- I have not observed women posters being
"brutalized" in this newsgroup [*], but I *have* observed you
proposing to escalate disagreements here beyond the bounds of Usenet.

[*] Admittedly I don't read all posts, so I suppose I could have
missed occurrences of this supposed phenomenon.

> > > Theodore Wiesengrund Adorno, Minima Moralia, 1948
> >
> > *OH!* Those weren't your words, were they? Well, perhaps there
> > were quotation marks, or indentation, or something identifying this
> > text as a quotation in the version of this review posted at wordpress.
>
> Also, do me the courtesy of focusing more carefully on what Adorno
> says.

My point, insofar as I had one, was that I was rather surprised that
someone who has been quick to take others to task for not making it
clear which words were their own and which were quoted would make the
same mistake himself -- even if it was an oversight.

That I don't read carefully all quoted material -- eh. That's not
why I spend some of my 168 hours a week reading posts here. <shrug>

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.

==============================================================================
TOPIC: #if 0?0?0:0:0
http://groups.google.com/group/comp.lang.c/t/b75e40e1094105ba?hl=en
==============================================================================

== 1 of 1 ==
Date: Tues, Apr 6 2010 5:17 am
From: Francois Grieu


I wrote:
> The following 4-lines source fragment test.c (fourth line empty)
> #if 0?0?0:0:0
>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate