reading from a socket

B

BGB

I don't think it carries that subtext at all. Instead it says, "We can't
answer your question, but those guys over there might know the answer."

fair enough.

I had just seen it differently apparently...

And that was in fact a wrong answer, as someone else (an "expert"!)
answered that the real problem was the the poster wasn't following the
FTP message protocol correctly. It had nothing to do with blocking.

So we see first-hand the danger of answering technical questions when you
don't really know the answer -- and possibly don't even understand the
question.

who knows?...

anyways (already mentioned elsewhere), I am generally ending the
argument, as all this is not being terribly productive.
 
K

Keith Thompson

BGB said:
<snip>
You wrote 200 pages of text here and all you should have told them is
look up the select() function call. He could call select() monitoring
his read descriptors [sockets] and set a timeout if he wants to stop
waiting for data after a fixed amount of time.

Instead, you [incorrectly] ranted for 10 posts about how everything
should be topical here because us as programmers generally know things
like this. The original reply was correct to point it was OT and send
him to the other group.

Or, at the very least, if you're going to bother with the long
diatribe at least point the OP in the right direction instead of being
a monumentus jackass.

interesting... (I guess it is notable how things can be seen differently
by different people...).

sorry it came off this way, just it was my response to what seemed to be
a sort of common social-injustice.

but, anyways, unless there is something worthwhile, I will probably end
this argument, as all this is not being terribly productive...

I think the problem is that you're seeing the original redirection as
a "social-injustice". It isn't. It was nothing more or less than an
attempt to help the OP get the best possible answer to his question,
by posting in a forum filled with experts on what he's asking about.
 
B

blmblm


[ snip ]

Maybe you're making a different point, Ben, but this reminds me
that I'm curious about that "or such" -- to me it doesn't seem like
native-speaker-idiomatic English, and I'm mildly curious about whether
it's idiomatic in some English I don't know, or perhaps a word-for-word
translation of something idiomatic in another language. BGB -- ?
 
K

Keith Thompson

BGB said:
except, that it was not an answer, it was a dismissal...

"go to this here other group" basically carries the subtext "screw off,
this topic is OT here...". saying something more politely does not
automatically nullify its original intent (nor does giving a gracious
response automatically mean that all is well). more just sort of some
strange social practice of candy-coating everything...

You have completely misinterpreted the response. It was not a
dismissal. It was not rude. It was the most helpful answer that
could have possibly been given.

The OP has since posted his question to comp.unix.programmer.
He's gotten several replies, and apparently his question has now
been answered to his satisfaction.

Furthermore, before he posted to comp.unix.programmer, the OP
*thanked* the first responder for redirecting him. Why are you
offended on his behalf?

I believe you owe "Noob" (the poster who suggested
comp.unix.programmer) an apology.
 
B

BGB

You have completely misinterpreted the response. It was not a
dismissal. It was not rude. It was the most helpful answer that
could have possibly been given.

The OP has since posted his question to comp.unix.programmer.
He's gotten several replies, and apparently his question has now
been answered to his satisfaction.

Furthermore, before he posted to comp.unix.programmer, the OP
*thanked* the first responder for redirecting him. Why are you
offended on his behalf?

I believe you owe "Noob" (the poster who suggested
comp.unix.programmer) an apology.

I realize my error now...

err, yeah...
 
B

BGB


[ snip ]

Maybe you're making a different point, Ben, but this reminds me
that I'm curious about that "or such" -- to me it doesn't seem like
native-speaker-idiomatic English, and I'm mildly curious about whether
it's idiomatic in some English I don't know, or perhaps a word-for-word
translation of something idiomatic in another language. BGB -- ?

I am a native speaker, but a decent part of my life has been lived in
places where English is not the dominant language. such as Europe for my
early years and on an island near south-east Asia, where there were lots
of Pacific Islanders (like Chukese and Philippinos and similar) and also
Chinese and similar around...

currently, I am living in the US though, and my parents are native to
the US.

as for my writing style, I don't know. writing has never really been my
strong point (well, I am not the best at reading either though, as
books/reading/... make head want to sleep, but this is a different
issue). I tend to at times write large amounts of text though.

some people have before described my speech patterns as "stilted" and
"high-speed and monotone" though. others have at times accused me of
generally talking a bit loudly, ... as well.


I guess according to psychology, I am an extrovert (like, ESTP or
somewhere around there, sometimes ESTJ, and a few times as ENTJ, also
ISTP sometimes as well, but ESTx is a fairly common result in general,
and seems to recently be mostly hanging out somewhere around ESTP...).

but, sadly, my social skills are not always great either, so mostly I
sit around and work on projects and similar.

in any case, I write as I write, and it has generally always been this way.
 
H

Heinrich Wolf

Steve Richter said:
when a client reads from a socket, how does it know the server has
completed sending and is itself currently blocking on a read from the
client?

I am writing a small ftp client in C for the IBM AS400 using the UNIX
APIs. When the client code connects to the FTP server it reads back
the initial welcome messages. My code reads from the server, gets
some /r terminated messages. Reads again and gets more /r terminated
welcome messages. Then reads a 3rd time and blocks because there is
nothing more to read. What in the socket protocol tells me the 3rd
read is going to block?

thanks,

Hello,

recv() might return 0 bytes.
You might also use signal(SIGALRM, ) and alarm() to catch a timeout
or you might use ioctl(Socket, FIONBIO, )

kind regards
Heiner
 
K

Kenny McCormack

Android Kiki Thompson said:
I believe you owe "Noob" (the poster who suggested
comp.unix.programmer) an apology.

And I, among many others, think you are completely insane.

--

Some of the more common characteristics of Asperger syndrome include:

* Inability to think in abstract ways (eg: puns, jokes, sarcasm, etc)
* Difficulties in empathising with others
* Problems with understanding another person's point of view
* Hampered conversational ability
* Problems with controlling feelings such as anger, depression
and anxiety
* Adherence to routines and schedules, and stress if expected routine
is disrupted
* Inability to manage appropriate social conduct
* Delayed understanding of sexual codes of conduct
* A narrow field of interests. For example a person with Asperger
syndrome may focus on learning all there is to know about
baseball statistics, politics or television shows.
* Anger and aggression when things do not happen as they want
* Sensitivity to criticism
* Eccentricity
* Behaviour varies from mildly unusual to quite aggressive
and difficult
 
K

Kenny McCormack

Keith Thompson said:
I think the problem is that you're seeing the original redirection as
a "social-injustice". It isn't. It was nothing more or less than an
attempt to help the OP get the best possible answer to his question,
by posting in a forum filled with experts on what he's asking about.

And if you believe that, I've got some land in Florida to sell you.

Nice and cheap...
 
A

Alan Curry

So... it's bad to answer questions quickly? I'm confused.

Let's try it this way: the less complete your answer, the longer you should
wait before posting it.

Post instantly if you understood the question's intent and context, and know
how to achieve the desired result.

If you have a pretty good idea what the answer is but you aren't sure and
can't test it, wait a while.

If you're just going to suggest repeating the question somewhere else (and
you aren't even a regular reader of the "somewhere else"), don't do it until
the question has aged 24 hours without being satisfied.

Once in a while some dumbass thinks Usenet is a real-time chat and responds
negatively to the "lack of replies" 5 minutes after his first post. When that
happens, everyone flame immediately :)
 
B

BartC


[ snip ]

Maybe you're making a different point, Ben, but this reminds me
that I'm curious about that "or such" -- to me it doesn't seem like
native-speaker-idiomatic English, and I'm mildly curious about whether
it's idiomatic in some English I don't know, or perhaps a word-for-word
translation of something idiomatic in another language. BGB -- ?

Better try asking in alt.english.usage.

After all no-one in comp.lang.c is going to be competent enough to answer
questions about English...
 
R

ralph


[ snip ]

Maybe you're making a different point, Ben, but this reminds me
that I'm curious about that "or such" -- to me it doesn't seem like
native-speaker-idiomatic English, and I'm mildly curious about whether
it's idiomatic in some English I don't know, or perhaps a word-for-word
translation of something idiomatic in another language. BGB -- ?

A very common expression in American speech. It is a contraction of
the idiom "such and such".

-ralph
 
R

ralph

but, sadly, my social skills are not always great either, so mostly I
sit around and work on projects and similar.

That should have been "... work on projects or somesuch."

-ralph
<bg>
 
E

Eric Sosman

except when asking questions that are sufficiently generic to where most
people will know the answer (unless they live in a hole or
something...), or which are not strictly topical in any relevant newsgroup.

Two points, both easily dismissed: First, the question is not
so generic that "most people will know the answer" (demonstration:
See your own incorrect answer elsethread). Second, the question is
far from "not strictly topical in any relevant newsgroup," since it
is quite clearly topical in the newsgroup to which the O.P. was
directed.
it is silly that people start waving "off topic" around as soon as the
conversation goes outside "well, the C standard says this..." and random
newbies doing Q/A about newbie issues related to the C standard ("why
cast pointer between incompatible types no work?...", ...).

Whose was the first post in this thread to use the phrase "off
topic?"

Whose was the first post in this thread to mention the C Standard?

Whose was the first post in this thread to mention conversion
between incompatible pointer types? (And why, one wonders, since it
seems utterly unconnected to the thread's subject? Perhaps it's time
to bring up the arguments for and against the Three Gorges project.)
the only real sane explanation is for volume control, but it smells like
many people have sticks shoved somewhere, which isn't really ideal...

Now you're just being offensive. Stupidly offensive, but offensive.
 
B

BGB

as noted else-thread, I have since realized that my initial judgment was
in error (and, more so, I was responding more "in general" than "in this
specific instance", partly from the good number of threads I have read
in here over the years).


but, in retrospect, trying to argue the point was a bad decision, as it
was more of a value-judgment based on misinterpretations than it was a
valid position (I may have to keep in mind to be more careful about this
sort of thing in the future).


so, effectively, the argument has ended.
 
D

Dr Nick

Let's try it this way: the less complete your answer, the longer you should
wait before posting it.

Post instantly if you understood the question's intent and context, and know
how to achieve the desired result.

If you have a pretty good idea what the answer is but you aren't sure and
can't test it, wait a while.

If you're just going to suggest repeating the question somewhere else (and
you aren't even a regular reader of the "somewhere else"), don't do it until
the question has aged 24 hours without being satisfied.

I read Usenet two or three times a day. That I should carefully check
time stamps, sequester away posts in a cellar to mature properly before
responding etc is just too much effort. People will get whatever help
they want from me (not much, I admit) as I pass.
 
N

Noob

BGB said:
seemed correct enough to me...

FTP sends messages on lines, and then lines stop showing up when they
stop showing up. obvious answer: using non-blocking IO. then the program
doesn't block when it tries to read, and so can carry on its business...

shouldn't be so difficult.

He who knows not and knows not he knows not: he is a fool - shun him.
He who knows not and knows he knows not: he is simple - teach him.
He who knows and knows not he knows: he is asleep - wake him.
He who knows and knows he knows: he is wise - follow him.
 
A

Angel

He who knows not and knows not he knows not: he is a fool - shun him.
He who knows not and knows he knows not: he is simple - teach him.
He who knows and knows not he knows: he is asleep - wake him.
He who knows and knows he knows: he is wise - follow him.

What about those who know not but are absolutely convinced that they do
know better than anyone else? ;-)
 
J

James Kuyper

On 06/22/2011 04:52 PM, Alan Curry wrote:
....
If you're just going to suggest repeating the question somewhere else (and
you aren't even a regular reader of the "somewhere else"), don't do it until
the question has aged 24 hours without being satisfied.

I think that criterion is based upon the assumption that there's
something wrong with redirecting an inquiry to a more appropriate forum.
I think such redirection is not only a very good thing, for all
concerned, but that the sooner it's done, the better. The sooner it's
done, the sooner the OP will get useful answers. A quick re-direction
can also reduce the amount of OT discussions cluttering up the wrong
forum where the question was originally posted.
 

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,776
Messages
2,569,603
Members
45,197
Latest member
Sean29G025

Latest Threads

Top