Pedants

S

santosh

Richard said:
Why do you insist on waffling on about the obvious Santosh? Clearly we
can not look at the source if only the binary is there.


What comparative measurements? Comparative against what?


So, in less words "if it works its good". The binary testing will tell
you next to nothing about type safety assuming the numbers in the
tests fall into compatible ranges for example.

I would be interested to see what you think you are comparing against
here.

Take the case of two binary programs that are specified to do exactly
the same task and with identical interfaces. Further assume that both
were compiled by the same compiler program and with identical compiler
options (except for things like source file naming of course). We shall
also execute both the programs under as similar a condition as
possible.

Now if program A takes twice as long to perform some task as program B,
what does that suggest to us about their respective sources? If we
disassemble two functionally identical routines in both the programs
and we observe the following pseudo-assembler for program A:

LOAD r0, [BP + 8]
LOAD r1, 0
loop:
PUSH [r0 + r1]
CMP [SP], 0
JE ret
CALL _putchar
ADD SP, 1
INC r1
JUMP loop
ret:
ADD SP, 1
RET

and the following for program B:

PUSH stdout
PUSH [BP + 8]
CALL _fputs
ADD SP, 8
RET

What can you conclude about the source for the respective programs?

There are many other similar comparative measurements and examinations
of the binaries that can be done to suggest the possible nature of the
original source code, provided the conditions of translation and
execution were and are "similar enough."
 
S

santosh

CBFalconer said:
Well, his principal item is labelled as a 'C compiler', which has a
fairly strict published standard, casually known as the C99
standard. This gives us an easily applied criterion - simply
report all failures to comply with that C standard.

Bugs in the binary tell us about possible bugs in the source, which is
one indication of the "quality" of the source code, but beyond that one
needs to examine the disassembly of the program and examine it's
machine code and performance against a functionally identical,
identically compiled, "control" program, to say more about
the "quality" of the source code.
 
S

santosh

Malcolm said:
Often there is a tension between efficient and well-structured
programming.

So what exactly does it suggest?

I see your point. Efficiency (both speed and resources consumed) is one
aspect of "quality of code". With quite a bit of assumptions, you can
also make other statements about the source code from inspecting the
disassembly. See my reply to Richard Riley. But the complexity of the
compiler makes it virtually impossible to say anything more than a few
bare observations about the source.
 
I

Ian Collins

Joachim said:
Some simple rules when dealing with Jacob:

1. Don't attack Jacob, he takes it as personal offense
2. Don't criticize Jajob, he takes it as an attack, see 1.
3. Don't criticise any software Jacob developed, he takes it as personal
criticism, see 2.
4. Don't report bugs in software Jacob developed, he takes it as criticism,
see, 3.

In any case he'll feel personnally offended by any of the above mentioned
things. On top of that:

5. Better don't reply to anything Jacob writes, if there is the slightest
possibility that it might be interpreted in 2 ways, one of which may
possible offending, he'll for sure pick that interpretation and go balistic.
6. If you did reply to Jacob, don't fell offended, when he goes balistic and
calls you a liar for no good reason, this is his normal behavoir, just
ignore it, it's better for your health
7. Never ever expect Jacob ot appologize for any offense he did to you, so
far it never ever happened. Saves you from a disappointement, and is better
for your health.
You forgot

8. Even when proved wrong by example, we will never admit to being
wrong. See 1.
 
J

jacob navia

Bob said:
The intent is to emphasize that C is, without otherwise being modified, that
which is defined by ISO/IEC.

I find this well-known image appropriate when I see a posting about clearing
the screen, writing to the Windows registry, reading directories and other
such off-topic atrocities here in c.l.c:


Yeah sure.

C is ISO C. Posix doesn't exist. Windows doesn't exist, the
Mac doesn't exist.

Network programming? Off topic.
GUI programming? Off topic.

There isn't a single interesting software written in ISO C.

But you and your friends have succeeded in destroying this group.

Who posts here?

Students too lazy to do their homework.
Regulars speaking about their favorite subject:

int main (void);

All people with an interest in language development, software
development are gone. You won. All people with a real interest
in developing the language are gone.

C is seen as a dead language that only students learning to program
or die hards, outmoded, old programmers use.

Any discussion about language development is killed. C++ is the
way, C is dead, go away. Let's go on forever insisting in

void main(void);

THAT is important.

ISO C is the best of all worlds. Long live gets() asctime() and other
ABOMINATIONS!!!

Compared to that PILE OF SHIT the registry hacks are NOTHING my
friend.
 
J

jacob navia

santosh said:
I see your point. Efficiency (both speed and resources consumed) is one
aspect of "quality of code".

Lcc-win is the smallest compiler system in the C world.
It is around 5 times faster than gcc in compilation
time, and in execution time it is approx 75-85% of the
speed of the gcc generated code.

This are facts. Easily measurable by anyone.
 
J

jacob navia

Richard said:
jacob navia said:


If the program doesn't have to work properly, I can easily write a compiler
system that is a thousand times smaller than yours and a thousand times
faster. There is more to quality than speed and size.

If you have nothing to say. Please do not say it here.

The "pedantic" flag is no longer supported, and if you invoke

lcc -pedantic pedantic.c

you get:

"Pedants are no longer supported!"

and the program exits!

:)

Obviously the fact that lcc-win is much faster than gcc
or other compilers doesn't count. What counts is if it
supports c89 or maybe another more obsolete version of the language.
 
B

Bartc

Richard Heathfield said:
jacob navia said:


If the program doesn't have to work properly, I can easily write a
compiler
system that is a thousand times smaller than yours and a thousand times
faster. There is more to quality than speed and size.

I think you're being too hard on this compiler (which I happen to use in
preference to half-a-dozen others).

You seem to be saying that a product has to be 100% perfect or it's not
worth bothering with. Surely many other compilers at some point must have
been less than 100%, but if people simply walked away from them, they would
never have progressed.

This particular problem, using -pedantic switch on math.h in lccwin: if you
look at gcc's math.h (3.4.5 or 4.3.1):

#if __GNUC__ >= 3
#pragma GCC system_header
#endif

It sort of looks like gcc had to do use some hackery in order to compile
system headers without generating errors or warnings. It also looks like gcc
versions before 3.0 may have had similar problems to lcc-win...
 
B

Ben Bacarisse

Richard said:
"Malcolm McLean" <[email protected]> writes:

Yes.

Does it work and do the job it says it does?

Simple really.

That you think this is simple suggests (as I have thought before)
that we think about software in totally different ways.

A compiler is quite complex, but given a year (maybe even 6 months) of
careful study of the source code, test cases and debugging runs I
could probably get reasonably confident that a purported C compiler
did or did not do what it was supposed to do.

If the software has lots of bugs, then one can find them by random
testing, but given a very good (but still possibly faulty) compiler, I
don't think I could gain the same degree of confidence from a year's
testing. There is a real philosophical issue here: the static
comprehension of a program's text is easier than the enumeration of
its behaviour.

Even knowing what a program is supposed to do is far from simple. It
is particularly problematic in this case: I don't think there is any
statement of what the compiler (lcc-win32) should do, so how can one
even start? There are some basics one might assume, but then what? I
have asked for clarification and got none. I think Jacob prefers the
specification of what lcc-win32 does to be left vague. This makes it
very hard to know if it "does the job it says it does".

Case in point, is lcc-win32's treatment of:

#include <stdio.h>

void f(int n, int a[n][n])
{
printf("%d\n", a[2][2]);
}

