Should attachments be accepted in comp.lang.c?

A

Al Balmer

Recently a poster here posted some C code as an attachment.

Should attachments (text only) be considered acceptable in this
newsgroup?

I don't recall the subject even coming up until just a few days ago.
Almost everyone here posts C code as plain inline text.

I think we can agree that binary attachments are inappropriate. But
what about text-only attachments? It's argued that newsreaders that
don't handle attachments will display them as plain inline text, and
those that do will handle them in some convenient manner.

For the record, my reader (in its current configuration) displays an
icon. I can tell it to "launch" the attachment in an editor (for
text), but that's a separate operation, and I probably won't bother,
even if I'm sure it contains nothing but text.

More to the point, what's the point? If a text-only attachment is
equivalent to posting the text in-line, why not post it in-line? If
there's inconvenience in cutting and pasting text rather than
attaching a file, let the inconvenience be on the part of the one
poster, not the many readers.
 
A

Al Balmer

If we were going to decide that text attachments are acceptable and
binary attachments are not, then I suppose the distinction would be
that text attachments are those that are still legible (with extra
header and footer lines) when displayed by a newsreader that ignores
attachments.

The header lines for the attachment that started this discussion were:

Content-Type: text/x-csrc; name="union.c"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="union.c"

I suppose the Content_Type starting with "text/" is indicative -- but
then again there are different kinds of text.

But why would I be displaying the header lines? Certainly, I can ask
the reader what kind of an attachment it is, but why should I bother?
 
W

Walter Roberson

Mikhail Teterin said:
You may also start another thread on the subject:
Should everyone be *forced* to post in the same manner?
Because I don't see, how your troubles (or lack thereof) are supposed to
compell *me*. My postings are on-topic of the news-group, and so are the
attachements.

* Allowing attachments certainly won't help encourage people to post
Uhh, place a maximum size limit, then. This is silly...

I don't see why your maximum size limit should compell *me*. If my
posting is on-topic and so are my attachments, then why should I be
*forced* to restrict myself to your arbitrary limits? It's not like
I'm planning to post 62 petabytes or something silly like that --
a few dozen terabytes should be enough this year, and by the time I need
a petabyte, you'll be on a faster connection anyhow.

