Son of Snarky Tirade: a response to Seebach's new CTCN: part 1

S

Seebs

Then you are committing the canonical error, committed by many,
of substituting what you think or want the standard to say
for what the standard actually says. It's the error committed
by some FAQs and by some well-intentioned but misinformed
people. Go and read what the standard *actually says*.

I have.

I understand it just fine.

I think our issue has nothing at all to do with the words in the
standard here, but with the question of what it means for the standard
to "mandate" something.
Wrong. Go and read what the document actually says.

If you want to make a case, you actually have to present some
kind of argument, not just assert that you're right.

Argument. You know. Explanation of how the data you cite allegedly
support your position.

You have provided NONE. That's because there isn't one. It's also because,
before you could do that, you'd have to offer a clear explanation of what
you think it means to say that the standard "mandates" something.

Hint: The general permission to offer extensions means that you can always
accept new kinds of programs that contradict what the standard mandates.
That an implementation is permitted, implicitly or implicitly, to accept a
program, does not mean that the standard did not mandate something contrary
to that program's structure or contents.

When we say the standard "mandates" a return type of int, we mean that, if
you use any other return type for main(), the standard provides you with
no guarantees. It is quite possible that an individual implementation will
choose to offer you guarantees. It was just as possible in 1989. It doesn't
change what the standard requires.

If you want to write code which conforms to the C standard, for a hosted
implementation, your main() must return int. That compilers *could* accept
other forms doesn't change that. Similarly, you can't rely on the value
of a right-shifted signed negative number. That an implementation COULD
define that to give you useful results doesn't mean that you can rely on it
and claim to be conforming with the standard.

-s
 
S

Seebs

STOP QUOTING PEOPLE WITHOUT ATTRIBUTIONS.
Someone that Pollard was TOO RUDE TO IDENTIFY said:
I'm not sure that that's really true. As I said before,
Schildt wasn't writing about C, but about DOS implementations
of C.

This is really not true. He was certainly primarily informed by DOS
implementations, but his *topic* was the C language. That he sucked
at it is not the same thing as saying that he was talking about
something else.

But on second thought, nevermind. Between "I've sent you a hyperlink"
and the refusal to attribute quotes, you are simply too annoying to
deal with.

You don't seem to comprehend that Usenet is a public discussion medium.
You're writing like you're responding to email; you send an individual
person a relevant link, but you don't display it for the thousands of
other readers. You quote things without attribution as though only the
person you were quoting has any interest in reading the post.

That, and you've gone around five or six rounds insisting on a novel
interpretation of the C standard that suggests that you don't understand
the relationship between the standard's requirements on implementations
and the standard's requiremens on programmers, but you have not yet
bothered to actually MAKE YOUR ARGUMENT.

Nevermind. *plonk*

-s
 
S

Seebs

3. Nilges suffers from what some might call a personality disorder
where he must at all times have a cause to fight for, a compulsion, a
fixation, an idee fixe etc. There's probably a proper name for it.

http://en.wikipedia.org/wiki/Narcissistic_personality_disorder

"The narcissist is described as being excessively preoccupied
with issues of personal adequacy, power, and prestige."
[...]
"fanatic type - including paranoid features. A severely
narcissistically wounded individual, usually with major
paranoid tendencies who holds onto an illusion of omnipotence.
These people are fighting the reality of their insignificance
and lost value and are trying to re-establish their
self-esteem through grandiose fantasies and self-reinforcement.
When unable to gain recognition of support from others,
they take on the role of a heroic or worshipped person with
a grandiose mission."

Fascinating reading.

-s
 
S

Seebs

May Jonathan's (and anybody else's) consistent attribution-snipping be due
to him considering authorship not only incidental, but downright
distracting? Perhaps he wishes to concentrate exclusively on what is said,
not on who said it.

Could be, although coupled with the "I've sent you a hyperlink", I think
it's just failure to think through the implications of a shared discussion
medium.

I have concluded that it's not worth the time to figure out.

-s
 
S

Seebs

I tried to tag this post [NILGES] please inform me if I failed.

On Apr 12, 9:41 am, Seebs <[email protected]> wrote:
No competent programmer makes code depend on struct padding.
that's because they know about it. A newbie (and I think this was a
book aimed a newbies despite the title) might think he can copy, say,
a message from a socket straight into a structure and not have
problems. That "Why is this structure bigger than the sum of its
parts" is a clc FAQ only illustrates my point.

Exactly. If you know about struct padding, it's easy to avoid making code
which depends on it. If you don't, it's not quite so easy.
so why did schildt use it so often?

Exactly; even if we were to grant the delusional rant, it'd just make
the book worse.

I do agree that there's some room for ambiguity about what things-not-covered
should be discussed when talking about a book's quality, but the more I look
at Schildt's work, the more I think it's just plain not even complete enough
to justify what little credibility it had. There's too much fundamental
and significant stuff missing. Moreso when he removed things (say, the
real discussion on order-of-evaluation problems) rather than fix errors in
them.

I'm gonna sorta break ranks with the conventional wisdom of the C community
and say that the existence of order-of-evaluation bugs is arguably a wart
in the language design. I think that, on the whole, it's a wart which is
justifiable in context (both when the language was designed, and what it is
now mostly used for). However, it's certainly a wart... Which is why a
book which doesn't have any real coverage of the feature's implications
is worthless to the student.

-s
 
S

Seebs

Seebs wrote:
Check next time you're in a large bookstore.

I'd complain that this was useless, except I've done it pretty much every
time in the last decade that someone asked me to remind them of something.

Okay, clarification.

The next time I'm in a large bookstore, someone please remind me to check.
:p

-s
 
K

Keith Thompson

Seebs said:
I'd complain that this was useless, except I've done it pretty much every
time in the last decade that someone asked me to remind them of something.

Okay, clarification.

The next time I'm in a large bookstore, someone please remind me to check.
:p

No problem. Next time you're in a large bookstore, post here so we
can remind you. Be sure you don't leave the store until you've read
all the responses.

It wouldn't hurt to remind us (while you'e in the bookstore, not now)
what we're supposed you remind you of.
 
N

Nick Keighley

[...] the existence of order-of-evaluation bugs is arguably a wart
in the language design.  I think that, on the whole, it's a wart which is
justifiable in context (both when the language was designed, and what it is
now mostly used for).  However, it's certainly a wart... Which is why a
book which doesn't have any real coverage of the feature's implications
is worthless to the student.

it's a pretty common wart
though I believe more modern (well newer) languages like Java avoid it

I once wrote
some_func (i, i++, i++);

Which is not so much staring into the abyss as throwing rocks and
shouting taunts at it
 
S

spinoza1111

I have.

I understand it just fine.

I think our issue has nothing at all to do with the words in the
standard here, but with the question of what it means for the standard
to "mandate" something.


If you want to make a case, you actually have to present some
kind of argument, not just assert that you're right.

Argument.  You know.  Explanation of how the data you cite allegedly
support your position.

You have provided NONE.  That's because there isn't one.  It's also because,
before you could do that, you'd have to offer a clear explanation of what
you think it means to say that the standard "mandates" something.

Hint:  The general permission to offer extensions means that you can always
accept new kinds of programs that contradict what the standard mandates.

5.1.2 WG14/N1124

"Two execution environments are defined: FREESTANDING and HOSTED. In
both cases, 'program startup' occurs when a designated C program is
called by the execution environment. All objects with static storage
duration shall be "initialized" (set to their initial values) before
program startup. The manner and timing of such initialization are
otherwise unspecified. 'Program termination' returns control to the
execution environment."

"In a freestanding environment (in which C program execution may take
place without any benefit of an operating system) the name and type of
the function called at program startup are implementation-defined. Any
library facilities available to a freestanding program, other than the
minimal set required by clause 4, are implementation-defined."

"The effect of program termination in a freestanding environment is
implementation-defined."

"A hosted environment need not be provided, but shall conform to the
following specifications if present."

[Followed by specifications for int main() in the hosted environment]

The standard doesn't "mandate" int main(). It says what a hosted as
opposed to freestanding execution environment will do with int main().
Other implementations, known as "freestanding" (including any
implementation that doesn't flag void main()) are also standard
implementations, and code that compiles with errors on them is at a
second level "standard". The distinction between hosted and
freestanding is not a moral distinction nor is it a distinction
between "conformant" and "nonconformant".

In fact, it's obvious that the "hosted" implementation was put into
the standard by way of Linux pressure to overlink, in violation of
separation of concerns, C to Linux.

Most contemporary uses of C are "freestanding" in that most C programs
are called from graphical user interfaces not coded in C.

Pressure on organizations to support Linux is represented as some sort
of crusade for "freedom" in the mythos. But the fact is that Linux, as
open source, represents a very valuable resource for profit-making
organizations and to this end, hordes of fools were marshaled and
deluded as Seebach is.
That an implementation is permitted, implicitly or implicitly, to accept a
program, does not mean that the standard did not mandate something contrary
to that program's structure or contents.

When we say the standard "mandates" a return type of int, we mean that, if
you use any other return type for main(), the standard provides you with
no guarantees.  

This is false. See above. It simply means that the implementation is
not hosted.

It is quite possible that an individual implementation will
choose to offer you guarantees.  It was just as possible in 1989.  It doesn't
change what the standard requires.

If you want to write code which conforms to the C standard, for a hosted
implementation, your main() must return int.  That compilers *could* accept

No, for only one type of "hosted" implementation: the host as defined
by the standard.
other forms doesn't change that.  Similarly, you can't rely on the value
of a right-shifted signed negative number.  That an implementation COULD
define that to give you useful results doesn't mean that you can rely on it
and claim to be conforming with the standard.

This is absurd. The Standard is open in the sense that it allows
implementations to have facts about them and programmers to rely on
those facts.

You're saying, in fact, that C must be used like Java to be
"standard". But after ten years doing apparently diddly on the
standards group save pad your resume, you don't understand that the
Standard is a standard for implementations and not C code.

It's not a very good standard for implementation. But for code, it's
nonsense.

A dependency in code on ones being shifted in is what C is for:
systems programming at a level where implementation details,
especially gross implementation details, are usable and known.

I agree that given your queue.c horror, your failure to correctly
implement strlen, and your %s nonsense, you shouldn't be using C and
should retrain in Java, which more resembles the scripting languages
where your expertise seems to lie. By condemning a C programmer
working at a certain depth for knowing his trade (knowing, for
example, that twos complement is in use on his target architecture)
you merely add to what we know: that you're uneducated in computer
science, and fail to compensate for that by being a knowledgeable
programmer.

When this serious pattern of resume padding, stalking and ignorance is
exposed, you embark on campaigns of personal destruction, including
making offensive neologisms out of people's names. You force others to
reply at your childish level. But, don't compete with me:

There's a coder named Dweebach
Who cried alas and alack
My code fails to work
And I know I'm a jerk.
That low level coder named Dweebach.

There's a low level coder named Peter
Who couldn't program a parking meter
Though god knows he tried
But his code, it died
Blue screen of death appeared on his parking meter.

There's a hacker named Seebs
Who's ranked with the feebs
Says he knows C
But he don't, see?
That hopelessly clue challenged Seebs!
 
S

spinoza1111

3. Nilges suffers from what some might call a personality disorder
where he must at all times have a cause to fight for, a compulsion, a
fixation, an idee fixe etc. There's probably a proper name for it.

http://en.wikipedia.org/wiki/Narcissistic_personality_disorder

        "The narcissist is described as being excessively preoccupied
        with issues of personal adequacy, power, and prestige."
        [...]
        "fanatic type - including paranoid features. A severely
        narcissistically wounded individual, usually with major
        paranoid tendencies who holds onto an illusion of omnipotence.
        These people are fighting the reality of their insignificance
        and lost value and are trying to re-establish their
        self-esteem through grandiose fantasies and self-reinforcement.
        When unable to gain recognition of support from others,
        they take on the role of a heroic or worshipped person with
        a grandiose mission."

Fascinating reading.

Look in the mirror. You didn't even learn the psychology you claimed
you majored in, for if you did, you would know that after the Soviet
misuse of psychology, all of these diagnoses have to be confirmed by
"danger to self or others" and genuine inability at common living
tasks.

Therefore, it's libel for you to affirm what you have affirmed.

You see, for the same reason that in the Soviet system people who
thought Communism could end before 1989, when it did end, there are
today, hopefully, people who are grand but not grandiose and
genuinely, if in an unknown way, heroic. I do not claim to be such a
person. But hopefully the grand and heroic gesture is not out of date
in a world dominated by corporate dweebs such as yourself.

The DSM cannot exclude this possibility, any more than it could
exclude the possibility that an apparently or actually paranoid person
might actually be followed.

But: essentially all you're doing is creating quite an audit trail of
serious mistakes, which indicate clearly that you've padded your
resume and stalked Schildt to build an image. The latest howler is
your failure to understand that not all conformant uses of C need be
hosted at all.

I understand that being broadly educated and even being a competent
programmer is here a marker of an apparent mental illness, since
modern clinical practice is overly based on statistics in a world that
is steadily going mad. How much easier it may be for you to destroy
others and pad your resume. But, look in the mirror.
 
S

spinoza1111

3. Nilges suffers from what some might call a personality disorder
where he must at all times have a cause to fight for, a compulsion, a
fixation, an idee fixe etc. There's probably a proper name for it.

        "The narcissist is described as being excessively preoccupied
        with issues of personal adequacy, power, and prestige."
        [...]
        "fanatic type - including paranoid features. A severely
        narcissistically wounded individual, usually with major
        paranoid tendencies who holds onto an illusion of omnipotence.
        These people are fighting the reality of their insignificance
        and lost value and are trying to re-establish their
        self-esteem through grandiose fantasies and self-reinforcement.
        When unable to gain recognition of support from others,
        they take on the role of a heroic or worshipped person with
        a grandiose mission."
Fascinating reading.

Look in the mirror. You didn't even learn the psychology you claimed
you majored in, for if you did, you would know that after the Soviet
misuse of psychology, all of these diagnoses have to be confirmed by
"danger to self or others" and genuine inability at common living
tasks.

Therefore, it's libel for you to affirm what you have affirmed.

You see, for the same reason that in the Soviet system people who
thought Communism could end before 1989, when it did end, there are
today, hopefully, people who are grand but not grandiose and
genuinely, if in an unknown way, heroic. I do not claim to be such a
person. But hopefully the grand and heroic gesture is not out of date
in a world dominated by corporate dweebs such as yourself.

The DSM cannot exclude this possibility, any more than it could
exclude the possibility that an apparently or actually paranoid person
might actually be followed.

But: essentially all you're doing is creating quite an audit trail of
serious mistakes, which indicate clearly that you've padded your
resume and stalked Schildt to build an image. The latest howler is
your failure to understand that not all conformant uses of C need be
hosted at all.

I understand that being broadly educated and even being a competent
programmer is here a marker of an apparent mental illness, since
modern clinical practice is overly based on statistics in a world that
is steadily going mad. How much easier it may be for you to destroy
others and pad your resume. But, look in the mirror.





Seebs is seriously confused about "standard". If a C program compiles
without errors or warnings on a conforming compiler, it is standard,
but it might not be portable:

void main()
{
return 0;
}

This produces a warning in my environment because the use of main()
might but does not have to indicate that the programmer is writing
code called from the command line. Therefore my environment is trying
to conform to the C standard for hosted applications. The host, if it
calls something, has indeed a sort of contractual right to expect
something back whereas void main() "promises" to return Random Garbage
Left Over From The Dawn Of Time.

If the host is a script processor, bad things will occur. However, the
host is a GUI (the C++ development environment). To test code snippets
I place a break at the final return statement in order to examine the
MS-DOS window for results.

Bad Things do happen if I stop the code at this break; the MS-DOS
window never goes away until reboot. You need to press the run button
to go through final return. But this behavior doesn't result from use
of main(). It's when you press run that control would exit to any code
that mistakenly examines the result.

Many C programs (eg., fast calculation subroutines running in a GUI)
are "freestanding" in the sense that their environment is defined by
the caller GUI. The caller GUI is in this environment free to ignore
the return.

Seebs doesn't realize that the Standard wasn't meant for ordinary
mortals, such as him. Even though he participated on the committee, he
wasn't, as he is in a grandiose fantasy, dictating to ordinary mortals
how they should code; this fantasy was in fact identified by Joseph
Weizenbaum in 1976, in Weizenbaum's book "Computer Power and Human
Reason" as one of obsessive programmers, who, assigned simple tasks
appropriate to their level of academic preparation and intellect,
reacted in some disappointment by telling themselves that they were
"really" writing The Great American Compiler.

This grandiosity and narcissism is not an individual and psychological
syndrome. Given the brutalization of sociology by capitalism, social
dysfunction is explained on a case by case basis as the complete
madness of an individual whereas it's the system that's fucked up.

You see, in fact, a little grandiosity and narcissism never hurt
anyone. In software, many programmers who've been assigned some
meaningless and ill-defined task generalize to elegance, as in the
case where you build a business rules compiler instead of a program
tuned to one set of fast-changing rules.

But the corporate system allowed Peter Seebach to fantasize that he
was dictating good programming when in fact the Standard was meant to
guide compiler developers. It's a separate question as to whether he
should have even been allowed to participate.

Ordinary programmers should not be permitted to read or cite the
Standard, and should use Schildt, or preferably Harbison and Steele.
Too many misunderstandings result.
 
J

J de Boyne Pollard

Then you are committing the canonical error, committed by many,
I have. I understand it just fine.

No, you don't, given that you keep saying that the standard
mandates something that it not only doesn't mandate, but
explicitly makes provision for not being the case.
If you want to make a case, you actually have to present some
kind of argument, not just assert that you're right.

It's presented at length on the WWW page I've already pointed
you to twice. Go and read it.
You have provided NONE.  

You're being silly. I've been providing a clear
explanation of what the standard actually says, and
how its actual text contradicts popular folklore,
with the exact text and section numbers, for
over ten years.
When we say the standard "mandates" a return type of int,
we mean that, if you use any other return type for main(),
the standard provides you with no guarantees.  

No you don't. You mean that it mandates a return type of
int, which is not the same as providing no guarantees.
We all (or at least most of us) know what a mandate by
the standard actually looks like. And if you want to
put one into the C standard, mandating a return type of
int for main(), I have, and have had since the early
2000s, the very wording change for you to vote on
at a WG14 meeting. It's hyperlinked to from the FGA
page.

But without that wording change, there is no such mandate.
You really do have to put your vote where your mouth is,
figuratively speaking, and change the standard to actually
contain within it the mandate that you keep erroneously
claiming it to maintain.
 
J

J de Boyne Pollard

So Schildt's book is working to the the 1999 standard.
This is really not true.  He was certainly primarily informed
by DOS implementations, but his *topic* was the C language.  

Rewind your discussion pointers back to earlier in this
discussion where you yourself said that the first error
was the title of the book.
That he sucked at it is not the same thing as saying that
he was talking about something else.

No. Saying that he was talking about something else is the
same, and that's what I actually wrote above. He really was
talking about DOS implementations of C. The discussions are
often DOS-centric; many of the library functions were DOS API
library functions; and many of the things that are asserted
as true but that are not in fact true for the general case
are true for the limited scope of DOS implementations of C.
That the book isn't presented as talking about a subject
doesn't mean that it isn't, nonetheless, talking about
that subject.
 
T

Tim Streater

J de Boyne Pollard said:
Rewind your discussion pointers back to earlier in this
discussion where you yourself said that the first error
was the title of the book.


No. Saying that he was talking about something else is the
same, and that's what I actually wrote above. He really was
talking about DOS implementations of C. The discussions are
often DOS-centric; many of the library functions were DOS API
library functions; and many of the things that are asserted
as true but that are not in fact true for the general case
are true for the limited scope of DOS implementations of C.
That the book isn't presented as talking about a subject
doesn't mean that it isn't, nonetheless, talking about
that subject.

Errrm, who are you having this discussion with? Think you could manage
to leave the attributions in or is that too hard for you?
 
S

Seebs

Errrm, who are you having this discussion with? Think you could manage
to leave the attributions in or is that too hard for you?

No one -- since I plonked him for snipping attributions, and I think
he may have been responding to things I wrote.

The attribution-snipping thing is simply too rude in a public
discussion medium.

-s
 
B

blmblm

5.1.2 WG14/N1124

"Two execution environments are defined: FREESTANDING and HOSTED. In
both cases, 'program startup' occurs when a designated C program is
called by the execution environment. All objects with static storage
duration shall be "initialized" (set to their initial values) before
program startup. The manner and timing of such initialization are
otherwise unspecified. 'Program termination' returns control to the
execution environment."

"In a freestanding environment (in which C program execution may take
place without any benefit of an operating system)

