473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Richard heathfields C programming article

Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.

my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.

2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)

3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???

now i have got my own questions

1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)

2) I have heard that the java compiler javac is purely written in C
how true is this statement...???

Nov 8 '07 #1
43 1821
In article <11**********************@i38g2000prf.googlegroups .com>,
<so**********@gmail.comwrote:
>Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.

my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.
There are a lot of good reasons, but one of them is that it forces you
to learn to think about programming in a way that will be useful with
any other language you use as well.

Two major ways that it does this are:
(a) It forces you to understand what you're doing at a fundamental
level; C doesn't have any built-in high-level abstractions, so if
you want them you have to build your own. Having done this a few
times will make it a lot easier to understand what's going on
underneath when you're using a language that has them pre-built for
you.
(b) It forces you to learn to get your programs right, by not
protecting you from your errors. If you get things wrong, the
program will break in subtle and unsubtle ways, and you will often
need to understand how your program works, even in parts that
aren't directly related to where the bug is showing up (which you
already should by the time you run into runtime problems!), to find
out what really went wrong.

>2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)
My day job involves writing code that gets deployed on Windows, and a
lot of that is done in C. In fact, most of the bits of the code that
everybody hates to have to poke at are written in languages other than
C, so my experience would indicate that C is one of the *better*
languages for developing under Windows (though I'm not going to claim
that that's representative).

>3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???
That depends what kind of job you want to get. It's probably unwise to
restrict the tools you learn to use to only those that are currently
useful for getting a job for "ordinary programmers", though, since
those tools tend to change over time and having a broader knowledge
base both makes you more likely to know *something* that's useful at
any given time and makes it easier to pick up new tools as they come
along.

>now i have got my own questions

1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)
1-57231-995-X

>2) I have heard that the java compiler javac is purely written in C
how true is this statement...???
I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.
dave

Nov 8 '07 #2
so**********@gmail.com said:
Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner,
If the above is not clear enough and brief enough for you, I'm afraid I
can't oblige.
even my peers ask this question most of the time, so that i
can give them some good answers.

my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.
Find out what they mean by "nerds". I'm just an ordinary programmer like
you, and I find that C is of a great deal of use to me.
2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)
I write far more C for Windows than I do for Linux. Most of the time I
don't care which OS my code runs on, but when I *do* care, the reason
tends to be that I am accessing the Win32 API. So, for me, C has a very
important role in Windows development.
>
3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???
If all you want to do is earn bread and butter, go get a job as a baker or
a dairymaid.
now i have got my own questions

1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)
I wasn't /going/ to curse.

"Programming Windows", 5th edition, by Charles Petzold, is an excellent
tutorial in Windows programming (although, alas, the C itself is a bit
dire). This work might reasonably be regarded as canonical. I don't know
what the canonical Linux equivalent is, but several decent books on GTK
exist. (And GTK has been ported to Windows, so you can kill two birds with
one stone if you like.)
2) I have heard that the java compiler javac is purely written in C
how true is this statement...???
I don't know, but I would not be surprised if it were true. Many compilers
are partly "written" using tools that generate lexing and parsing code,
and this code is typically generated in C, so a typical modern compiler is
likely to be at least partly written in C.

--
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
Nov 8 '07 #3
so**********@gmail.com wrote:
2) I have heard that the java compiler javac is purely written in C
how true is this statement...???
There are probably javac implementations written in C, but the reference
implementation from Sun is entirely written in Java, last time I looked.
Nov 8 '07 #4
dj******@csclub.uwaterloo.ca.invalid wrote:
>
>2) I have heard that the java compiler javac is purely written in C
how true is this statement...???

I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.
Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno), or
something else ...
Nov 8 '07 #5
Mark Bluemel wrote:
>I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.

Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno), or
something else ...
But presumably Jalapeno then has to run on *another* virtual machine :)

--
Philip Potter pgp <atdoc.ic.ac.uk
Nov 8 '07 #6
Philip Potter wrote:
Mark Bluemel wrote:
>>I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.

Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno),
or something else ...

But presumably Jalapeno then has to run on *another* virtual machine :)
I don't think so, but I don't know any of the details. A paper linked
from http://citeseer.ist.psu.edu/alpern99implementing.html discusses
this, though.
Nov 8 '07 #7
so**********@gmail.com wrote:
Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.

my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.

2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)

3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???
These three questions all kind of imply one question: "Is C a good
language?" or "Is C better than <other language>?"

This is actually an FAQ in the comp.lang.c++ FAQ, though it is almost as
applicable to C:
http://www.parashift.com/c++-faq-lit...e.html#faq-6.5

If all the programmers and all the managers within an organisation use
C# or Java, then it makes sense for you to learn C# or Java too. If
everyone uses C, then you should use C. Speaking the same language as
your colleagues is /much/ more valuable than using the "best" language
for the job.

