To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.nntpOpen lugnet.admin.nntp in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / NNTP / 1309
1308  |  1310
Subject: 
// and ** vs {} and [] (was: testing in rtl...)
Newsgroups: 
lugnet.publish, lugnet.admin.nntp
Date: 
Fri, 30 May 2003 00:38:20 GMT
Viewed: 
19 times
  
In lugnet.publish, William R. Ward wrote:
I agree that FTX should translate {} and [] to // and ** when displaying in
plain text, and I'm *not* joking.

The problem with that is that articles are stored in the news server in their
raw original format only.  When they're displayed by the web interface, and
the FTX content is rendered into HTML for viewing on a web browser, it's done
so on-the-fly by a fairly complex set of Perl5 operations.  Although it
wouldn't be the hardest thing in the world to convert {} and [] to // and **
when dispatching articles by e-mail, I sure don't like the idea of firing up
Perl to convert the content on-the-fly from the news server every time an
article is fetched.  An alternative to on-the-fly converstion might be to
store two copies of articles on the server (one raw, one converted), but that
seems pretty gunky to me.

But all of the above presupposes that the conversion should even happen in the
first place, which I disagree with anyway.  If the conversion did occur, what
would happen in replies?  How would those get magicly converted back?

Let's approach the problem from a different direction:  What if FTX simply
supported // and ** directly?  I'll bet that if it did, a lot of people would
choose that over {} and [], and you'd be able to read them in Mozilla.

Now I'm tossing this idea out without having thoroughly thought through the
ramifications of parsing.  The syntax of // and ** is much more subtle than
the syntax of {} and [].

Help convince me that // and ** could be parsed without horrible anomalies
and exception tables.  Here is some food for thought...

   Menelaus replied, "/How/ do I take your meaning? Am I to stay with ...

   "Have you read Steven King's /Pet Semetary/?" she asked.

   "What's the /Herald/'s position on this issue?"

   Coffee with cream /and/or/ sugar.

   "No, you're supposed to turn it /counter/clockwise!"

I think all of those except the last one could be handled with some clever
word-boundary detection.  Some more:

   * = .10 level (10%)     ** = .05 level (5%)     *** = .01 level (1%)

   I think *Bill* was the one who mentioned this earlier.*

   Dude, I love your mosaic! (*Wow!*)

   Microsoft (*cough* bloat *cough*) Windows.

   (*^_^*)

I suppose that defining a word boundary might start with dividing the ASCII
character set into 3 character classes...

   1.  Whitespace - tabs, spaces, newlines
   2.  Printable "punctuation" characters - .,:;!?'"()[]{}
   3.  Everything else - letters, numbers, and other symbols

...and then doing...

   my $FOO = q{.,:;!?'"()[]{}};
   my $BAR = join "", grep { !m/[\Q$foo\E\s]/ } map { chr($_) } (32..255);
   s{\b([\Q$FOO\E]*)/([\Q$BAR\E])}{$1<I>$2}g;
   s{([\Q$BAR\E])/([\Q$FOO\E]*)\b}{$1</I>$2}g;
   s{\b([\Q$FOO\E]*)\*([\Q$BAR\E])}{$1<B>$2}g;
   s{([\Q$BAR\E])\*([\Q$FOO\E]*)\b}{$1</B>$2}g;

...or something like that.  But that doesn't handle (*Wow!*) or /Herald/'s
yet.

--Todd



Message has 2 Replies:
  Re: // and ** vs {} and [] (was: testing in rtl...)
 
(...) I think you'll find too many anomalies if FTX supports // and ** directly. You have to also make sure you don't FTX format text that is not intended to be FTX formatted. Some examples to consider follow. For slashes: Valid web addresses: (URL) (...) (21 years ago, 30-May-03, to lugnet.publish, lugnet.admin.nntp)
  Re: // and ** vs {} and [] (was: testing in rtl...)
 
(...) What NNTP server do you use? I was under the impression that it was written in Perl itself. [...] (...) How about a different interpretation - // and ** (and don't forget __ for underlining) might not be interpreted the same as the {} and [] (...) (21 years ago, 2-Jun-03, to lugnet.publish, lugnet.admin.nntp)

Message is in Reply To:
  Re: testing in rtl...
 
(...) [...] (...) Mozilla does this too (the *bold* and _underline_ and /italics/ convention, and the smileys). But I don't use Mozilla on Lugnet. I agree that FTX should translate {} and [] to // and ** when displaying in plain text, and I'm *not* (...) (21 years ago, 29-May-03, to lugnet.publish)

31 Messages in This Thread:









Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR