Efficency and the standard library

S

spinoza1111

Because in picky mode they often point out real code problems that they
don't point out in non-picky mode. The earlier you discover the bug, the
cheaper it is to fix it.

Unless it's not a bug, in which case the picky mode is wasting time.
For example, if it flags unused variables in stubbed code, it's
wasting time.
If I were writing (or, still pretty unlikely but rather less unlikely,
specifying) a compiler, I'd want its default setting to be maximally
picky. Anyone who doesn't want that could switch OFF warnings, either
individually or by small inter-related groups.

Overcomplicating these levels creates different languages in the last
analysis. The source code is therefore incomplete, since it has to be
accompanied by word to you Mama about what compiler settings it needs.
 
S

spinoza1111

I thought these days they were. Apparently they "eat their own dog
food".

That is correct. The phrase means "use software we are developing to
develop your software so that we can find as many problems as
possible."
Though some would argue failure to support C99 is a gaping
hole.

Microsoft may be aware that C99 is a disaster, since it was staffed by
people without computer science preparation and driven by the greed of
non-Microsoft vendors.
 
S

spinoza1111

spinoza1111wrote:



We know.


Ha!



But W4 is more reasonable, and far preferable.


Would that they did. Then the quality of software might improve a bit.

Wouldn't a picky compiler complain about your use of pointer to void
in your linked list tool? Correct me if I am wrong, but if I'm right
then your trumpeted claim that you want picky by default is
rhodomontade.
 
S

spinoza1111

spinoza1111wrote:


That doesn't follow at all.

Yes it does. Seebach was engaged in near-extortion.
By the time the third edition of CTCR (the edition on which CTCN was
based) was written, the ANSI Standard was already six years old.


Well, you're wrong, but you didn't know that, did you?



I do. They did.


It is far more likely that you just didn't understand how to write the
code portably.

That wasn't my job, and Nash, although not as *au fait* on the detail
and errors of C as you clowns, was a superior programmer; in the 1950s
he foresaw the need for multiple threads and announced a solid, if
preliminary, solution.

My assignment was in fact to help him get his code working without
freaking him out by bullying him and asking stupid questions, which
the average programming "expert" prefers to do. Which I did.

It was an extraordinarily sensitive assignment because at the time,
many members of the Nobel selection committee were very concerned with
Nash's stability: cf Sylvia Nasar's book. I was selected for this
assignment because unlike some other "experts" on the staff I had
better social skills in addition to knowing C.
 
S

spinoza1111

Not in the slightest. :)

**** you, asshole. These newsgroups are not set up so that you and
Seebach can harass and label their contributors. If you can't behave,
leave.

And **** you very much indeed, for I regard profanity as a far lesser
evil than the deliberate destruction of reputations in which you
engage, while claiming to defend Holy Fucking C, a piece of shit on
its last legs.
 
R

Rob Kendrick

**** you, asshole. These newsgroups are not set up so that you and
Seebach can harass and label their contributors. If you can't behave,
leave.

But it's clearly OK for you to label contributors.
And **** you very much indeed, for I regard profanity as a far lesser
evil than the deliberate destruction of reputations in which you
engage, while claiming to defend Holy Fucking C, a piece of shit on
its last legs.

I think that book reviews are a good way of destroying people's
reputations. Like, say, the reviews for your and Herb's books on
Amazon.

B.
 
E

Ersek, Laszlo

Ersek, Laszlo wrote:
)> It may be "idiomatic" but it is not good style in any language. If
)> you can't put an assignment in the test (because the language does not
)> allow it) then I think the way to go is an input function:
)>
)> while (can_get_input(&a))
)> do_things_with(a);
)
) Or we could commit a little bit of style massacre:
)
) for (;;) {
) char buf[SIZE];
)
) if (0 == fgets(buf, sizeof buf, stdin)) {
) break;
) }
)
) /* ... */
) }

That's just plain silly; you moved the while() condition into an if()
condition with the exact same semantics.

I think you meant:

for (;;) {
a = fgets(...);
if (a == 0) {
break;
}
...
}

Yes, exactly. I was too lazy to say explicitly:

"and any code (eg. the full body of can_get_input(&a)) can be inserted
between the loop body's opening brace and the if statement". The point
was to open up some space between the loop's beginning and the
controlling expression.

Of course my laziness didn't pay off, now that we're having this
sub-conversation.

which could be even further massacred to:

do {
a = fgets(...);
if (a) {
...
}
} while(a);

This checks "a" twice per iteration.

lacos
 
B

BruceS

But it's clearly OK for you to label contributors.


I think that book reviews are a good way of destroying people's
reputations.  Like, say, the reviews for your and Herb's books on
Amazon.

B.

Wow! I didn't realize that spinoza1111 had written a book. I guess a
more diligent reading of clc would have revealed that, but I have to
admit to not having nearly enough time for that. Given the quality of
his posts here, both in terms of technical competence and in writing
style (not to mention his quick resort to vulgarity, vitriol, and
petty flames), I'm truly amazed that he's been published. My hat is
off to you, spinoza1111. You've proven by example that *anyone* can
write a book and get it published. You can't imagine how inspiring
that is.
 
N

Nick Keighley

That is correct. The phrase means "use software we are developing to
develop your software so that we can find as many problems as
possible."

I know. Though I thought it went deeper than that. It isn't just bug
finding bugs. If Excel, for instance, is written in C and compiled
with a MS compiler then the quality of Excel is partially determined
by the quality of the compiler. I bet the manager of the compiler
group pays attention when the Excel manager rings him! You also get a
virtuous circle (hopefully!) in that the compiler compiles itself.

<snip>
 
S

spinoza1111

Wow!  I didn't realize thatspinoza1111had written a book.  I guess a
more diligent reading of clc would have revealed that, but I have to
admit to not having nearly enough time for that.  Given the quality of
his posts here, both in terms of technical competence and in writing
style (not to mention his quick resort to vulgarity, vitriol, and
petty flames), I'm truly amazed that he's been published.  My hat is
off to you,spinoza1111.  You've proven by example that *anyone* can
write a book and get it published.  You can't imagine how inspiring
that is.

The real vulgarity is the treatment that I and many others have been
subjected to in this newsgroup. Others mistreated here include C
compiler developer Jacques Navia, who has attempted to use this
newsgroup, as I am, for technical discussion only to have his good
name dragged in the mud by two incompetent programmers here, Richard
Heathfield and Peter Seebach. The former has written a poorly-received
book with far more, and far more global, errors than Schildt, who is
being scapegoated here for the incompetence of the regulars. The
latter started the anti-Schildt canard by attacking his book when he
could not extort money from McGraw Hill, and has repeatedly posted
erroneous code, and Seebach is distinguished, if that is the word, by
having taken a grand total of zero classes in computer science at
university or thereafter.

Feminized males in corporations don't defend their reputations: this
is "disruptive". I defend mine.

Feminized, disempowered, weak and soft males have been taught by bimbo
feminism and the corporation to simply look the other way when evil
occurs whether here, in the corporate world, or in Palestine. They
reason that if someone's getting his ass kicked, he must have deserved
it. They reason that if someone fights back, he must be a terrorist.

You have poor reading comprehension indeed, because you have read one
or two posts and jumped to a conclusion. When I am treated with
dignity, collegiality, and respect, I respond in kind to people like
Professor Massengill and others right here. I conducted myself with
enough dignity, collegiality, respect and technical acumen to be
selected to assist John Nash with C at Princeton University.

However, I am quite past the point of showing patience with break-room
antics here: back-stabbing, childish name-calling insults, and
scapegoating others for errors we ALL make in a complex business.

And you can take it as read that I will fight fire with fire. I will
call people "names". The difference is my evidence. When I call Peter
Seebach an "incompetent" my evidence, if needs be in a court of law,
will be his attempt to simulate strlen() with a newbie's off by one
bug, his "replace %s" that replaces all percent signs, and his self-
confessed lack of ANY academic qualifications.

When I call Richard Heathfield a thug, I repeat my evidence of his
false "humility" unlinked to charity, his enabling of others'
bullying, his name-calling, and his lack of any substantive technical
contributions to this newsgroup other than break room programming
saws.

My book, "Build Your Own .Net Language and Compiler" is still selling
well and has in the past ranked among the top ten compiler books on
Amazon. It describes technology that is a complete mystery to the regs
here. I suggest you buy a copy: I can use your money, and it would be
a worthwhile investment on your part.
 
S

spinoza1111

But it's clearly OK for you to label contributors.

Yes, in self-defense. Verbal self-defense in fact is called freedom of
speech, and thoughtlessly equating an attack such as Heathfield
launched on me ten years ago in comp.programming with verbal self-
defense is stupid.