On the other hand, if you are interested in learning about programming
rather than just trying to get some job done, then C is an excellent
language to learn. It has many, many different applications: GUI code,
web servers, DSP processors, embedded devices (such as cars or mobile
phones), compilers and interpreters (including C compilers, the Perl
interpreter, games (from NetHack to Quake), and lots more. Once you know
C, you have a tool which can be used in all these fields.

I have known C for a long time, but I've only just started working on
embedded processors and C is the language of choice for my particular
processor (the Xilinx MicroBlaze soft processor). My previous experience
writing C for Windows and Linux applications meant I didn't have to
waste time learning a new language.

Phil

--
Philip Potter pgp <atdoc.ic.ac.uk
Nov 8 '07 #8
dj******@csclub.uwaterloo.ca.invalid wrote:
In article <11**********************@i38g2000prf.googlegroups .com>,
<so**********@gmail.comwrote:
....
>1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)

1-57231-995-X

Would you care to identify what that character string means? I've got an
educated guess, but I shouldn't have to guess.
Nov 8 '07 #9
"James Kuyper" <ja*********@verizon.netschrieb im Newsbeitrag
news:oNCYi.5988$3j7.443@trnddc02...
dj******@csclub.uwaterloo.ca.invalid wrote:
>In article <11**********************@i38g2000prf.googlegroups .com>,
<so**********@gmail.comwrote:
...
>>1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)

1-57231-995-X


Would you care to identify what that character string means? I've got an
educated guess, but I shouldn't have to guess.
Looks like an ISBN to me...

http://www.amazon.de/Programming-Win...523822&sr=11-1
Nov 8 '07 #10
so**********@gmail.com wrote:
Hi,

I was going through Mr "Richard heathfields" site , it is written as
follows:-

Some people think C has no role to play in the modern programming
world. I would consider this opinion to have rather more validity if
it weren't for the fact that even those who express it use C code on a
daily basis (whether they realise it or not). C programs and libraries
are woven into the very fabric of the modern programming world, and
only a fool thinks otherwise.

Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.
Since he declined to expand on his statement, I'll give a stab at it.
Even people who never read or write a single line of C code are
constantly using tools that were written in C. The system utilities are
often written in C. In many cases the compilers for other languages are
written in C. In many cases compilers for other languages produce C code
as an intermediate step before using a C compiler to create the actual
executable. Even people who never go near a computer terminal are
constantly using devices that have small computers embedded in them that
the user is probably unaware of, and those embedded computers are often
running programs written in C, or at least in a variant of C.

I think Richard Heathfield may have gone too far by calling the people
who are unaware of this "fools". If the use of C is well hidden (and I
think every one of the cases I described above is fairly well hidden
from the ordinary user), I don't think that people can be justifiably be
called fools just because they're unaware of it.
My father is a technophobe who probably doesn't even know what C is; but
I don't think that makes him a fool - he's fairly wise in many ways that
have nothing to do with computers. I have a brother who's president of a
large organization, who constantly uses computers in connection with his
business, but only as a user, never as a programmer. He might have heard
of C, but I doubt that he's aware of any of the facts I've given above,
and he's certainly not a fool.
Nov 8 '07 #11

Mark Bluemel wrote:
Philip Potter wrote:
Mark Bluemel wrote:
>I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.

Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno),
or something else ...
But presumably Jalapeno then has to run on *another* virtual machine :)

I don't think so, but I don't know any of the details. A paper linked
from http://citeseer.ist.psu.edu/alpern99implementing.html discusses
this, though.
i don't know what are you talking about
the full source of jdk 6 is available (i've already posted a link)
and it's written in c
(of course library functions etc are written in java but the core is c)

Nov 8 '07 #12
James Kuyper said:

<snip>
Since he declined to expand on his statement, I'll give a stab at it.
I'd gladly have obliged if I could have done so more clearly and more
briefly than the original statement. I could not think of a way to do so.

But it's just as well that I didn't, since your reply raises an interesting
and important flaw in my original statement.

<snip>
I think Richard Heathfield may have gone too far by calling the people
who are unaware of this "fools".
So does Richard Heathfield. I have recast the original statement as
follows:

"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their ignorance
of that world."

Better?

--
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
Nov 8 '07 #13
Richard Heathfield wrote:
....
>I think Richard Heathfield may have gone too far by calling the people
who are unaware of this "fools".

So does Richard Heathfield. I have recast the original statement as
follows:

"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their ignorance
of that world."

Better?
Yes.
Nov 8 '07 #14
Richard Heathfield wrote:
James Kuyper said:

<snip>
>Since he declined to expand on his statement, I'll give a stab at it.

I'd gladly have obliged if I could have done so more clearly and more
briefly than the original statement. I could not think of a way to do so.
Now you're just playing word games again. The offending request was:
Well Mr heathfield can you explain your statement in a clear & brief
manner,
He asked you to explain the statement. I take 'explain' to mean expand
upon, fill in the gaps, put in more details; which naturally implies
that the explanation will be longer than the statement. Thankfully, at
no point did the OP ask for an explanation shorter than the statement,
so this is indeed a perfectly possible task.

A 'brief explanation' can be longer than a statement, just as a 'small
elephant' can be larger than a dog.

--
Philip Potter pgp <atdoc.ic.ac.uk
Nov 8 '07 #15
Philip Potter said:
Richard Heathfield wrote:
>James Kuyper said:

<snip>
>>Since he declined to expand on his statement, I'll give a stab at it.

I'd gladly have obliged if I could have done so more clearly and more
briefly than the original statement. I could not think of a way to do
so.

Now you're just playing word games again.
No, I wasn't, although I agree that you make a valid point, below.
The offending request was:
Well, presumably you intend "offending" to be taken in the informal sense,
close to "relevant" in meaning. Certainly I wasn't offended by it.
>
Well Mr heathfield can you explain your statement in a clear & brief
manner,

He asked you to explain the statement. I take 'explain' to mean expand
upon, fill in the gaps, put in more details; which naturally implies
that the explanation will be longer than the statement. Thankfully, at
no point did the OP ask for an explanation shorter than the statement,
so this is indeed a perfectly possible task.
Indeed. Fortunately, James has now saved me the trouble. :-)
A 'brief explanation' can be longer than a statement, just as a 'small
elephant' can be larger than a dog.
Although of course it depends on the size of the dog, and of the elephant.
It may even depend on the state of mind of the observer. I recall a Calvin
& Hobbes cartoon where a small wasp was chasing Calvin, and (in relation
to Calvin) it was drawn considerably larger than a dog. It may even have
been as large as a very, very small elephant.

