UNIX questions should be considered Semi-On Topic on clc

K

Kenny McCormack

Malcolm McLean said:
Questions on the Unix interface are not off-topic in the same way that a
question on knitting would be off-topic. However the reality is that C is so

No, questions on (and discussion of) knitting are completely OK. As are
discussions of Shakespeare, English spelling and grammar, dirty
underwear, and problems with apartments and landlords. It is only the
stuff that's just a smidgen off-topic (in some people's not so humble
opinions) that causes the rockets to fire.
 
A

Antoninus Twink

It's written in standardese, a dialect of English that will be
unfamiliar to most C programmers.

EXACTLY.

And yet, you want to restrict all discussions in this group to take
place in this very same standardese!

So by your own admission, you want to exclude "most C programmers" from
taking part in the discussions here. Most real world programmers aren't
able to breathe the rarefied air of discussions of the minutiae of the
ISO standards - oh well! let them go elsewhere, and the self-appointed
elite can continue to toady up to each other and look down on the stupid
outsiders who aren't interested in the difference between undefined
behavior and implementation-defined behavior.

This disgusting elitism is exactly the reason that most people have no
interest in an academic career - merit and ability counts for nothing,
only knowing the right people and having the right shibboleths has any
value.

I say: NO!

Let's make clc a meritocracy, where egalitarianism flourishes and
programmers can exchange knowledge and experience in a frank and
down-to-earth way. Let's have an end to Heathfield's intolerable
arrogance and Thomson's obsession with trivial details. Let's have an
end to the self-congratualting clique who only care about preserving
their rights and privileges. Let's dare to try something new and better.

To quote the zeitgeist once again: YES WE CAN.
 
A

Antoninus Twink

This is acceptable.

You use the word "acceptable" as if it is objectively defined.

clc is a highly hetergeneous group, where there are many, many different
opinions and shades of opinion as to what is "acceptable".
 
C

CBFalconer

Wolfgang said:
Mark McIntyre wrote:
.... snip ...


Because I often see it here, that posts that contain a tiny
little bit of OS specifics are regarded Off Topic here, even if
the question itself may well be a C one like why does my code
compile, but program crashes if reaching $OS_SPECIFIC_FUNCTION.
It's simply assumed, that the function is used wrongly. But
sometimes the error may lie in a wrong typecast, passing the
value of a pointer and not the pointer to the pointer or
something similair into a function that takes a void*. And a
newbie might/probably does not know the details of that. But it
happened close to a non standard function, it's like a red flag
for some people which makes those blind for the actual problem,
which still might be a sole C problem. Especially if the API has
been designed around C and knowledge of it's structures is
required to understand it. I'm just waiting for a X-post from
c.u.p referring here with a sentence like "that's a C question.
You can't call 'xyz' without knowing, how C treats the types of
it's parameters."

And why do you object to sending the newbie (or whatever) to a
newsgroup where s/he will get accurate advice from people familiar
with that system? The point is that the problem is NOT a C
problem, and the C language is the subject of this newsgroup.

If the $OS_SPECIFIC_FUNCTION is not the culprit, simply remove it
and substitute a detailed function, or a standard C function. This
immediately resolves your objection.
 
C

CBFalconer

user923005 said:
.... snip ...

I have a book on my desk called "Algorithms in C" by Sedgewick.
It also has C in the name and Algorithms too! So algorithms are
on topic.

I have Sedgewicks Algorithms book, written earlier, with the same
material. However, the code is expressed in Pascal. So, according
to you, Pascal code is topical.

I disagree.
 
R

Richard

CBFalconer said:
And why do you object to sending the newbie (or whatever) to a
newsgroup where s/he will get accurate advice from people familiar
with that system? The point is that the problem is NOT a C
problem, and the C language is the subject of this newsgroup.

Not everyone only reads the standard for fun Chuck. Some people here
know other things about C and styles and APIs. Do not insult everyone
because you are totally clueless about C in the real world.
If the $OS_SPECIFIC_FUNCTION is not the culprit, simply remove it
and substitute a detailed function, or a standard C function. This
immediately resolves your objection.

If you want to help do so. But, for a change, double check before you
posts because, frankly, your input is generally rude, abrasive and plain
wrong.
 
I

Ian Collins

CBFalconer said:
user923005 wrote:
.... snip ...

I have Sedgewicks Algorithms book, written earlier, with the same
material. However, the code is expressed in Pascal. So, according
to you, Pascal code is topical.

I disagree.
Did you bother to read the rest of Dan's post? If so, it appears to
have flown over your head. If not, please do before replying to out of
context snippets.
 
K

Kaz Kylheku

Questions on the Unix interface are not off-topic in the same way that a
question on knitting would be off-topic. However the reality is that C is so
widely used that it would be unreasonable to try to cover every library.

