C the complete nonsense

S

spinoza1111

Yes, we already know that.  You think instead that the reader should be
forced to wade through thousands of bugs.

Hey, why should I have to wade through the flies
In Seebach's great and dismal swamp,
To be dazzled with brilliance that 'tis said lies
Somewhere in the darkness, rain and damp?
What profiteth a man if he wastes weary hour
Only to learn to code int main?
Can such toys as these give physic to the sour
Set a limb without further strain?
What profiteth a man whose head is full of saws
Disconnect with any coherent set of principles,
Simple rules, world-views or great laws
Or anything that unifies these multiples?
None, I say, none, no not again one
Not even grace, nor humor, nor even any fun.
 
J

James Harris

Seebs said:
[FAT filesystem]
Did you just pollu..., uh, crosspost to, comp.os.msdos.programmer with OT
c.l.c. crud just because JdeBP mentioned 8.3 filenames?

I didn't pay attention to the headers, so presumably they'd been set
previously.

Possibly Jonathan playing around with headers. For some reason his
replies have been popping up in odd newsgroups and with idiosyncratic
changes to the subject text. I haven't spotted any pattern to when and
why he makes the changes. Beat's me.

James
 
S

Seebs

But something that I think Seebs needs to
make clearer is how much Schildt *doesn't* explain about the language
(the point about structure padding is a good one).

That's a much, much, harder problem -- I'd have to search the entire book
for stuff, and it's very hard to figure out what things ought to be covered
but aren't, especially because he could always cover something in an
unexpected place. Basically, it's more work than I want to do. I figure
the current document is enough to establish that the book is awful,
and that's really all I feel motivated to do.

I'd rather get back to, say, actually working on code.

-s
 
J

John Bode

They are indeed exceptionally bad.

I think that's the key bit missing from the Nilges analysis; he's assuming
that negative statements about something are "libel", but that's only the
case *if they are untrue*.

Even that's not enough; there must be actual malice -- IOW, a
deliberate attempt to harm someone's reputation by spreading
falsehoods.

It could be argued that C:TCN is a deliberate attempt to harm
Schildt's reputation as an authority on the C programming language,
but it is not using falsehoods to do so; it is using examples of
Schildt's own writing compared to the language definition to
demonstrate his lack of authority.

In short, it is not libel to point out that someone doesn't know what
they're talking about if you can demonstrate that they really don't
know what they're talking about (at least in the US).

And honestly, the intent is not to harm Schildt; the intent is to
alert non-experts that this reference is substantially flawed and
should not be used. The reason we pile on Shildt is that a) he is
advertised as an authority on the language, b) his books on C have
been *consistently* awful, and c) after *four* editions he *still*
makes stupid mistakes.

I agree with Harter that Seebs' updated page could be substantially
improved upon by focusing less on individual mistakes and addressing
larger structural failings (sins of both omission and commission).
It's clear that, as a C programmer, Schildt is pretty damned lazy and/
or sloppy; his examples are riddled with stupid runtime errors (such
as redirecting stdout *before* prompting for input, using the wrong
conversion specifiers in printf() statements, etc.) and bad practice
(gets() still appears in his examples, feof() as a loop condition,
etc.). It's also clear that some (much?) of his explanatory text is
at variance with the language definition (be it the standard or a
specific implementation). But something that I think Seebs needs to
make clearer is how much Schildt *doesn't* explain about the language
(the point about structure padding is a good one).
 
J

J de Boyne Pollard

For what it's worth, I think that I partly understand why that error
besides your, quite reasonable, explanation another possibility is
that he'd had dealings with "clairvoyant" i/o systems such as Pascal's
(the language). In Pascal you check the flag for EOF *before* you read
a character.


I thought by convention DOS textfiles were terminated with ^Z?

As I said:

I have a Frequently Given Answer on this, a hyperlink to
which I have sent to you. The convention was entirely
an artifact of the C libraries. The actual operating
system never required any such thing, and does not
treat character 26 specially in this regard.
I'd expect stdio to strip it

The C libraries look for the character, and if they see it,
they set the same flag on a C stream that they set if they
encounter a zero byte read. See the Frequently Given
Answer, which even shows you the source code of some C
libraries that do this.
 