--
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
Nov 8 '07 #16
Szabolcs Nagy wrote:
Mark Bluemel wrote:
>Philip Potter wrote:
>>Mark Bluemel wrote:
dj******@csclub.uwaterloo.ca.invalid wrote:
I would be unsurprised to find that javac is implemented (at least
partly) in Java, but the JVM that it would run on in that case is
almost definitely written in C.
Or C++ (much of Sun's "Hotspot" implementation), or Java (Jalapeno),
or something else ...
But presumably Jalapeno then has to run on *another* virtual machine :)
I don't think so, but I don't know any of the details. A paper linked
from http://citeseer.ist.psu.edu/alpern99implementing.html discusses
this, though.

i don't know what are you talking about
For a start I'm saying that, contrary to what you may think, there is
more than one implementation of javac and more than one implementation
of the Java Virtual Machine.

Some of these may be implemented in C but that by no means implies that
all of them are.
the full source of jdk 6 is available (i've already posted a link)
and it's written in c
That is one implementation - not the only one.

Even that is (probably) by no means entirely implemented in C. I have
worked extensively with Sun's "Hotspot" JDK codebase (I'm not sure
whether the link you pointed to is for HotSpot which is why I've added
"probably" above). Based on my exposure, though I didn't spend much time
on the core JVM, and as I recall :-

* large parts of the JVM implementation are written in C++, not C
* the class libraries are written in Java with supporting
native code written partially in C and partially in C++

As I've already pointed out - the Jalapeno JVM implementation is written
in Java.

Other JVM implementations may use other languages. I'm aware of one JVM
where the core bytecode interpreter was implemented in assembler.
Nov 8 '07 #17

Mark Bluemel wrote:
For a start I'm saying that, contrary to what you may think, there is
more than one implementation of javac and more than one implementation
of the Java Virtual Machine.
thanks now i see
i've never thought about sun implementing more than one jvm (does it
make sense?)
Other JVM implementations may use other languages. I'm aware of one JVM
where the core bytecode interpreter was implemented in assembler.
ok this makes sense (arm-11 jazelle is obviously faster than a c
implementation)
but otherwise it's not clear why they need more than one implementation

Nov 8 '07 #18
Szabolcs Nagy wrote:
Mark Bluemel wrote:
>For a start I'm saying that, contrary to what you may think, there is
more than one implementation of javac and more than one implementation
of the Java Virtual Machine.
thanks now i see
i've never thought about sun implementing more than one jvm (does it
make sense?)
<Apologies for Off-Topic posting>
It's not about Sun implementing more than one. BEA and IBM, for starters
have their own JVM implementations - JRockit and J9 (see wikipedia) -
and there is an Open-Source one called Kaffe.

Actually Sun used to have at least two implementations - a "reference"
version and "HotSpot".
>Other JVM implementations may use other languages. I'm aware of one JVM
where the core bytecode interpreter was implemented in assembler.
ok this makes sense (arm-11 jazelle is obviously faster than a c
implementation)
but otherwise it's not clear why they need more than one implementation
For example, to provide JVMs on platforms where Sun's implementation
hadn't been ported?

(BTW has your shift key broken?)
Nov 8 '07 #19
>>>>"SA" == sophia agnes <so**********@gmail.comwrites:

SAmy colleagues always advice me on the following lines:-

SA1)C why learn it, it is of no use for ordinary programmers
SAlike us,it is a language for nerds.

If they have no use for it, they should not learn it. It's a
programming language, not the secret to salvation.

On the other hand, if they learn it, they are likely to understand a
number of things better, and suddenly see lots of uses for it. But
it's their decision to make and their time to spend.