A MIME-aware newsreader, that does not offer to show the attachment as plain
text (especially, if the type is set to text/*) is broken...

trn does not so offer. trn offers to process the whole article
through an external mime decoder (not provided with trn), and if
one has such as decoder, odds are that the external decoder will offer
to save the attachment to disk rather than to display it (since the
external decoder doesn't know that it's invoked in the context of
a newsgroup article.)
 
W

Walter Roberson

Walter Roberson wrote:
Not true. "The primary subtype for multipart, 'mixed', is intended for use
when the body parts are independent and need to be bundled *in a particular
order*." --RFC 2046 [Emphasis mine.]
Clients that mess up the order on reading are plain wrong
Clients may mess up the
order on *composing* a message, but that's a quality of interface issue;
presumably they ought to send parts in the order they were attached, with
the main message first.

When I wrote the paragraph, I was thinking of the composition process.
I have numerous times received email in which, at the pure text level,
the attachments proceeded the message (often, but not exclusively,
in instances where something was being forwarded.)
 
R

Robert Gamble

Mikhail said:
You may also start another thread on the subject:

Should everyone be *forced* to post in the same manner?

Because I don't see, how your troubles (or lack thereof) are supposed to
compell *me*. My postings are on-topic of the news-group, and so are the
attachements.

I'm at a loss over this desire for uniformity, you are displaying...

While I'm here, let me quickly go over the objections raised so far:

First off, nobody can *force* you to do anything, some people may try
to compel you to not post attachments but there is nothing they can do
to keep you from doing so.

It is obvious from this thread that many people would take issue with
articles containing attachments and many of those people would likely
not feel the need to try to overcome the obstacles involved, however
insignificant you may feel them to be, to read the attachment. If you
want to post attachments, go ahead, but just realize that you are
basically saying to everyone: "I am posting this as an attachment to
make my life a little bit easier and I expect everyone to go out of
their way if need be to read it". That attitude won't go over well
with the vast majority of the folks here, especially if you are asking
for help at the same time, such behavior will probably just land you in
multiple killfiles. It really doesn't much matter what you think of
the objections of others because it isn't going to change their view.
In the end you might annoy some folks by posting attachments but you
are really hurting yourself more than anyone else.

Robert Gamble
 
D

Default User

Keith said:
Recently a poster here posted some C code as an attachment.

Should attachments (text only) be considered acceptable in this
newsgroup?

No.



Brian
 
D

Default User

Mikhail Teterin wrote:

You may also start another thread on the subject:

Should everyone be forced to post in the same manner?


Is everyone forced to read your posts and help you? No.




Brian
 
W

Walter Roberson

Robert Gamble said:
Mikhail Teterin wrote:
First off, nobody can *force* you to do anything, some people may try
to compel you to not post attachments but there is nothing they can do
to keep you from doing so.

I haven't bothered to look to see which posting ISP Mikhail is using,
or to look up their Terms of Service. It is common, though, for ISPs to
write in their Terms of Service wording to the effect that Usenet
conventions must be followed. The restriction against posting MIME or
other forms of attachment in newsgroups that do not explicitly permit
such, is longstanding, and is enforced by some ISPs. Such clauses are
not rare, as the same clause variety is used to deal with spammers, and
with those who post abusive messages in newsgroups not intended to
convey such abuse.

Thus, until such time as comp.lang.c actively permits MIME, there
are ISPs that will enforce restrictions against MIME (though it is
quite uncommon for such ISPs to act without someone having complained
to them.)
 
K

Keith Thompson

Al Balmer said:
But why would I be displaying the header lines? Certainly, I can ask
the reader what kind of an attachment it is, but why should I bother?

I wasn't suggesting that you should. I was attempting to come up with
a plausible answer to Ronald Bruck's question: "how do you distinguish
between text and binary attachments?". *If* we were to decide that
text attachments are acceptable but binary attachments are not, then
we'd need a definition that distinguishes between them. That doesn't
imply that each individual reader needs to be able to make that
distinction.

On the other hand, if I see an attachment I'm going to be nervous
about doing anything with it, even it it claims to be plain text.
Suppose some malicious poster posts an article with an attachment that
*claims* to be a plain text file named "foo.c", but it's actually a
malware program called "foo.c.exe" or something. There are systems on
which it's entirely too easy to open such an attachment. I'm sure
that Mikhail Teterin, the poster who triggered this discussion,
wouldn't do such a thing, but others would. By avoiding attachments,
we can minimize this risk. (I read news on a Linux box, and I don't
believe my newsreader is going to attempt to execute an attachment if
I don't explicitly tell it to, but others are in different
situtation.)

I don't know a lot about how various software handles attachments on
vulnerable systems (yeah, I mean MS Windows). Perhaps someone else
can comment further on how much of a problem this can actually be.

This doesn't mean the spammers and virus writers have won. It means
that avoiding attachments is one way we can defend ourselves against
them. IMHO, it's a small price to pay; I'm not at all convinced that
attachments provide enough of a benefit to be worth the trouble of
dealing with even plain text attachments, let alone any risks of
malware.
 
M

Mark McIntyre

Recently a poster here posted some C code as an attachment.

Should attachments (text only) be considered acceptable in this
newsgroup?

This is a discussion group, not a sources group. If people want to
post code to be commented on, it should either be short and inline, or
a link. If tehy want to post code to share, this is the wrong placae.
I think we can agree that binary attachments are inappropriate.

Absolutely.
But what about text-only attachments?

Whats the use of posting an attachment? I can't comment on it, except
by spending my valuable time opening the blasted files in some sort of
editor and copy-pasting it back into my newsreader. Thats an absurd
amount of hassle.
It's argued that newsreaders that
don't handle attachments will display them as plain inline text, and
those that do will handle them in some convenient manner.

Convenient for *what* though? Remember, this isn't a filesharing
newsgroup, its a discussion group, and if we can't trivially annotate
code theres no point posting it.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
M

Mark McIntyre

You may also start another thread on the subject:

Should everyone be *forced* to post in the same manner?

I am generally amazed at how people do things in usenet they'd never
do IRL. I mean, IRL if you wanted advice about motorcycles, would you
go into the bikers bar and complain about the beer? Course not, you'd
get chucked out on your ear.
Because I don't see, how your troubles (or lack thereof) are supposed to
compell *me*.

Nobody can compel you. They can however ignore you, permanently. You
then get no benefit from this group, which presumably is what you
want.
Really and trully, all complete files (rather than illustratory segments)
should be placed on a web-site by the poster, posting just a link, IMO :)

Yup.
Soon, when everyone gets their own web-server,

You're being facetious, but this is trivially possible already and
without personal webservers. Apparently you've never come across any
of the social networking sites, or wikis, or etc etc etc
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
M

Mark McIntyre

I don't know a lot about how various software handles attachments on
vulnerable systems (yeah, I mean MS Windows). Perhaps someone else
can comment further on how much of a problem this can actually be.

Its an actual problem, if you're the sort of person who has assigned
admin / root permissions to his normal login account, or if you're
unfortunate enough to be running Win98/ME, older MacOS etc. It can
even be a serious annoyance if you have a properly restricted account.
I blush to recall that I once accidentally executed an attachment in
Lotus Notes, which deleted every gif and jpg from my C drive.
This doesn't mean the spammers and virus writers have won. It means
that avoiding attachments is one way we can defend ourselves against
them. IMHO, it's a small price to pay; I'm not at all convinced that
attachments provide enough of a benefit to be worth the trouble of
dealing with even plain text attachments, let alone any risks of
malware.

I agree absolutely with this. Even text attachments need not be
harmless. Some OSen are notorious for concealing the true nature of
files (I meanb, which cretin thought a bright idea to default to
"hide" the executable-ness of files?) or for trying to outthink the
user (cue MacOS...)
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
B

Ben Pfaff

Keith Thompson said:
In fact, it appears that a text attachment in a posted article is
represented as approximately 4 header lines, followed by the content
of the attachment, followed by 1 trailer line. (I determined this by
grabbing a copy of the orginal article in question using a small Perl
script and the NNTP protocol, rather than via a newsreader; I expect
that a newsreader that doesn't understand attachments would simply
display the extra lines along with the content.)
[...]

I read news using Gnus, a newsreader that runs under GNU Emacs.

For what it's worth, in Gnus, you can see the "raw" format of the
article by typing "C-u g" in the summary buffer. There's no need
to go to the trouble of generating your own NNTP.
 
E

Eigenvector

Keith Thompson said:
Recently a poster here posted some C code as an attachment.

Should attachments (text only) be considered acceptable in this
newsgroup?

I don't recall the subject even coming up until just a few days ago.
Almost everyone here posts C code as plain inline text.

I think we can agree that binary attachments are inappropriate. But
what about text-only attachments? It's argued that newsreaders that
don't handle attachments will display them as plain inline text, and
those that do will handle them in some convenient manner.

In fact, it appears that a text attachment in a posted article is
represented as approximately 4 header lines, followed by the content
of the attachment, followed by 1 trailer line. (I determined this by
grabbing a copy of the orginal article in question using a small Perl
script and the NNTP protocol, rather than via a newsreader; I expect
that a newsreader that doesn't understand attachments would simply
display the extra lines along with the content.)

Personally, I tend to prefer inline text rather than attachments, even
for multiple chunks of code. If I want to try compiling a posted
piece of code, I copy it from the window in which I'm reading news,
then paste it into a window on the machine where I want to compile it.
If I had to save the attachment to do this, I'd have to copy the
resulting file from one machine to another; not impossible, of course,
but inconvenient enough that I often wouldn't bother. Of course,
others will have different preferences.

I'll offer one data point. I read news using Gnus, a newsreader that
runs under GNU Emacs. It handles attachments reasonable well; the
file name is displayed in bold text, and the attachment is expanded
inline after I move the cursor on top of it and press <enter>. (Note
that I'm referring to a text cursor, not a mouse cursor, so moving it
to the right spot can require several keystrokes.) I presume there's
command to save the attachment as a file, but I haven't bothered to
find out. As I said, I prefer inline text to attachments, but I can
deal with them if there's a consensus that they're acceptable. If
there are people using newsreaders that make plain-text attachments
difficult to handle, I suggest that attachments should be discouraged.

This was discussed recently in the "passing a union's field to a
function" thread, particularly in the "Posting sample C-code as
attachment" subthread. There was some disagreement about whether any
conclusion had been reached. I thought it would be useful to have
this discussion in its own thread.

You can attempt to mandate this group all you want (not you personally), it
really doesn't matter, people are going to do what they are going to do. If
someone wants to post attachments that's fine with me, I simply won't look
at them. Not that my opinion matters at all, as I'm really only a lurker.

This has nothing to do with newsreaders, it has everything to do with
laziness on the part of the poster and whether or not this group is prepared
to begin allowing wholesale code debugging. Because when it gets down to
it, I can't think of a reasonable justification for having to post more than
50 or so lines of code - if troubleshooting is your aim that is. But that
is just my opinion.
 
K

Keith Thompson

Ben Pfaff said:
For what it's worth, in Gnus, you can see the "raw" format of the
article by typing "C-u g" in the summary buffer. There's no need
to go to the trouble of generating your own NNTP.

Thanks, that's a useful tip.
 
C

CBFalconer

Keith said:
Thanks, that's a useful tip.

The same in Netscape or Thunderbird with "ALT-v u".

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
 
P

Peter Shaggy Haywood

Groovy hepcat Keith Thompson was jivin' on Thu, 17 Aug 2006 01:03:43
GMT in comp.lang.c.
Should attachments be accepted in comp.lang.c?'s a cool scene! Dig it!
Recently a poster here posted some C code as an attachment.

Should attachments (text only) be considered acceptable in this
newsgroup?

No. There's no reason to attach what can be cut and pasted into the
body of the post. And some Usenet servers remove attachments.

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
 
H

Herbert Rosenau

I don't see why your maximum size limit should compell *me*. If my
posting is on-topic and so are my attachments, then why should I be
*forced* to restrict myself to your arbitrary limits? It's not like
I'm planning to post 62 petabytes or something silly like that --
a few dozen terabytes should be enough this year, and by the time I need
a petabyte, you'll be on a faster connection anyhow.

Why should one try to open spam? Only spammers try to attach something
like
"test.c .exe" to force the reader to
open the worm, virus or other malware.

Servers around the world are trained to kill news when they have an
attachement to save theyr users from malware independant of the type
of attachement.

You like to be identified as spammer? Try to post attachements. You'll
quiickly blocked by regulars. So nothing of you will be readed by
experienced users. You'll arrive no help on that.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
 
W

Walter Roberson

Why should one try to open spam? Only spammers try to attach something
like
"test.c .exe" to force the reader to
open the worm, virus or other malware.

Well, it isn't only spammers; there are insane people, and there are
sane people who consider it less wrong than whatever they are thinking
of at the time.

But either way, whether it is only spammers or not, the virus/malware
argument doesn't have any bearing on the question of why his
maximum size limit should compel -me-. Who is he to judge what
the size limit should be? Is this or is this not an anarchist
collective, in which each person decides for themselves which
rules they wish to follow?
 
C

CBFalconer

Walter said:
.... snip ...

But either way, whether it is only spammers or not, the
virus/malware argument doesn't have any bearing on the question
of why his maximum size limit should compel -me-. Who is he to
judge what the size limit should be? Is this or is this not an
anarchist collective, in which each person decides for themselves
which rules they wish to follow?

Yes, it is an anarchy, but most participants have the objective of
communicating with others. After all, there is very little
satisfaction in pounding out unending drivel on the keyboard, if
that drivel is totally ignored. And such ignoring will be its fate
if it doesn't conform to some degree with the consensus standard.
Thus: DON'T FEED THE TROLLS.

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
 

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,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top