J

J de Boyne Pollard

My understanding of how stdio normally works on DOS (which could
be mistaken) is this:

You can be more sure of your understanding. (-: I've sent a
hyperlink to the Frequently Given Answer to you, too. It
shows the actual source of some of the C libraries for DOS
implementations. Have a read.
 
K

Keith Thompson

I wrote the above.
You can be more sure of your understanding. (-: I've sent a
hyperlink to the Frequently Given Answer to you, too. It
shows the actual source of some of the C libraries for DOS
implementations. Have a read.

Two requests.

First, please don't delete attribution lines. They make it easier
to follow the discussion, and it's rude to quote other people's
words without acknowledgement.

Second, is there some reason you sent your hyperlink to me (I
haven't seen it) without posting it to the group?
 
J

J de Boyne Pollard

Possibly Jonathan playing around with headers.

Time for you to read some Usenet FAQs. Moving a discussion of MS-DOS
programming to the newsgroup for MS-DOS programming is hardly "playing
around". Don't unthinkingly follow the bad example of Rod Pemberton's
cluelessness, here. Put the thinking cap on and think!
 
J

J de Boyne Pollard

Second, is there some reason you sent your hyperlink to me (I
haven't seen it) without posting it to the group?

Yes, and I have a Frequently Given Answer on that, too,
which you can find by following the "Up" link to the index
on the FGA already sent to you and going to the
Mail and News section. Briefly: Long experience
shows that passing along hyperlinks via methods other
than hypertext doesn't work. If you've been through as
many "I copied that URL but it didn't work." discussions
as I have over the years, you would reach the same
conclusion. The RFC 1738 appendix was a good idea,
but it doesn't actually work in practice.

Looking at my server logs, it transpires that the reason
that you haven't received the hyperlink is that the
mailbox on your WWW page doesn't work. The
cts.com. SMTP Relay server at 207.155.249.237
says this about your mailbox:

Recipient address rejected: No such user [13RVG9GHT600]

You might want to ask your postmaster why you've
become an un-person at cts.com, and what the
code means. Either that, or you might want to
fix your WWW page. (-:

I've jumped through the tedious Google Groups hoops
that I was avoiding before, and sent a copy to your
other mailbox. You could of course just put
"character 26 end-of-file DOS" into
Google Web. (-:
 
K

Keith Thompson

J de Boyne Pollard said:
Yes, and I have a Frequently Given Answer on that, too,
which you can find by following the "Up" link to the index
on the FGA already sent to you and going to the
Mail and News section. Briefly: Long experience
shows that passing along hyperlinks via methods other
than hypertext doesn't work. If you've been through as
many "I copied that URL but it didn't work." discussions
as I have over the years, you would reach the same
conclusion. The RFC 1738 appendix was a good idea,
but it doesn't actually work in practice.

Here's the URL you sent me, in case anyone else wants to see it:

<http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/dos-character-26-is-not-special.html>

or if line wrapping causes any problems:

<http://preview.tinyurl.com/y8chyyf>

(I have no idea why there's a "." after the ".com", but it seems to
work anyway. Feel free to post a treatise on the use of '.' in domain
names somewhere else.)
Looking at my server logs, it transpires that the reason
that you haven't received the hyperlink is that the
mailbox on your WWW page doesn't work.
[...]

No, it doesn't. That web page hasn't been updated in a long time, and
the address is obsolete. The address that appears in the "From:"
header of every article I post is valid; I'm not sure why you didn't
try that first. I'll update the web page just as soon as I get around
to it.

This is cross-posted to comp.lang.c and comp.os.msdos.programmer. As
far as comp.lang.c is concerned, the behavior of binary and text files
on a given system is determined by the C implementation. As far as
MS-DOS is concerned, I don't have enough experience to comment
further.

One more thing. I asked you before, in text that you didn't bother to
quote, to leave attribution lines in place. Would you care to explain
why you don't do so?

I specifically do not give permission to quote anything I write on
Usenet without proper attribution.
 
S

spinoza1111

Even that's not enough; there must be actual malice -- IOW, a
deliberate attempt to harm someone's reputation by spreading
falsehoods.

In the case of a private person, spreading discreditable truths is
also libel, I'm afraid. Here's what Blackstone's commentaries say
(4-150):

"For the same reason it is immaterial with respect to the essence of a
libel, whether the matter of it be true or false; since the
provocation, and not the falsity, is the thing to be punished
criminally: though, doubtless, the falsehood of it may aggravate its
guilt, and enhance its punishment."

Here's the unabridged Oxford definition of the Law use of Libel as a
noun:

"Any published statement damaging to the reputation of a person"

In Seebach's case, there is an aggravating falsehood in Blackstone's
sense. This is his inference from what he considers an "error" in
Schildt to the conclusion that Schildt doesn't know about the facility
or C in general. When Seebach fucks up one line strlen, we're not
supposed to make this inference.

This is unwarranted, since anyone with publishing experience knows
that the production process introduces errors (both Seebach and
Heathfield have admitted that there own books contain errors).
It could be argued that C:TCN is a deliberate attempt to harm
Schildt's reputation as an authority on the C programming language,

This is what it would appear to be.
but it is not using falsehoods to do so; it is using examples of

"The 'heap' is a DOS term" is a falsehood, and, absent working face to
face to Schildt, Seebach had no right to make inferences about his
competence, inferences which are proven false by Schildt's large
number of books, each of which has been more commercially successful
than Seebach or Heathfield.

Schildt's own writing compared to the language definition to

The "language definition" as found in the standards cannot be used to
write compilers or even understand how to use C (Seebach's code is
exhibit A). They fail to define significant semantics, because by the
time they were drafted, there existed several incompatible
implementations, and the standards writers appear to have no mandate
to make these compilers incompatible with a standard.

The only way to square this circle was to create a non-deterministic
semantics, in which (to take only one simple example) the programmer
cannot code a(b=0, b) and expect in all cases that the values of the
formal parameters will both be zero.

In this code

#include "stdio.h"
#define MAX_SIZE 100
void b(int c, int d)
{
printf("%d %d",c,d);
}
int main()
{

int e = 4;
b(e = 0, e);
return 0;

}

my Microsoft C++ express compiler in C mode prints 0 0, but I'm not
"supposed" to expect this because in "standard" C the order of
evaluation has been "defined" as nondeterministic.

But if the order of evaluation is nondeterministic, this means that a
truly conformant compiler would have to use a random number generator
to generate code for matching formal and actual parameters.

This is a result of vendor greed, and the Bush-Clinton spirit of
allowing the private sector to highjack the public good.

A sensible compiler cannot be written for "standard" C nor can a
sensible book for real programmers be written about it. Schildt is at
most guilty of a little *schlamperei* in going along to get along to
get along with a marketing plan at McGraw Hill, which deliberately
ignored, as you clowns ignore, the essential problem.

Schildt compromised himself as I compromised myself when the Registrar
of my university, for whom I'd written a lot of software and who
considered me a genius, counseled me to get my ass to Champaign-Urbana
and learn (as Herb there learned) REAL computer science using real DEC
gear instead of IBM mainframes. Although I did go to grad school in
Chicago, I wound up wasting time by having to reinvent structured
programming in assembler and Cobol.

But all programmers do this, because they have relationships and
children as I did. The real evil are programmers handed access to
higher-level platforms who then stalk and shit upon their brothers and
sisters for having to make a silk purse out of a sow's ear and being
underwhelmed by the void main issue...because it's 3:00 AM in the
server room and they have to get it working.
demonstrate his lack of authority.

In short, it is not libel to point out that someone doesn't know what
they're talking about if you can demonstrate that they really don't
know what they're talking about (at least in the US).

Seebach hasn't demonstrated this, since as Dr McClean has pointed out,
his tone is biased and he makes errors of his own. But see Blackstone:
the malice and not the truth is what determines libel.


And honestly, the intent is not to harm Schildt; the intent is to

The tone implies something that is in fact the secret fear of every
programmer; you guys are secretly soiling yourselves in fear that your
incompetence will be discovered. This is because American business
highjacked computers in order to give a gloss of Science and Reason to
the game of expropriation. In so doing, they needed programmers able
to get code to "work" in the sense of running with or without errors.
In the "hacker ethos" this became "rough consensus and working code",
and despite the hackers' illusion that they were free men, they were
men so willing to compromise and **** with truth-as-software-
correctness that they, and not educated or cultivated men or women,
program computers today and create the ongoing software crisis.

Schildt was made "it" by Seebach because Seebs was able to get
corporate jobs as a programmer but had never taken computer science
nor been certified as one who knew his trade except in the most sloppy
ways: that approbation which one can get from making things work, or
run, or appearing to. By stalking Schildt, Seebach tried to exorcise
Seebach's demons, but it gives him only temporary Nepenthe.
alert non-experts that this reference is substantially flawed and
should not be used.  The reason we pile on Shildt is that a) he is
advertised as an authority on the language, b) his books on C have
been *consistently* awful, and c) after *four* editions he *still*
makes stupid mistakes.

You have never made this case, because you can only criticise his lack
of conformance to Linux and his "failure" to tell his readers about
nondeterministic operations...information which is useless on a
specific compiler and platform which works deterministically.
I agree with Harter that Seebs' updated page could be substantially
improved upon by focusing less on individual mistakes and addressing
larger structural failings (sins of both omission and commission).
It's clear that, as a C programmer, Schildt is pretty damned lazy and/
or sloppy; his examples are riddled with stupid runtime errors (such
as redirecting stdout *before* prompting for input, using the wrong
conversion specifiers in printf() statements, etc.) and bad practice
(gets() still appears in his examples, feof() as a loop condition,
etc.).  It's also clear that some (much?) of his explanatory text is
at variance with the language definition (be it the standard or a
specific implementation).  But something that I think Seebs needs to
make clearer is how much Schildt *doesn't* explain about the language
(the point about structure padding is a good one).

As I have said, no professional programmer or educated person such as
Dr McClean expects to self-moronize and blindly type in code. I
realized in my first computer science class that the assembler code
for the IBM 7094 wasn't going to work on a 1401; tyros, contrary to
mythos, are in my experience often smarter than "experienced"
programmers who are moronized by corporate life.

And when Seebach turns to the vastly more important expository Schildt
text, Seebach's lack of education is plain.

Here's a howler from CTCN-4 that shows this: "similarly, "the heap" is
not necessarily a single region."

To the uneducated, whether in CS or other fields, a grave skepticism
is their simulation of the education they do not have, as in the case
of Creationist "scholars" who express doubt about a "theory" and trust
to the ignorance of their readers on the nature of a scientific
"theory".

To the half-educated fraud, whether Seebach or the Creationist, the
best kind of statements are open-ended and nondeterministic because
these types of statements, as opposed to e=mc**2, four colors suffice,
or three control structures suffice, are harder to FALSIFY.

Because Seebach never took a single class in CS, nor, apparently, a
class in philosophy of science, nor, apparently International
Baccalaureate classes in Theory of Knowledge that I teach, he believes
that he can get away with gravely intoning "the heap is not
necessarily a single region". This is because he skipped computer
hardware -oftware architecture which despite the passing of highly
leveled architectures such as the VAX still uses Dijsktran "separation
of concerns" to make things CLEAR.

At some implementation level, the heap may not "necessarily" be a
single region. It may be a linked list of pointers or chunks of
storage. It may in fact be several linked regions. At the level of
engineering it might be scattered over several chips on a board, and
you may be able to watch it being used in several different places. At
the level of physics it's particles dancing in a void who do not know
what they do.

But the computer SCIENTIST as opposed to the hacker, or stalker, knows
that it's her job to e pluribus unum, and to make at some
comprehensible singular HEAP out of lower-level implementation
details. To assault and stalk based on denying the scientist the
ability to form a concept is not only libel and stalking. It's also
digital Maoism.

Exhausted middle-aged mothers and grandmothers bring their shining
sons and daughters to my classes in Hong Kong in hopes that they will
major, in some cases, in computer science in Hong Kong. In many cases,
these mothers and grandmothers lived in mainland China in the 1960s
and 1970s and were denied an education by thugs who disrupted classes
and stalked decent teachers and authors based on what these assholes
thought were "errors". Seebach is not as destructive as they but he is
as evil, and contemptible because so impotent in the long run. And the
Teabaggers are Seebach scaled up: Fascism.
 
J

J de Boyne Pollard

Here's the URL you sent me, in case anyone else wants to see it:

There you go. You actually *did* know that this
sort of thing doesn't work in practice before you
asked why I didn't use it. And you probably know
what the next steps in the silly dance, that
happens over and over again, are almost invariably,
too. Watch as they now happen with your post.
One already has.
(I have no idea why there's a "." after the
".com", but it seems to work anyway.)

There's a Frequently Given Answer on that, too.
CIS URLs are subject to search path spoofing.
That's two hits in a row that you've had,
now. (-:
I'm not sure why you didn't try that first.

It was explained in what you're replying to.
 
C

Colonel Harlan Sanders

There you go. You actually *did* know that this
sort of thing doesn't work in practice before you
asked why I didn't use it.


Sorry to butt in, but why do you say that Tinyurl (or any of several
similar services) "doesn't work in practice"? That's the reason they
exist.
Sure, you then have the risk of the link going dead if Tinyurl goes
offline, but your alternative of not giving an address at all seems
worse, as I for one did want to read that.

And anyway,the link Keith Thompson put in his post worked perfectly
well, at least in my newsreader.
Of course, your quote of the longer URL above was mangled by Google.

And you probably know
what the next steps in the silly dance, that
happens over and over again, are almost invariably,
too. Watch as they now happen with your post.
One already has.


There's a Frequently Given Answer on that, too.
CIS URLs are subject to search path spoofing.

Okay, I'm sure this is a stupid question, but what is a "CIS URL"? You
don't appear to be in Russia....
 
K

Keith Thompson

J de Boyne Pollard said:
There you go. You actually *did* know that this
sort of thing doesn't work in practice before you
asked why I didn't use it. And you probably know
what the next steps in the silly dance, that
happens over and over again, are almost invariably,
too. Watch as they now happen with your post.
One already has.

The long URL looked just fine in the previous article. I just tried
posting it through Google Groups myself; it wrapped around (something
a reader can easily cope with), and there was no ellipsis. No, I'm
not interested in whatever "silly dance" you're talking about.
There's a Frequently Given Answer on that, too.
CIS URLs are subject to search path spoofing.
That's two hits in a row that you've had,
now. (-:

I don't know what you're talking about, but I don't care enough to
ask. Feel free to be clearer if you want to share knowledge rather
than show off.
It was explained in what you're replying to.

Not in any way that I could decipher, but I didn't spend much time on
it.

As long as you continue to quote my words without attribution, don't
expect any further replies from me.
 
S

SG

I just happened to skim through your recent blog post, spinoza1111,
and noticed the following:

Page 162

Seebach: “Functions are not of type void; functions are of various
types, called collectively the function types. A function may have
a return of type void, which means that its type is something like
‘function taking (…) and returning void’.”

Mr. Snoid is lost in the void. Herb knows very well that to return
“void” is to return nothing and not return anything. Syntactically,
in a way the student needs to know, the type of a void function is
“void”.

Both Seebach and Schildt are using reifying language, treating our
ideas about what electrons do in a computer as things. Peter would
renarrate the void function as returning something named “void”,
which does not exist, and Schildt’s language is better, since void
functions are something of a special [syntactical] type, which is
not returned.

It seems you have completely missed the criticism's point. The point
wasn't about whether a function "returns void" or "returns nothing".
It was about function types. "void" is not a function type but
"void(int)" is a function type. It's the type of a function that takes
an int and "returns void" (or returns nothing if you prefer, but
that's besides the point). The type of a function cannot be "void"
because "void" is not a function type. The *return type* of some
function may be void. But that's different from saying "the type of
function xyz is void". Of course, you could argue that this is
nitpicking. But I would disagree.

typedef void i_am_a_function_type(int);
typedef void i_am_not;

void some_function(int);

int main() {
i_am_a_function_type *pf;
i_am_not *pv;
pf = some_function; /* OK! */
pv = some_function; /* ill-formed */
return 0;
}


Cheers,
SG
 
S

Seebs

It seems you have completely missed the criticism's point. The point
wasn't about whether a function "returns void" or "returns nothing".
It was about function types. "void" is not a function type but
"void(int)" is a function type.

Right.

Function types are a kind of derived type, and are not at all the same
thing as the type of their return value.

A pointer to function-returning-int is not the same thing at all as a
pointer-to-int, nor is a function-returning-pointer-to-int, nor is a
pointer to a function-returning-pointer-to-int.

This can be instructive to think about. Imagine that we were to
pretend that a function could be of type "int". Well, then. Its address
must be of type "int *". But instead, when you take the address of a
function returning int, you get a pointer to a function returning int,
not a function returning pointer to int. (And you can't take the address
of its return value, either...)

I stand by that one. There is no such thing as a function of type void.

-s
 
M

Malcolm McLean

I just happened to skim through your recent blog post, spinoza1111,
and noticed the following:
[Is the "type" of a fucntion void or void(int)?]

Generally we use the terms "signature" and "return type" to avoid this
ambiguity.

In some contexts ypu want to talk about the return type of a function,
for instance in the expression
printf("%f", foo() );

foo() can be replaced by any function of "type" float or double. On
the other hand qsort takes a pointer to a comparison function of
"type" int(const void *, const void *).
 
B

BruceS

No.

By the time I made the post here, the page had been updated.

Tragically, Nilges has not yet learned about the "cache".

I should have thought of that possibility. That makes sense.
I removed the automatic redirect. The link to the old page is in the
section on "Schildt and C:TCN".

I see it now, thanks. I also note that the old page now has a disclaimer
section, as spinoza1111 demanded. In my first skimming of the new page,
I didn't see any credit for my supportive work, and was prepared to
deliver a scathing attack. Now I'm glad I resisted until a slightly
deeper skim, as it's clearly there. I'd hate to look the fool, making
unfounded accusations.
 
S

Seebs

[Is the "type" of a fucntion void or void(int)?]
Generally we use the terms "signature" and "return type" to avoid this
ambiguity.

Usually, yes. :)
In some contexts ypu want to talk about the return type of a function,
for instance in the expression
printf("%f", foo() );
foo() can be replaced by any function of "type" float or double. On
the other hand qsort takes a pointer to a comparison function of
"type" int(const void *, const void *).

The key is that, in an expression, a function yields a value of its
return type. That doesn't mean it *is* of that type. In:
3 + 5
the result of the "+" operator has type int, but we don't say that the
+ operator itself is of type int.

-s
 
J

James Harris

In the case of a private person, spreading discreditable truths is
also libel, I'm afraid. Here's what Blackstone's commentaries say
(4-150):

"For the same reason it is immaterial with respect to the essence of a
libel, whether the matter of it be true or false; since the
provocation, and not the falsity, is the thing to be punished
criminally: though, doubtless, the falsehood of it may aggravate its
guilt, and enhance its punishment."

Selective copying, Ed. You have omitted the preceding context, you
know - that bit that "For the same reason" applies to. Also, what a
pity you did not read on just a little bit. The very next sentence
reads, "In a civil action, we may remember, a libel must appear to be
false, as well as scandalous; for, if the charge be true, the
plaintiff has received no private injury, and has no ground to demand
a compensation for himself, whatever offence it may be against the
public peace: and therefore, upon a civil action, the truth of the
accusation may be pleaded in bar of the suit."
Here's the unabridged Oxford definition of the Law use of Libel as a
noun:

"Any published statement damaging to the reputation of a person"

Are you absolutely sure that is unabridged... or have you abridged it?
Are we to believe a venerable tome like the unabridged Oxford
(whatever that is; I take it you aren't claiming that's an unabridged
quote from the OED) has no more to say.

I looked up the term too. Here are some senses that seem to apply.

The V2 gives sense 2. an attack on somebody's reputation. That may
please you but it also refers to what applies in a court when it says:
1. a legal term for published material that is false and defamatory.

The American Heritage/Yahoo gives sense 1a: A false publication, as in
writing, print, signs, or pictures, that damages a person's
reputation.

M-W: A written or oral defamatory statement or representation that
conveys an unjustly unfavorable impression.

etc. Feel free to check for yourself.

http://www.onelook.com/?w=libel&ls=a

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top