Note the "without any benefit of an operating system".
the name and type of
the function called at program startup are implementation-defined. Any
library facilities available to a freestanding program, other than the
minimal set required by clause 4, are implementation-defined."

"The effect of program termination in a freestanding environment is
implementation-defined."

"A hosted environment need not be provided, but shall conform to the
following specifications if present."

[Followed by specifications for int main() in the hosted environment]

The standard doesn't "mandate" int main(). It says what a hosted as
opposed to freestanding execution environment will do with int main().
Other implementations, known as "freestanding" (including any
implementation that doesn't flag void main()) are also standard
implementations, and code that compiles with errors on them is at a
second level "standard". The distinction between hosted and
freestanding is not a moral distinction nor is it a distinction
between "conformant" and "nonconformant".

In fact, it's obvious that the "hosted" implementation was put into
the standard by way of Linux pressure to overlink, in violation of
separation of concerns, C to Linux.

Most contemporary uses of C are "freestanding" in that most C programs
are called from graphical user interfaces not coded in C.

I'm *very* skeptical about this sense of "freestanding" being compatible
with the definition stated/implied by the quoted text above.
Pressure on organizations to support Linux is represented as some sort
of crusade for "freedom" in the mythos. But the fact is that Linux, as
open source, represents a very valuable resource for profit-making
organizations and to this end, hordes of fools were marshaled and
deluded as Seebach is.


This is false. See above. It simply means that the implementation is
not hosted.



No, for only one type of "hosted" implementation: the host as defined
by the standard.


This is absurd. The Standard is open in the sense that it allows
implementations to have facts about them and programmers to rely on
those facts.

You're saying, in fact, that C must be used like Java to be
"standard". But after ten years doing apparently diddly on the
standards group save pad your resume, you don't understand that the
Standard is a standard for implementations and not C code.

It's not a very good standard for implementation. But for code, it's
nonsense.

A dependency in code on ones being shifted in is what C is for:
systems programming at a level where implementation details,
especially gross implementation details, are usable and known.

I agree that given your queue.c horror, your failure to correctly
implement strlen, and your %s nonsense, you shouldn't be using C and
should retrain in Java, which more resembles the scripting languages
where your expertise seems to lie.

"Scripting languages"? as best I can tell, Seebs has claimed only
familiarity with UNIX-like command shells, which -- eh, I suppose
they *could* be considered scripting languages, but the ones I know
(Bourne shell and C shell) seem to me to be more similar in spirit
to C than Java, particularly with regard to the difficulties of
writing reliably-portable code.

[ snip ]
 
S

Seebs

Note the "without any benefit of an operating system".

However, while that's certainly a common form of freestanding environments,
two other fairly widely-used freestanding implementations come to mind:

* Microsoft Windows
* Classic MacOS

For both of these implementations, the default format of an "application"
was treated, from a C implementation standpoint, as "freestanding".

.... However, this is irrelevant to Schildt's book, because a "freestanding"
implementation is not obliged to provide <stdio.h> or related functions.
As a result, it's quite clear that Schildt is writing about hosted
environments, not freestanding environments. Note that both Windows and
Classic MacOS compilers provided hosted environments as an alternative,
they just weren't the default form for applications.
I'm *very* skeptical about this sense of "freestanding" being compatible
with the definition stated/implied by the quoted text above.

I never thought I'd say this, but: Nilges is actually right, loosely
speaking, on that one. Graphical environments typically don't provide
printf(), stdin, or stdout, and applications written for them are often
viewed as "freestanding". As a famous example, some Windows
application environments omitted sprintf(), because it was only required
in a hosted implementation!

.... That said, it has widely been assumed that such trickery violates
the *spirit* of the standard. I would not have much respect for an
environment which omitted substantial chunks of the hosted environment
stuff just because it was claiming to be freestanding, even though it
really was running on an operating system.

But again, this is all irrelevant; Schildt is clearly writing about
hosted environments, complete with stdio, stdin, stdout, stderr, and
so on.
"Scripting languages"? as best I can tell, Seebs has claimed only
familiarity with UNIX-like command shells, which -- eh, I suppose
they *could* be considered scripting languages, but the ones I know
(Bourne shell and C shell) seem to me to be more similar in spirit
to C than Java, particularly with regard to the difficulties of
writing reliably-portable code.

I can get by in Lua, Ruby, perl, PHP, most of the sh family (this does
not include csh/tcsh), and maybe one or two others I can't think of.

I consider it harder to write portable code in sh than in C.

.... Not that I see any relevance to that. :p

-s
 
B

BruceS

On 12 Apr, 15:07, Nick Keighley <[email protected]>
On 12 Apr, 10:03, (e-mail address removed) <[email protected]> wrote:
<snip>


As I understand it, Google's posting interface strips tags in square
brackets from subject lines, so your proposed fix here may not be as
effective as you might like.  Just sayin'.
this is a test.
this is posted from google and the subject line should contain square
brackets
well I can see em
As can I (using news.individual.net).  However, Seebs's subject line
was
"Re: [NILGES] Son of Snarky Tirade: a response to Seebach's new CTCN: part 1"
and yours doesn't seem to have the beginning "[NILGES]".  That's what
I thought would happen.
So maybe the trick is to put the text in square brackets at the end
rather than the beginning?
the subject of this post is
"[PREFIX ENCLOSED IN SQUARE BRACKETS]  google test  [POSTFIX ENCLOSED
IN SQUARE BRACKETS]"

again it appears to survive...

FWIW: I'm using GG, and this subthread shows the full subject (pre-
and postfix) in the left pane. However, looking at individual
messages, your first one is full, but the following ones (even your
own) all strip the prefix.
 
B

blmblm

However, while that's certainly a common form of freestanding environments,
two other fairly widely-used freestanding implementations come to mind:

* Microsoft Windows
* Classic MacOS

For both of these implementations, the default format of an "application"
was treated, from a C implementation standpoint, as "freestanding".

Interesting! I think I misread this part of the text quoted from
the standard

"In a freestanding environment (in which C program execution may take
place without any benefit of an operating system)"

to mean that there definitely will *not* be an operating system, only
the C program. What part of "may" didn't I get ....
... However, this is irrelevant to Schildt's book, because a "freestanding"
implementation is not obliged to provide <stdio.h> or related functions.
As a result, it's quite clear that Schildt is writing about hosted
environments, not freestanding environments. Note that both Windows and
Classic MacOS compilers provided hosted environments as an alternative,
they just weren't the default form for applications.


I never thought I'd say this, but: Nilges is actually right, loosely
speaking, on that one. Graphical environments typically don't provide
printf(), stdin, or stdout, and applications written for them are often
viewed as "freestanding". As a famous example, some Windows
application environments omitted sprintf(), because it was only required
in a hosted implementation!

Interesting! That's certainly not what I was thinking "freestanding"
meant, but -- sure, why not.
... That said, it has widely been assumed that such trickery violates
the *spirit* of the standard. I would not have much respect for an
environment which omitted substantial chunks of the hosted environment
stuff just because it was claiming to be freestanding, even though it
really was running on an operating system.

But again, this is all irrelevant; Schildt is clearly writing about
hosted environments, complete with stdio, stdin, stdout, stderr, and
so on.

[ snip ]
 
S

spinoza1111

However, while that's certainly a common form of freestanding environments,
two other fairly widely-used freestanding implementations come to mind:

* Microsoft Windows
* Classic MacOS
Yes...

For both of these implementations, the default format of an "application"
was treated, from a C implementation standpoint, as "freestanding".

So far so good...
... However, this is irrelevant to Schildt's book, because a "freestanding"
implementation is not obliged to provide <stdio.h> or related functions.

No, but it can. Both Windows and MacOS provide these.
As a result, it's quite clear that Schildt is writing about hosted
environments, not freestanding environments.  Note that both Windows and

False. It's clear that his code examples are meant to be used inside
the "freestanding host" of a C GUI to see what happens. It's
"freestanding" in terms of the Standard since it doesn't matter what
main() returns. It's "hosted' in the ordinary (non-C) sense of the
term.