But this is questionable. If the topic is relaxed, does that mean that the
newsgroup will now exhaustively cover every single platform-specific library
known to man?

All that matters is the amount of noise. Is it better to have 30 postings
harping about how some library is off topic, or is it better to just
let it be. If someone has an answer, let it be said, and that's it.
There isn't an obvious answer, but it is not a matter of opinion, but of
consensus.

I think we can look at treatment of algorithms. "How do I implement a linked
list in C?" is on-topic. "How do I implement Needleman-Wunch multiple
alignment?" would not be.

The question will be asked anyway. The only difference that topicality makes
is how much noise will be dedicated to redirecting that message with
``you are off topic'' replies, and whether it will devolve into a topicality
discussion, like this one.

If Needleman-Wunch is considered tangentially topical, then all of that can
cease. Someone can say, I have a nice C routine which does Needleman-Wunch. If
that's not good enough, try the algorithms wizards in comp.programming,
or comp.theory.

People who don't know anything about Needleman-Wunch (other than that
it's not pertinent to C) can perhaps try just shutting up! How about that.

Then if nobody in the newsgroup knows anything about Needleman-Wunch, there is
no reply! Maybe that person will ask again. At that point, a redirection to
comp.programming is fine.

When posting a redirection, a randomized backoff strategy should idealy be
applied. When the duplicate question appears on your server, pick a random
number between 30 and 330. Wait that many minutes. If no other reply has
appeared after that time passes, then go ahead and post. Use some kind of
real random process, and if the random number is too low, do not choose another
random number.
 
K

Kaz Kylheku

Kaz Kylheku wrote:
...

The ISO C standard is certainly canonical, but it is not a textbook, and

I used the standard exactly like a textbook, and it immediately exposed
holes in my textbook knowledge.
serves very poorly when used as one. K&R2 is not canonical, but it is a
textbook, and serves that purpose very well.

I knew the K&R2 well, yet the standard proved me to be a relative C dummy.
 
R

Richard

Mark McIntyre said:
Exactly my point. Your road atlas is largely correct, but some parts
are hugely incorrect now. K&R also has its flaws and although much of
it remains correct, many parts are now either wrong or irrelevant.


Incorrect. Either you're not reading carefully enough, or you're
including in your analysis posts from known trolls and mischief makers
such as Kenny.

like why does my code compile, but program crashes if reaching

I disagree with your claim. Furthermore in most cases that I've
observed, it /has/ been the case that the OP has called some
OS-specific function wrong. I have no idea whether wxGetWidget() takes
a long, short or pointer to a struct, so how can I usefully diagnose
it. Over in comp.unix.programmer they probably know about wx tho.


Typecasting is what happens to actors. Casting is what happens in C.

It is universally known as type casting.

typecast - identify as belonging to a certain type

e.g the value of an expression is identifying as being of a certain
type.

Why would you try to deny this?
 
R

Richard

Mark McIntyre said:
I have a textbook from my Nuclear Physics course dating from my
undergrad days at Oxford. This was printed around the same time as
K&R.
It too contains much that is now inaccurate, irrelevant or plain wrong.

You're not helping your argument.

Did you get typecast as a big head there too?
 
C

CBFalconer

Kaz said:
.... snip ...

When posting a redirection, a randomized backoff strategy should
idealy be applied. When the duplicate question appears on your
server, pick a random number between 30 and 330. Wait that many
minutes. If no other reply has appeared after that time passes,
then go ahead and post. Use some kind of real random process,
and if the random number is too low, do not choose another
random number.

Won't work. For example, I read posts that are marked 'unread'.
The act of reading marks them as read. I will normally never see
them again. I may see an indication of their existence in the
header summary, but only if there are other connected replies in
the thread.

Besides which, there is no harm in presenting multiple
'redirection' posts. They may not suggest the same newsgroup. The
harm arises when an off-topic answer is given, which is possibly
erroneous, and which never gets corrected because it is in the
wrong newsgroup.
 
K

Kaz Kylheku

Won't work. For example, I read posts that are marked 'unread'.

You use an e-mail client instead of a newsreader:

X-Mailer: Mozilla 4.75 [en] (Win98; U)
The act of reading marks them as read.

And for that you'd have to RTFM about unmarking messages in your e-mail
program, so I guess there goes that idea.

What was I thinking, not proposing an idea that is inclusive
of the newsgroup dummy?
 
R

Richard

Richard Heathfield said:
CBFalconer said:


So Kaz's system means you won't reply to articles you can't remember
reading, yes? I don't see why this counts as "not working".

Allow me to precis for Mr Chuck..

"Please stop posting until you are sure (a) no one has already done so
and (b) you KNOW what you are talking about".

Unfortunately simple boolean logic means that this simplifies to

