Wrapping existing UNIX commands in C

K

Kenny McCormack

tom st denis said:
On Aug 2, 10:16 am, (e-mail address removed) (Kenny McCormack)
wrote: [snip]
Nobody is questioning your devotion to the C language.  They're
questioning if you know the name on the door you walked through.

Please don't feed the troll.

Never hurts to check in once in a while and see if there is any
humanity behind the account.

Leader Kiki is not going to be happy with your attitude, sir!

--
Windows 95 n. (Win-doze): A 32 bit extension to a 16 bit user interface for
an 8 bit operating system based on a 4 bit architecture from a 2 bit company
that can't stand 1 bit of competition.

Modern day upgrade --> Windows XP Professional x64: Windows is now a 64 bit
tweak of a 32 bit extension to a 16 bit user interface for an 8 bit
operating system based on a 4 bit architecture from a 2 bit company that
can't stand 1 bit of competition.
 
K

Keith Thompson

tom st denis said:
tom st denis said:
On Aug 2, 10:16 am, (e-mail address removed) (Kenny McCormack)
wrote: [snip]
Nobody is questioning your devotion to the C language.  They're
questioning if you know the name on the door you walked through.

Please don't feed the troll.

Never hurts to check in once in a while and see if there is any
humanity behind the account.

Can't you do that without giving him public attention?
 
C

Chicken McNuggets

Can't you do that without giving him public attention?

Wow. It seems like I have really pissed off the regulars here with my
question. In the future I'll know to ask in comp.unix.programmers with
any POSIX related questions I might have.

I really didn't mean to start a huge flame war I was simply asking for
some help and originally thought that this was the best place to ask for
said help. I'm sorry that this thread got out of hand.

Having said that I did receive an answer to my question which I am
grateful for.

So you have made your point and as I said in future I'll know to keep to
standard C when asking questions here.

Thank you all.
 
K

Keith Thompson

Chicken McNuggets said:
Wow. It seems like I have really pissed off the regulars here with my
question. In the future I'll know to ask in comp.unix.programmers with
any POSIX related questions I might have.

No, you really haven't. You made a minor mistake, and you've
acknowledged it. No harm done. The flame war had nothing to do
with you, and is in no way your fault. In particular, my remark
upthread about not feeding the troll was *not* in reference to you.

[snip]
 
H

Heinrich Wolf

Hi,

I do not mind your question. And I do not restrict a C forum to only Windows
OS. I still believe, that C covers both Linux, Windows and more. So I am
glad that I could point you to popen. I neither interpreted your question
for only using ls. For me it was clearly readable that this was just an
example. It may be hard to code all in C, maybe especially when you need a
suid bit for running it. Why bother with security issues, when reading a
pipe does the job.

Heiner
 
K

Kenny McCormack

Hi,

I do not mind your question. And I do not restrict a C forum to only Windows
OS. I still believe, that C covers both Linux, Windows and more. So I am
glad that I could point you to popen. I neither interpreted your question
for only using ls. For me it was clearly readable that this was just an
example. It may be hard to code all in C, maybe especially when you need a
suid bit for running it. Why bother with security issues, when reading a
pipe does the job.

Heiner

Yes, I totally agree that C should not be seen as limited to Windows.

In fact, it runs on, and has been ported to, many non-Windows OSes. This is
a Good Thing.
 
K

Keith Thompson

Heinrich Wolf said:
I do not mind your question. And I do not restrict a C forum to only Windows
OS. I still believe, that C covers both Linux, Windows and more. So I am
glad that I could point you to popen. I neither interpreted your question
for only using ls. For me it was clearly readable that this was just an
example. It may be hard to code all in C, maybe especially when you need a
suid bit for running it. Why bother with security issues, when reading a
pipe does the job.

Yes, but there's an entire newsgroup, comp.unix.programmer, dedicated
to programming under Unix and Unix-like operating systems.

The C language doesn't mention popen(). Unix does, and
comp.unix.programmer is full of people who know more about it than
even a C expert is likely to know.

My point is simply that comp.unix.programmer is a better place
for such questions than comp.lang.c, for at least two reasons.
First, you're more likely to get knowledgeable answers in c.u.p.,
which will be read by other experts who are going to be able to
point out any errors. And second, it lets clc focus on what it's
best at: discussing the C language as defined by the standard;
there isn't a better newsgroup for that.

And yet some people (I'm not referring either to you or to the OP)
take great offense at that, or pretend to.
 
N

Nick Keighley

I do not mind your question. And I do not restrict a C forum to only Windows
OS.

nor does anyone else. The point is *both* Unix and Windows specific
questions are off-topic.
 
G

gwowen

nor does anyone else. The point is *both* Unix and Windows specific
questions are off-topic.

So it is repeatedly claimed. Such repitition aside, I don't see any
evidence that that is actually the case.

All that is clear (to me, at least) is that a significant minority of
regular posters are happy to answer such questions, while a separate
minority are vociferous that they not even be asked.
 
J

James Kuyper

On Aug 5, 11:27�am, Nick Keighley <[email protected]>
wrote: ....

So it is repeatedly claimed. Such repitition aside, I don't see any
evidence that that is actually the case.

Questions of topicality are hard to resolve for a newsgroup first
created before it became conventional for newsgroups to have charters.
That's why I normally phrase my comments on such subjects in terms of
where the best place is to get answers to such questions. I hope you
would not seriously argue against the proposition that a forum specific
to a given operating system is generally a better place to go to than
clc for answers to questions that are specific to that operating system?
All that is clear (to me, at least) is that a significant minority of
regular posters are happy to answer such questions, while a separate
minority are vociferous that they not even be asked.

There's a key word missing from that last sentence. We believe that such
questions should not be asked HERE. We think it would be a great idea to
ask such questions in a different forum where they're more likely to be
answered promptly and correctly.

My personal judgment is that the number of people who answer such
questions is significantly smaller than the number of people who
vociferously object to telling anyone that there's better forums to go
to for answers to those kinds of questions. Those people almost never
provide an actual answer to the question being asked, they just, for
some reason, want the existence of such forums to be kept a secret.
 
G

gwowen

There's a key word missing from that last sentence. We believe that such
questions should not be asked HERE.

I don't believe that.
We think it would be a great idea to
ask such questions in a different forum where they're more likely to be
answered promptly and correctly.

And yet I think that too. That a better place exists does not mean
that the sole response should be "ask in <better place>". That POSIX/C/
UNIX technical questions have exactly one place where they should be
asked is a weirdly Manichean point of view.

I'm not a road map, but if someone asks me directions, I don't say
"Road maps will provide more accurate information than I can. Why
don't you buy a road map?"
 
J

James Kuyper

I don't believe that.

I didn't say that you did. You described a group of people of which I'm
a member (well, not exactly - I was correcting your description of that
group), and when I said "we", I was referring to the members of that group.
And yet I think that too. That a better place exists does not mean
that the sole response should be "ask in <better place>". That POSIX/C/
UNIX technical questions have exactly one place where they should be
asked is a weirdly Manichean point of view.

That they have only one place to be asked would be odd; that they have a
unique best place to be asked is entirely normal - however you measure
it, exact ties for the top position (in any context, not just this one)
are rare. That the most appropriate place is a significantly better
place to ask such questions than c.l.c is a simple matter of fact,
regardless of how many other such places there might be.
I'm not a road map, but if someone asks me directions, I don't say
"Road maps will provide more accurate information than I can. Why
don't you buy a road map?"

I'd be more likely to use the MapQuest app on my smartphone and show
them the best route. However, if I didn't have that with me, and I
wasn't sure of the way, I certainly would recommend asking someone who
knew more than me. Buying a road map would be rather low on the list - I
used to love map books, but I doubt that I will ever again buy one.

Your analogy doesn't really hold up, because buying a road map would
involve a small amount of expense, and (in such a context) a significant
amount of inconvenience, which are both good reasons for me to simply
give the requested directions, if I can. Being redirected to a more
appropriate forum involves no expense and negligible inconvenience - far
less inconvenience than would be caused by getting a subtly incorrect
answer, or by waiting longer than necessary for a correct answer.
 
K

Kenny McCormack

James Kuyper said:
Your analogy doesn't really hold up, blah, blah, blah...

I so fondly remember that time, back in 1991, where in response to an
analogy on Usenet, someone did *not* respond with (some variation of)
"That's a bad analogy".
 
G

gwowen

I'd be more likely to use the MapQuest app on my smartphone and show
them the best route. However, if I didn't have that with me, and I
wasn't sure of the way,

Well, no-one's suggesting that people who are unsure of the answer
should answer. Are you really suggesting that comp.lang.c questions
should be restricted to questions that you personally can answer?

For some posters here (not you James, admittedly) it does feel like
that sometimes. Anyone who asks a question that cannot be answered
with a dutifully intoned Chapter/Verse citation from the Holy Standard
gets clubbed with "try comp.unix.programmer you non-portable heretic"
 
J

James Kuyper

Well, no-one's suggesting that people who are unsure of the answer
should answer. Are you really suggesting that comp.lang.c questions
should be restricted to questions that you personally can answer?

No, I'm suggesting that it's entirely appropriate for people who don't
know the answer to respond, despite that ignorance, for the purpose of
redirecting the questioner to a forum where it will be easier to find
people qualified to answer it.

I also believe that it's a good idea to give such a response even if the
responder does know the answer. Just because the answer is known doesn't
mean that it's a good idea to give the answer here.

Someone writing a game program set in the universe of Lois McMaster
Bujold's Vorkosigan series might want to know whether or not there's a
direct connection from Earth to Cetaganda. I know the answer to that
question, but I would not consider it a good idea to answer it here,
regardless of whether or not the program was written in C. I feel that
questions about POSIX (some of which I am qualified to answer) should be
treated the same way.
For some posters here (not you James, admittedly) it does feel like
that sometimes. Anyone who asks a question that cannot be answered
with a dutifully intoned Chapter/Verse citation from the Holy Standard
gets clubbed with "try comp.unix.programmer you non-portable heretic"

There's no one here who treats the standard as Holy, though it may
sometimes seem that way when someone is able to provide precise
"Chapter/Verse" citations. The standard was written by a committee of
fallible human beings, and many examples of that fallibility are present
in the actual standard, and I don't think you'll find many people here
who'd disagree with that statement. The closest you'll come to that is
Douglas Gwyn, and even he recognized that some mistakes were made.

I haven't seen any such clubbing applied to newbies, just reasonably
polite re-directions. Progressively less polite messages are sometimes
sent to people who should know better, but that seems entirely justified
to me (though unlikely to succeed).

Microsoft-specific questions are, if anything, even more aggressively
redirected than POSIX-specific ones.

I don't know anyone here who would advocate a complete avoidance of
non-portable code. The closest you could get was CBFalconer, but his
approach was different - he didn't advocate avoiding non-portable code,
he simply pretended to believe that code which was non-portable wouldn't
actually work, regardless of platform, no matter how ridiculous that
claim made him seem.
For many purposes, non-portable code is not merely necessary or
acceptable, but actually a good idea, and I doubt you'll find many
people on this group that would disagree with that statement, either.

I can't remember anybody being branded a heretic by anybody for writing
non-portable code.
 
B

BartC

gwowen said:
So it is repeatedly claimed. Such repitition aside, I don't see any
evidence that that is actually the case.

C is a funny language in that it pervades everywhere and people having
issues with it may not be aware of the strict partitioning into standard
language / extensions / compilers / implementations / platform / libraries /
applications / hardware / etc that some try to enforce here. As far as the
latter are concerned, only the standard language is on-topic (plus anything
to do with topicality!)

But the standard language would be quite a narrow topic, unless you are
interested in C Standard minutiae, while most questions seem to be covered
by the FAQ. Since traffic on the group is quite low, and many of the more
relevant groups are pretty much dead, I can't see the problems. Just put
"OT" in front of the subject to stop anyone complaining.
 
K

Kenny McCormack

But the standard language would be quite a narrow topic, unless you are
interested in C Standard minutiae, while most questions seem to be covered
by the FAQ. Since traffic on the group is quite low, and many of the more
relevant groups are pretty much dead, I can't see the problems. Just put
"OT" in front of the subject to stop anyone complaining.[/QUOTE]

The thing to keep in mind is that the obsession with "What's in the standard
and only what's in the standard" is not divine truth. It is merely human
definition. It could easily be otherwise, and, as I've noted many times,
most other groups (online forums in general) choose not to go down this
dusty old path. In fact, most groups (online forums) do both of the
following:
1) Have an ethic that if you can't (or won't) answer the question, then
please quietly and calmly STFU.
2) Have a loose definition of topicality and rightly allow questions
relating to using the language, not just the Biblical
interpretations of what the language is.

The point is that I'm willing to grant (but see below) that there's a place
for the picayunish standards nit-picking that obviously thrills a certain
sort of person - but this isn't it. A group called comp.lang.c should be
about C and using C. If you want comp.religion.c (or whatever you choose to
call it), by all means create a group for it. But this here group *isn't it*.

As I noted upthread, the real problem is that the top-level name
(comp.lang.c) got usurped by people who should have known better - and knew
that they should have created a new group for their Biblical musings - but
didn't do so.

Final note to those who will try to picture my posts as misguided ramblings,
please note that the text speaks for itself. If you go back, you will see
that folks like Kiki and so on are on record as saying that the reason they
made topicality so strict here was specifically to ward off evil things
happening - for example, they like to point to "what happened in the C++
group" as their prime example.

So, they simply cannot maintnain that the topicality rules are God-given;
they are clearly man-made - and for a very specific and intended purpose.
 
K

Keith Thompson

gwowen said:
I don't believe that.

Why not?

When I mention that a question would be better asked elsewhere, I almost
always suggest one or more newsgroups that would be a better fit. Have
you not noticed that?

[...]
 
K

Keith Thompson

gwowen said:
Well, no-one's suggesting that people who are unsure of the answer
should answer. Are you really suggesting that comp.lang.c questions
should be restricted to questions that you personally can answer?

