Reverse a string

S

Sam Halliday

Keith said:
You'll annoy all of the people some of the time, and some of the
people all of the time -- but if you continue posting 82-column text,
you'll annoy all of the people all of the time.

Ok, that's a slight exaggeration, but trust me on this. Many, perhaps
most, Usenet users use a terminal or emulator configured to display 80
columns, simply because of long tradition.

for the record, my posts were all 80 characters (i forgot 82 is my emacs
setting). however, to appease those trapped in 1984, i have reduced it to
75 [despite most usenet etiquette pages stating 64-70 lines... so 75 is
even crossing the boat]
Since C already has an extremely well-defined meaning for the symbol 1,
it seems ill-advised to use it to refer to something else.

oh yes, that was a mistake. i am sure there are even branches of
mathematics which would have scolded me for such notation. i should have
used 'i' for sure, or at least renamed XOR to something else... possibly
'.' as in that notation, the reason why i chose 1 would have been obvious.
the message was to show, algebraically, why the "stupid XOR trick" works...
i thought it was a cute trick, and not stupid at all; from a mathematical
point of view.
Speaking of rudeness, I see you've been the recipient of some abuse in
this thread. I recommend ignoring the abuse, though the technical
points in that response are basically correct.

thats why i now send in 75 characters... i am prepared to accept advice,
however personal abuse is not called for. it amazes me how many people on
usenet forget that recipients are real people. its childish. however, after
checking the credentials of the people calling me an "idiot" i find it
laughable that they should say such a thing. really. it is also quite
amusing to see that all the threads which go off topic and flamey quickly,
are all 100% guided into it by regulars.

happy Pi approximation day! (yesterday for some, including myself)
http://en.wikipedia.org/wiki/Pi_day
 
K

Keith Thompson

Sam Halliday said:
for the record, my posts were all 80 characters (i forgot 82 is my emacs
setting). however, to appease those trapped in 1984, i have reduced it to
75 [despite most usenet etiquette pages stating 64-70 lines... so 75 is
even crossing the boat]

Thanks. Keep in mind that if your posts are 80 characters, any
responses quoting them will be 81 or 82, depending on whether the
poster uses ">" or "> " (unless the person posting the followup
reformats the quoted text but not everyone bothers).

[...]
thats why i now send in 75 characters... i am prepared to accept advice,
however personal abuse is not called for. it amazes me how many people on
usenet forget that recipients are real people.
[...]

Agreed.
 
D

Dan Pop

In said:
Thanks. Keep in mind that if your posts are 80 characters, any
responses quoting them will be 81 or 82, depending on whether the
poster uses ">" or "> " (unless the person posting the followup
reformats the quoted text but not everyone bothers).
^^^^^^^^^^^^^^^^^^^^^^^^^
If the quotation marks are automatically added by your client (which is
current practice), it's too late for reformatting the quoted text, unless
you're prepared to do all the extra work of removing the old marks (now
spread all over the reformatted text) and reinserting them where they
belong. Are you willing to do that?

If the client has a builtin editor (e.g. PINE), this editor might be
aware of the special meaning of the quotation marks and preserve them
during the reformatting operation (provided that everybody uses the same
quotation marks). However, this is the exception, rather than the rule
(most Unix text based clients use an external editor).

Dan
 
E

Emmanuel Delahaye

Dan Pop wrote on 23/07/04 :
If the quotation marks are automatically added by your client (which is
current practice), it's too late for reformatting the quoted text, unless
you're prepared to do all the extra work of removing the old marks (now
spread all over the reformatted text) and reinserting them where they
belong. Are you willing to do that?

The idiomatic answer is 'get a better client', like XNews...
(PC/Windows)
 
K

Keith Thompson

^^^^^^^^^^^^^^^^^^^^^^^^^
If the quotation marks are automatically added
by your client (which is current practice),
it's too late for reformatting the quoted text,
unless you're prepared to do all the extra
work of removing the old marks (now spread all
over the reformatted text) and reinserting them
where they belong. Are you willing to do that?

Since you ask, yes, I am, but I don't expect everyone to do so. (Just
for demonstration purposes, I've reformatted the above paragraph to 50
colums while keeping the "> " prefixes.)

The newsreader I use is Gnus, which runs under, and is provided with,
GNU Emacs. The Emacs commands "fill-paragraph" (esc-q) and
"fill-region" handle multiple ">" prefixes correctly in most cases
(though they can get a bit confused if some lines are prefixed with
"> " and some with "> > "). Or I can always pipe a region of text
through "fmt -p'>'".
If the client has a builtin editor (e.g. PINE), this editor might be
aware of the special meaning of the quotation marks and preserve them
during the reformatting operation (provided that everybody uses the same
quotation marks). However, this is the exception, rather than the rule
(most Unix text based clients use an external editor).

Agreed, but any decent text editor under Unix should be able to pipe a
region of text through an external command.
 

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
474,145
Messages
2,570,826
Members
47,371
Latest member
Brkaa

Latest Threads

Top