(c) Simply please do not post.
 
G

Guest

It is universally known as type casting.

typecast - identify as belonging to a certain type

e.g the value of an expression is identifying as being of a certain
type.

Why would you try to deny this?

because it isn't true? You have used three different terms
and pretended they are all the same.

I might use the term "type cast" (I'm not sure) meaning a cast
but for some reason emphasising that it the type that is being
modified. This term you do come across (though I don't think
its use should be encouraged).

typecast (one word) I don't use and just sounds wrong in a
C context. In normal english "typecast" is something that
happens to an actor. I don't think anyone sets out to do
it.

type is a fine word with a well defined meaning. It's not
the same as the other two.

int i;

i has a type; it hasn't been typecast or type cast or even cast!

<snip>

--
Nick Keighley

"I don't skydive; I don't bungee;
I don't go on rollercoasters, they scare me to death."
Col. Eileen Collins (Shuttle Pilot)
 
R

Richard

because it isn't true? You have used three different terms
and pretended they are all the same.

Sorry, but it IS true. Throughout my programming life people
*refer* to it as type casting / typecasting. I make no CLAIMS as to the
official correctness. I just know real people do indeed use this
term/terms.
I might use the term "type cast" (I'm not sure) meaning a cast
but for some reason emphasising that it the type that is being
modified. This term you do come across (though I don't think
its use should be encouraged).

typecast (one word) I don't use and just sounds wrong in a
C context. In normal english "typecast" is something that
happens to an actor. I don't think anyone sets out to do
it.

I thought someone would play that game ...
type is a fine word with a well defined meaning. It's not
the same as the other two.

int i;

i has a type; it hasn't been typecast or type cast or even cast!

I know. So what? Or did I miss something?

Frankly I would not quibble over

int i = (int) b;

being called typecasting or typecasting ...
 
K

Kenny McCormack

Richard said:
Sorry, but it IS true. Throughout my programming life people
*refer* to it as type casting / typecasting. I make no CLAIMS as to the
official correctness. I just know real people do indeed use this
term/terms.

(Warning: Defense of CLC regs follows. Be careful, and don't expect it
to become a habit of mine)

To be fair, the regs do have a point here. That point being that (in
the general and in the abstract) thousands of people doing something
doesn't make it right, and that (in the particular), most (real world)
programmers are terrible with terminology.

The general truth is that most programmers are thinking about lunch (in
the morning) and about rush hour traffic (in the afternoon).
 
C

Chad

I'm currently browsing though my copy of K&R "The C Programming
Language", preparing a undergraduate course "Introduction to
numerical C programming for physicists".

Well, chapter 8 (p. 169 ff.) is captioned "The UNIX System
Interface".

Now I ask you: How which newsgroup will it be, that (new) readers
are asking UNIX questions in? Hint: They're reading a book about
the C programming language.

I think this NG should adhere to the fact, that in the standard
textbook about the language it covers (C), the UNIX API is
outlined. And that will readers will have questions on that,
which they reasonably - it's covered in a textbook on C - will
ask here.

Wolfgang

According the the FreeBSD 6.3 man pages, read(2) is part of the C
Standard Library.

m-net% man 2 read
READ(2) FreeBSD System Calls Manual
READ(2)

NAME
read, readv, pread, preadv -- read input

LIBRARY
Standard C Library (libc, -lc)


Can someone enlighten me on this.
 
G

Guest

According the the FreeBSD 6.3 man pages, read(2) is part of the C
Standard Library.

m-net% man 2 read
READ(2)                   FreeBSD System Calls Manual
READ(2)

NAME
     read, readv, pread, preadv -- read input

LIBRARY
     Standard C Library (libc, -lc)

Can someone enlighten me on this

It depends what you mean by "standard". Around here
(with a few exceptions) "standard" is taken to to be
the ISO Standard for the C Programming Language. Or
near varient thereof. This standard defines the C Language and
its standard library. read() is *not* specified by this standard.
It is possible read() is specified by the Posix (Unix) standard,
but to comfirm this you'd need to ask on a unix ng such as
comp.unix.programming. Or as the BSD people why they did that

--
Nick Keighley

A lot of the c.l.c. verbiage seems to be devoted to the numerical
density of cavorting nubile seraphim upon pinheads.
CBFalconer
 
N

Nelu

According the the FreeBSD 6.3 man pages, read(2) is part of the C
Standard Library.

m-net% man 2 read
READ(2) FreeBSD System Calls Manual READ(2)

NAME
read, readv, pread, preadv -- read input

LIBRARY
Standard C Library (libc, -lc)


Can someone enlighten me on this.

That's the library you need to link against to have access to the
implementation of the function. It does not mean that the function itself
is part of the C standard.
 

Ask a Question

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

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

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top