Pedants | |
Dear pedantic user
What is a pedant?
According to dictionary.com you are:
1. a person who makes an excessive or inappropriate display of learning.
2. a person who overemphasizes rules or minor details.
3. a person who adheres rigidly to book knowledge without regard to
common sense.
I am very glad that this flag, done for people like you
works as expected.
My compiler system is not for pedants, so you can stop using it
and get a compiler that suits your pedantic needs. Many pedants
here (this group has a lot of them) will point you to their
favorite software.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
jacob navia wrote: Quote:
Dear pedantic user
>
What is a pedant?
>
According to dictionary.com you are:
>
1. a person who makes an excessive or inappropriate display of learning.
2. a person who overemphasizes rules or minor details.
3. a person who adheres rigidly to book knowledge without regard to
common sense.
>
I am very glad that this flag, done for people like you
works as expected.
>
My compiler system is not for pedants, so you can stop using it
and get a compiler that suits your pedantic needs. Many pedants
here (this group has a lot of them) will point you to their
favorite software.
>
>
>
This message should have been sent to the
"Is pedantic a bad flag"
thread...
But anyway, forget it, it is not worth the effort
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
On Jun 21, 1:19 pm, jacob navia <ja...@nospam.comwrote: Quote:
jacob navia wrote: Quote:
Dear pedantic user
> > Quote:
According to dictionary.com you are:
> Quote:
1. a person who makes an excessive or inappropriate display of learning.
2. a person who overemphasizes rules or minor details.
3. a person who adheres rigidly to book knowledge without regard to
common sense.
> Quote:
I am very glad that this flag, done for people like you
works as expected.
> Quote:
My compiler system is not for pedants, so you can stop using it
and get a compiler that suits your pedantic needs. Many pedants
here (this group has a lot of them) will point you to their
favorite software.
>
This message should have been sent to the
"Is pedantic a bad flag"
thread...
>
But anyway, forget it, it is not worth the effort
I think the person who made the thread is on purpose making threads
about bugs with little importance in your compiler system.
But it would be wiser to ignore the bait and just fix the bugs. | | | | re: Pedants
jacob navia skrev: Quote:
My compiler system is not for pedants, so you can stop using it
and get a compiler that suits your pedantic needs. Many pedants
here (this group has a lot of them) will point you to their
favorite software.
I find it odd that a C compiler maintainer, care more for his HTML, than
his C code. http://www.cs.virginia.edu/~lcc-win32/ validate to HTML 4.01 Strict!:
Congratulations
The document located at <http://www.cs.virginia.edu/~lcc-win32/ was
checked and found to be valid HTML 4.01 Strict. This means that the
resource in question identified itself as "HTML 4.01 Strict" and that we
successfully performed a formal validation using an SGML or XML Parser
(depending on the markup language used).
"valid" Icon(s) on your Web page
To show your readers that you have taken the care to create an
interoperable Web page, you may display this icon on any page that
validates. Here is the HTML you could use to add this icon to your Web
page:
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z> | | | | re: Pedants
jacob navia said: Quote:
Dear pedantic user
>
What is a pedant?
>
According to dictionary.com you are:
>
1. a person who makes an excessive or inappropriate display of learning.
2. a person who overemphasizes rules or minor details.
3. a person who adheres rigidly to book knowledge without regard to
common sense.
Note that dictionary.com is non-normative.
In comp.lang.c, the word "pedant" tends to be used to describe someone who
cares about getting it right, by someone who doesn't.
In that sense, you are using it correctly.
<snip>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
jacob navia wrote: Quote:
>
Dear pedantic user
>
What is a pedant?
>
According to dictionary.com you are:
>
1. a person who makes an excessive or inappropriate display of
learning.
2. a person who overemphasizes rules or minor details.
3. a person who adheres rigidly to book knowledge without regard
to common sense.
>
I am very glad that this flag, done for people like you
works as expected.
>
My compiler system is not for pedants, so you can stop using it
and get a compiler that suits your pedantic needs. Many pedants
here (this group has a lot of them) will point you to their
favorite software.
Excellent. Very amusing.
However, we need to point out that the pedantic beast is not the
probrammer, but the compiler. That poor compiler is stolidly
insisting that the code it compiles be written to match the demands
of the C standard. This has the side-effect of ensuring that the
code actually performs as desired. In most cases this matches the
conscious desires of the programmer.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com ** | | | | re: Pedants
CBFalconer wrote: Quote:
jacob navia wrote: Quote:
>Dear pedantic user
>>
>What is a pedant?
>>
>According to dictionary.com you are:
>>
>1. a person who makes an excessive or inappropriate display of
> learning.
>2. a person who overemphasizes rules or minor details.
>3. a person who adheres rigidly to book knowledge without regard
> to common sense.
>>
>I am very glad that this flag, done for people like you
>works as expected.
>>
>My compiler system is not for pedants, so you can stop using it
>and get a compiler that suits your pedantic needs. Many pedants
>here (this group has a lot of them) will point you to their
>favorite software.
>
Excellent. Very amusing.
>
However, we need to point out that the pedantic beast is not the
probrammer, but the compiler. That poor compiler is stolidly
insisting that the code it compiles be written to match the demands
of the C standard. This has the side-effect of ensuring that the
code actually performs as desired. In most cases this matches the
conscious desires of the programmer.
>
Yes yes Mr PEDANT.
Obviously it suffices to conform to ISO C and your
program will "perform as desired". Of course.
3. a person who adheres rigidly to book knowledge without regard
to common sense.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
Richard Heathfield wrote: Quote:
jacob navia said:
> Quote:
>Dear pedantic user
>>
>What is a pedant?
>>
>According to dictionary.com you are:
>>
>1. a person who makes an excessive or inappropriate display of learning.
>2. a person who overemphasizes rules or minor details.
>3. a person who adheres rigidly to book knowledge without regard to
>common sense.
>
Note that dictionary.com is non-normative.
>
In comp.lang.c, the word "pedant" tends to be used to describe someone who
cares about getting it right, by someone who doesn't.
>
In that sense, you are using it correctly.
>
<snip>
>
1. a person who makes an excessive or inappropriate display of learning.
2. a person who overemphasizes rules or minor details.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
jacob navia <jacob@nospam.comwrites: Quote:
Dear pedantic user
Dear Jacob What is the -pedantic flag? As far as I can see you don't document
the use of it. As such, you can hardly have faced an easier bug to
fix -- just report "bad flag" and ignore it. Of course, if you
intended it to do something then you have a bigger problem.
Rather than getting hot under the collar about it, I think the users
of your compiler would be better served by a simple statement of
intent: accepting the flag is either a simple bug (which you can fix
in about a minute) or you do intend to offer some sort of more
rigorous checking mode and you plan to get it working soon. Would it
not have been simpler just to say which is the case?
--
Ben. | | | | re: Pedants
Ben Bacarisse wrote: Quote:
jacob navia <jacob@nospam.comwrites:
> Quote:
>Dear pedantic user
>
Dear Jacob
> Quote:
>What is a pedant?
>
What is the -pedantic flag? As far as I can see you don't document
the use of it. As such, you can hardly have faced an easier bug to
fix -- just report "bad flag" and ignore it. Of course, if you
intended it to do something then you have a bigger problem.
>
Rather than getting hot under the collar about it, I think the users
of your compiler would be better served by a simple statement of
intent: accepting the flag is either a simple bug (which you can fix
in about a minute) or you do intend to offer some sort of more
rigorous checking mode and you plan to get it working soon. Would it
not have been simpler just to say which is the case?
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.
This should really be added to the CLC FAQ.
Sad, but apparently true...
Bye, Jojo | | | | re: Pedants
Joachim Schmitz said:
<snip> Quote:
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.
<etc snipped>
Some simple rules when dealing with critics:
1. If they're criticising your C code, listen to them, make sure they're
right, and - if they are - fix the code.
2. Don't forget to thank them for educating them.
3. If you can't stand your code being criticised, don't write any.
Jacob Navia is not immune to criticism just because he doesn't know how to
handle it properly. One day, he will learn that criticism is good and
useful. Until then, his rants and raves will no doubt continue, but so
what?
<snip>
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
Richard Heathfield wrote: Quote:
Some simple rules when dealing with critics:
>
1. If they're criticising your C code, listen to them, make sure
they're right, and - if they are - fix the code.
Guess you meant "make sure _whether_ they are right", otherwise you may need
to introduce bugs just to make them being right 8-) Quote:
2. Don't forget to thank them for educating them.
guess you meant: "educating _you_" Quote:
3. If you can't stand your code being criticised, don't write any.
guess you mean: "don't _publish_ any" Quote:
Jacob Navia is not immune to criticism just because he doesn't know
how to handle it properly. One day, he will learn that criticism is
good and useful.
hope dies last, doesn't it?
Bye, Jojo | | | | re: Pedants
"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrites: Quote:
Richard Heathfield wrote: Quote:
>Some simple rules when dealing with critics:
>>
>1. If they're criticising your C code, listen to them, make sure
>they're right, and - if they are - fix the code.
Guess you meant "make sure _whether_ they are right", otherwise you may need
to introduce bugs just to make them being right 8-)
> Quote:
>2. Don't forget to thank them for educating them.
guess you meant: "educating _you_"
> Quote:
>3. If you can't stand your code being criticised, don't write any.
guess you mean: "don't _publish_ any"
> Quote:
>Jacob Navia is not immune to criticism just because he doesn't know
>how to handle it properly. One day, he will learn that criticism is
>good and useful.
hope dies last, doesn't it?
>
Bye, Jojo
Smashing job there of being a pedant over Heathfield's pompous pedantry,
advice giving and general lording it. | | | | re: Pedants
Joachim Schmitz said: Quote:
Richard Heathfield wrote: Quote:
>Some simple rules when dealing with critics:
>>
>1. If they're criticising your C code, listen to them, make sure
>they're right, and - if they are - fix the code.
Guess you meant "make sure _whether_ they are right", otherwise you may
need to introduce bugs just to make them being right 8-)
I presume you meant "be right", rather than "being right". :-) Quote: Quote:
>2. Don't forget to thank them for educating them.
guess you meant: "educating _you_"
I did, yes. Thanks. Quote:
> Quote:
>3. If you can't stand your code being criticised, don't write any.
guess you mean: "don't _publish_ any"
No, I meant "don't write any". Because if you write some code, you'll want
to write some more (programming is very more-ish), and then you'll write
even more, and sooner or later you'll get to the point where you think
you're pretty good, and then some day you'll want to show someone your
stuff. And then they'll criticise it. And that would be just awful, right? Quote: Quote:
>Jacob Navia is not immune to criticism just because he doesn't know
>how to handle it properly. One day, he will learn that criticism is
>good and useful.
hope dies last, doesn't it?
As Doctor Johnson said of a second marriage, "it is the triumph of hope
over experience".
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
jacob navia wrote: <snip> Quote:
Yes yes Mr PEDANT.
[ ... ]
Why not answer to the post that started all this jacob? If not to "new
to c" (another anonymous "win-lcc troll" I suppose, though they could
be genuine), then at least to the group at large, many of whose lurkers
might well be using win-lcc. Are the "error" messages claimed by the OP
correct? Is this a bug or feature of win-lcc? Does it accept
the '-pedantic' flag? If not, why does it not print a "Unknown command
option" diagnostic? | | | | re: Pedants
In article <g3ik4r$q0s$1@aioe.org>, jacob navia <jacob@nospam.orgwrote: Quote:
>Dear pedantic user
Quote:
>What is a pedant?
Quote:
>According to dictionary.com you are:
Quote:
>1. a person who makes an excessive or inappropriate display of learning.
>2. a person who overemphasizes rules or minor details.
>3. a person who adheres rigidly to book knowledge without regard to
>common sense.
Quote:
>I am very glad that this flag, done for people like you
>works as expected.
"They like me. They really like me!"
--
"There's no term to the work of a scientist." -- Walter Reisch | | | | re: Pedants
Richard Heathfield wrote: Quote:
Joachim Schmitz said:
> Quote:
>Richard Heathfield wrote: Quote:
>>Some simple rules when dealing with critics:
>>>
>>1. If they're criticising your C code, listen to them, make sure
>>they're right, and - if they are - fix the code.
>Guess you meant "make sure _whether_ they are right", otherwise you
>may need to introduce bugs just to make them being right 8-)
>
I presume you meant "be right", rather than "being right". :-)
Tribute to english not being my native language Quote: Quote: Quote:
>>2. Don't forget to thank them for educating them.
>guess you meant: "educating _you_"
>
I did, yes. Thanks.
> Quote:
>> Quote:
>>3. If you can't stand your code being criticised, don't write any.
>guess you mean: "don't _publish_ any"
>
No, I meant "don't write any". Because if you write some code, you'll
want to write some more (programming is very more-ish), and then
you'll write even more, and sooner or later you'll get to the point
where you think you're pretty good, and then some day you'll want to
show someone your stuff. And then they'll criticise it. And that
would be just awful, right?
However: the criticism starts only when you publish Quote: Quote: Quote:
>>Jacob Navia is not immune to criticism just because he doesn't know
>>how to handle it properly. One day, he will learn that criticism is
>>good and useful.
>hope dies last, doesn't it?
>
As Doctor Johnson said of a second marriage, "it is the triumph of
hope over experience".
Great 8-), guess I'll steal and use that sooner or later...
Bye, Jojo | | | | re: Pedants
"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message n Quote:
Richard Heathfield wrote: Quote:
>Joachim Schmitz said:
>>
>>
>No, I meant "don't write any". Because if you write some code, you'll
>want to write some more (programming is very more-ish), and then
>you'll write even more, and sooner or later you'll get to the point
>where you think you're pretty good, and then some day you'll want to
>show someone your stuff. And then they'll criticise it. And that
>would be just awful, right?
However: the criticism starts only when you publish
>
However Jacob publishes only his binaries. I can't actually remember seeing
any C source by him. He's not one of those people who, like me, are
constantly providing little snippetts.
Which leads us to a philosophical point. Can we tell the quality of code
purely from the binaries?
--
Free games and programming goodies. http://www.personal.leeds.ac.uk/~bgy1mm | | | | re: Pedants
"Malcolm McLean" <regniztar@btinternet.comwrites: Quote:
"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message n Quote:
>Richard Heathfield wrote: Quote:
>>Joachim Schmitz said:
>>>
>>>
>>No, I meant "don't write any". Because if you write some code, you'll
>>want to write some more (programming is very more-ish), and then
>>you'll write even more, and sooner or later you'll get to the point
>>where you think you're pretty good, and then some day you'll want to
>>show someone your stuff. And then they'll criticise it. And that
>>would be just awful, right?
>However: the criticism starts only when you publish
>>
However Jacob publishes only his binaries. I can't actually remember
seeing any C source by him. He's not one of those people who, like me,
are constantly providing little snippetts.
>
Which leads us to a philosophical point. Can we tell the quality of
code purely from the binaries?
Yes.
Does it work and do the job it says it does?
Simple really. | | | | re: Pedants
Malcolm McLean wrote: Quote:
"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message n Quote:
>Richard Heathfield wrote: Quote:
>>Joachim Schmitz said:
>>>
>>>
>>No, I meant "don't write any". Because if you write some code,
>>you'll want to write some more (programming is very more-ish), and
>>then you'll write even more, and sooner or later you'll get to the
>>point where you think you're pretty good, and then some day you'll
>>want to show someone your stuff. And then they'll criticise it. And
>>that would be just awful, right?
>However: the criticism starts only when you publish
>>
However Jacob publishes only his binaries. I can't actually remember
seeing any C source by him. He's not one of those people who, like me,
are constantly providing little snippetts.
However I recall him posting various minor snippets of code
occasionally, mainly from his standard library. In the past he used to
post code more often than he does these days. Quote:
Which leads us to a philosophical point. Can we tell the quality of
code purely from the binaries?
We must first define what we mean by "quality of code", and this is not
a simple job, as the difference between the source of various versions
of functionally identical programs is largely a subjective matter,
IMHO.
If the binary happens to do correctly all that it is specified to do
under reasonable conditions, then we can say that the binary
is "working", but we still can't say anything much about the source
from examining the machine code. We can attempt a decompilation, but
the resulting source is hardly likely to be better than travesty of the
original source.
Still examining the binary versions of program under a debugger and
under various "stress" conditions, and taking comparative measurements
can enable is to state many objective statements about the machine
code. If the machine code for both the binaries was derived from the
same compiler under the same switches, then differences can be safely
attributed to the source from which it was compiled. | | | | re: Pedants
santosh <santosh.k83@gmail.comwrites: Quote:
Malcolm McLean wrote:
> Quote:
>"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message n Quote:
>>Richard Heathfield wrote:
>>>Joachim Schmitz said:
>>>>
>>>>
>>>No, I meant "don't write any". Because if you write some code,
>>>you'll want to write some more (programming is very more-ish), and
>>>then you'll write even more, and sooner or later you'll get to the
>>>point where you think you're pretty good, and then some day you'll
>>>want to show someone your stuff. And then they'll criticise it. And
>>>that would be just awful, right?
>>However: the criticism starts only when you publish
>>>
>However Jacob publishes only his binaries. I can't actually remember
>seeing any C source by him. He's not one of those people who, like me,
>are constantly providing little snippetts.
>
However I recall him posting various minor snippets of code
occasionally, mainly from his standard library. In the past he used to
post code more often than he does these days.
> Quote:
>Which leads us to a philosophical point. Can we tell the quality of
>code purely from the binaries?
>
We must first define what we mean by "quality of code", and this is not
a simple job, as the difference between the source of various versions
of functionally identical programs is largely a subjective matter,
IMHO.
>
If the binary happens to do correctly all that it is specified to do
under reasonable conditions, then we can say that the binary
is "working", but we still can't say anything much about the source
from examining the machine code. We can attempt a decompilation, but
the resulting source is hardly likely to be better than travesty of the
original source.
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. Quote:
>
Still examining the binary versions of program under a debugger and
under various "stress" conditions, and taking comparative measurements
What comparative measurements? Comparative against what? Quote:
can enable is to state many objective statements about the machine
code. If the machine code for both the binaries was derived from the
same compiler under the same switches, then differences can be safely
attributed to the source from which it was compiled.
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. | | | | re: Pedants
Malcolm McLean skrev: Quote:
Which leads us to a philosophical point. Can we tell the quality of code
purely from the binaries?
Yup, black box testing can detect quite a number of defects. For C
compilers, Perennial & Plum Hall has validation test suits, mandatory
for UNIX 03 certification.
A C compiler, is like a batch program... I find lots of programs harder
to test than "batch" like programs. :)
Code review, in particular when done here, is also an interesting
experience, not to be recommended for certain category of "professionals".
From a security point of view, using a closed source compiler which
hasn't gone through external code review, is a potential security risk
-- as there can be a trojan horse injected in the compiled programs.
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z> | | | | re: Pedants
"Richard" <rgrdev@gmail.comschreef in bericht
news:g3j9k7$f69$5@registered.motzarella.org... Quote:
santosh <santosh.k83@gmail.comwrites:
> Quote:
>Malcolm McLean wrote:
>> Quote:
>>"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message n
>>>Richard Heathfield wrote:
>>>>Joachim Schmitz said:
>>>>>
>>>>>
>>>>No, I meant "don't write any". Because if you write some code,
>>>>you'll want to write some more (programming is very more-ish), and
>>>>then you'll write even more, and sooner or later you'll get to the
>>>>point where you think you're pretty good, and then some day you'll
>>>>want to show someone your stuff. And then they'll criticise it. And
>>>>that would be just awful, right?
>>>However: the criticism starts only when you publish
>>>>
>>However Jacob publishes only his binaries. I can't actually remember
>>seeing any C source by him. He's not one of those people who, like me,
>>are constantly providing little snippetts.
>>
>However I recall him posting various minor snippets of code
>occasionally, mainly from his standard library. In the past he used to
>post code more often than he does these days.
>> Quote:
>>Which leads us to a philosophical point. Can we tell the quality of
>>code purely from the binaries?
>>
>We must first define what we mean by "quality of code", and this is not
>a simple job, as the difference between the source of various versions
>of functionally identical programs is largely a subjective matter,
>IMHO.
>>
>If the binary happens to do correctly all that it is specified to do
>under reasonable conditions, then we can say that the binary
>is "working", but we still can't say anything much about the source
>from examining the machine code. We can attempt a decompilation, but
>the resulting source is hardly likely to be better than travesty of the
>original source.
>
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.
> Quote:
>>
>Still examining the binary versions of program under a debugger and
>under various "stress" conditions, and taking comparative measurements
>
What comparative measurements? Comparative against what?
> Quote:
>can enable is to state many objective statements about the machine
>code. If the machine code for both the binaries was derived from the
>same compiler under the same switches, then differences can be safely
>attributed to the source from which it was compiled.
>
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.
Take the case of the -pedantic flag not working with math.h. It doesnt say
anything about the quality of the code, it only says something about the
size of compiler system software and the lack of automated testing. | | | | re: Pedants
"Tor Rustad" <tor_rustad@hotmail.comwrote in message
news:08qdneqrndhmt8DVRVnzvQA@telenor.com... Quote:
Malcolm McLean skrev:
> Quote:
>Which leads us to a philosophical point. Can we tell the quality of code
>purely from the binaries?
Quote:
From a security point of view, using a closed source compiler which hasn't
gone through external code review, is a potential security risk -- as
there can be a trojan horse injected in the compiled programs.
So you have some compiler source, which you then presumably have to compile
with another binary, which must also be open source...
So where do you start? It seems that at some point you need to use a trusted
binary.
--
bartc | | | | re: Pedants
Bartc wrote: Quote:
>
"Tor Rustad" <tor_rustad@hotmail.comwrote in message
news:08qdneqrndhmt8DVRVnzvQA@telenor.com... Quote:
>Malcolm McLean skrev:
>> Quote:
>>Which leads us to a philosophical point. Can we tell the quality of
>>code purely from the binaries?
> Quote:
>From a security point of view, using a closed source compiler which
>hasn't gone through external code review, is a potential security
>risk -- as there can be a trojan horse injected in the compiled
>programs.
>
So you have some compiler source, which you then presumably have to
compile with another binary, which must also be open source...
>
So where do you start? It seems that at some point you need to use a
trusted binary.
No need. The BIOS could be open source and the hardware specs could also
be open source. This way nothing inside the computer is beyond
understanding, but this is not commonly the case. An average PC
contains tons of closed source firmware, which *could* do subversive
things, even if the OS and applications were to be open source.
Also even if a program is open source, to be absolutely sure, you need
to check the complete source for the program and compile it yourself.
Otherwise there is no guarantee that a binary of an "open source"
program that you download and use does not contain components in
additions to it's published source base. | | | | re: Pedants
Bartc skrev: Quote:
"Tor Rustad" <tor_rustad@hotmail.comwrote in message
news:08qdneqrndhmt8DVRVnzvQA@telenor.com... Quote:
>Malcolm McLean skrev:
>> Quote:
>>Which leads us to a philosophical point. Can we tell the quality of code
>>purely from the binaries?
> Quote:
>From a security point of view, using a closed source compiler which hasn't
>gone through external code review, is a potential security risk -- as
>there can be a trojan horse injected in the compiled programs.
>
So you have some compiler source, which you then presumably have to compile
with another binary, which must also be open source...
>
So where do you start? It seems that at some point you need to use a trusted
binary.
Thompson has a classic paper on the subject, I would rank his compiler
hack among the top 10 of all time.
We simply trust major organizations to have sufficient QA to detect
injection of trojans. I believe there was a case some years ago, when
someone had injected a backdoor in the GNU GCC sources, which was
detected by the public.
Lots of people argue compilers should be banned from production systems,
but I can't agree with this. Test systems has less trust, and if someone
is able to modify the compiler there, and it is used to build production
programs, the attacker/insider can be able to get access to higher
privilege level, without being authorized for it.
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z> | | | | re: Pedants
In message <b9a7k.13364$E41.4308@text.news.virginmedia.com> , Bartc
<bc@freeuk.comwrites Quote:
>
>"Tor Rustad" <tor_rustad@hotmail.comwrote in message
>news:08qdneqrndhmt8DVRVnzvQA@telenor.com... Quote:
>Malcolm McLean skrev:
>> Quote:
>>Which leads us to a philosophical point. Can we tell the quality of code
>>purely from the binaries?
> Quote:
>From a security point of view, using a closed source compiler which hasn't
>gone through external code review, is a potential security risk -- as
>there can be a trojan horse injected in the compiled programs.
>
>So you have some compiler source, which you then presumably have to compile
>with another binary, which must also be open source...
>
>So where do you start? It seems that at some point you need to use a trusted
>binary.
Have you read this? http://www.ece.cmu.edu/~ganger/712.f...1-thompson.pdf
--
If one person has delusions, we call them psychotic. If, however, 1.5 billion
people have delusions we must apparently call them a religious group, and
respect their delusionary state. | | | | re: Pedants
Richard wrote: Quote:
santosh <santosh.k83@gmail.comwrites:
> Quote:
>Malcolm McLean wrote:
>> Quote:
>>"Joachim Schmitz" <nospam.jojo@schmitz-digital.dewrote in message
>>n
>>>Richard Heathfield wrote:
>>>>Joachim Schmitz said:
>>>>>
>>>>>
>>>>No, I meant "don't write any". Because if you write some code,
>>>>you'll want to write some more (programming is very more-ish), and
>>>>then you'll write even more, and sooner or later you'll get to the
>>>>point where you think you're pretty good, and then some day you'll
>>>>want to show someone your stuff. And then they'll criticise it.
>>>>And that would be just awful, right?
>>>However: the criticism starts only when you publish
>>>>
>>However Jacob publishes only his binaries. I can't actually remember
>>seeing any C source by him. He's not one of those people who, like
>>me, are constantly providing little snippetts.
>>
>However I recall him posting various minor snippets of code
>occasionally, mainly from his standard library. In the past he used
>to post code more often than he does these days.
>> Quote:
>>Which leads us to a philosophical point. Can we tell the quality of
>>code purely from the binaries?
>>
>We must first define what we mean by "quality of code", and this is
>not a simple job, as the difference between the source of various
>versions of functionally identical programs is largely a subjective
>matter, IMHO.
>>
>If the binary happens to do correctly all that it is specified to do
>under reasonable conditions, then we can say that the binary
>is "working", but we still can't say anything much about the source
>from examining the machine code. We can attempt a decompilation, but
>the resulting source is hardly likely to be better than travesty of
>the original source.
>
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.
> Quote:
>>
>Still examining the binary versions of program under a debugger and
>under various "stress" conditions, and taking comparative
>measurements
>
What comparative measurements? Comparative against what?
> Quote:
>can enable is to state many objective statements about the machine
>code. If the machine code for both the binaries was derived from the
>same compiler under the same switches, then differences can be safely
>attributed to the source from which it was compiled.
>
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." | | | | re: Pedants
Malcolm McLean wrote: .... snip ... Quote:
>
However Jacob publishes only his binaries. I can't actually
remember seeing any C source by him. He's not one of those people
who, like me, are constantly providing little snippetts.
>
Which leads us to a philosophical point. Can we tell the quality
of code purely from the binaries?
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.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com ** | | | | re: Pedants
CBFalconer wrote: Quote:
Malcolm McLean wrote: ... snip ... Quote:
>>
>However Jacob publishes only his binaries. I can't actually
>remember seeing any C source by him. He's not one of those people
>who, like me, are constantly providing little snippetts.
>>
>Which leads us to a philosophical point. Can we tell the quality
>of code purely from the binaries?
>
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. | | | | re: Pedants
"santosh" <santosh.k83@gmail.comwrote in message Quote:
>
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?
>
Often there is a tension between efficient and well-structured programming.
So what exactly does it suggest?
--
Free games and programming goodies. http://www.personal.leeds.ac.uk/~bgy1mm | | | | re: Pedants
Richard wrote: Quote:
[..] This group is c.l.c. Not ISO C. Not C89. Just "c". And if others want
to help others with "general" C issues then good luck to them.
And since is it ``just c'', so it must be -- ``just C'', which by definition
is the C language as standardized by ISO/IEC. Any other variant is not
``just C'' but is platform-specific and not at all ``general C''.
I personally take an even more purist approach of what should be acceptable
in this newsgroup than what's now tolerated by even some of the so-called
``regulars'' of the current era. My preference (and realize it's only that)
would be to not qualify a response to an off-topic post with such wording
as:
``That's not REALLY a question about standard C.''
I would modify it as follows:
``That's not AT ALL a question about C.''
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: http://www.ibiblio.org/Dave/Dr-Fun/d...df20000210.jpg | | | | re: Pedants
Malcolm McLean wrote: Quote:
"santosh" <santosh.k83@gmail.comwrote in message Quote:
>>
>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?
>>
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. | | | | re: Pedants
Joachim Schmitz wrote: Quote:
Ben Bacarisse wrote: Quote:
>jacob navia <jacob@nospam.comwrites:
>> Quote:
>>Dear pedantic user
>Dear Jacob
>> Quote:
>>What is a pedant?
>What is the -pedantic flag? As far as I can see you don't document
>the use of it. As such, you can hardly have faced an easier bug to
>fix -- just report "bad flag" and ignore it. Of course, if you
>intended it to do something then you have a bigger problem.
>>
>Rather than getting hot under the collar about it, I think the users
>of your compiler would be better served by a simple statement of
>intent: accepting the flag is either a simple bug (which you can fix
>in about a minute) or you do intend to offer some sort of more
>rigorous checking mode and you plan to get it working soon. Would it
>not have been simpler just to say which is the case?
>
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.
--
Ian Collins. | | | | re: Pedants
santosh wrote: Quote:
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.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
jacob navia said: Quote:
santosh wrote: Quote:
>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.
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.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
Richard Heathfield wrote: Quote:
jacob navia said:
> Quote:
>santosh wrote: Quote:
>>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.
>
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.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 | | | | re: Pedants
santosh skrev: Quote:
Bartc wrote:
> Quote:
>"Tor Rustad" <tor_rustad@hotmail.comwrote in message
>news:08qdneqrndhmt8DVRVnzvQA@telenor.com... Quote:
>>Malcolm McLean skrev:
>>>
>>>Which leads us to a philosophical point. Can we tell the quality of
>>>code purely from the binaries?
>>From a security point of view, using a closed source compiler which
>>hasn't gone through external code review, is a potential security
>>risk -- as there can be a trojan horse injected in the compiled
>>programs.
>So you have some compiler source, which you then presumably have to
>compile with another binary, which must also be open source...
>>
>So where do you start? It seems that at some point you need to use a
>trusted binary.
>
No need. The BIOS could be open source and the hardware specs could also
be open source.
Well, in theory there might be no need, but in practice we don't (just)
analyze the binaries, but perform internal and external code audits of
sources. It is far easier to detect backdoors prior to compilation.
This is needed for trust-wordy systems.
Reviews are getting more important, and a number of OS'es has EAL 4
certifications these days, including SLES 10, RH 5, and soon Microsoft
have a number of such certificates too. http://en.wikipedia.org/wiki/Evaluation_Assurance_Level
Nevertheless, software engineering has yet a long way to go, when it
comes to quality, good thing we ain't making tall buildings... :) Quote:
This way nothing inside the computer is beyond
understanding, but this is not commonly the case. An average PC
contains tons of closed source firmware, which *could* do subversive
things, even if the OS and applications were to be open source.
Well, there are a number of OS'es, which are open source, they don't
exactly have "tons" of binary blobs originating from closed source. Quote:
Also even if a program is open source, to be absolutely sure, you need
to check the complete source for the program and compile it yourself.
If the source is public, then code review can be done by many. Anyway,
by taking a peek at the source, it is normally not that hard to see how
well designed a program is.
The track record on number of bugs, also indicate what quality level a
program has. For example, that OpenBSD and the Linux kernel are high
quality, shows IMO on their track record. Quote:
Otherwise there is no guarantee that a binary of an "open source"
program that you download and use does not contain components in
additions to it's published source base.
That is not correct santosh, if the binaries was build on a trusted
system, the binaries could be digitally signed there too, and then
verified prior to installation on the target machine.
However, as long as the target machine lack any kind of HW verification
method, a Trojan horse or root kit, can invalidate this verification.
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z> | | | | re: Pedants
jacob navia said: Quote:
Richard Heathfield wrote: Quote:
>jacob navia said:
>> Quote:
>>santosh wrote:
>>>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.
>>
>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.
Just because you don't understand me, that doesn't mean I have nothing to
say. Quote:
The "pedantic" flag is no longer supported, and if you invoke
>
lcc -pedantic pedantic.c
>
you get:
>
"Pedants are no longer supported!"
That's an implementation issue, and as such should be discussed in a
newsgroup where that implementation is topical, such as comp.compilers.lcc Quote:
and the program exits!
Fine, but hardly topical here. Quote:
:-)
>
Obviously the fact that lcc-win is much faster than gcc
or other compilers doesn't count.
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.
But for the record, no, if the compiler *doesn't work*, it doesn't matter
how fast it is - same as with any program. Quote:
What counts is if it
supports c89 or maybe another more obsolete version of the language.
No, what counts is that it is an implementation, and therefore needs to be
discussed in a group where it is topical, rather than here, where we
discuss the language itself, not implementations thereof. I do not expect
you to understand this because, on the many previous occasions that I have
explained it to you, you have demonstrated yourself to be incapable of
grasping the point. Nevertheless, I hope others will understand it and
take note.
But the bottom line is that a C compiler has to translate C programs
correctly. If it can't do that, it isn't really a C compiler. And you
don't get to decide what C is, any more than I do.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
Bartc skrev: Quote:
"Richard Heathfield" <rjh@see.sig.invalidwrote in message
[...] Quote: Quote:
>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).
No, Richard Heathfield is not too hard, if a compiler can't be trusted,
it shouldn't be used for anything serious.
First step is doing the job right, adding new features, will increase
the complexity, make testing harder and most likely increase the number
of defects.
How fast a C compiler runs, say very little about the correctness of the
translation.
--
Tor <bwzcab@wvtqvm.vw | tr i-za-h a-z> | | | | re: Pedants
jacob navia wrote: Quote:
Bob Nelson wrote:
> Quote:
>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.
An examination of WG14/N1256 ``Committee Draft -- September 7, 2007''
ISO/IEC 9899:TC3, finds there is no mention (that I could find) of the
word ``computer'' in the document.
Therefore, although POSIX, Windows and the Mac do exist, they are not within
the scope of discussing the C language. The international standard deals
only with the behavior of an abstract machine.
Postings confined to matters involving translation unit(s) in ISO C are a
rich source of interesting material for this newsgroup. Subjects involving
POSIX, Windows and the Mac have appropriate venues elsewhere. The name of
the newsgroup says it all: comp.lang.c. This is a forum for the language C.
Mr. Navia: I know that you and Mr. Heathfield have, on more than one
occasion, had differences. You may take some small solace in knowing that I
believe that I may disagree with Mr. Heathfield concerning C99.
The standard for the C language is no longer C90 but is C99. Therefore, in
my opinion, any discussion in this newsgroup concerning C90 is only of
historic interest (much like that of K&R C or dmr's earlier
implementations). While topical, they do not deal with current C as defined
by the international standard.
Thus the following little snippet, presuming a hosted implementation, of a
translation unit *is* C -- period (modulo a botch of my part when pasting
this):
#include <string.h>
#include <stdio.h>
int main(void)
{
char s[strlen("42") + 1]; // variable length array, standard conforming
strcpy(s, "42");
for(int i = 0; i < 2; ++i)
puts(s);
// the C language returns 0 upon reaching } [5.1.2.2.3]
}
Perhaps giving credence to arguments about the [lack of?] utilitarian value
of c.l.c., I don't care one iota about how widely used, popular or how many
implementations there are of C99 translators. Since C99 == C, that's
sufficient for me. Anything else is merely a QOI matter of little concern
when the focus is solely on the C language.
But to end this posting amicably, I admit to being a unapologetic purist and
probably an unrepentant pedant. If this draws the ire of both Mr. Navia and
Mr. Heathfield, then perhaps we have achieved peace in our time. :-) | | | | re: Pedants
Bob Nelson said:
<lots of good stuff (or should I say 'other good stuff'?) snipped> Quote:
Postings confined to matters involving translation unit(s) in ISO C are a
rich source of interesting material for this newsgroup. Subjects
involving POSIX, Windows and the Mac have appropriate venues elsewhere.
The name of the newsgroup says it all: comp.lang.c. This is a forum for
the language C.
Right. Quote:
>
Mr. Navia: I know that you and Mr. Heathfield have, on more than one
occasion, had differences. You may take some small solace in knowing that
I believe that I may disagree with Mr. Heathfield concerning C99.
It's possible. Quote:
The standard for the C language is no longer C90 but is C99.
C99 is the de jure standard, but it won't become the de facto standard
until it is at least comparatively widely implemented (by which I mean
that it must be implemented on at least /almost/ as many mainstream
architectures as C90. Quote:
Therefore,
in my opinion, any discussion in this newsgroup concerning C90 is only of
historic interest (much like that of K&R C or dmr's earlier
implementations). While topical, they do not deal with current C as
defined by the international standard.
I agree that C90 is topical, of course, and I agree that it doesn't deal
with "C as defined by the [current] international standard" - but it's of
more than historic interest until such time as C99 becomes the de facto
standard. Quote:
Thus the following little snippet, presuming a hosted implementation, of
a translation unit *is* C -- period (modulo a botch of my part when
pasting this):
<snip>
Yes, C99 is C! Believe it or not, I do agree with that.
<snip> Quote:
Perhaps giving credence to arguments about the [lack of?] utilitarian
value of c.l.c., I don't care one iota about how widely used, popular or
how many implementations there are of C99 translators.
That is perhaps the difference between us. I like a language I can actually
use. But your point is valid and well-made.
<snip> Quote:
But to end this posting amicably, I admit to being a unapologetic purist
and probably an unrepentant pedant. If this draws the ire of both Mr.
Navia and Mr. Heathfield, then perhaps we have achieved peace in our
time. :-)
It seems that peace in our time may have to wait a little. :-)
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 | | | | re: Pedants
Richard Heathfield wrote: Quote:
Bob Nelson said:
>
[...]
> Quote:
>The standard for the C language is no longer C90 but is C99.
>
C99 is the de jure standard, but it won't become the de facto standard
until it is at least comparatively widely implemented (by which I mean
that it must be implemented on at least /almost/ as many mainstream
architectures as C90.
My daily commute on Stemmons Freeway in Carrollton, TX [USA] exposes me to
the reality of de jure vs. de facto standards. The city's traffic police
accept only the de jure standard with a pedantically (-Wall -Wextra)
enforced speed limit not to exceed 60.000000 MPH. Greater than that yields
some form of overflow and subsequent UB. Quote: Quote:
>[...]
>>
>Perhaps giving credence to arguments about the [lack of?] utilitarian
>value of c.l.c., I don't care one iota about how widely used, popular or
>how many implementations there are of C99 translators.
>
That is perhaps the difference between us. I like a language I can
actually use. But your point is valid and well-made.
Much appreciated, Richard. I was actually prepared for a response more along
the lines of ``Get thee to a monastery!''. :-)
I'll bow out for a while and get back to tweaking the ``abstract machine''
on the other side of my desk. | | | | re: Pedants
Richard<rgrdev@gmail.comwrites: Quote:
"Malcolm McLean" <regniztar@btinternet.comwrites:
<snip> Quote: Quote:
>Which leads us to a philosophical point. Can we tell the quality of
>code purely from the binaries?
>
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.
--
Ben. | | | | re: Pedants
jacob navia <jacob@nospam.comwrites:
[snip] Quote:
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.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister" | | | | re: Pedants
"jacob navia" <jacob@nospam.comwrote in message
news:g3ik4r$q0s$1@aioe.org... Quote:
Dear pedantic user
>
What is a pedant?
[...]
I like to make sure things work correctly and honestly within a given set of
rules. | | | | re: Pedants
jacob navia wrote:
<snip>
[regarding win-lcc] Quote:
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. Quote:
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. Quote:
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. Quote:
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> | | | | re: Pedants
On 21 Jun 2008 at 23:12, Richard Heathfield wrote: Quote:
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....a53ec428697ee#
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. | | | | re: Pedants
Antoninus Twink <nospam@nospam.invalidwrote: Quote:
On 21 Jun 2008 at 22:25, Richard Heathfield wrote: [extremely incisive analysis of clc] Quote:
If you think comp.lang.c is a total loss, why post here?
Quote:
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.
Quote:
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.
Quote:
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.
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de | | | | re: Pedants
In article <slrng5sflr.2jj.nospam@nospam.invalid>,
Antoninus Twink <nospam@nospam.invalidwrote: Quote:
>On 21 Jun 2008 at 23:12, Richard Heathfield wrote: Quote:
>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....a53ec428697ee#
>
>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. |  | | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,414 network members.
|