Classic MacOS compilers provided hosted environments as an alternative,
they just weren't the default form for applications.


I never thought I'd say this, but:  Nilges is actually right, loosely
speaking, on that one.  Graphical environments typically don't provide
printf(), stdin, or stdout, and applications written for them are often
viewed as "freestanding".  As a famous example, some Windows
application environments omitted sprintf(), because it was only required
in a hosted implementation!

Correct. This is because only a fool, today, would write GUIs in C.
... That said, it has widely been assumed that such trickery violates
the *spirit* of the standard.  I would not have much respect for an
environment which omitted substantial chunks of the hosted environment
stuff just because it was claiming to be freestanding, even though it
really was running on an operating system.

But again, this is all irrelevant; Schildt is clearly writing about
hosted environments, complete with stdio, stdin, stdout, stderr, and
so on.

No, he was writing for a disparate set of environments in a
Wittgensteinian family relationship united only by conformance to the
syntax and non-IO semantics of C. You have a foolish and narrow
conception of education as "nothing but the truth", one that fails to
prepare for ambiguity and error.
I can get by in Lua, Ruby, perl, PHP, most of the sh family (this does
not include csh/tcsh), and maybe one or two others I can't think of.

I consider it harder to write portable code in sh than in C.

But sh is of even less scientific interest than C, since in learning
either, you waste time and spiritual energy by having to learned just
how fucked up the past was.

I learned Latin. It has its benefits. But it is not useful. In
focusing on shibboleths, you're wasting our time. You need to learn
how to code, not "in" a programming language, but across a spectrum of
programming languages.

You need to code what you mean in excess of the requirements of fast
and dirty. This way, you won't present a search for % followed by
anything as a search for %s.

You need to check your code by desk-checking, and playing computer, as
we did in the "old days" when computer time was limited. This way, you
won't present off by one bugs in one line of code to people like me
who are your adversaries.

You need to use the Bohm-Jacopini structured constructs, enriched by
case without fallthrough and one trip do while.

You need to learn common courtesy in order to pair program or
participate productively in a structured walkthrough, and stop running
from the Other, whether Schildt or people in survey classes.

You need to learn separation of concerns. Finding a void main()
doesn't mean it's Miller Time, and time to go on break and diss your
fellow man, because in "freestanding" environments the code is still
standard, ceteris paribus. It might be code authored by Nash, Navia,
or Nilges from which you could learn. In mocking people over your
shibboleths, you are mixing up concerns.

**** or walk, Peter.
 

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

Forum statistics

Threads
474,262
Messages
2,571,058
Members
48,769
Latest member
Clifft

Latest Threads

Top