Why are you letting the uninformed opinions of other people dictate
what you study and what you learn?

SA2) it has no role of C language in a windows development
SAenvironment...???(they say c is purely for *nix environment)

The Win32 API is a C API. Draw your own conclusions.

SA3) for ordinary programmers just knowledge of database design
SAconcepts, SQL,SDLC, then a language like java or C# will earn
SAthe bread and butter...???

You can get a paying computer job knowing only C# or Java and SQL,
yes. However, there's far more to life and to a career than merely
getting paid. Your colleagues need to consider job satisfaction as
well.

SA1) can any one point out good enough tutorials showing how to
SAmake gui app in C(with the help of graphical libraries) just
SAas we do in java...???(no curses please, i don't like it)

GUIs are fairly complicated things. As hard as it is to write a
useful tutorial on C, it is even harder to write a useful tutorial on
GUI programming. You almost certainly won't find one online.

That said, choose a platform -- Windows and Win32, Apple and Carbon,
or a Unixlike and GTK, and research the second half of the pair.
You'll probably find more than enough to keep you occupied.

SA2) I have heard that the java compiler javac is purely written
SAin C how true is this statement...???

I believe the source code for javac is publicly available now; look
for yourself and see.

Given what javac does, I don't think it can be written in
strictly-conforming standard C, but it wouldn't surprise me in the
slightest if it were written predominantly in C.

Charlton
--
Charlton Wilbur
cw*****@chromatico.net
Nov 8 '07 #20
In article <fg**********@online.de>,
Joachim Schmitz <jo**@schmitz-digital.dewrote:
>"James Kuyper" <ja*********@verizon.netschrieb im Newsbeitrag
news:oNCYi.5988$3j7.443@trnddc02...
>dj******@csclub.uwaterloo.ca.invalid wrote:
>>In article <11**********************@i38g2000prf.googlegroups .com>,
<so**********@gmail.comwrote:
...
>>>1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)

1-57231-995-X


Would you care to identify what that character string means? I've got an
educated guess, but I shouldn't have to guess.
Looks like an ISBN to me...
'Tis. I have a bad habit of forgetting that not everybody immediately
recognizes the format as "unique identifier for a book".

>http://www.amazon.de/Programming-Win...523822&sr=11-1

dave

Nov 8 '07 #21

Mark Bluemel wrote:
It's not about Sun implementing more than one. BEA and IBM, for starters
[..]
thanks for your insightful answers
(BTW has your shift key broken?)
i prefer all lower-case
ymmv

Nov 8 '07 #22
so**********@gmail.com wrote:

[...]
Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.
His name is Richard Heathfield.

Try this: Remove all the C programs in the world, what do *you* think
would work?

Hint: Not a lot...
my colleagues always advice me on the following lines:-

1)C why learn it, it is of no use for ordinary programmers like us,it
is a language for nerds.
flame-bate & troll-o-meter = 50%
2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)
Windows or UNIX is off-topic.
3) for ordinary programmers just knowledge of database design
concepts, SQL,SDLC, then a language like java or C# will earn the
bread and butter...???
SQL etc is off-topic.
1) can any one point out good enough tutorials showing how to make gui
app in C(with the help of graphical libraries) just as we do in
java...???(no curses please, i don't like it)
GUI programming is off-topic
2) I have heard that the java compiler javac is purely written in C
how true is this statement...???
Java is off-topic

--
Tor <bw****@wvtqvm.vw | tr i-za-h a-z>
Nov 8 '07 #23
Richard Heathfield wrote:
Philip Potter said:
.... snip ...
>
>A 'brief explanation' can be longer than a statement, just as a
'small elephant' can be larger than a dog.

Although of course it depends on the size of the dog, and of the
elephant. It may even depend on the state of mind of the observer.
I recall a Calvin & Hobbes cartoon where a small wasp was chasing
Calvin, and (in relation to Calvin) it was drawn considerably
larger than a dog. It may even have been as large as a very, very
small elephant.
I strongly suspect that such a wasp will be totally incapable of
flying. The excess of legs will probably also seriously impede
walking and running. All of which makes the 'chase' rather
improbable. :-)

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Nov 8 '07 #24
"Charlton Wilbur" <cw*****@chromatico.neta écrit dans le message de news:
87************@mithril.chromatico.net...
>>>>>"SA" == sophia agnes <so**********@gmail.comwrites:

SA2) I have heard that the java compiler javac is purely written
SAin C how true is this statement...???

I believe the source code for javac is publicly available now; look
for yourself and see.

Given what javac does, I don't think it can be written in
strictly-conforming standard C, but it wouldn't surprise me in the
slightest if it were written predominantly in C.
What do you think javac does that cannot not be implemented in Standard C ?

--
Chqrlie.
Nov 9 '07 #25
On Friday 09 Nov 2007 4:13 am Tor Rustad <to********@hotmail.comwrote
in article <E8*********************@telenor.com>:
so**********@gmail.com wrote:

[...]
>Well Mr heathfield can you explain your statement in a clear & brief
manner, even my peers ask this question most of the time, so that i
can give them some good answers.

His name is Richard Heathfield.

Try this: Remove all the C programs in the world, what do *you* think
would work?

Hint: Not a lot...
[ ... ]
flame-bate & troll-o-meter = 50%
[ ... ]
Windows or UNIX is off-topic.
[ ... ]
SQL etc is off-topic.
[ ... ]
GUI programming is off-topic
[ ... ]
Java is off-topic
Had a bad huh?
;-)

Nov 9 '07 #26
Richard Heathfield <r...@see.sig.invalidwrote:
James Kuyper said:
Since [Richard] declined to expand on his statement, I'll
give a stab at it.

I'd gladly have obliged if I could have done so more clearly
and more briefly than the original statement. I could not
think of a way to do so.

But it's just as well that I didn't, since your reply raises
an interesting and important flaw in my original statement.

<snip>
[Talk of _blissfully_ ignorant family members not being fools.]
I think Richard Heathfield may have gone too far by
calling the people who are unaware of this "fools".

So does Richard Heathfield. I have recast the original
statement as follows:

"C programs and libraries are woven into the very fabric of
the modern programming world, and anyone who thinks otherwise
betrays their ignorance of that world."
I don't think I'll ever figure out how your mind works. ;-)

A statement like "people are ignorant" is perfectly true,
in a literal sense, but not everyone will thank you for
reminding them because not everyone thinks as literally
as you do.
Better?
Same! You've just replaced one pejorative with another.
Of course, you've changed the 'literal' translation, but
not everyone reads arbitrary commentary in such a literal
way. In fact, very few people do!

I can't find the actual page, but I imagine the target audience
is either programmers or people interested in programming, not
'anyone'.

If that's the case, then I think the appropriate amendment
is...

C programs and libraries are woven into the very fabric
of the modern programming world, and any _programmer_ who
thinks otherwise betrays their ignorance of that world.

If you're prepared to disparage people, then the important
thing is not the disparagement, but correctly identifying
those you wish to disparage. ;)

--
Peter

Nov 9 '07 #27
CBFalconer said:
Richard Heathfield wrote:
>Philip Potter said:
... snip ...
>>
>>A 'brief explanation' can be longer than a statement, just as a
'small elephant' can be larger than a dog.

Although of course it depends on the size of the dog, and of the
elephant. It may even depend on the state of mind of the observer.
I recall a Calvin & Hobbes cartoon where a small wasp was chasing
Calvin, and (in relation to Calvin) it was drawn considerably
larger than a dog. It may even have been as large as a very, very
small elephant.

I strongly suspect that such a wasp will be totally incapable of
flying. The excess of legs will probably also seriously impede
walking and running. All of which makes the 'chase' rather
improbable. :-)
You kind of have to buy into the whole C&H thing, really. If you understand
Hobbes (and who does?), you can understand the wasp, too.

--
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
Nov 9 '07 #28
Richard Heathfield wrote:
CBFalconer said:
>Richard Heathfield wrote:
>>I recall a Calvin & Hobbes cartoon where a small wasp was chasing
Calvin, and (in relation to Calvin) it was drawn considerably
larger than a dog. It may even have been as large as a very, very
small elephant.
I strongly suspect that such a wasp will be totally incapable of
flying. The excess of legs will probably also seriously impede
walking and running. All of which makes the 'chase' rather
improbable. :-)

You kind of have to buy into the whole C&H thing, really. If you understand
Hobbes (and who does?), you can understand the wasp, too.
Like much absurdist comedy, I think it's more about "acceptance" than
"understanding"... :)

--
Philip Potter pgp <atdoc.ic.ac.uk
Nov 9 '07 #29
Richard Heathfield wrote:
Peter Nilsson said:
>Richard Heathfield <r...@see.sig.invalidwrote:
>>"C programs and libraries are woven into the very fabric of
the modern programming world, and anyone who thinks otherwise
betrays their ignorance of that world."
I don't think I'll ever figure out how your mind works. ;-)

A statement like "people are ignorant" is perfectly true,
in a literal sense, but not everyone will thank you for
reminding them because not everyone thinks as literally
as you do.

Give them time (and a dictionary). They'll learn.
Or perhaps, you will learn /their/ language.

I happen to be quite literal-minded as well, and so I sympathise - and
in fact read the paragraph as you intended; but I have countless
misunderstandings with my girlfriend (and others) as a result of her
reading too much into what I say, or me not reading enough into what she
says. But I'm not going to say that her way of communicating is worse
than mine, because it isn't.

<snip>

--
Philip Potter pgp <atdoc.ic.ac.uk
Nov 9 '07 #30
Philip Potter said:
Richard Heathfield wrote:
>CBFalconer said:
>>Richard Heathfield wrote:
I recall a Calvin & Hobbes cartoon where a small wasp was chasing
Calvin, and (in relation to Calvin) it was drawn considerably
larger than a dog. It may even have been as large as a very, very
small elephant.
I strongly suspect that such a wasp will be totally incapable of
flying. The excess of legs will probably also seriously impede
walking and running. All of which makes the 'chase' rather
improbable. :-)

