UNIX questions should be considered Semi-On Topic on clc

N

Nate Eldredge

Chad said:
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.

Different senses of the word "standard". And note the difference
between "standard C library" and "C Standard".

Every system has its own "standard library", consisting of a collection
of functions that are normally available to every C program *on that
system*. Here "standard" is used as an adjective in the sense of
"normal, common, generally used". The ISO C Standard, a document which
specifies a set of agreed-upon requirements for C implementations,
describes a number of functions which every system's standard library
should include. read(2) is not one of them.

Thus, although read(2) happens to be a function in FreeBSD's standard
library (and in fact that of every other Unix system, and many others),
the ISO Standard doesn't require it, and therefore it can't be
considered a part of the C language itself (IMHO).
 
J

jameskuyper

Chad said:
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.

Ultimately, you'll have to ask the writers of that man page why they
chose to write it that way. To give them the benefit of the doubt,
they may have been referring to the POSIX standard library, which has
a C interface, but referring to it as the "Standard C Library" is, at
best, sloppy.

However, it's quite trivial to verify that read() is not part of the C
standard library. Just get a copy of n1256.pdf, which contains the
currently approved standard, modified by the application of all three
currently approved Technical Corrigenda. It's freely available. Search
it for "read". You won't find any use of that word as an identifier
defined anywhere in the C standard library. Then check section 7.1.3,
and you'll see that 'read' is not one of the identifiers reserved to
the implementation, not in any context. This means a program can
define "read" to be anything it wants, and a conforming implementation
of C must do whatever it needs to do to make that work.
 
R

Richard

