Richard heathfields C programming article

M

Mark Bluemel

Szabolcs said:
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".
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?)
 
C

CBFalconer

Richard said:
Philip Potter said:
.... snip ...


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. :)
 
T

Tor Rustad

(e-mail address removed) 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
 
C

Charlie Gordon

Charlton Wilbur said:
SA> 2) I have heard that the java compiler javac is purely written
SA> in 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 ?
 
U

user923005

On Nov 7, 9:13 pm, (e-mail address removed) wrote:
[snip]
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.

I would advise you to learn C if it is something you want to do. If
you don't want to learn it then don't.
2) it has no role of C language in a windows development
environment...???(they say c is purely for *nix environment)

Most modern projects run in multiple environments. A good example is
the PostgreSQL database, which is a large project written almost
entirely in C. It runs in Windows and Unix varants etc. There are
literally thousands of other projects like it. Take a look on
SourceForge to verify this for yourself.
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...???

Java and C# are languages for GUI development. For database work, C
is used in embedded C and using a C API to gather data and for writing
extension stored procedures and other things like that. On the other
hand, if I was just going to write a simple GUI to create an order
entry program over a SQL database, then it would definitely be in Java
or a .NET language.
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)

It's not too difficult with the Microsoft Visual Studio 2005 C and C++
compiler.
On the other hand, if you want it portable, then use wxWidgets or
something of that ilk that makes it easier to be portable across
systems.
http://www.wxwidgets.org/
2) I have heard that the java compiler javac is purely written in C
how true is this statement...???

I don't see the relevance.
 
S

santosh

(e-mail address removed) 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?
;-)
 
P

Peter Nilsson

Richard Heathfield said:
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.]
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.

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. ;)
 
R

Richard Heathfield

CBFalconer said:
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.
 
R

Richard Heathfield

Peter Nilsson said:
I don't think I'll ever figure out how your mind works. ;-)

A statement like "people are ignorant" is perfectly true,
Right.

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.
Same! You've just replaced one pejorative with another.

No, I haven't. The word "ignorance" is a descriptive term, not a pejorative
one.
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!

Give them time. They'll learn.
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.

When contrasted with my original statement, your version appears to suggest
that *non*-programmers do *not* betray their ignorance of the modern
programming world in this way. I find this bizarre.
If you're prepared to disparage people, then the important
thing is not the disparagement, but correctly identifying
those you wish to disparage. ;)

I am not disparaging such people, merely describing them. We are *all*
ignorant of almost everything - for example, I haven't a clue about
agronomy, batique, Cantonese, dermatology, equarianism, fishing, golf,
homeopathy, indium, jacaranda, koalas, laryngitis, morris-dancing, napalm,
orang utans, psychiatry, quail-hunting, ribose-nucleic acid, saffron,
terracing, ultrasound, valium, warthogs, x-ray analysis, yoga, or zygotes.
So my ignorance, like everyone else's, runs the gamut from A to Z. I am as
ignorant as most people on all of those subjects. (Yes, experts exist on
all those subjects, I'm sure - but for them, substitute other subjects
beginning with the same letter.)

Does my ignorance of those subjects mean I am thus disparaged? By no means!
Ignorance is not a sin. Nor is it a disease. Nor is it an insult. It is
simply the inevitable state of all humans on almost all subjects.

Those who are ignorant of the meaning of the word "ignorant" would do
better to consult a dictionary than to complain at a non-existent insult.
 
U

user923005

I am not disparaging such people, merely describing them. We are *all*
ignorant of almost everything - for example, I haven't a clue about
agronomy, batique, Cantonese, dermatology, equarianism, fishing, golf,
homeopathy, indium, jacaranda, koalas, laryngitis, morris-dancing, napalm,
orang utans, psychiatry, quail-hunting, ribose-nucleic acid, saffron,
terracing, ultrasound, valium, warthogs, x-ray analysis, yoga, or zygotes.
So my ignorance, like everyone else's, runs the gamut from A to Z. I am as
ignorant as most people on all of those subjects. (Yes, experts exist on
all those subjects, I'm sure - but for them, substitute other subjects
beginning with the same letter.)

Does my ignorance of those subjects mean I am thus disparaged? By no means!
Ignorance is not a sin. Nor is it a disease. Nor is it an insult. It is
simply the inevitable state of all humans on almost all subjects.

Those who are ignorant of the meaning of the word "ignorant" would do
better to consult a dictionary than to complain at a non-existent insult.

One of my favorite philosophers, Will Rogers, said:
"Everybody is ignorant, only on different subjects."
 
P

Philip Potter

Richard said:
CBFalconer said:


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"... :)
 
P

Philip Potter

Richard said:
Peter Nilsson said:

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>
 
R

Richard Heathfield

Philip Potter said:
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.)
 
R

Richard Heathfield

Philip Potter said:
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. :)
 
C

Charlton Wilbur

CG> What do you think javac does that cannot not be implemented in
CG> 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.

Charlton
 
D

dj3vande

[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
 
C

Charlton Wilbur

D> In article <[email protected]>,

D> [Talking about javac, though the comments here apply just as
D> much to any other compiler]

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

D> If there's no benefit for going outside what the standard
D> provides, 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
 
B

Ben Pfaff

Richard Heathfield said:
"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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top