You kind of have to buy into the whole C&H thing, really. If you
understand Hobbes (and who does?), you can understand the wasp, too.

Like much absurdist comedy, I think it's more about "acceptance" than
"understanding"... :)
I think there's more to it than that, in this case at least (and I also
think that "absurdist" is a little way wide of the mark as a description
of C&H).

The C&H cartoons are drawn from two perspectives - six-year-old Calvin's,
and everybody else's. From Calvin's perspective, Hobbes is a friendly (and
yet scary) playmate, denizen of the jungle, Calvinball hero, and
mostly-loyal member of a secret society (the purpose of which appears to
be trying - and failing - to play mean tricks on Suzi, but mostly both the
club members just spend club meetings lazing around in the treehouse
reading comics). BUT... everyone else just sees Hobbes as a cuddly toy.

When we share Calvin's perspective, we see his mom putting shrunken heads,
weedkiller, and an entire octopus into the evening meal, attacking the
whole lot with an electric whisk whilst wearing a look of grim
determination. (In that example, we don't get to see *her* perspective -
but we can infer it. It's just a normal evening meal.)

Similarly, we see this tiny little wasp from Calvin's perspective, and in
*his* mind it's about two yards long and incoming. Many of us will
empathise with that point of view. (In fact, those who do empathise are
perhaps more likely to understand that cartoon.)

--
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
Nov 9 '07 #31
Philip Potter said:
Richard Heathfield wrote:
>Peter Nilsson said:
<snip>
>>A statement like "people are ignorant" is perfectly true,
in a literal sense, but not everyone will thank you for
reminding them because not everyone thinks as literally
as you do.

Give them time (and a dictionary). They'll learn.

Or perhaps, you will learn /their/ language.
Oh, I have done. In a marriage, it's an essential survival trait.

But on *my* Web site, I'll use *my* language, thank you. :-)

--
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
Nov 9 '07 #32
>>>>"CG" == Charlie Gordon <ne**@chqrlie.orgwrites:

CG"Charlton Wilbur" <cw*****@chromatico.neta écrit dans le
CGmessage de news: 87************@mithril.chromatico.net...
>Given what javac does, I don't think it can be written in
strictly-conforming standard C, but it wouldn't surprise me in
the slightest if it were written predominantly in C.
CGWhat do you think javac does that cannot not be implemented in
CGStandard C ?

Hrm, I was thinking of the runtime, which does low-level IO and threading.

I expect the compiler can actually be written entirely in standard C,
although as a practical matter I don't see any reason to restrict it
that far.

Charlton


--
Charlton Wilbur
cw*****@chromatico.net
Nov 9 '07 #33
In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:

[Talking about javac, though the comments here apply just as much to
any other compiler]
>I expect the compiler can actually be written entirely in standard C,
although as a practical matter I don't see any reason to restrict it
that far.
The things a compiler does are helped immensely by code generators for
things like the tokenizer and the parser, but the generated code (and
the generators themselves!) can very easily be entirely standard C, and
it's not immediately obvious how going beyond the standard for the rest
of the compiler would help either.

If there's no benefit for going outside what the standard provides,
wouldn't that be a reason to restrict it that far?
dave

Nov 9 '07 #34
>>>>"D" == dj3vande <dj******@csclub.uwaterloo.ca.invalidwrites:

DIn article <87************@mithril.chromatico.net>,
DCharlton Wilbur <cw*****@chromatico.netwrote:

D[Talking about javac, though the comments here apply just as
Dmuch to any other compiler]
>I expect the compiler can actually be written entirely in
standard C, although as a practical matter I don't see any
reason to restrict it that far.
DThe things a compiler does are helped immensely by code
Dgenerators for things like the tokenizer and the parser, but
Dthe generated code (and the generators themselves!) can very
Deasily be entirely standard C, and it's not immediately obvious
Dhow going beyond the standard for the rest of the compiler
Dwould help either.

DIf there's no benefit for going outside what the standard
Dprovides, wouldn't that be a reason to restrict it that far?

There may be no academic benefit (i.e., everything you might use
outside the standard can be reimplemented in standard C), but there's
a lot of possible practical benefit (i.e., using strsep or strtok_r,
for instance, or other BSD or POSIX standard calls).

There's a tradeoff between portability and programmer convenience, and
it should not come as a great surprise to anyone in this newsgroup
that there are times when one opts for convenience over portability --
especially when the standard being adhered to in place of the C
standard is something like POSIX that's broadly supported. You aren't
going to be running your compiler on non-hosted embedded systems, but
then, do you really need to?

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Nov 9 '07 #35
Richard Heathfield <rj*@see.sig.invalidwrites:
"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their ignorance
of that world."
Still not that friendly. I prefer to use the term "uninformed"
to "ignorant" when I am trying to avoid offense. (It is easier
to educate people when they are not offended.)
--
Ben Pfaff
http://benpfaff.org
Nov 9 '07 #36
In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:
>>>>>"D" == dj3vande <dj******@csclub.uwaterloo.ca.invalidwrites:

DIn article <87************@mithril.chromatico.net>,
DCharlton Wilbur <cw*****@chromatico.netwrote:

D[Talking about javac, though the comments here apply just as
Dmuch to any other compiler]
>I expect the compiler can actually be written entirely in
>standard C, although as a practical matter I don't see any
>reason to restrict it that far.

DThe things a compiler does are helped immensely by code
Dgenerators for things like the tokenizer and the parser, but
Dthe generated code (and the generators themselves!) can very
Deasily be entirely standard C, and it's not immediately obvious
Dhow going beyond the standard for the rest of the compiler
Dwould help either.

DIf there's no benefit for going outside what the standard
Dprovides, wouldn't that be a reason to restrict it that far?

There may be no academic benefit (i.e., everything you might use
outside the standard can be reimplemented in standard C), but there's
a lot of possible practical benefit (i.e., using strsep or strtok_r,
for instance, or other BSD or POSIX standard calls).
Because nobody would ever want to run your compiler on a non-BSD,
non-POSIX platform like, say, Windows.

>There's a tradeoff between portability and programmer convenience, and
it should not come as a great surprise to anyone in this newsgroup
that there are times when one opts for convenience over portability --
The examples you've given are terrible ones to use to illustrate this
point, since the cost of writing your own code to get that
functionality is not only a vanishingly small fraction of the total
cost of writing a compiler, but also highly unlikely to be larger than
the cost of going back after system-specific code has been written and
porting it to another hosted system (which, depending on how well the
design was done and how well the non-portable parts were separated out,
may or may not also be vanishingly small compared to the total cost of
building the whole thing in the first place).
dave

Nov 9 '07 #37
Ben Pfaff said:
Richard Heathfield <rj*@see.sig.invalidwrites:
>"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their
ignorance of that world."

Still not that friendly.
Weeeelllll, it's friendly to C programmers. :-)
I prefer to use the term "uninformed"
to "ignorant" when I am trying to avoid offense. (It is easier
to educate people when they are not offended.)
Understood. But, although it was not my intent to offend anyone, I wasn't
particularly trying to avoid it, either. :-)