int main(void)
{
int A[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
f(3, A);
}

"doing the job is says it does"? You get a diagnostic: "Warning
vla-b2.c: 11 assignment of pointer to array 3 of int to pointer to
array 4 of int" and the resulting binary prints "4198554". Where does
one go to find out what the above program should do under the compiler
in question? A C90 compiler is permitted to do almost anything it
likes with this code and a C99 one should print "9", I think, but we
don't know what sort of non-C99 lcc-win32 is.

I don't think it is fair to call anything like this a bug since there
is no claim to conformance.
 
K

Keith Thompson

jacob navia said:
The "pedantic" flag is no longer supported,
[snip]

Then why the HELL didn't you just say that in response to the original
question? Sheesh.
 
S

santosh

jacob navia wrote:

The "pedantic" flag is no longer supported, and if you invoke

You should have removed mention of the flag in win-lcc's usage message
as soon as you stopped support for the flag.

Version 3.8 of win-lcc compiled on March 2008 accepts the pedantic flag
without any mention that it is not supported.
lcc -pedantic pedantic.c

you get:

"Pedants are no longer supported!"

So I updated my win-lcc installation to the latest binaries and sure
enough, I get this silly message of yours. IMHO, you should remove this
message and replace it with the default one ("Warning N Ignoring
unknown option '-pedantic') to maintain professionalism.
and the program exits!

Which it shouldn't do, at least in this case. IMHO it should print a
message that it is ignoring the said option and continue translation.

IMHO, you are affecting the professional image of your product by such
reactionary tactics.
Obviously the fact that lcc-win is much faster than gcc
or other compilers doesn't count.

With machines these days, compiler speed is not as important as it's
other abilities. Compiler correctness is especially critical, since it
has the potential to make or break other programs.

<snip>
 
A

Antoninus Twink

jacob navia said:
[extremely incisive analysis of clc]
If you think comp.lang.c is a total loss, why post here?

You don't get it, do you Heathfield? You aren't the absolute monarch of
clc anywhere except in your own mind. Those of us who won't bow the knee
to your topicality tyrrany aren't just going to give up on clc, because
it has the potential to be such a useful resource for real-world C
programmers.

You and your cronies and lackies can shout and scream, you can try to
bore us to death with "off topic, not portable, don't top post, blah
blah blah" day after day, you can bully and harangue us... but clc IS
NOT your personal fiefdom, and you can't stop us discussing C here.
We're not going to roll over and die.

As it happens, I think there are signs that the tide is slowly turning.
As the months pass, there are more and more people who dare to stick
their heads above the parapet and provide "off topic" answers to
questions. The atmosphere is slowly improving for newbies (at least now
most newbies' posts get at least one friendly answer, even if they also
get half a dozen flames)... The Roman Empire fell, and Heathfield's
empire won't last forever either.
 
A

Antoninus Twink

Some simple rules when dealing with Jacob:

1. Don't attack Jacob, he takes it as personal offense
[snip pages of nonsense like this]

On the contrary, Jacob responds politely to polite questions. Witness
his patience in the recent "Eddie" thread (another Heathfield
sock-puppet?).

You can hardly blame him for being a bit sensitive when Heathfield is
conducting a sustained campaign of character assassination against him
that any decent person would be ashamed to have any part of (I wonder if
he'd be so obnoxious IRL - they often say that people can be monsters
across the internet because they're talking to words not people). And
not just Heathfield, but a whole gang of them who egg each other on into
posting more and more unpleasant things about Jacob - Mackintyre, "Old
Wolf", "Mr Teapot", more names than I can remember...
 
A

Antoninus Twink

Not in comp.lang.c, no, where we discuss the language, not implementations
thereof. If you want to race compilers, please do it in a newsgroup where
it's topical.

Is your memory so short that you don't remember this thread, only six
weeks ago:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/82aa53ec428697ee#

In it you yourself "race" not even two C compilers, but a C compiler vs.
a C++ compiler vs. a Java compiler.

But of course there's no hypocrisy here. Of course it's not one rule for
you and another for Jacob. Of course not.
 
J

Jens Thoms Toerring

Antoninus Twink said:
jacob navia said:
[extremely incisive analysis of clc]
If you think comp.lang.c is a total loss, why post here?
You don't get it, do you Heathfield? You aren't the absolute monarch of
clc anywhere except in your own mind. Those of us who won't bow the knee
to your topicality tyrrany aren't just going to give up on clc, because
it has the potential to be such a useful resource for real-world C
programmers.
You and your cronies and lackies can shout and scream, you can try to
bore us to death with "off topic, not portable, don't top post, blah
blah blah" day after day, you can bully and harangue us... but clc IS
NOT your personal fiefdom, and you can't stop us discussing C here.
We're not going to roll over and die.
As it happens, I think there are signs that the tide is slowly turning.
As the months pass, there are more and more people who dare to stick
their heads above the parapet and provide "off topic" answers to
questions. The atmosphere is slowly improving for newbies (at least now
most newbies' posts get at least one friendly answer, even if they also
get half a dozen flames)... The Roman Empire fell, and Heathfield's
empire won't last forever either.

You seem to be a hopeless case. This group is about C, not every-
thing that was ever written in some dialect resembling C. And
it's not for system specific extensions, there are other groups
that are dedicated to those topics for a reason. Redirecting
people to those groups isn't unfriendly but the only reasonable
thing to do. Your kind of "friendliness" is lik giving a child
the cleaner fluid to drink just because it asked for and might
throws a tantrum instead of telling it not to drink it and ex-
plaining why.

I for one came originally to comp.lang.c after having gotten
bitten badly by not being able to distinguish what's C and
what are system specific extensions. I learned here what the
difference is and how to spot such probems since people took
the time to explain it clearly and in detail (if necessary
even being a bit pedantic - but non-pedantic programmers tend
to be bad programmers and we already have too many of those).

With your "we discuss everything here that ever was written
in anything that somehow resembles C" approach you try to
kill exactly what makes clc worth reading. If you would get
away with it it would become another completely useless place
where it's impossible to get relevant informations and where
the people that actually know their stuff leave in disgust.
There are already much too many newsgroups that suffered this
fate since nobody tried to maintain topicality.

But whom I am telling this. Someone who seems to write at least
20 to 30 poests a day (with a record at over 50 a day over a
months period) for sure wont have time for thinking. Consider
yourself finally plonked together with the other two assholes.
Three quartes of what you write is whining and of the rest a
big part is wrong or misleading. Perhaps you should start to
learn a bit more about C before you try to prescribe what is
to be discussed here.
 
K

Kenny McCormack

Is your memory so short that you don't remember this thread, only six
weeks ago:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/82aa53ec428697ee#

In it you yourself "race" not even two C compilers, but a C compiler vs.
a C++ compiler vs. a Java compiler.

But of course there's no hypocrisy here. Of course it's not one rule for
you and another for Jacob. Of course not.

My personal view is that it is not really hypocrisy when there is no
actual assumption of equality. The CLC regs have, collectively stated
(explicitly) that they are not bound by the same topicality rules that
they enforce on others (non-regs). You can do the Google on this; it
will not be hard to find explicit statements to this effect.

Think of this as being like the way cops drive - in non-emergency
situations. We all know they drive like lunatics - because they can -
and no one is going to even think of it as "hypocritical" when they
issue tickets to people for doing the same things they routinely do.
It goes with the job, as they say.
 
K

Keith Thompson

You seem to be a hopeless case.
[snip]

Of *course* he's a hopeless case. AT is a troll, nothing more,
nothing less. Responding to him only encourages him to continue
trolling.
 
J

Joachim Schmitz

Antoninus said:
Some simple rules when dealing with Jacob:

1. Don't attack Jacob, he takes it as personal offense
[snip pages of nonsense like this]

On the contrary, Jacob responds politely to polite questions. Witness
his patience in the recent "Eddie" thread (another Heathfield
sock-puppet?).
Show polite reples of Jacob to bug reports, start with just one!

RH isn't using win-lcc (he says, and I have no reason to not believe that),
so none of the bug reports came from him.
You can hardly blame him for being a bit sensitive when Heathfield is
conducting a sustained campaign of character assassination against him
that any decent person would be ashamed to have any part of (I wonder
if he'd be so obnoxious IRL - they often say that people can be
monsters across the internet because they're talking to words not
people). And not just Heathfield, but a whole gang of them who egg
each other on into posting more and more unpleasant things about
Jacob - Mackintyre, "Old Wolf", "Mr Teapot", more names than I can
remember...

Bye, Jojo
 
A

Antoninus Twink

Show polite reples of Jacob to bug reports, start with just one!

Besides the thread mentioned in my quotes, here are a couple from this
year:
http://groups.google.com/group/comp.compilers.lcc/browse_frm/thread/191a54fa4ec2701e
http://groups.google.com/group/comp.compilers.lcc/browse_frm/thread/df047137e694c128
RH isn't using win-lcc (he says, and I have no reason to not believe that),
so none of the bug reports came from him.

Yes, it's a matter of speculation and there's no firm evidence. But you
have to agree it's a bit suspicious that, while Heathfield is waging his
nasty guerilla war against Jacob, there's a continual drip-drip of
aggressive anti-lccwin posters who start threads then disappear once the
shit is flying.
 
J

jacob navia

Joachim said:
Show polite reples of Jacob to bug reports, start with just one!

RH isn't using win-lcc (he says, and I have no reason to not believe that),
so none of the bug reports came from him.

Those aren't bug reports. The regulars insisted in their stupid
pedantic stuff and I added a flag to please them.


Instead of filing a bug report, they laugh at me with their
"new to c" posts:

What happens? Am I doing something wrong?

Then Heathfield starts saying that my compiler is useless, etc.

What have you done for the community Mr Schmitz?

Is there any program from you *I* can laugh at?

No. Not even that. Nothing. Like your friend Heathfield.
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top