Yes, in collegial defense of decent, hard-working programmers like
Herb Schildt who was given a certain quantum of time by McGraw Hill to
do a "good enough" introduction to C for programmers who don't care
what main "should" return when their code compiles and runs: who was
admitted by Seebach et al. to be a "clear" writer where "clear" means
"understandable", "understandable" means "contributes to knowledge",
and "knowledge" is the justified belief in what is true (in such a way
that Herb's errors are instructive and easy to locate).
I think that book reviews are a good way of destroying people's
reputations.  Like, say, the reviews for your and Herb's books on
Amazon.

Yes, and this insanity has got to stop. If I have to use profanity, so
be it.
 
R

Rob Kendrick

My book, "Build Your Own .Net Language and Compiler" is still selling
well and has in the past ranked among the top ten compiler books on
Amazon. It describes technology that is a complete mystery to the regs
here. I suggest you buy a copy: I can use your money, and it would be
a worthwhile investment on your part.

Your book is deceptively named. It should be called "Build your own
toy language using Visual Basic .Net".

The reviews on Amazon for the book are enlightening reading, and I
suggest people take time out to take a peek at them. use the .com
site; the .co.uk site only has a single review, and that's from spinny
himself.

B.
 
R

Rob Kendrick

Yes, in self-defense. Verbal self-defense

I see. Perhaps you could try to be a bit more grown up and just walk
away rather than resorting to school playground language. Swearing at
people you disagree with is rarely the most effective way of getting
people to side with you.
Yes, and this insanity has got to stop. If I have to use profanity, so
be it.

Are you suggesting that all the negative reviews there are some sort of
conspiracy?

B.
 
S

santosh

Richard Heathfield said:
Nick Keighley wrote:



I would imagine it's more the other way around. Steve Maguire
recounts how, many years ago, one of the Office programs (might
have been Excel, might have been Word, too lazy to look it up) had
a great many hard-coded 2s in it, which represented the size of an
int. Perhaps they knew in their hearts that they should be using
sizeof(int), but they knew in their heads that the compiler guys
wouldn't want to break the code by change the size of an int, would
they now? And of course the compiler guys *didn't* want to break
the Office code. On the other hand, though, they *did* want to
respond to their wider customer feedback. So they went ahead and
made int 4 bytes, despite the screaming...

Apparently though, unsigned long is still 32 bits even under 64 bit
versions of Visual C. That's indeed a very strange choice, but I
guess there was a compelling reason for it.
 
S

spinoza1111

Mmm, yes. *Definitely* better social skills.

The organizational theorist Anne Wilson Schaef writes "the addictive
system has no memory" in analyzing corporate life. You see, only in a
corporate world view is such a snap judgement as above made and even
lauded as scientifically ascetic.

As I have said, people's names and reputations are being
systematically wrecked here. I have made in the past few days a
conscious decision to express this as strongly as I can.

However, I realize that another effect of corporate life is to delink
humility from charity and destroy compassion. Richard Heathfield and
others manifest a fawning, unpleasant, Uriah Heap style humility
unlinked to respect and decency, and have had in my view no compassion
for people like Schildt or Navia.

While being "humble" and "admitting their own mistakes", they ruin
others' reputations by holding others, and never themselves, to
standards they do not meet. They greet new approaches as threats to
their own hard-won acquisition of folklore from magazines, books, and
loudmouth but popular coworkers. They retail war stories of old
coworkers and former posters in a deliberate attempt to off-topic tar
new targets by association.

So: **** your snap judgements. I have published on computer topics
since 1976. I developed compilers at Bell Northern Research. I
developed an oceangoing stability program which contributed materially
to the safety of vessels. Based on my C skills and interpersonal
skills I was asked at Princeton to assist John Nash. I published
"Build Your Own .Net Language and Compiler". I left the field when it
turned out to populated by creeps like Seebach, who have destroyed any
interest or challenge because they think it's cute to replace %s by
scanning for %, getting it wrong.
 
S

spinoza1111

I see.  Perhaps you could try to be a bit more grown up and just walk
away rather than resorting to school playground language.  Swearing at
people you disagree with is rarely the most effective way of getting
people to side with you.

I don't want incompetents like Richard Heathfield or Peter Seebach to
"side with me". Read Spinoza's ethics or Crito from Socrates' trial:
the wise do NOT suffer the company of fools.
Are you suggesting that all the negative reviews there are some sort of
conspiracy?

It is in fact well known that organized groups of people DO cooperate
in attacking books. This has happened for example to the British
physicist Stephen Wolfram: his 2002 A New Kind of Science was a
brilliant attempt to show the broad utility of cellular automata, and
he was assaulted systematically with negative reviews by other people
enraged at his accomplishment.
 
R

Rob Kendrick

I don't want incompetents like Richard Heathfield or Peter Seebach to
"side with me".

I didn't say you did. If you don't want *anybody* to side with you,
then posting here serves little purpose.
It is in fact well known that organized groups of people DO cooperate
in attacking books.

And your evidence for this happening to your book rather than
individuals independently expressing their displeasure is? Many of
them do appear to have actually read the book; each of them buying a
copy just to annoy you seems... odd.

B.
 
S

spinoza1111

Your book is deceptively named.  It should be called "Build your own
toy language using Visual Basic .Net".

Quick Basic is not a toy language. The interpretive compiler shipped
with the book consists of 26000 lines of code and happens to
demonstrate that .Net Basic is even less of a "toy language": in my
view Visual Basic .Net is a BETTER tool for compiler development than
C, which has far too many gotchas to be used for compiler development.
The reviews on Amazon for the book are enlightening reading, and I
suggest people take time out to take a peek at them.  use the .com
site; the .co.uk site only has a single review, and that's from spinny
himself.

The negative reviews started to appear, for the most part, just a few
years ago. Before that time, authors were treated with respect.
However, pimply little convenience store clerks and incompetent
programmers have discovered that they can use wikipedia, Amazon and
other open access sites to amplify their pathetic abilities by
attacking authors and real contributors based on procedure and
shibboleth, even as common thugs during the Cultural Revolution found
that they could destroy teachers.
 
S

spinoza1111

spinoza1111wrote:


Why would it do that?

I'm not certain, being the strange and monstrous combination of C
expert and lousy computer programmer that you are, but if "pointer to
void" is not a real data type, and if it should be avoided for the
most part, and since you are on record as being Mr. Picky-Picky, don't
you want your compiler to warn you that you have coded void * snoid?

It walks, it stumbles and it doth Lurch, crost the Heath
The Frankenstein monster, all are astonish'd and cry Good Grief
He knows all there is to know about the mysteries of C
But can't program properly, his code's a misery.
It uses size_t and returns an int to main
Yet somehow something's wrong, and gives the Wise a Pain:
For he is spilling bytes into a Receptacle
Not knowing how many, alas a order-"enn" Spectacle:
Able to admonish others on the use of "terminology"
Which he has mastered with swotting at the prison university,
He hath the letter which killeth but nought of the Spirit of Life:
And so everywhere he produceth not understanding but dismal murk, and
strife.
Herb is such a smoothie, and he writes so very clear
That this enrages Heathie boy, and fills him with secret fear:
Perhaps his career is nothing more than some sort of cosmic Joke
Better say something insulting to Navia, or give Nilges another Poke:
But the joke's on he, say we, with a Tee, a Hee, and Hee:
His linked list's a Coding Horror and altogether a Misery.
He doesn't participate in Massengill's learned discussion
For he's been there and done that, in his very own opinion.
The problem is that he has been there and on That he has Shat
Doing the job all wrong, like Seuss' Cat that was in Hat.
 
E

Ersek, Laszlo

Apparently though, unsigned long is still 32 bits even under 64 bit
versions of Visual C. That's indeed a very strange choice, but I
guess there was a compelling reason for it.

Yuck. So they can squeeze a long in an int, but not a pointer into a
long. This is none of ILP32, LP64, LPBIG. I'm curious what their off_t
is (if they have any).

http://www.unix.org/whitepapers/64bit.html

"The LLP64 data model preserves the relationship between int and long by
leaving both as 32-bit types. Data objects, such as structures, which do
not contain pointers will be the same size as on a 32-bit system. This
model is sometimes described as a 32-bit model with 64-bit addresses.
Most of the run-time problems associated with the assumptions between
the sizes of the data types are related to the assumption that a pointer
will fit in an int. To solve this class of problems, int or long
variables which should be 64-bits in length are changed to long long (or
int64), a non-standard data type. This data model is thus again
dependent on the introduction of a new data type. Again there is
potential for conflict with existing typedefs in applications."

Cheers,
lacos
 

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,102
Messages
2,570,645
Members
47,247
Latest member
GabrieleL2

Latest Threads

Top