For some posters here (not you James, admittedly) it does feel like
that sometimes. Anyone who asks a question that cannot be answered
with a dutifully intoned Chapter/Verse citation from the Holy Standard
gets clubbed with "try comp.unix.programmer you non-portable heretic"

I really don't understand the tendency to describe this in religious
terms. If those of us who like to redirect off-topic questions really
phrased our suggestions that way, or in any vaguely similar way, you'd
have a point.

I typically write something like "You'd get better answers in
comp.unix.programmer". What is your objection to that?
 
J

James Kuyper

On 08/06/2012 01:04 PM, BartC wrote:
....
C is a funny language in that it pervades everywhere and people having
issues with it may not be aware of the strict partitioning into standard
language / extensions / compilers / implementations / platform / libraries /
applications / hardware / etc that some try to enforce here. As far as the
latter are concerned, only the standard language is on-topic (plus anything
to do with topicality!)

But the standard language would be quite a narrow topic, unless you are
interested in C Standard minutiae, while most questions seem to be covered
by the FAQ. Since traffic on the group is quite low, ...

It has more traffic than I can easily deal with. Only by filtering out a
lot of the noise does it become feasible to keep pace with it.
...and many of the more
relevant groups are pretty much dead, ...

If the most appropriate alternative forum (which need not be a usenet
newsgroup) for discussing a given OS/library/software package is "pretty
much dead", than the thing being discussed is presumably also "pretty
much dead" - otherwise, where do people go to discuss it? They certainly
don't come here - nothing other than C is discussed here frequently
enough for this to be the main place where an active user community for
that thing hangs out.

The closest you could get would be lcc-win32, which for some reason is
discussed here fairly frequently, rather than on comp.lang.lcc. However,
most of the lcc-win32 "users" posting on this newsgroup use a pseudonym
containing the word "tea" to launch attacks on jacob. If it were
actually the case that those "users" constituted the bulk of his user
base, then lcc-win32 would be accurately described as "pretty much dead"
- which I don't believe is the case.

As a result, while c.l.c might be the best place to post questions about
things that are "pretty much dead", it will still be a bad place to post
them here, because there wouldn't be many people here, either, who know
anything about those things. On the flip side, something is "pretty much
dead", then we shouldn't get many questions about it, either.

However, I can't quite get my head around the concept that either
Microsoft Windows or POSIX could be described as "pretty much dead".
Could you explain that to me? Are you really saying that those systems
are both so nearly dead that there's no forum better than c.l.c for
users of those systems to go to for advice?
... I can't see the problems. Just put
"OT" in front of the subject to stop anyone complaining.

For a subject such as POSIX or Windows, for which there are forums which
are not "pretty much dead", labeling the questions with "OT" won't solve
the main problem - which is that there are better places to get answers
to those questions.
 

Ask a Question

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

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

Ask a Question

Members online

Forum statistics

Threads
474,078
Messages
2,570,570
Members
47,204
Latest member
MalorieSte

Latest Threads

Top