--
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
Nov 9 '07 #38
<dj******@csclub.uwaterloo.ca.invalida écrit dans le message de news:
fh**********@rumours.uwaterloo.ca...
In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:

[Talking aboutjavac, though the comments here apply just as much to
any other compiler]
>>I expect the compiler can actually be written entirely in standard C,
although as a practical matter I don't see any reason to restrict it
that far.

The things a compiler does are helped immensely by code generators for
things like the tokenizer and the parser, but the generated code (and
the generators themselves!) can very easily be entirely standard C, and
it's not immediately obvious how going beyond the standard for the rest
of the compiler would help either.

If there's no benefit for going outside what the standard provides,
wouldn't that be a reason to restrict it that far?
The compiler could use multiple threads in an attempt to take advantage of
todays multi-core processors, or just for the fun of spreading the peanut
butter on both sides of the slice of bread.

--
Chqrlie.
Nov 10 '07 #39
Charlton Wilbur wrote:
Charlie Gordon <ne**@chqrlie.orgwrites:
.... snip ...
>
>What do you think javac does that cannot not be implemented in
Standard C ?

Hrm, I was thinking of the runtime, which does low-level IO and
threading.

I expect the compiler can actually be written entirely in standard
C, although as a practical matter I don't see any reason to
restrict it that far.
How about to port the compiler to almost anywhere instantaneously?
This is also an adequate reason to write as much as possible of the
runtime in standard C.

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Nov 10 '07 #40
On Fri, 09 Nov 2007 10:41:54 -0800, Ben Pfaff <bl*@cs.stanford.edu>
wrote:
>Richard Heathfield <rj*@see.sig.invalidwrites:
>"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their ignorance
of that world."

Still not that friendly. I prefer to use the term "uninformed"
to "ignorant" when I am trying to avoid offense. (It is easier
to educate people when they are not offended.)
Reminds me of a manager telling me many years ago, after a meeting
where I had upset the project sponsor who clearly knew very little:

"Keith, rather than telling people 'That's bollocks!', we prefer the
phrase 'Sadly that turns out not to be the case'" :-)
--
PGP key ID 0xEB7180EC
Nov 12 '07 #41
Keith Willis said:
On Fri, 09 Nov 2007 10:41:54 -0800, Ben Pfaff <bl*@cs.stanford.edu>
wrote:
>>Richard Heathfield <rj*@see.sig.invalidwrites:
>>"C programs and libraries are woven into the very fabric of the modern
programming world, and anyone who thinks otherwise betrays their
ignorance of that world."

Still not that friendly. I prefer to use the term "uninformed"
to "ignorant" when I am trying to avoid offense. (It is easier
to educate people when they are not offended.)

Reminds me of a manager telling me many years ago, after a meeting
where I had upset the project sponsor who clearly knew very little:

"Keith, rather than telling people 'That's bollocks!', we prefer the
phrase 'Sadly that turns out not to be the case'" :-)
Y2K. On behalf of a client, I was at a meeting with that client's customer
in their head office. Also present were representatives of another
supplier to that customer. Lots of big wheels there, plus me (a very
little wheel). They were all discussing a report that called into question
the feasibility of my sub-project, while I quietly read through the report
in increasing disbelief. Eventually, I cried out in sheer exasperation,
"who wrote all this junk anyway?"

There was a stunned silence, my project manager looked like he wanted the
earth to open up, but then up went a hand... belonging to someone who
worked for the other supplier. Everyone (well, almost everyone) in the
room breathed again, as I proceeded to back my "junk" claim with a
blizzard of appropriate technical detail (and, if I recall correctly, a
scary diagram) that demonstrated exactly why the sub-project was perfectly
feasible and the objections that had been raised were on the same level as
a claim that "we can't go shopping today, because it might rain" by
someone who had never figured out how to raise an umbrella.

During the trip back to base, the project manager tried hard to tell me off
for my lack of tact, but he couldn't, because he couldn't stop laughing.

--
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
Nov 12 '07 #42
In article <47***********************@news.free.fr>,
Charlie Gordon <ne**@chqrlie.orgwrote:
><dj******@csclub.uwaterloo.ca.invalida icrit dans le message de news:
fh**********@rumours.uwaterloo.ca...
>In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:

[Talking aboutjavac, though the comments here apply just as much to
any other compiler]
>>>I expect the compiler can actually be written entirely in standard C,
although as a practical matter I don't see any reason to restrict it
that far.

The things a compiler does are helped immensely by code generators for
things like the tokenizer and the parser, but the generated code (and
the generators themselves!) can very easily be entirely standard C, and
it's not immediately obvious how going beyond the standard for the rest
of the compiler would help either.

If there's no benefit for going outside what the standard provides,
wouldn't that be a reason to restrict it that far?

The compiler could use multiple threads in an attempt to take advantage of
todays multi-core processors,
Development tools are one of the (not too many these days) areas where
this doesn't make sense; any sensible developer with access to a
multi-core system (which have already been available to the general
public for a decade or so if you didn't mind the cores being on
separate physical CPUs) already has a build system set up that runs
multiple jobs in parallel to take advantage of it. Having individual
tools try to do the same just increases contention and breaks things.
So this is still a clear cost (a compiler targeting a widely ported VM
especially would benefit from avoiding non-portable features where it's
reasonable to do so) for a questionable benefit.
or just for the fun of spreading the peanut
butter on both sides of the slice of bread.
I want the tools I use to be written by somebody who's trying to build
good tools, not by somebody who's trying to show off. There are plenty
of other places to show off.
dave

Nov 12 '07 #43
<dj******@csclub.uwaterloo.ca.invalida écrit dans le message de news:
fh**********@rumours.uwaterloo.ca...
In article <47***********************@news.free.fr>,
Charlie Gordon <ne**@chqrlie.orgwrote:
>><dj******@csclub.uwaterloo.ca.invalida icrit dans le message de news:
fh**********@rumours.uwaterloo.ca...
>>In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:

[Talking aboutjavac, though the comments here apply just as much to
any other compiler]
I expect the compiler can actually be written entirely in standard C,
although as a practical matter I don't see any reason to restrict it
that far.

The things a compiler does are helped immensely by code generators for
things like the tokenizer and the parser, but the generated code (and
the generators themselves!) can very easily be entirely standard C, and
it's not immediately obvious how going beyond the standard for the rest
of the compiler would help either.

If there's no benefit for going outside what the standard provides,
wouldn't that be a reason to restrict it that far?

The compiler could use multiple threads in an attempt to take advantage of
todays multi-core processors,

Development tools are one of the (not too many these days) areas where
this doesn't make sense; any sensible developer with access to a
multi-core system (which have already been available to the general
public for a decade or so if you didn't mind the cores being on
separate physical CPUs) already has a build system set up that runs
multiple jobs in parallel to take advantage of it. Having individual
tools try to do the same just increases contention and breaks things.
So this is still a clear cost (a compiler targeting a widely ported VM
especially would benefit from avoiding non-portable features where it's
reasonable to do so) for a questionable benefit.
> or just for the fun of spreading the peanut
butter on both sides of the slice of bread.

I want the tools I use to be written by somebody who's trying to build
good tools, not by somebody who's trying to show off. There are plenty
of other places to show off.
I agree completely on both counts. I was just giving examples of what
temptations tool developers might fall for, and make their tools non
portable.

--
Chqrlie.
Nov 16 '07 #44

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: sophia.agnes | last post by:
Hi , I was going through peter van der linden's book Expert C programming, in this book there is a section named "How and why to cast" the author then says as follows (float) 3 - it's a...
3
by: George Orwell | last post by:
hay, Han frm china heer again... ben readin sum more c unleashed book dick heathfields book... still readin dick heathfields data structs cht but jumped ahead to chad dixons cgi proggraming cht...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.