(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.

I agree it does not make it right. I never suggested it was perfectly
right.

And I would argue to the death that it's not completely wrong either.

Since "casting" is done from type to a type.

And being the flexible, kindly person I am I tend to "understand" when
someone says typecasting in CONTEXT.

Call me non-anal or non-reg if you like.
 
J

J. J. Farrell

Richard said:
Sorry, but it IS true. Throughout my programming life people
*refer* to it as type casting / typecasting.

You constantly make it abundantly clear that you believe your limited
experience explicitly and absolutely defines the universe, and that
anyone who claims to have different experience is an idiot or a liar.
Your delusions don't alter the fact that casting is most definitely not
universally known as type casting or typecasting.
 
P

Phil Carmody

Chad said:
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.

Lesson: if you wish to know what's in the C standard library, don't
go asking BSD man pages for what's in its particular standard C
library.

If you look at an alternative OS's man pages, you might get something
like this:

"""
NAME
read - read from a file descriptor

SYNOPSIS
#include <unistd.h>

ssize_t read(int fd, void *buf, size_t count);
....
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
"""

which is far more informative, and clearly indicates that this is
not a standard C function.

Phil
 
K

Kenny McCormack

You constantly make it abundantly clear that you believe your limited
experience explicitly and absolutely defines the universe, and that
anyone who claims to have different experience is an idiot or a liar.
Your delusions don't alter the fact that casting is most definitely not
universally known as type casting or typecasting.

But he didn't claim any such thing. Your interpretation is
bizarre.[/QUOTE]

Thank you for putting that more cleanly and succinctly than I could have.

The funny thing is that, as is usually the case when dealing with CLC
regs, just the opposite is true. It is the CLC regs who assume that
their own extremely limited (often non-existent) real world experience
allows them to make blanket statements about the world.
 
R

Richard

J. J. Farrell said:
You constantly make it abundantly clear that you believe your limited
experience explicitly and absolutely defines the universe, and that

Nope. I Say that something is or is not true *in my experience*. I do
not state categorically that therefore it is true for ALL. But I KNOW it
to be true for a fair proportion. Big difference.
anyone who claims to have different experience is an idiot or a
liar. Your delusions don't alter the fact that casting is most
definitely not universally known as type casting or typecasting.

This would be true if I had said ANY of those things.

I didn't call anyone an idiot or a liar. Picky and anal perhaps.

What I said (and my experience is probably quite significant) is that
PEOPLE DO USE THAT TERM and that it is, in my experience, understood by
all but the most anal retentive jobs worths who make a point of trying
to be smart arses.

I guess I can add you to that list. Well done.
 
R

Richard

But he didn't claim any such thing. Your interpretation is
bizarre.

Thank you for putting that more cleanly and succinctly than I could have.

The funny thing is that, as is usually the case when dealing with CLC
regs, just the opposite is true. It is the CLC regs who assume that
their own extremely limited (often non-existent) real world experience
allows them to make blanket statements about the world.[/QUOTE]

Thank you too. I was wondering if I had gone mad for a moment
there. What on earth was Farrell trying to do?

But you made the point about petty, bitter "regs" better than I could
have done.

I simply could not imagine sitting in a room with a C crowd and someone
objecting to the term "typecasting" in general conversation.
 
C

CBFalconer

J. J. Farrell said:
Richard wrote:
.... snip ...


You constantly make it abundantly clear that you believe your
limited experience explicitly and absolutely defines the universe,
and that anyone who claims to have different experience is an
idiot or a liar. Your delusions don't alter the fact that casting
is most definitely not universally known as type casting or
typecasting.

Bear in mind that Richard the nameless is a troll. Best plonked.
 
R

Richard

CBFalconer said:
Bear in mind that Richard the nameless is a troll. Best plonked.

Keeping in mind that I have implemented more real world C systems than
you have had cups of milky tea.
 
A

Antoninus Twink

Bear in mind that Richard the nameless is a troll. Best plonked.

Yeee...aaaaa...wwwwn.

Change the goddamn record, grandad. And just /try/ to see the irony of
/you/ accusing other people of being trolls, will you?
 
A

Antoninus Twink

It's wrong. See the C standard.

YET AGAIN you make a complete idiot of yourself by jumping in and
posting from utter ignorance, when all you had to do was READ THE REST
OF THE DAMN THREAD to find the answer.

The man page informed FreeBSD developers which library they needed to
link against if they used the read(2) function. That library was just
the standard (small s) C library, libc. The man page writer wasn't
making any statement about the contents of any ISO standard.

Of course, you'd know that IF YOU'D BOTHERED TO READ THE REST OF THE
DAMN THREAD. Jeez.
 
J

J. J. Farrell

Richard said:
Thank you. J.J. Farrell is clearly drunk or dumb as a plank.

Neither - well not the former unfortunately, and I don't think the
latter. Just complete misreading, misattribution, and misassociation of
names, compounded (or caused) by a bad mood and a bad moment. I
apologise and withdraw; let's get back to the usual nonsense.
 
R

Richard

J. J. Farrell said:
Neither - well not the former unfortunately, and I don't think the
latter. Just complete misreading, misattribution, and misassociation
of names, compounded (or caused) by a bad mood and a bad moment. I
apologise and withdraw; let's get back to the usual nonsense.

Accepted with no hard feelings whatsoever.
 
R

Richard

Mark McIntyre said:
No its not. I've already explained what typecasting is.

Universally was not meant to mean "everyone". Just "in many places
around the world"...
Well, indeed....


I wouldn't - I might however say "if I cast x to type y".

Who cares. Many people DO. And I for one know what they mean.
 
R

Richard

Golden California Girls said:
Antoninus said:
[drivel snipped]
Of course, you'd know that IF YOU'D BOTHERED TO READ THE REST OF THE
DAMN THREAD. Jeez.

I believe that CBF would be better served using Google as his newsreader than
whatever not functioning pile of crap he is using.

The funny thing is that he frequently insults Windows users and
"Winders". And yet he uses ancient Windows crap and the worst mail/news
client in existence. He must be a troll.
 
G

Guest

Universally was not meant to mean "everyone". Just "in many places
around the world"...

that isn't waht I mean by universally...

<snip>

oh, I never heard you call anyone an idiot or a liar
(on this topic anyway :) )
 
R

Richard

that isn't waht I mean by universally...

<snip>

oh, I never heard you call anyone an idiot or a liar
(on this topic anyway :) )

I can only express what I *know*. And I *know* that many people the
world over refer to "type[ ]casting" in C circles and no one *EVER* in
my presence has feigned confusion. It really is that simple. And as for
idiots (there you go) like Chuck, I daresay I can (allowing myself a
moment of smug elitism) buy and sell him on experiences and length of
service on large programming projects where open mindedness, teamwork
and maintainable standards are a must. c.l.c is too full of smug little
cretins who hide behind the standard despite misquoting it,
misunderstanding it and having next to no real world C experience. Not
all, but a sizable proportion.

I am at a loss to explain this thread in the first place.
 

Ask a Question

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

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top