Hi,
So I am aware of the exec family of functions and the system function to
execute external commands but they do not seem to offer the
functionality to allow me to get the output of said executable so I can
use it in the rest of my program. For instance a simple example would be
to use the "ls" command. I would want to get the output of the directory
listing and be able to manipulate it later on in my program.
Is there an easy way to do this? I realise that this is technically not
standard C and is most likely a POSIX extension but it would be nice if
someone could offer some advice.
Thanks.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
7/29/2012 3:11:18 PM |
|
On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> Hi,
>
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the
> functionality to allow me to get the output of said executable so I can
> use it in the rest of my program. For instance a simple example would be
> to use the "ls" command. I would want to get the output of the directory
> listing and be able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
"Technically not Standard C" is an understatement: There is no
aspect of your question that has anything at all to do with C.[*]
[*] No, not even the passing mention of system() qualifies this
as a C question. On some platforms it is possible to use system()
to run a program and have the output go to a file the invoking
program can then open and read, but the form of the argument that
gets system() to do this is entirely platform-specific.
Try comp.unix.programmer.
--
Eric Sosman
esosman@ieee-dot-org.invalid
|
|
0
|
|
|
|
Reply
|
esosman2 (2945)
|
7/29/2012 3:18:19 PM
|
|
"Chicken McNuggets" <chicken@mcnuggets.com> schrieb im Newsbeitrag
news:jv3jqk$r1t$1@speranza.aioe.org...
> Hi,
>
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the functionality
> to allow me to get the output of said executable so I can use it in the
> rest of my program. For instance a simple example would be to use the "ls"
> command. I would want to get the output of the directory listing and be
> able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
>
> Thanks.
Do you also know pipes?
if ((fp = popen("ls")) != NULL)
{
while (fgets(Buffer, sizeof(Buffer), fp))
puts(Buffer);
fclose(fp);
}
|
|
0
|
|
|
|
Reply
|
invalid171 (6616)
|
7/29/2012 3:20:07 PM
|
|
On 29/07/2012 16:20, Heinrich Wolf wrote:
> Do you also know pipes?
>
> if ((fp = popen("ls")) != NULL)
> {
> while (fgets(Buffer, sizeof(Buffer), fp))
> puts(Buffer);
> fclose(fp);
> }
Ah. Thank you. popen() looks exactly like what I was looking for.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
7/29/2012 3:24:14 PM
|
|
On 29/07/2012 16:18, Eric Sosman wrote:
>
> "Technically not Standard C" is an understatement: There is no
> aspect of your question that has anything at all to do with C.[*]
>
> [*] No, not even the passing mention of system() qualifies this
> as a C question. On some platforms it is possible to use system()
> to run a program and have the output go to a file the invoking
> program can then open and read, but the form of the argument that
> gets system() to do this is entirely platform-specific.
>
> Try comp.unix.programmer.
>
Apologies for being so off-topic.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
7/29/2012 3:24:50 PM
|
|
In article <jv3jqk$r1t$1@speranza.aioe.org>,
Chicken McNuggets <chicken@mcnuggets.com> wrote:
> Hi,
>
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the
> functionality to allow me to get the output of said executable so I can
> use it in the rest of my program. For instance a simple example would be
> to use the "ls" command. I would want to get the output of the directory
> listing and be able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
The easiest way is to use popen/pclose which opens an anonymous pipe to (mode
"w") or from (mode "r") a child process executing the command:
FILE *ls = popen("ls -l .", "r");
while (fgets(ls, line, sizeof line)) process(line);
pclose(ls);
Using named pipes, you can do this with just system():
system("mkfifo ../pipe");
FILE *ls = open("../pipe", "r");
system("ls -l . >../pipe &");
while (fgets(ls, line, sizeof line)) process(line);
fclose(ls);
You can also use exec by openning a pipe:
int pp[2]; pipe(pp);
int child = fork();
if (child) {
close(pp[1]);
FILE *ls = fdopen(pp[0],"r");
while (fgets(ls, line, sizeof line)) process(line);
fclose(ls);
int status; waitpid(child, &status, 0);
} else {
close(pp[0]);
dup2(pp[1], 1);
close(pp[1]);
execl("/bin/ls", "/bin/ls", "-l", ".", 0);
}
--
My name Indigo Montoya. | Die, Robbie Ferrier! Die!
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (668)
|
7/29/2012 3:31:39 PM
|
|
In article <jv3k82$92v$1@dont-email.me>,
Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
> On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> > Hi,
> >
> > So I am aware of the exec family of functions and the system function to
> > execute external commands but they do not seem to offer the
> > functionality to allow me to get the output of said executable so I can
> > use it in the rest of my program. For instance a simple example would be
> > to use the "ls" command. I would want to get the output of the directory
> > listing and be able to manipulate it later on in my program.
> >
> > Is there an easy way to do this? I realise that this is technically not
> > standard C and is most likely a POSIX extension but it would be nice if
> > someone could offer some advice.
>
> "Technically not Standard C" is an understatement: There is no
> aspect of your question that has anything at all to do with C.[*]
That's odd, because we have been doing this in C since the 1970s.
--
My name Indigo Montoya. | Die, Robbie Ferrier! Die!
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (668)
|
7/29/2012 3:34:25 PM
|
|
On 29-Jul-12 10:11, Chicken McNuggets wrote:
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the
> functionality to allow me to get the output of said executable so I can
> use it in the rest of my program. For instance a simple example would be
> to use the "ls" command. I would want to get the output of the directory
> listing and be able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
If you've already decided to limit portability to POSIX systems, pipes
are the general solution for what you're trying to do, but may not be
the optimal solution. For instance, in the case of "ls", why not just
call the functions in <dirent.h> yourself rather than opening a pipe to
a program that calls them for you and then writing an enormous amount of
code to parse its output to extract the same data?
S
--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
|
|
0
|
|
|
|
Reply
|
stephen (1138)
|
7/29/2012 4:57:32 PM
|
|
In article <jv3k82$92v$1@dont-email.me>,
Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
>On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
>> Hi,
>>
>> So I am aware of the exec family of functions and the system function to
>> execute external commands but they do not seem to offer the
>> functionality to allow me to get the output of said executable so I can
>> use it in the rest of my program. For instance a simple example would be
>> to use the "ls" command. I would want to get the output of the directory
>> listing and be able to manipulate it later on in my program.
>>
>> Is there an easy way to do this? I realise that this is technically not
>> standard C and is most likely a POSIX extension but it would be nice if
>> someone could offer some advice.
>
> "Technically not Standard C" is an understatement: There is no
>aspect of your question that has anything at all to do with C.[*]
blah, blah, blah, like a biddy old aunt - who hasn't gotten any since the
war (WWII, that is).
Isn't it funny how, in the rest of the Usenet (and online forums in
general), the ethic is "If you can't answer the question, then STFU!", but
here in comp.lang.c, people still get mileage out of:
Off topic. Not portable. Cant discuss it here. Blah, blah, blah.
--
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.
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
7/29/2012 5:10:04 PM
|
|
"China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
> In article <jv3k82$92v$1@dont-email.me>,
> Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
>> On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
>> > So I am aware of the exec family of functions and the system function to
>> > execute external commands but they do not seem to offer the
>> > functionality to allow me to get the output of said executable so I can
>> > use it in the rest of my program. For instance a simple example would be
>> > to use the "ls" command. I would want to get the output of the directory
>> > listing and be able to manipulate it later on in my program.
>> >
>> > Is there an easy way to do this? I realise that this is technically not
>> > standard C and is most likely a POSIX extension but it would be nice if
>> > someone could offer some advice.
>>
>> "Technically not Standard C" is an understatement: There is no
>> aspect of your question that has anything at all to do with C.[*]
>
> That's odd, because we have been doing this in C since the 1970s.
But you haven't been doing it in *standard* C. (Well, prior to 1989
there was no standard.)
Of course there's nothing wrong with writing non-standard C; the
ability to write system-specific code is one of the language's
greatest strengths. And yes, POSIX is also a standard. But as
you probably know, the people who know about it tend to hang out
in comp.unix.programmer, not in comp.lang.c
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
7/29/2012 7:05:37 PM
|
|
In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org>
wrote:
> "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
> > In article <jv3k82$92v$1@dont-email.me>,
> > Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
> >> On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> >> > So I am aware of the exec family of functions and the system function to
> >> > execute external commands but they do not seem to offer the
> >> > functionality to allow me to get the output of said executable so I can
> >> > use it in the rest of my program. For instance a simple example would be
> >> > to use the "ls" command. I would want to get the output of the directory
> >> > listing and be able to manipulate it later on in my program.
> >> >
> >> > Is there an easy way to do this? I realise that this is technically not
> >> > standard C and is most likely a POSIX extension but it would be nice if
> >> > someone could offer some advice.
> >>
> >> "Technically not Standard C" is an understatement: There is no
> >> aspect of your question that has anything at all to do with C.[*]
> >
> > That's odd, because we have been doing this in C since the 1970s.
>
> But you haven't been doing it in *standard* C. (Well, prior to 1989
> there was no standard.)
>
> Of course there's nothing wrong with writing non-standard C; the
> ability to write system-specific code is one of the language's
> greatest strengths. And yes, POSIX is also a standard. But as
> you probably know, the people who know about it tend to hang out
> in comp.unix.programmer, not in comp.lang.c
Did you know comp.lang.c predates 1989? And that we weren't obnoxious twits back
then? Are you happy you're wasting more electrons being a dick than where spent
just giving a straightfotward and useful answer? Do you know that you are
allowed to create a moderated newsgroup that is actually moderated instead of
flouncing around on an unmoderated newsgroup?
--
My name Indigo Montoya. | Die, Robbie Ferrier! Die!
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (668)
|
7/29/2012 9:00:25 PM
|
|
On 2012-07-29, Heinrich Wolf <invalid@invalid.invalid> wrote:
> if ((fp = popen("ls")) != NULL)
> {
> while (fgets(Buffer, sizeof(Buffer), fp))
> puts(Buffer);
> fclose(fp);
pclose(fp); ?
|
|
0
|
|
|
|
Reply
|
ike8 (164)
|
7/29/2012 9:41:50 PM
|
|
On 2012-07-29, China Blue [Tor], Meersburg <chine.bleu@yahoo.com> wrote:
> system("mkfifo ../pipe");
> FILE *ls = open("../pipe", "r");
FILE *ls = fopen("../pipe", "r"); ?
|
|
0
|
|
|
|
Reply
|
ike8 (164)
|
7/29/2012 9:46:32 PM
|
|
"China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
> In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org>
> wrote:
>> "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
[...]
>> > That's odd, because we have been doing this in C since the 1970s.
>>
>> But you haven't been doing it in *standard* C. (Well, prior to 1989
>> there was no standard.)
>>
>> Of course there's nothing wrong with writing non-standard C; the
>> ability to write system-specific code is one of the language's
>> greatest strengths. And yes, POSIX is also a standard. But as
>> you probably know, the people who know about it tend to hang out
>> in comp.unix.programmer, not in comp.lang.c
>
> Did you know comp.lang.c predates 1989?
Yes, I did. Did you know that it also postdates 1989?
> And that we weren't obnoxious
> twits back then? Are you happy you're wasting more electrons being a
> dick than where spent just giving a straightfotward and useful answer?
> Do you know that you are allowed to create a moderated newsgroup that
> is actually moderated instead of flouncing around on an unmoderated
> newsgroup?
If you have a question about POSIX, which is the best place to ask it
("best" meaning most likely to get good answer), comp.lang.c or
comp.unix.programmer?
And kindly explain how my offering advice and expression my opinion
about which questions are best posted where makes me an "obnoxious
twit".
How many electrons are you wasting by publicly insulting me?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
7/29/2012 10:19:31 PM
|
|
China Blue [Tor], Meersburg wrote:
> Did you know comp.lang.c predates 1989? And that we weren't obnoxious
> twits back then?
Well, it appears that you are now contributing for that turn of events.
> Are you happy you're wasting more electrons being a dick
> than where spent just giving a straightfotward and useful answer?
If you took the time to actually read what has been repeatedly pointed out
to you, you would notice that the replies you've got were actually straight
forwrad and useful. It's pretty obvious that you would be better served if
you posted questions regarding unix APIs to a newsgroup dedicated to unix
programming. Yet, instead of following that advice you decided to ignore it
and instead waste "more electrons being a dick", as you've put it. Go
figure.
Rui Maciel
|
|
0
|
|
|
|
Reply
|
rui.maciel (1761)
|
7/29/2012 11:35:18 PM
|
|
"Ike Naar" <ike@sverige.freeshell.org> schrieb im Newsbeitrag
news:slrn3vfsk1bbgu.jeo.ike@sverige.freeshell.org...
> On 2012-07-29, Heinrich Wolf <invalid@invalid.invalid> wrote:
>> if ((fp = popen("ls")) != NULL)
>> {
>> while (fgets(Buffer, sizeof(Buffer), fp))
>> puts(Buffer);
>> fclose(fp);
>
> pclose(fp); ?
Yes of course. I am sorry.
|
|
0
|
|
|
|
Reply
|
invalid171 (6616)
|
7/30/2012 4:46:44 AM
|
|
"Heinrich Wolf" <invalid@invalid.invalid> schrieb im Newsbeitrag
news:jv3kb3$fk6$1@news.m-online.net...
....
> if ((fp = popen("ls")) != NULL)
popen("ls", "r")
> {
> while (fgets(Buffer, sizeof(Buffer), fp))
> puts(Buffer);
> fclose(fp);
pclose in place of fclose
> }
I'm sorry.
My code is untested.
|
|
0
|
|
|
|
Reply
|
invalid171 (6616)
|
7/30/2012 4:49:37 AM
|
|
On Jul 29, 10:00=A0pm, "China Blue [Tor], Meersburg"
<chine.b...@yahoo.com> wrote:
> In article <ln8ve24cce....@nuthaus.mib.org>, Keith Thompson <ks...@mib.or=
g>
> > "China Blue [Tor], Meersburg" <chine.b...@yahoo.com> writes:
> > > In article <jv3k82$92...@dont-email.me>,
> > > =A0Eric Sosman <esos...@ieee-dot-org.invalid> wrote:
> > >> On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> > >> > So I am aware of the exec family of functions and the system funct=
ion to
> > >> > execute external commands but they do not seem to offer the
> > >> > functionality to allow me to get the output of said executable so =
I can
> > >> > use it in the rest of my program. For instance a simple example wo=
uld be
> > >> > to use the "ls" command. I would want to get the output of the dir=
ectory
> > >> > listing and be able to manipulate it later on in my program.
>
> > >> > Is there an easy way to do this? I realise that this is technicall=
y not
> > >> > standard C and is most likely a POSIX extension but it would be ni=
ce if
> > >> > someone could offer some advice.
>
> > >> =A0 =A0 =A0"Technically not Standard C" is an understatement: There =
is no
> > >> aspect of your question that has anything at all to do with C.[*]
>
> > > That's odd, because we have been doing this in C since the 1970s.
how would I do this on a Windows system?
> > But you haven't been doing it in *standard* C. =A0(Well, prior to 1989
> > there was no standard.)
>
> > Of course there's nothing wrong with writing non-standard C; the
> > ability to write system-specific code is one of the language's
> > greatest strengths. =A0And yes, POSIX is also a standard. =A0But as
> > you probably know, the people who know about it tend to hang out
> > in comp.unix.programmer, not in comp.lang.c
>
> Did you know comp.lang.c predates 1989? And that we weren't obnoxious twi=
ts back
> then? Are you happy you're wasting more electrons being a dick than where=
spent
> just giving a straightfotward and useful answer?
where was your "straightfotward and useful answer"?
> Do you know that you are
> allowed to create a moderated newsgroup that is actually moderated instea=
d of
> flouncing around on an unmoderated newsgroup?
|
|
0
|
|
|
|
Reply
|
nick_keighley_nospam (4575)
|
7/30/2012 8:59:55 AM
|
|
Le 29/07/12 23:00, China Blue [Tor], Meersburg a �crit :
> In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org>
> wrote:
>
> Did you know comp.lang.c predates 1989? And that we weren't obnoxious twits back
> then?
Of course! We were 22 years younger!
Some people tend to change for the worst when they get old... They
forget what youth means, even.
> Are you happy you're wasting more electrons being a dick than where spent
> just giving a straightfotward and useful answer? Do you know that you are
> allowed to create a moderated newsgroup that is actually moderated instead of
> flouncing around on an unmoderated newsgroup?
>
Nobody has appointed Mr Thompson as a moderator of this group but he
is playing the moderator since such a long time that somehow people
(including me) got used to that situation.
Happily he tells everywhere that I am in his killfile so that now
he can't answer my postings, so I can say and do whatever I want.
:-)
You should try the same solution: just get into his killfile and then
you will live happily thereafter.
|
|
0
|
|
|
|
Reply
|
jacob31 (874)
|
7/30/2012 9:13:34 AM
|
|
On Sun, 29 Jul 2012 11:57:32 -0500, Stephen Sprunk wrote:
> If you've already decided to limit portability to POSIX systems, pipes
> are the general solution for what you're trying to do, but may not be
> the optimal solution. For instance, in the case of "ls", why not just
> call the functions in <dirent.h> yourself rather than opening a pipe to
> a program that calls them for you and then writing an enormous amount of
> code to parse its output to extract the same data?
Because that requires learning the API, whereas someone who already knows
about system() and popen() can just write half-baked code and avoid the
effort of learning to do it correctly.
I have seen real-world code which did:
char buf[100];
sprintf(buf, "rm %s", filename);
system(buf);
|
|
0
|
|
|
|
Reply
|
nobody (4833)
|
7/30/2012 11:13:09 AM
|
|
Le 30/07/12 13:13, Nobody a écrit :
> On Sun, 29 Jul 2012 11:57:32 -0500, Stephen Sprunk wrote:
>
>> If you've already decided to limit portability to POSIX systems, pipes
>> are the general solution for what you're trying to do, but may not be
>> the optimal solution. For instance, in the case of "ls", why not just
>> call the functions in <dirent.h> yourself rather than opening a pipe to
>> a program that calls them for you and then writing an enormous amount of
>> code to parse its output to extract the same data?
>
> Because that requires learning the API, whereas someone who already knows
> about system() and popen() can just write half-baked code and avoid the
> effort of learning to do it correctly.
>
Why is that not correct?
Why bothering to learn the API, and spend hours debugging a new
version of "ls"?
If performance is not a big concern the code below will work correctly
even if in this case a call to remove() would be shorter.
> I have seen real-world code which did:
>
> char buf[100];
> sprintf(buf, "rm %s", filename);
> system(buf);
>
Yes, the hard coded buffer size is a problem but in principle
this thing will work as intended.
|
|
0
|
|
|
|
Reply
|
jacob31 (874)
|
7/30/2012 11:26:34 AM
|
|
jacob navia <jacob@spamsink.net> writes:
> Le 30/07/12 13:13, Nobody a écrit :
<snip>
>> I have seen real-world code which did:
>>
>> char buf[100];
>> sprintf(buf, "rm %s", filename);
>> system(buf);
>
> Yes, the hard coded buffer size is a problem but in principle
> this thing will work as intended.
....and you just hope that 'filename' does not contain a space, or a '*'
or a ';' followed by something worse.
Of course one can imagine an implementation of system that keeps such
things safe, but I don't know of any.
--
Ben.
|
|
0
|
|
|
|
Reply
|
ben.usenet (6516)
|
7/30/2012 11:39:54 AM
|
|
On 30/07/2012 12:39, Ben Bacarisse wrote:
> jacob navia <jacob@spamsink.net> writes:
>
>> Le 30/07/12 13:13, Nobody a écrit :
> <snip>
>>> I have seen real-world code which did:
>>>
>>> char buf[100];
>>> sprintf(buf, "rm %s", filename);
>>> system(buf);
>>
>> Yes, the hard coded buffer size is a problem but in principle
>> this thing will work as intended.
>
> ...and you just hope that 'filename' does not contain a space, or a '*'
> or a ';' followed by something worse.
Obligatory XKCD reference follows - <http://xkcd.com/327/>
|
|
0
|
|
|
|
Reply
|
mark_bluemel (848)
|
7/30/2012 12:16:52 PM
|
|
On Sun, 2012-07-29, Rui Maciel wrote:
> China Blue [Tor], Meersburg wrote:
>
>> Did you know comp.lang.c predates 1989? And that we weren't obnoxious
>> twits back then?
>
> Well, it appears that you are now contributing for that turn of events.
>
>> Are you happy you're wasting more electrons being a dick
>> than where spent just giving a straightfotward and useful answer?
>
> If you took the time to actually read what has been repeatedly pointed out
> to you, you would notice that the replies you've got were actually straight
> forwrad and useful.
As far as I can tell, it wasn't "China Blue" who asked; that guy
learned about popen() (and comp.unix.programmer, I hope), thanked
and left.
I do think the first "this is offtopic, try c.u.p." post could have
been formulated better.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|
|
0
|
|
|
|
Reply
|
nntp24 (1600)
|
7/30/2012 2:54:35 PM
|
|
On Mon, 2012-07-30, Ben Bacarisse wrote:
> jacob navia <jacob@spamsink.net> writes:
>
>> Le 30/07/12 13:13, Nobody a �crit :
> <snip>
>>> I have seen real-world code which did:
>>>
>>> char buf[100];
>>> sprintf(buf, "rm %s", filename);
>>> system(buf);
>>
>> Yes, the hard coded buffer size is a problem but in principle
>> this thing will work as intended.
>
> ...and you just hope that 'filename' does not contain a space, or a '*'
> or a ';' followed by something worse.
>
> Of course one can imagine an implementation of system that keeps such
> things safe, but I don't know of any.
Depends on if 'filename', in the actual application, can be based on
user input. Of course, if you use remove() or something, you don't
have to worry about that.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|
|
0
|
|
|
|
Reply
|
nntp24 (1600)
|
7/30/2012 3:02:21 PM
|
|
On Mon, 2012-07-30, jacob navia wrote:
> Le 30/07/12 13:13, Nobody a �crit :
>> On Sun, 29 Jul 2012 11:57:32 -0500, Stephen Sprunk wrote:
>>
>>> If you've already decided to limit portability to POSIX systems, pipes
>>> are the general solution for what you're trying to do, but may not be
>>> the optimal solution. For instance, in the case of "ls", why not just
>>> call the functions in <dirent.h> yourself rather than opening a pipe to
>>> a program that calls them for you and then writing an enormous amount of
>>> code to parse its output to extract the same data?
>>
>> Because that requires learning the API, whereas someone who already knows
>> about system() and popen() can just write half-baked code and avoid the
>> effort of learning to do it correctly.
>
> Why is that not correct?
He didn't say it's incorrect. If he's like me, he's all for
half-baked code and avoiding effort -- up to a point.
> Why bothering to learn the API, and spend hours debugging a new
> version of "ls"?
Depends. If all he wants is an unordered list of file names, learning
the API may well be easier than popen()ing ls.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|
|
0
|
|
|
|
Reply
|
nntp24 (1600)
|
7/30/2012 3:18:06 PM
|
|
On 30/07/2012 15:54, Jorgen Grahn wrote:
> As far as I can tell, it wasn't "China Blue" who asked; that guy
> learned about popen() (and comp.unix.programmer, I hope), thanked
> and left.
>
> I do think the first "this is offtopic, try c.u.p." post could have
> been formulated better.
>
> /Jorgen
>
That is correct. I asked the question. I didn't mean this thread to turn
into a flame fest though so apologies for asking a question that was
off-topic to this list.
Frankly though I think people could just relax a little. It is not the
end of the world if someone asks a question that is off-topic. A simple
"You'll get a better answer on comp.unix.programmer" would have been
sufficient.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
7/30/2012 4:15:17 PM
|
|
On 07/30/2012 10:54 AM, Jorgen Grahn wrote:
> On Sun, 2012-07-29, Rui Maciel wrote:
>> China Blue [Tor], Meersburg wrote:
....
>>> Are you happy you're wasting more electrons being a dick
>>> than where spent just giving a straightfotward and useful answer?
>>
>> If you took the time to actually read what has been repeatedly pointed out
>> to you, you would notice that the replies you've got were actually straight
>> forwrad and useful.
....
> I do think the first "this is offtopic, try c.u.p." post could have
> been formulated better.
How?
It had two main parts. The first part pointed out to the OP the clues
that he should have used to realize that some other forum would be a
more appropriate one for his question. The second part identified c.u.p
as that more appropriate forum. Would you have left out the first part?
It seems to me that it's important for people to understand how easy it
is to determine that c.u.p is a more appropriate forum than this one for
questions like this one.
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
7/30/2012 4:44:12 PM
|
|
On 29/07/2012 17:57, Stephen Sprunk wrote:
> If you've already decided to limit portability to POSIX systems, pipes
> are the general solution for what you're trying to do, but may not be
> the optimal solution. For instance, in the case of "ls", why not just
> call the functions in <dirent.h> yourself rather than opening a pipe to
> a program that calls them for you and then writing an enormous amount of
> code to parse its output to extract the same data?
>
> S
>
Because the "ls" command was an example. I really want to process the
output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
dirent.h would be great if I needed to analyse information about
directories but since I don't need that functionality (and I have
already used it in the past) it is a rather pointless suggestion.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
7/30/2012 5:10:45 PM
|
|
Chicken McNuggets wrote:
> On 29/07/2012 17:57, Stephen Sprunk wrote:
>
>> If you've already decided to limit portability to POSIX systems, pipes
>> are the general solution for what you're trying to do, but may not be
>> the optimal solution. For instance, in the case of "ls", why not just
>> call the functions in <dirent.h> yourself rather than opening a pipe to
>> a program that calls them for you and then writing an enormous amount of
>> code to parse its output to extract the same data?
>>
>> S
>>
>
> Because the "ls" command was an example. I really want to process the
> output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
>
> dirent.h would be great if I needed to analyse information about
> directories but since I don't need that functionality (and I have
> already used it in the past) it is a rather pointless suggestion.
Does the language need to be C ?
Paul
|
|
0
|
|
|
|
Reply
|
nospam64 (158)
|
7/30/2012 5:30:06 PM
|
|
On 07/30/2012 01:10 PM, Chicken McNuggets wrote:
> On 29/07/2012 17:57, Stephen Sprunk wrote:
>
>> If you've already decided to limit portability to POSIX systems, pipes
>> are the general solution for what you're trying to do, but may not be
>> the optimal solution. For instance, in the case of "ls", why not just
>> call the functions in <dirent.h> yourself rather than opening a pipe to
>> a program that calls them for you and then writing an enormous amount of
>> code to parse its output to extract the same data?
>>
>> S
>>
>
> Because the "ls" command was an example. I really want to process the
> output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
>
> dirent.h would be great if I needed to analyse information about
> directories but since I don't need that functionality (and I have
> already used it in the past) it is a rather pointless suggestion.
We can only comment on the questions you actually ask. The only specific
example you gave was for "ls", for which there are utilities from
section 2 of the Unix manual that provide the same information in a form
that's easier to deal with from inside a program than parsing the output
of "ls". There's lots of other POSIX command line utilities for which
that's also true. The fact that you were interested in utilities for
which it's not true was not at all obvious.
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
7/30/2012 5:34:04 PM
|
|
On 7/30/2012 7:16 AM, Mark Bluemel wrote:
> On 30/07/2012 12:39, Ben Bacarisse wrote:
>> jacob navia <jacob@spamsink.net> writes:
>>
>>> Le 30/07/12 13:13, Nobody a écrit :
>> <snip>
>>>> I have seen real-world code which did:
>>>>
>>>> char buf[100];
>>>> sprintf(buf, "rm %s", filename);
>>>> system(buf);
>>>
>>> Yes, the hard coded buffer size is a problem but in principle
>>> this thing will work as intended.
>>
>> ...and you just hope that 'filename' does not contain a space, or a '*'
>> or a ';' followed by something worse.
>
> Obligatory XKCD reference follows - <http://xkcd.com/327/>
>
yep...
a JS/ES/... analogue would be something like:
eval("setName(\""+name+"\");");
(not sure if similar also applies to PHP, would have to look into this).
where some clever entries in the name field can do all sorts of things...
so, it is a good indication for things like:
for something which prints/composes something, be sure to filter the
string (or "C-ify" it, where any uncertain characters are escaped);
for code which parses something, it is a good idea to check for and make
sure one has the intended type of token (as a poorly written parser can
have "interesting" effects when fed cleverly crafted code).
nevermind all the usual annoyances, like trying to avoid buffer-overflow
risks, ...
|
|
0
|
|
|
|
Reply
|
cr88192355 (1754)
|
7/30/2012 5:39:01 PM
|
|
On 30-Jul-12 12:10, Chicken McNuggets wrote:
> On 29/07/2012 17:57, Stephen Sprunk wrote:
>> If you've already decided to limit portability to POSIX systems, pipes
>> are the general solution for what you're trying to do, but may not be
>> the optimal solution. For instance, in the case of "ls", why not just
>> call the functions in <dirent.h> yourself rather than opening a pipe to
>> a program that calls them for you and then writing an enormous amount of
>> code to parse its output to extract the same data?
>
> Because the "ls" command was an example. I really want to process the
> output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
As I said, pipes are the general solution.
The source for all of those should be available, so you'd have to
figure out whether it'd be more optimal (for your specific needs) to
crib the logic and API calls to get the data you need directly rather
than using pipes and parsing the output. Maybe, maybe not.
> dirent.h would be great if I needed to analyse information about
> directories but since I don't need that functionality (and I have
> already used it in the past) it is a rather pointless suggestion.
Obviously, I could only respond to the specific example you gave.
S
--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
|
|
0
|
|
|
|
Reply
|
stephen (1138)
|
7/30/2012 6:18:06 PM
|
|
On Mon, 30 Jul 2012 13:26:34 +0200, jacob navia wrote:
>> I have seen real-world code which did:
>>
>> char buf[100];
>> sprintf(buf, "rm %s", filename);
>> system(buf);
>
> Yes, the hard coded buffer size is a problem but in principle
> this thing will work as intended.
The lack of quoting/escaping is a bigger problem than the fixed buffer
size. Apart from the need to protect against interpretation by the shell,
"rm" will interpret the argument as an option if it begins with a dash.
Using a relative path to "rm" means that it may run something other than
/bin/rm.
And performance is several orders of magnitude worse than remove() or
unlink() (fork() and/or exec() can be particularly expensive).
At least system() usually does the right thing with respect to signals;
the situation for popen() is much more complex.
|
|
0
|
|
|
|
Reply
|
nobody (4833)
|
7/31/2012 1:53:24 PM
|
|
On Jul 29, 1:10=A0pm, gaze...@shell.xmission.com (Kenny McCormack)
wrote:
> In article <jv3k82$92...@dont-email.me>,
> Eric Sosman =A0<esos...@ieee-dot-org.invalid> wrote:
>
>
>
>
>
>
>
>
>
> >On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> >> Hi,
>
> >> So I am aware of the exec family of functions and the system function =
to
> >> execute external commands but they do not seem to offer the
> >> functionality to allow me to get the output of said executable so I ca=
n
> >> use it in the rest of my program. For instance a simple example would =
be
> >> to use the "ls" command. I would want to get the output of the directo=
ry
> >> listing and be able to manipulate it later on in my program.
>
> >> Is there an easy way to do this? I realise that this is technically no=
t
> >> standard C and is most likely a POSIX extension but it would be nice i=
f
> >> someone could offer some advice.
>
> > =A0 =A0 "Technically not Standard C" is an understatement: There is no
> >aspect of your question that has anything at all to do with C.[*]
>
> blah, blah, blah, like a biddy old aunt - who hasn't gotten any since the
> war (WWII, that is).
>
> Isn't it funny how, in the rest of the Usenet (and online forums in
> general), the ethic is "If you can't answer the question, then STFU!", bu=
t
> here in comp.lang.c, people still get mileage out of:
>
> Off topic. =A0Not portable. =A0Cant discuss it here. =A0Blah, blah, blah.
I like that you post. In case of a lull of NNTP activity you're
useful to check if I still have net access...
:-)
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
7/31/2012 9:55:40 PM
|
|
Le 31/07/12 23:55, tom st denis a �crit :
> On Jul 29, 1:10 pm, gaze...@shell.xmission.com (Kenny McCormack)
> wrote:
>>
>> Off topic. Not portable. Cant discuss it here. Blah, blah, blah.
>
> I like that you post. In case of a lull of NNTP activity you're
> useful to check if I still have net access...
>
At least his posts are useful, contrary to yours!
|
|
0
|
|
|
|
Reply
|
jacob31 (874)
|
7/31/2012 10:24:37 PM
|
|
On 07/30/2012 11:10 AM, Chicken McNuggets wrote:
> On 29/07/2012 17:57, Stephen Sprunk wrote:
>
>> If you've already decided to limit portability to POSIX systems, pipes
>> are the general solution for what you're trying to do, but may not be
>> the optimal solution. For instance, in the case of "ls", why not just
>> call the functions in <dirent.h> yourself rather than opening a pipe to
>> a program that calls them for you and then writing an enormous amount of
>> code to parse its output to extract the same data?
>>
>> S
>>
>
> Because the "ls" command was an example. I really want to process the
> output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
>
> dirent.h would be great if I needed to analyse information about
> directories but since I don't need that functionality (and I have
> already used it in the past) it is a rather pointless suggestion.
The book that made any of this comprehensible to me was _Advanced
Programming in the Unix Environment_. Stevens and Rago. They go over
ls exhaustively.
I just looked at one of the files (good books and good authors always
have the software available for those who purchase the book).
#include "apue.h"
#define BUFFSIZE 4096
int
main(void)
{
int n;
char buf[BUFFSIZE];
while ((n = read(STDIN_FILENO, buf, BUFFSIZE)) > 0)
if (write(STDOUT_FILENO, buf, n) != n)
err_sys("write error");
if (n < 0)
err_sys("read error");
exit(0);
}
So you've got the proprietary yet available header as the only thing in
the source that is non-standard. Eric's a little bit of a zealot about
that, but he's totally right that your answer is over in
comp.unix.programmer .
--
Cal
|
|
0
|
|
|
|
Reply
|
cal819 (188)
|
8/2/2012 3:08:27 AM
|
|
In article <dfGdnUOdz5OycoTNnZ2dnUVZ_vidnZ2d@supernews.com>,
Cal Dershowitz <cal@example.invalid> wrote:
....
>So you've got the proprietary yet available header as the only thing in
>the source that is non-standard. Eric's a little bit of a zealot about
>that, but he's totally right that your answer is over in
>comp.unix.programmer .
As I said before, every other newsgroup and online forum (IME) has a simple
ethic of "If you can't (or won't) answer the question, then STFU!". If you
violate this norm, you are pretty much politely ignored. But (obviously),
here in CLC, no such norm exists (hence this post [the post I am writing
right now] is unassailably correct in context).
But the real, underlying, problem is that the current rulers of CLC have
usurped the name. That is, a newsgroup named comp.lang.c should be about C,
but they have changed it into comp.religion.c - but forgot to change the
name. It is as if someone (back around 1991) had been assigned the task of
filing the paperwork to setup (charter, whatever terminology you prefer) a
new newsgroup, but forgot to do so (maybe they went on vacation that week,
maybe they got sick - who can say?). So, in desperation, they (the
religious zealots) just setup shop (for their new idea of what a newsgroup
about C should be like) here in comp.lang.c.
--
(This discussion group is about C, ...)
Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch [sic] revelations of the childhood
traumas of the participants...
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/2/2012 12:20:29 PM
|
|
On Jul 31, 6:24=A0pm, jacob navia <ja...@spamsink.net> wrote:
> Le 31/07/12 23:55, tom st denis a crit :
>
> > On Jul 29, 1:10 pm, gaze...@shell.xmission.com (Kenny McCormack)
> > wrote:
>
> >> Off topic. =A0Not portable. =A0Cant discuss it here. =A0Blah, blah, bl=
ah.
>
> > I like that you post. =A0In case of a lull of NNTP activity you're
> > useful to check if I still have net access...
>
> At least his posts are useful, contrary to yours!
Given that you've hijacked CLC to talk about your super-duper
collections library [which has nothing to do with clc] I'll take that
for what it's worth. Nothing.
Tom
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
8/2/2012 1:12:43 PM
|
|
On Aug 2, 8:20=A0am, gaze...@shell.xmission.com (Kenny McCormack) wrote:
> But the real, underlying, problem is that the current rulers of CLC have
> usurped the name. =A0That is, a newsgroup named comp.lang.c should be abo=
ut C,
> but they have changed it into comp.religion.c - but forgot to change the
> name. =A0It is as if someone (back around 1991) had been assigned the tas=
k of
> filing the paperwork to setup (charter, whatever terminology you prefer) =
a
> new newsgroup, but forgot to do so (maybe they went on vacation that week=
,
> maybe they got sick - who can say?). =A0So, in desperation, they (the
> religious zealots) just setup shop (for their new idea of what a newsgrou=
p
> about C should be like) here in comp.lang.c.
Why is it such a hard concept that clc is about the C language and
comp.unix.programmer is about programming applications in unix?
If you want to chat about the finer points of POSIX functionality/etc
then move on over to comp.unix.programmer.
In the real world this would be like you showing up at a football game
and complaining that there are no hockey fans around.
Tom
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
8/2/2012 1:15:09 PM
|
|
On Jul 30, 7:26=A0am, jacob navia <ja...@spamsink.net> wrote:
> Le 30/07/12 13:13, Nobody a =E9crit :
>
> > On Sun, 29 Jul 2012 11:57:32 -0500, Stephen Sprunk wrote:
>
> >> If you've already decided to limit portability to POSIX systems, pipes
> >> are the general solution for what you're trying to do, but may not be
> >> the optimal solution. =A0For instance, in the case of "ls", why not ju=
st
> >> call the functions in <dirent.h> yourself rather than opening a pipe t=
o
> >> a program that calls them for you and then writing an enormous amount =
of
> >> code to parse its output to extract the same data?
>
> > Because that requires learning the API, whereas someone who already kno=
ws
> > about system() and popen() can just write half-baked code and avoid the
> > effort of learning to do it correctly.
>
> Why is that not correct?
In theory "remove()" is more portable given that "rm" is a typical
*NIX command not found on [say] Windows.
> Why bothering to learn the API, and spend hours debugging a new
> version of "ls"?
Depends on what you want to do with the information and how you want
to present it. When I hit "read file" in nano it presents me with a
directory listing that is nicely formatted that I can walk through
with the arrow keys. Can't do that with "ls" ...
> If performance is not a big concern the code below will work correctly
> even if in this case a call to remove() would be shorter.
>
> > I have seen real-world code which did:
>
> > =A0 =A0char buf[100];
> > =A0 =A0sprintf(buf, "rm %s", filename);
> > =A0 =A0system(buf);
>
> Yes, the hard coded buffer size is a problem but in principle
> this thing will work as intended.
Except where the system doesn't have an "rm" command... And this code
snippet [though just an example] doesn't check the return code of
system. This code can also fail simply because it cannot start a
shell to run "rm" whereas remove() will fail for reasons more directly
related to failing to remove the damn file/directory.
Tom
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
8/2/2012 1:21:15 PM
|
|
On Mon, 2012-07-30, James Kuyper wrote:
> On 07/30/2012 10:54 AM, Jorgen Grahn wrote:
>> On Sun, 2012-07-29, Rui Maciel wrote:
>>> China Blue [Tor], Meersburg wrote:
> ...
>>>> Are you happy you're wasting more electrons being a dick
>>>> than where spent just giving a straightfotward and useful answer?
>>>
>>> If you took the time to actually read what has been repeatedly pointed out
>>> to you, you would notice that the replies you've got were actually straight
>>> forwrad and useful.
> ...
>> I do think the first "this is offtopic, try c.u.p." post could have
>> been formulated better.
>
> How?
>
> It had two main parts. The first part pointed out to the OP the clues
> that he should have used to realize that some other forum would be a
> more appropriate one for his question. The second part identified c.u.p
> as that more appropriate forum. Would you have left out the first part?
> It seems to me that it's important for people to understand how easy it
> is to determine that c.u.p is a more appropriate forum than this one for
> questions like this one.
We're talking about
Message-ID: <jv3k82$92v$1@dont-email.me>
You're right. The first part /did/ come across as rather aggressive
when I read it ... but it wasn't insulting, and that's better than the
average Usenet posting.
I think the tone of the postings that followed influenced my view of
the first one.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|
|
0
|
|
|
|
Reply
|
nntp24 (1600)
|
8/2/2012 1:51:01 PM
|
|
In article <02eb160b-1884-4c72-b3ef-8febdfcd5830@c25g2000yqa.googlegroups.com>,
tom st denis <tom@iahu.ca> wrote:
....
>In the real world this would be like you showing up at a football game
>and complaining that there are no hockey fans around.
Wrong, as usual.
A closer analogy would be as if I showed up at a football game and was told
that I (and all the other hockey fans) had to go home, because we aren't
true, blue, football fans (because we happen to be fans of both sports).
--
"We should always be disposed to believe that which appears to us to be
white is really black, if the hierarchy of the church so decides."
- Saint Ignatius Loyola (1491-1556) Founder of the Jesuit Order -
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/2/2012 2:16:19 PM
|
|
On 8/2/2012 8:20 AM, Kenny McCormack wrote:
> In article <dfGdnUOdz5OycoTNnZ2dnUVZ_vidnZ2d@supernews.com>,
> Cal Dershowitz <cal@example.invalid> wrote:
> ....
>> So you've got the proprietary yet available header as the only thing in
>> the source that is non-standard. Eric's a little bit of a zealot about
>> that, but he's totally right that your answer is over in
>> comp.unix.programmer .
>
> As I said before, every other newsgroup and online forum (IME) has a simple
> ethic of "If you can't (or won't) answer the question, then STFU!". If you
> violate this norm, you are pretty much politely ignored. But (obviously),
> here in CLC, no such norm exists (hence this post [the post I am writing
> right now] is unassailably correct in context).
So, if I were to go over to comp.unix.programmer, and ask a question about
reading the Windows registry to find out how to print a PDF file, the
response would be either (1) dead silence, or (2) an answer to my question?
No one would say "ask in $NEWSGROUP_X"? No one would tell me it's off-topic?
What about asking a question on getting a list of tables from a MySQL
database in rec.food.borscht?
Perhaps asking how to recover data from a crashed hard drive in
alt.sysadmin.recovery?
Or asking for help on an error message while installing Linux in
comp.os.ms-windows.advocacy?
Or ...?
I find it hard to believe that "every other newsgroup" tolerates off-topic
postings. Perhaps some tolerate it more than others, but the whole purpose
of different newsgroups is to have a place to concentrate on one particular
topic. Otherwise, why not just have a single group called "usenet"?
> But the real, underlying, problem is that the current rulers of CLC have
> usurped the name. That is, a newsgroup named comp.lang.c should be about C,
> but they have changed it into comp.religion.c - but forgot to change the
> name.
You seem to think that anything that compiles a file ending with a ".c"
extension is "C", regardless of how many platform-specific things are in it.
Yes, you can call popen() or WaitForMultipleObjects() from a C program,
but what those functions do, and the proper way to call and use them, are
not part of the C language.
Do you fell that comp.lang.c needs to support every platform-specific
extension and function every conceived, as long as there is some way to call
it from a C (plus platform-specific extensions) program? Wouldn't a
question about CreateProcessEx() be better answered in a Windows group than
here? Wouldn't a question about how to plot a conic section be better off
being asked in a math and/or algorithm group? (Though, if you have the
necessary algorithms, and need help implementing them in C, this would be
the place to go.) Wouldn't a question about how to call a FORTRAN library
function from your C code be better asked in a compiler-specific group?
> It is as if someone (back around 1991) had been assigned the task of
> filing the paperwork to setup (charter, whatever terminology you prefer) a
> new newsgroup, but forgot to do so (maybe they went on vacation that week,
> maybe they got sick - who can say?). So, in desperation, they (the
> religious zealots) just setup shop (for their new idea of what a newsgroup
> about C should be like) here in comp.lang.c.
--
Kenneth Brody
|
|
0
|
|
|
|
Reply
|
kenbrody (1862)
|
8/2/2012 3:27:14 PM
|
|
On 8/2/2012 10:16 AM, Kenny McCormack wrote:
> In article <02eb160b-1884-4c72-b3ef-8febdfcd5830@c25g2000yqa.googlegroups.com>,
> tom st denis <tom@iahu.ca> wrote:
> ....
>> In the real world this would be like you showing up at a football game
>> and complaining that there are no hockey fans around.
>
> Wrong, as usual.
>
> A closer analogy would be as if I showed up at a football game and was told
> that I (and all the other hockey fans) had to go home, because we aren't
> true, blue, football fans (because we happen to be fans of both sports).
No, since no one has a problem with anyone just "sitting around" and reading
this group. It's not until you start asking questions (at that football
game) about the finer points of soccer (which, I understand, is called
"football" in some part of the world), and then start complaining that
people tell you to leave them alone and let them enjoy the game.
At least no one's complaining that they have a "First Amendment right" to
post whatever they want. :-)
--
Kenneth Brody
|
|
0
|
|
|
|
Reply
|
kenbrody (1862)
|
8/2/2012 3:33:09 PM
|
|
On Aug 2, 10:16=A0am, gaze...@shell.xmission.com (Kenny McCormack)
wrote:
> In article <02eb160b-1884-4c72-b3ef-8febdfcd5...@c25g2000yqa.googlegroups=
..com>,
> tom st denis =A0<t...@iahu.ca> wrote:
> ...
>
> >In the real world this would be like you showing up at a football game
> >and complaining that there are no hockey fans around.
>
> Wrong, as usual.
>
> A closer analogy would be as if I showed up at a football game and was to=
ld
> that I (and all the other hockey fans) had to go home, because we aren't
> true, blue, football fans (because we happen to be fans of both sports).
Nobody is questioning your devotion to the C language. They're
questioning if you know the name on the door you walked through.
There is actually an entire usenet group devoted to programming
challenges with *NIX and it's not clc.
That's the thing I don't get about you. It's not like there is NO
PLACE for those sorts of questions you just choose to refuse to accept
the reality that you're in the wrong spot and then you post [regularly
I might add] over the course of YEARS about the great travesty that is
topicality.
And it's not even like the other [helpful] regulars are being
particularly rude or unhelpful they're just telling the posters that
there are better places to ask the questions which will likely get
more appropriate responses.
Tom
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
8/2/2012 6:51:24 PM
|
|
tom st denis <tom@iahu.ca> writes:
> On Aug 2, 10:16 am, gaze...@shell.xmission.com (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.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/2/2012 10:03:37 PM
|
|
On Aug 2, 6:03=A0pm, Keith Thompson <ks...@mib.org> wrote:
> tom st denis <t...@iahu.ca> writes:
>
> > On Aug 2, 10:16=A0am, gaze...@shell.xmission.com (Kenny McCormack)
> > wrote:
> [snip]
> > Nobody is questioning your devotion to the C language. =A0They'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.
Tom
|
|
0
|
|
|
|
Reply
|
tom236 (284)
|
8/3/2012 1:46:25 AM
|
|
In article <e533e089-7456-42e5-af24-83c0cc888b47@a4g2000vbt.googlegroups.com>,
tom st denis <tom@iahu.ca> wrote:
>On Aug 2, 6:03�pm, Keith Thompson <ks...@mib.org> wrote:
>> tom st denis <t...@iahu.ca> writes:
>>
>> > On Aug 2, 10:16�am, gaze...@shell.xmission.com (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.
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/3/2012 2:18:47 AM
|
|
tom st denis <tom@iahu.ca> writes:
> On Aug 2, 6:03 pm, Keith Thompson <ks...@mib.org> wrote:
>> tom st denis <t...@iahu.ca> writes:
>>
>> > On Aug 2, 10:16 am, gaze...@shell.xmission.com (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?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/3/2012 4:07:38 AM
|
|
On 03/08/2012 05:07, Keith Thompson wrote:
> 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.
|
|
0
|
|
|
|
Reply
|
chicken (50)
|
8/4/2012 9:40:26 AM
|
|
Chicken McNuggets <chicken@mcnuggets.com> writes:
> On 03/08/2012 05:07, Keith Thompson wrote:
>> 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.
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]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/4/2012 10:22:36 AM
|
|
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
|
|
0
|
|
|
|
Reply
|
invalid171 (6616)
|
8/4/2012 10:34:54 AM
|
|
In article <jvits4$1u2$1@news.m-online.net>,
Heinrich Wolf <invalid@invalid.invalid> wrote:
>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.
--
The motto of the GOP "base": You can't be a billionaire, but at least you
can vote like one.
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/4/2012 1:25:23 PM
|
|
"Heinrich Wolf" <invalid@invalid.invalid> writes:
> 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.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/4/2012 11:26:31 PM
|
|
On Aug 4, 11:34=A0am, "Heinrich Wolf" <inva...@invalid.invalid> wrote:
> I do not mind your question. And I do not restrict a C forum to only Wind=
ows
> OS.
nor does anyone else. The point is *both* Unix and Windows specific
questions are off-topic.
> 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.
|
|
0
|
|
|
|
Reply
|
nick_keighley_nospam (4575)
|
8/5/2012 10:27:14 AM
|
|
On Aug 5, 11:27=A0am, Nick Keighley <nick_keighley_nos...@hotmail.com>
wrote:
> On Aug 4, 11:34=A0am, "Heinrich Wolf" <inva...@invalid.invalid> wrote:
>
> > I do not mind your question. And I do not restrict a C forum to only Wi=
ndows
> > OS.
>
> 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.
|
|
0
|
|
|
|
Reply
|
gwowen (533)
|
8/6/2012 8:50:09 AM
|
|
On 08/06/2012 04:50 AM, gwowen wrote:
> On Aug 5, 11:27�am, Nick Keighley <nick_keighley_nos...@hotmail.com>
> wrote:
....
>> 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.
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.
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 11:15:20 AM
|
|
On Aug 6, 12:15=A0pm, James Kuyper <jameskuy...@verizon.net> wrote:
> 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?"
|
|
0
|
|
|
|
Reply
|
gwowen (533)
|
8/6/2012 11:25:47 AM
|
|
On 08/06/2012 07:25 AM, gwowen wrote:
> On Aug 6, 12:15�pm, James Kuyper <jameskuy...@verizon.net> wrote:
>
>> 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.
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.
>> 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.
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.
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 1:14:10 PM
|
|
In article <jvofv4$gta$1@dont-email.me>,
James Kuyper <jameskuyper@verizon.net> wrote:
....
>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".
--
A liberal, a moderate, and a conservative walk into a bar...
Bartender says, "Hi, Mitt!"
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/6/2012 2:14:13 PM
|
|
On Aug 6, 2:14=A0pm, James Kuyper <jameskuy...@verizon.net> wrote:
> 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"
|
|
0
|
|
|
|
Reply
|
gwowen (533)
|
8/6/2012 2:43:35 PM
|
|
On 08/06/2012 10:43 AM, gwowen wrote:
> On Aug 6, 2:14 pm, James Kuyper <jameskuy...@verizon.net> wrote:
>
>> 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?
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.
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 3:52:46 PM
|
|
"gwowen" <gwowen@gmail.com> wrote in message
news:90326476-cbc2-49ea-b55e-9cd794727529@m13g2000vbd.googlegroups.com...
> On Aug 5, 11:27 am, Nick Keighley <nick_keighley_nos...@hotmail.com>
> wrote:
>> On Aug 4, 11:34 am, "Heinrich Wolf" <inva...@invalid.invalid> wrote:
>>
>> > 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.
>
> 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.
--
Bartc
|
|
0
|
|
|
|
Reply
|
bc (2221)
|
8/6/2012 5:04:26 PM
|
|
In article <jvotgo$7rs$1@dont-email.me>, BartC <bc@freeuk.com> wrote:
....
>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.
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.
--
"We should always be disposed to believe that which appears to us to be
white is really black, if the hierarchy of the church so decides."
- Saint Ignatius Loyola (1491-1556) Founder of the Jesuit Order -
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/6/2012 6:24:23 PM
|
|
gwowen <gwowen@gmail.com> writes:
> On Aug 6, 12:15 pm, James Kuyper <jameskuy...@verizon.net> wrote:
>> 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.
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?
[...]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/6/2012 6:34:07 PM
|
|
gwowen <gwowen@gmail.com> writes:
> On Aug 6, 2:14 pm, James Kuyper <jameskuy...@verizon.net> wrote:
>> 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"
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?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/6/2012 6:37:23 PM
|
|
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.
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 6:46:01 PM
|
|
"BartC" <bc@freeuk.com> writes:
> "gwowen" <gwowen@gmail.com> wrote in message
> news:90326476-cbc2-49ea-b55e-9cd794727529@m13g2000vbd.googlegroups.com...
>> On Aug 5, 11:27 am, Nick Keighley <nick_keighley_nos...@hotmail.com>
>> wrote:
>>> On Aug 4, 11:34 am, "Heinrich Wolf" <inva...@invalid.invalid> wrote:
>>>
>>> > 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.
>>
>> 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.
The standard C language is not a narrow topic. This newsgroup still has
a decent level of traffic, even if you consider only the articles that
you and I would both agree are topical. And comp.unix.programmer is
also still active. I think some relevant Windows groups are as well;
comp.os.ms-windows.programmer.win32 is the one I tend to refer people
to.
And the fact remains that if you have a question about some
POSIX-specific C function, comp.unix.programmer has a higher density
than comp.lang.c of people who can answer and discuss it intelligently.
(Some of them happen to be the same people).
Standard C happens to be an interest of mine. I *like* having a forum
to discuss it in.
As for putting "OT" in the subject, how about
Subject: OT: How do I repair my bicycle chain?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/6/2012 6:50:31 PM
|
|
Keith Thompson <kst-u@mib.org> writes:
> gwowen <gwowen@gmail.com> writes:
>> On Aug 6, 12:15 pm, James Kuyper <jameskuy...@verizon.net> wrote:
>>> 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.
>
> 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?
>
> [...]
I probably misunderstood you. I thought you meant you didn't
believe James's statement that "We believe that such questions
should not be asked HERE", i.e., that you were expressing doubt
about what we believe. On further consideration, I think you meant
that you don't believe that such questions should not be asked here.
Assuming that's the case, please ignore my previous response. (I
still disagee with you.)
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/6/2012 6:53:52 PM
|
|
James Kuyper <jameskuyper@verizon.net> writes:
[...]
> The closest you could get would be lcc-win32, which for some reason is
> discussed here fairly frequently, rather than on comp.lang.lcc.
[...]
You mean comp.compilers.lcc, which discusses both lcc-win32 and the
lcc compiler on which it was based.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/6/2012 6:55:55 PM
|
|
"Keith Thompson" <kst-u@mib.org> wrote in message
news:lnehnjyhvs.fsf@nuthaus.mib.org...
> "BartC" <bc@freeuk.com> writes:
>> 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.
> And comp.unix.programmer is
> also still active. I think some relevant Windows groups are as well;
> comp.os.ms-windows.programmer.win32 is the one I tend to refer people
> to.
That one is not so bad. But microsoft.public.win32.programmer.gdi for
example, last had a question posted 8 months ago (and hasn't had any
replies). And someone who thinks gnu.gcc might help with their gcc-specific
C problems, will see it apparently hasn't had any posts - ever!
> As for putting "OT" in the subject, how about
>
> Subject: OT: How do I repair my bicycle chain?
(Actually they could well have a better chance of getting help here, than
somewhere like uk.rec.cycling, which is very active, but highly political.)
The OT prefix ought to be used sensibly, not used an excuse to discuss
anything under the sun.
--
Bartc
|
|
0
|
|
|
|
Reply
|
bc (2221)
|
8/6/2012 7:28:36 PM
|
|
On 08/06/2012 03:28 PM, BartC wrote:
....
> The OT prefix ought to be used sensibly, not used an excuse to discuss
> anything under the sun.
That begs the question - IMO it is almost never "sensible" to post the
first message of a thread using "OT" - if you need "OT", you've chosen
the wrong forum for your message. Thread drift often makes it
appropriate to add it to an existing thread's subject line, but that's a
different issue.
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 7:44:46 PM
|
|
On 08/06/2012 02:55 PM, Keith Thompson wrote:
> James Kuyper <jameskuyper@verizon.net> writes:
> [...]
>> The closest you could get would be lcc-win32, which for some reason is
>> discussed here fairly frequently, rather than on comp.lang.lcc.
> [...]
>
> You mean comp.compilers.lcc, which discusses both lcc-win32 and the
> lcc compiler on which it was based.
I should have checked, rather than relying upon my memory. Sorry!
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/6/2012 11:13:02 PM
|
|
On Aug 6, 9:50=A0am, gwowen <gwo...@gmail.com> wrote:
> On Aug 5, 11:27=A0am, Nick Keighley <nick_keighley_nos...@hotmail.com>
> wrote:
>
> > On Aug 4, 11:34=A0am, "Heinrich Wolf" <inva...@invalid.invalid> wrote:
>
> > > 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.
>
> So it is repeatedly claimed. =A0Such repitition aside, I don't see any
> evidence that that is actually the case.
I was correcting the impression he'd formed that people thought this
was
a Windows only ng.
I see little point in reiterating previously iterated positions
> 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.
|
|
0
|
|
|
|
Reply
|
nick_keighley_nospam (4575)
|
8/7/2012 7:07:28 AM
|
|
On Aug 6, 7:34=A0pm, Keith Thompson <ks...@mib.org> wrote:
> gwowen <gwo...@gmail.com> writes:
> > On Aug 6, 12:15=A0pm, James Kuyper <jameskuy...@verizon.net> wrote:
> >> There's a key word missing from that last sentence. We believe that su=
ch
> >> questions should not be asked HERE.
>
> > I don't believe that.
>
> Why not?
Sorry, vague answer. I meant "I do not believe that such questions
should be asked here." Not "I do not believe that you believe that
such questions should be asked here".
|
|
0
|
|
|
|
Reply
|
gwowen (533)
|
8/7/2012 7:33:32 AM
|
|
"BartC" <bc@freeuk.com> ha scritto nel messaggio
news:jvp62e$vnn$1@dont-email.me...
> "Keith Thompson" <kst-u@mib.org> wrote in message
> news:lnehnjyhvs.fsf@nuthaus.mib.org...
>> "BartC" <bc@freeuk.com> writes:
> The OT prefix ought to be used sensibly, not used an excuse to discuss
> anything under the sun.
why not "discuss anything under the sun"? if it is one time/year...
|
|
0
|
|
|
|
Reply
|
io_x
|
8/7/2012 8:15:53 AM
|
|
Geeze, are you still arguing about how much it wastes bandwidth to tell people
about popen/pclose? The question was asked and answerred days ago, and you
people still have a pinecone shoved up where it's rather uncomfortable.
--
My name Indigo Montoya. | Die, Robbie Ferrier! Die!
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (668)
|
8/7/2012 8:55:59 AM
|
|
On 08/07/2012 03:33 AM, gwowen wrote:
> On Aug 6, 7:34�pm, Keith Thompson <ks...@mib.org> wrote:
>> gwowen <gwo...@gmail.com> writes:
>>> On Aug 6, 12:15�pm, James Kuyper <jameskuy...@verizon.net> wrote:
>>>> 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.
>>
>> Why not?
>
> Sorry, vague answer. I meant "I do not believe that such questions
> should be asked here." Not "I do not believe that you believe that
> such questions should be asked here".
"Vague" doesn't quite cover it. To me, you seemed to be saying 'I don't
believe "that such questions should not be asked here".', which is
almost, but not quite, exactly the opposite of what you meant.
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/7/2012 10:44:14 AM
|
|
On Aug 7, 11:44=A0am, James Kuyper <jameskuy...@verizon.net> wrote:
> "Vague" doesn't quite cover it. To me, you seemed to be saying 'I don't
> believe "that such questions should not be asked here".', which is
> almost, but not quite, exactly the opposite of what you meant.
No. That's exactly what I meant. I don't believe that such questions
should not be asked here.
I believe that any question relating to the C language, including
common extensions and C APIs like POSIX, pthreads, the Win32 C API,
Jacob's Container library, DOS TSR, Borland C should all be welcomed.
Some of those may get better answers elsewhere, and there's no problem
in pointing that out but if that's all you've got to say, you're
probably best off keeping quiet for a day or so, to see if someone who
knows more comes along.
|
|
0
|
|
|
|
Reply
|
gwowen (533)
|
8/7/2012 12:15:58 PM
|
|
On 08/07/2012 08:15 AM, gwowen wrote:
> On Aug 7, 11:44�am, James Kuyper <jameskuy...@verizon.net> wrote:
>
>> "Vague" doesn't quite cover it. To me, you seemed to be saying 'I don't
>> believe "that such questions should not be asked here".', which is
>> almost, but not quite, exactly the opposite of what you meant.
>
> No. That's exactly what I meant. I don't believe that such questions
> should not be asked here.
In your previous message you said:
> ... I meant "I do not believe that such questions should be asked here."
The only difference between those two different expressions, by you, of
what you meant (other than "do not" => "don't") is "should" => "should
not", a difference that changes the meaning radically. I hope you can
understand how such tiny discrepancies can lead to major confusion.
....
> Some of those may get better answers elsewhere, and there's no problem
> in pointing that out but if that's all you've got to say, you're
> probably best off keeping quiet for a day or so, to see if someone who
> knows more comes along.
I believe that the earlier the poster is re-directed to a more
appropriate forum, the better. He or she will get better answers sooner
that way.
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
8/7/2012 12:37:40 PM
|
|
On 2012-08-07, gwowen <gwowen@gmail.com> wrote:
> I believe that any question relating to the C language,
> including common extensions and C APIs like POSIX, pthreads,
> the Win32 C API, Jacob's Container library, DOS TSR, Borland C
> should all be welcomed.
Despite that, I hope you can see why a person interested in C
programming wouldn't wish this group to be filled with
discussions of non-standard C libraries and implementation
details of unknown compilers.
Conversely, most regulars of this newgroup are respectful to
those who come here with initially mistaken assumptions.
> Some of those may get better answers elsewhere, and there's no
> problem in pointing that out but if that's all you've got to
> say, you're probably best off keeping quiet for a day or so, to
> see if someone who knows more comes along.
comp.lang.c is an unmoderated group with effectively no charter.
Thus, if you are invested in defining the topic of this
newsgroup, then some sort of action is required.
You may make the accusation that this group spends perhaps too
much time and bandwidth defining itself. But it's long-standing
part of its culture.
--
Neil Cerutti
|
|
0
|
|
|
|
Reply
|
neilc1 (263)
|
8/7/2012 1:04:20 PM
|
|
gwowen <gwowen@gmail.com> writes:
> On Aug 7, 11:44 am, James Kuyper <jameskuy...@verizon.net> wrote:
>> "Vague" doesn't quite cover it. To me, you seemed to be saying 'I don't
>> believe "that such questions should not be asked here".', which is
>> almost, but not quite, exactly the opposite of what you meant.
>
> No. That's exactly what I meant. I don't believe that such questions
> should not be asked here.
>
> I believe that any question relating to the C language, including
> common extensions and C APIs like POSIX, pthreads, the Win32 C API,
> Jacob's Container library, DOS TSR, Borland C should all be welcomed.
>
> Some of those may get better answers elsewhere, and there's no problem
> in pointing that out but if that's all you've got to say, you're
> probably best off keeping quiet for a day or so, to see if someone who
> knows more comes along.
Ok, let me ask you a more specific question.
If someone has a question about, say, the fork() function (which
is defined by POSIX and not by ISO C), would that person be better
off asking that question in comp.lang.c or in comp.unix.programmer?
The answer seems obvious to me: it's better to ask in
comp.unix.programmer, largely because it's a Unix/POSIX-specific
question, and that's where the experts hang out. Do you agree?
Are you seriously saying we should "keep quiet for a day or so"
rather than letting the questioner know about a better forum?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
8/7/2012 7:57:37 PM
|
|
In article <lnobmmwk3y.fsf@nuthaus.mib.org>,
Keith Thompson <kst-u@mib.org> wrote his usual twaddle, full of the usual "assume that which is to be proven" falacies:
....
>Are you seriously saying we should "keep quiet for a day or so"
>rather than letting the questioner know about a better forum?
In short: Yes. As I've explained to you repeatedly over the last few days,
the ethic in every other group/online forum is: If you can't (or won't)
answer the question, then STFU. Do not get in the way of others who can and
will. As they say in the army, lead, follow, or get out of the way!
This method works very well and should be followed here.
See, the problem is that even *if* your intentions are pure (when you
"redirect" the questioner to a more "appropriate" group), which is highly
doubtful, BTW, the questioner never sees it that way. Instead, all he sees
is you being a jerk.
--
Religion is regarded by the common people as true,
by the wise as foolish,
and by the rulers as useful.
(Seneca the Younger, 65 AD)
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/7/2012 9:24:08 PM
|
|
In article <lnehnjyhvs.fsf@nuthaus.mib.org>,
Keith Thompson <kst-u@mib.org> wrote:
....
>The standard C language is not a narrow topic.
Yes. It is. Moreover, although it seems to be a subject of great interest
to obessives like you, it really is of no interest to the typical newbie.
So, make no mistake, by making this newsgroup be about religious C (Chapter
& verse), you are excluding the newbies who might otherwise benefit from a
more diverse group. Believe me, this standards-only stuff is only of
interest to folks like Kiki (and a few other "regulars" here).
--
But the Bush apologists hope that you won't remember all that. And they
also have a theory, which I've been hearing more and more - namely,
that President Obama, though not yet in office or even elected, caused the
2008 slump. You see, people were worried in advance about his future
policies, and that's what caused the economy to tank. Seriously.
(Paul Krugman - Addicted to Bush)
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/7/2012 9:26:41 PM
|
|
Kenny McCormack wrote:
>>The standard C language is not a narrow topic.
>
> Yes. It is. Moreover, although it seems to be a subject of great
> interest to obessives like you, it really is of no interest to the typical
> newbie.
>
> So, make no mistake, by making this newsgroup be about religious C
> (Chapter & verse), you are excluding the newbies who might otherwise
> benefit from a more diverse group. Believe me, this standards-only stuff
> is only of interest to folks like Kiki (and a few other "regulars" here).
This newsgroup tends to receive an average of about 900 posts per month
while focusing on the C programming language. I don't believe this would
happen if the C programming language was, as you claim, a narrow topic.
In addition, no newbie is excluded if a newsgroup dedicated to the C
programming language hosts discussions on the C programming language. If a
newbie wishes to discuss any issue regarding the use of the C programming
language then this is the place to go. If, instead, a newbie wishes to
discuss any issue which goes beyond the C programming language, such as unix
programming, then there are other places which are expected to serve him
better. The reason for that is that those topics tend to be "only of
interest to folks" who follow those newsgroups.
Finally, these people whose interests and focus you criticise so much are
actually those who are in a position to help out and give meaningful answers
to newbies, which they actually do. In other words, they are essentially
the reason why newbies go here to begin with. So, if you actually had any
concern regarding their best interests then you wouldn't be launching these
personal attacks on the people who spend their personal time helping them
out when they can.
Rui Maciel
|
|
0
|
|
|
|
Reply
|
rui.maciel (1761)
|
8/8/2012 7:47:02 AM
|
|
On Aug 7, 10:24=A0pm, gaze...@shell.xmission.com (Kenny McCormack)
wrote:
> In article <lnobmmwk3y....@nuthaus.mib.org>,
> Keith Thompson =A0<ks...@mib.org>
<snip>
> >Are you seriously saying we should "keep quiet for a day or so"
> >rather than letting the questioner know about a better forum?
>
> In short: Yes. =A0As I've explained to you repeatedly over the last few d=
ays,
> the ethic in every other group/online forum is: If you can't (or won't)
> answer the question, then STFU.
I know you keep on saying this but I haven't come across it.
Most other .lang groups don't get as much topic busting as comp.lang.c
but I'm sure I've seen people being politely redirected on other
groups.
Besides don't you get bored repeating yourself?
<snip>
> See, the problem is that even *if* your intentions are pure (when you
> "redirect" the questioner to a more "appropriate" group), which is highly
> doubtful, BTW, the questioner never sees it that way. =A0Instead, all he =
sees
> is you being a jerk.
I've known people to say thankyou sometimes.
|
|
0
|
|
|
|
Reply
|
nick_keighley_nospam (4575)
|
8/8/2012 7:58:37 AM
|
|
Rui Maciel wrote:
> This newsgroup tends to receive an average of about 900 posts per
> month while focusing on the C programming language.
What is wrong with that "picture"?
|
|
0
|
|
|
|
Reply
|
tinker454 (114)
|
8/11/2012 3:58:36 AM
|
|
On 8/4/2012 9:25 AM, Kenny McCormack wrote:
[...]
> 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.
ITYM:
In fact, it runs on, and has been ported to, many non-Unix OSes (including
Windows). This is a Good Thing.
--
Kenneth Brody
|
|
0
|
|
|
|
Reply
|
kenbrody (1862)
|
8/15/2012 5:52:59 PM
|
|
In article <5016C58C.5070802@verizon.net>,
James Kuyper <jameskuyper@verizon.net> wrote:
....
>We can only comment on the questions you actually ask. The only specific
>example you gave was for "ls", for which there are utilities from
>section 2 of the Unix manual that provide the same information in a form
>that's easier to deal with from inside a program than parsing the output
>of "ls". There's lots of other POSIX command line utilities for which
>that's also true. The fact that you were interested in utilities for
>which it's not true was not at all obvious.
This, incidentally, is a very good illustration of why, when posting in
hostile environments, such as this one (though, to be fair, most of Usenet
also qualifies), it is a good idea to not be too specific about what your
real problem is *or* to give examples (analogies) which are not your real
problem.
In both cases, the goons will latch onto the specific problem (as you have
proudly done) and ignore the question that you actually asked.
--
They say compassion is a virtue, but I don't have the time!
- David Byrne -
|
|
0
|
|
|
|
Reply
|
gazelle3 (1609)
|
8/15/2012 9:21:08 PM
|
|
On 15-Aug-12 16:21, Kenny McCormack wrote:
> In article <5016C58C.5070802@verizon.net>,
> James Kuyper <jameskuyper@verizon.net> wrote:
> ...
>> We can only comment on the questions you actually ask. The only specific
>> example you gave was for "ls", for which there are utilities from
>> section 2 of the Unix manual that provide the same information in a form
>> that's easier to deal with from inside a program than parsing the output
>> of "ls". There's lots of other POSIX command line utilities for which
>> that's also true. The fact that you were interested in utilities for
>> which it's not true was not at all obvious.
>
> This, incidentally, is a very good illustration of why, when posting in
> hostile environments, such as this one (though, to be fair, most of Usenet
> also qualifies), it is a good idea to not be too specific about what your
> real problem is *or* to give examples (analogies) which are not your real
> problem.
>
> In both cases, the goons will latch onto the specific problem (as you have
> proudly done) and ignore the question that you actually asked.
Vague questions get vague answers--probably too vague to be of any use.
Specific questions get specific answers--but if the specifics do not
match your actual problem, they probably won't be of any use either.
S
--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
|
|
0
|
|
|
|
Reply
|
stephen (1138)
|
8/15/2012 10:17:16 PM
|
|
Chicken McNuggets wrote:
> Because the "ls" command was an example. I really want to process the
> output of things like "iostat", "/proc/loadavg", "sar" and "tcpdump".
It appears that /proc/loadavg is one of those "everything is a file" that
unix is known for. So, in this case instead of relying on wrapping unix
commands in C you only need to open the file, read it, parse the content,
and finally close it.
Rui Maciel
|
|
0
|
|
|
|
Reply
|
rui.maciel (1761)
|
8/16/2012 8:43:08 AM
|
|
In article <jvp24n$55f$1@news.xmission.com>,
Kenny McCormack <gazelle@shell.xmission.com> wrote:
>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.
If they're concerned with that, they're in the wrong newsgroup.
That is "comp.std.c".
|
|
0
|
|
|
|
Reply
|
jgk1 (176)
|
8/22/2012 5:08:41 PM
|
|
On 8/6/2012 2:44 PM, James Kuyper wrote:
> On 08/06/2012 03:28 PM, BartC wrote:
> ....
>> The OT prefix ought to be used sensibly, not used an excuse to discuss
>> anything under the sun.
>
> That begs the question - IMO it is almost never "sensible" to post the
> first message of a thread using "OT" - if you need "OT", you've chosen
> the wrong forum for your message. Thread drift often makes it
> appropriate to add it to an existing thread's subject line, but that's a
> different issue.
Where is it sensible to post the first message of your thread if it
is mainly a question about what the proper forum is, since you haven't
been able to find any forum that looks suitable?
|
|
0
|
|
|
|
Reply
|
milesrf (101)
|
9/10/2012 3:46:06 AM
|
|
On 2012-09-10, Robert Miles <milesrf@Usenet-News.net> wrote:
> Where is it sensible to post the first message of your thread if it
> is mainly a question about what the proper forum is, since you haven't
> been able to find any forum that looks suitable?
news.newusers.questions, perhaps.
|
|
0
|
|
|
|
Reply
|
kaz15 (1129)
|
9/10/2012 4:29:16 AM
|
|
Robert Miles <milesrf@Usenet-News.net> writes:
[...]
> Where is it sensible to post the first message of your thread if it
> is mainly a question about what the proper forum is, since you haven't
> been able to find any forum that looks suitable?
By convention, discussions about topicality are considered topical.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
|
|
0
|
|
|
|
Reply
|
kst-u (21549)
|
9/10/2012 5:42:13 AM
|
|
On Monday, September 10, 2012 6:46:23 AM UTC+3, Robert Miles wrote:
> On 8/6/2012 2:44 PM, James Kuyper wrote:
> > On 08/06/2012 03:28 PM, BartC wrote:
> > ....
> >> The OT prefix ought to be used sensibly, not used an excuse to discuss
> >> anything under the sun.
> >
> > That begs the question - IMO it is almost never "sensible" to post the
> > first message of a thread using "OT" - if you need "OT", you've chosen
> > the wrong forum for your message. Thread drift often makes it
> > appropriate to add it to an existing thread's subject line, but that's a
> > different issue.
>
> Where is it sensible to post the first message of your thread if it
> is mainly a question about what the proper forum is, since you haven't
> been able to find any forum that looks suitable?
People in c.l.c are so friendly that you can ask whatever you want.
They have so broad minds that someone eventually knows correct
answer ... even if the question is about something really exotic
like UNIX or Windows. The people who do not know the answer
contribute by friendly humming and nudging each other and original
poster to pump the thread until someone answers. Traditional topic
in such humm-pump remarks is topicality.
|
|
0
|
|
|
|
Reply
|
ootiib (706)
|
9/10/2012 10:10:49 AM
|
|
On 09/09/2012 11:46 PM, Robert Miles wrote:
> On 8/6/2012 2:44 PM, James Kuyper wrote:
>> On 08/06/2012 03:28 PM, BartC wrote:
>> ....
>>> The OT prefix ought to be used sensibly, not used an excuse to discuss
>>> anything under the sun.
>>
>> That begs the question - IMO it is almost never "sensible" to post the
>> first message of a thread using "OT" - if you need "OT", you've chosen
>> the wrong forum for your message. Thread drift often makes it
>> appropriate to add it to an existing thread's subject line, but that's a
>> different issue.
>
> Where is it sensible to post the first message of your thread if it
> is mainly a question about what the proper forum is, since you haven't
> been able to find any forum that looks suitable?
I did say "almost" - reasonable accommodation should be made for
reasonable levels of uncertainty. Post such a message on one of the
forums (with a reasonable activity level) that comes closest to looking
suitable. In such a place you're more likely to find someone who knows
what an appropriate forum is for your question. Just don't go posting
such a question at random.
--
James Kuyper
|
|
0
|
|
|
|
Reply
|
jameskuyper (5210)
|
9/10/2012 12:01:54 PM
|
|
On 2012-09-10, Keith Thompson <kst-u@mib.org> wrote:
> Robert Miles <milesrf@Usenet-News.net> writes:
> [...]
>> Where is it sensible to post the first message of your thread if it
>> is mainly a question about what the proper forum is, since you haven't
>> been able to find any forum that looks suitable?
>
> By convention, discussions about topicality are considered topical.
You didn't think this one through, Kiki.
"Where might it be topical to ask a question about hair spray for rats?"
What if that topicality being discussed has nothing even remotely to do with
the topicality of the newsgroup?
This new-fangled "topicality is topical" is not a convention, but only an
excuse for some regulars to feel they have "immunity" when engaging in extended
debates about why something or someone is off topic. This view is overdue
for being laid to rest.
I've been here longer than most regulars, and all I remember is that at
the height of the topicality policing, there had been kind of agreement that
it's okay to ask about where a question can be posted, if that question is
related to the use of some C dialect in some way (e.g. platform-specific
programming with some C based toolchain).
But I have come to believe that if the question is related to the use of some C
dialect, even to do something platform-specific, then it is actually just fine
in comp.lang.c. Part of why I think this now is the lessening of the traffic,
compared to the "heyday". Lower traffic newsgroups can tolerate more topic
diversity. (As an extreme example. if all of Usenet consisted of only five
people, they would best use only one newsgroup to discuss anything whatsoever,
rather than chasing each other across 10,000 newsgroups in order to maintain a
topicality charade.)
We have come full circle, because if you look at very old archives of
comp.lang.c (or net.lang.c), you will see that once upon a time it was also
more relaxed. The strict topic policing kicked in sometime around the mid to
late 1990's when the daily volume became quite high. (And, furthermore, C had
then been standardized for a number of years, giving some people the excuse
that only what is written up in ISO 9899:1990 is C and nothing else.)
|
|
0
|
|
|
|
Reply
|
kaz15 (1129)
|
9/10/2012 7:15:21 PM
|
|
Kaz Kylheku wrote:
>
> On 2012-09-10, Keith Thompson <kst-u@mib.org> wrote:
> > Robert Miles <milesrf@Usenet-News.net> writes:
> > [...]
> >> Where is it sensible to post the first message of your thread if it
> >> is mainly a question about what the proper forum is,
> >> since you haven't
> >> been able to find any forum that looks suitable?
> >
> > By convention, discussions about topicality are considered topical.
>
> You didn't think this one through, Kiki.
>
> "Where might it be topical
> to ask a question about hair spray for rats?"
>
> What if that topicality being discussed
> has nothing even remotely to do with
> the topicality of the newsgroup?
>
> This new-fangled "topicality is topical" is not a convention,
> but only an excuse for some regulars
> to feel they have "immunity" when engaging in extended
> debates about why something or someone is off topic.
> This view is overdue for being laid to rest.
You're off topic.
Oops!
--
pete
|
|
0
|
|
|
|
Reply
|
pfiland (6614)
|
9/11/2012 2:25:51 AM
|
|
|
99 Replies
59 Views
(page loaded in 1.346 seconds)
Similiar Articles: standar command line argument parser - comp.unix.programmer ...... wondering if there is a C/C++ command ... end-session ] End an existing ... argument parser - comp.unix.programmer ... Hello all, I was wondering if there is a C/C++ command ... sed to insert lines in a file. - comp.unix.programmerInserting new line of code between existing XML code - comp.soft ... sed to insert ... Replace, and Count File Lines This article is part of the on going Unix sed command ... Create direcotry recursively - comp.unix.programmerIs thre any best already existing code to do this? Note: I canot use ... directory - comp.unix.admin Create direcotry recursively - comp.unix.programmer find command to ... Live Upgrade - Unable to Determine Boot Device - comp.unix.solaris ...I'm trying to create a boot environment on a system which has the existing OS (Solaris 10) mirrored using SVM. When I try to use the lucreate command... Hide Password in a script - comp.unix.solaris... for the forseeable future. > > Write a few-liner C program to wrap the ... Hide Password in a script - comp.unix.solaris There is no ... on 'fdx' command usage in a shell ... .ini file C/C++ lib needed - comp.unix.programmer.ini file C/C++ lib needed - comp.unix.programmer Hi, I'd need a C ... once you've done the "vlib" and "vmap" commands ... order is write the Mex file, or use an existing ... maximum file record lengths? - comp.unix.programmerHe's not writing an application, he's using existing applications, and ... comp.databases.btrieve ... maximum file record lengths? - comp.unix.programmer Btrieve 5.10 command ... Leaving a process running after log-off - comp.unix.solaris ...... ago in my other thread (foce cp to overwrite existing ... In general, I use > 'at now' command which always works on any unix platform. > On Linux, in C, it's possible to ... How to concatenate two (mor more) commands on one line? - comp.os ...Why are you wrapping the command in qoutes? That says to regard the whole thing as one ... how to run long command on unix - comp.unix.solaris How to concatenate two (mor ... Change process/command name? - comp.unix.solarisChange process/command name? - comp.unix.solaris Folks, How can I change the process ... get umask of existing process? - comp.unix.solaris I have process that is ... Necessary world-writable files/directories - comp.unix.admin ...X Command and 7Zip - comp.soft-sys.sas Any zip tools to create zip64 files ... get umask of existing process? - comp.unix.solaris Necessary world-writable files/directories ... Characters permitted in file names - comp.unix.programmer ...Execute the following list of commands in that order, and ... A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ... How can I add an extra character or symbol to an existing ... Solaris 10 Upgrade Procedures - comp.unix.solaris... scratch or just simply do an upgrade over the existing ... Your showrev command will not work if you are on x86 ... Solaris 10 Upgrade Procedures - comp.unix.solaris If ... nth day of the year? - comp.lang.awkAnd since we're only talking about the day of the year, don't worry about wrapping ... not* > comp.unix.awk, so assuming Unix (or the availability of Unix commands such > as ... cannot find entry symbol _start - comp.unix.programmerIf the O.P wants to figure out the ld command line, he could use gcc -v ... Cannot overwrite an existing symbolic link - comp.unix.solaris ... The program is free. >> >>The ... Cocoa Dev Central: Wrapping UNIX Commands« Wrapping UNIX Commands ... that having a GUI shell for the many UNIX commands ... no-clobber don't clobber existing files. -c ... Unix and Windows Shell Programming - Ch -- an embeddable C/C++ ...There are more than 250 Unix commands in Ch for Windows 32 ... file or update the modification time of an existing file ... wrap files to fit in a specified number of columns 7/30/2012 1:39:44 PM
|