🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Kludge Thu, 10 Feb 2000 00:00
slrn / score / specifying pattern
#57877
Author: Kludge
Date: Thu, 10 Feb 2000 00:00
36 lines
2032 bytes
I'm new at slrn -- having moved from tin when I recently dumped
my old Internet Hassle Provider.  I am now a happy customer at
a new ISP -- but they seem to run a REALLY OLDE version of
linux --- with associated OLDE applications.

They're running slrn 0.9.4.3   

I've read the old slrn doc's here (at the ISP ) and newer doc's 
on the web, and I am uncertain that the score file uses (full) 
Regular Expressions for the text of Subject:/From:, etc.
I've gotten A LOT of scoring working for me, but for the life of
me I cannot get one type of pattern to match:

  Subject: ^fa\s    % kill Subject lines that start: "fa XYZ-2000.....
  Subject: ^fs\s    % kill Subject lines that start: "fs XYZ-2000.....

I'm trying to kill one of the 'flavors' of "For Auction" and "For
Sale" postings that clog up the rec.radio.amateur.* ng's.
I've got the other 'flavors' covered: "fa:", "fs:", "f.s."....
But I'd REALLY LIKE to score (kill) the ^fa\s and ^fs\s variations.

I'm a lightweight hacker in Regular Expressions.  I've attempted
several ways to accomplish my task -- all to no avail, and all 
without any untoward consequences, either.

Please reply here.  I'll bet there are some lurkers with similar
questions.

Thanks in advance
Jonesy
-- 
--
Marvin L Jones  jonz--AT>>frontier.net
Gunnison, Colorado

Re: slrn / score / specifying pattern
#57879
Author: J.B. Nicholson-Owens
Date: Thu, 10 Feb 2000 00:00
28 lines
1826 bytes
Kludge wrote:
> I've read the old slrn doc's here (at the ISP ) and newer doc's 
> on the web, and I am uncertain that the score file uses (full) 
> Regular Expressions for the text of Subject:/From:, etc.

It doesn't.  S-Lang's regular expressions don't support some things but 
this won't be a problem for this case.

>   Subject: ^fa\s    % kill Subject lines that start: "fa XYZ-2000.....
>   Subject: ^fs\s    % kill Subject lines that start: "fs XYZ-2000.....

I don't know if you know this, but inline comments are not allowed in 
S-Lang regular expressions--if you have these lines in your scorefile, 
they won't match what you want them to.  Try:

   [rec.radio.amateur.*]
      Score: =-9999
         Subject: ^fa[ \t]+
         Subject: \<f\.[sa]\.:?\>
         Subject: \<f[sa]:

To kill the for sale and for auction stuff.  There are three regexes 
instead of two so you won't kill on "fa" or "fs" as a word.  I don't 
know if that's a concern or not, but better safe than sorry.

Off-topic: I'm just *trying* MT-NW, I'm not switching to it.

Editing problems with GUI newsreaders (was: slrn / score / specifying pattern)
#57914
Author: J. B. Moreno
Date: Fri, 11 Feb 2000 00:00
13 lines
1421 bytes
J.B. Nicholson-Owens <jbn@mystery-train.pdnt.com> wrote:

> You want crude?  Use a GUI newsreader for a while.  I have yet to see a
> GUI newsreader that is good for anything but casual infrequent reading.
> Editing this post was way more difficult than it should have been.

Really?  I know you don't have the vast expanse of commands available to
a Gnus user, but what in particular did you have trouble with?

-- 
John B. Moreno

Re: slrn / score / specifying pattern
#57915
Author: J.B. Nicholson-Owens
Date: Fri, 11 Feb 2000 00:00
53 lines
2459 bytes
I wrote:
>     Score: =-9999

I should have written "Score::" there--two colons means 'or'.

I wrote:
>        Subject: ^fa[ \t]+
>        Subject: \<f\.[sa]\.:?\>
>        Subject: \<f[sa]:

Kludge replied:
> Thanks.  I'll use'em instead of mine (below) after I understand them in
> full.  <g>

I'm going to guess the tricky bit is the second one (I admit, it looks 
more like line noise than the other two).  Hopefully this will help you  
parse it:

  \<         beginning of word
  f\.        matches "F." or "f." (slrn's scoring regexes are
             case-insensitive by default).  That's a literal dot, by the
             way, not a metacharacter.
  [sa]\.     matches "S.", "s.", "a." or "A."
  :?         an optional colon
  \>         end of word

> What is working for me at this time:
>  [rec.radio.amateur.*]
>   Score:: =-9999
>   Subject: ^fs\>
>   Subject: Re\:\ fs
>   Subject: fs\:
>   Subject: f\.s\.
>   Subject: fa\:
>   Subject: ^fa\>

When you get into the swing of reading regexes you'll see how much 
shorter those can be.

> (I guess I don't need to 'escape' a blank there.)

You only need to specify what kind of whitespace you mean and how much 
whitespace you want to match.  A single space character matches only 
that.  "[ \t]+" matches at least one tab or space (including neighboring 
mixtures of both tab and space).

> Crude -- no doubt.

You want crude?  Use a GUI newsreader for a while.  I have yet to see a 
GUI newsreader that is good for anything but casual infrequent reading.  
Editing this post was way more difficult than it should have been.

Re: Editing problems with GUI newsreaders
#57916
Author: J.B. Nicholson-Owens
Date: Fri, 11 Feb 2000 00:00
91 lines
6184 bytes
J. B. Moreno wrote:
> Really?  I know you don't have the vast expanse of commands available to
> a Gnus user, but what in particular did you have trouble with?

I don't expect it to do all Gnus can do, but slrn is a reachable target.  
There's a lot (I've already written one long letter to the author and 
I'm working on a second) so I'll limit it to the editing highlights.  
I'm not saying MT-NW is unusable.  MT-NW has a lot of potential.  I 
think there are some things that need to be expanded so they aren't so 
annoying (to me).

There are too many windows involved:  Even if I choose to reuse an 
article window (by setting that in the prefs) this preference doesn't 
refer to the kind of reuse I want.  Opening another article by 
double-clicking it or using the keyboard should be able to put that 
article in the article window that's already open (or the topmost 
article window if there's more than one open).  You could still force a 
new window by option-double-click or option-return (or if you have this 
theoretical preference set to the default, option modified openings 
would reuse the topmost article window).  By default MT-NW does what I 
expect it to do here, but it needs more choices.  The choice to have a 
split screen (article thread lists above the horizontal bar, article 
content below) isn't here.  I just don't see how people read lots of 
news with this app switching between the mouse and keyboard or using 
cmd-, to switch the focus on windows.

The default editing should be configurable system-wide: Emacs and vi 
predate anything on the Mac and have a strong editing history.  Cursor 
movement and kill line would have been nice.  Again, not what I expect 
Mac users to use but the option to have the keys would be nice.

The number of configurable options in MT-NW is way too low.  Just about 
everything should be alterable (with reasonable defaults, of course).  
For instance, altering the declaration "In <msg-id>, name 
<e-mail@address> wrote:" should be editable so I can set it once and 
leave it alone.

The multithreadedness only goes so far: starting a lengthy operation 
(like saving multiple articles) means you can't close certain windows.  
That's just silly--netnews is a database and a newsreader should provide 
a view onto that database.  I should be allowed to start a process (like 
a download) and close windows I used to start the process.  And 
option-closing to free memory is just plain wrong--it's what I want to 
do by default, not the exception, even though I've got over 100MB RAM.
Even downloads of articles should be allowed to complete even if you 
close the window into which they are downloading.  It would be fine to 
make a preference control this--closing a window implies aborting the 
actions from that window--and make its default on.

I don't want apps bugging me every time there's a problem--log it and 
keep going as best you can (unless the problem is so crucial I *must* 
attend to it instantly).  I will read the error log at my leisure.  
Alert panels in GUIs are particularly bad because they take focus away 
from what you're working on (dangerous if you have a return keystroke 
buffered because you've inadvertantly hit whatever the default button 
is, possibly without getting a chance to read the alert text) and 
because they often interrupt your work flow to tell you something you 
would have figured out anyway (for example, 'an article you wanted to 
save is no longer on the server'--I would have figured that out from the 
log or the missing data in the saved file).

There are too many needless window redraws--the task list should look 
like NeXTSTEP's File Viewer process panel (other apps use a similar 
panel--iCab's download manager, for instance, is close).  The key 
concept is adding/removing tasks doesn't cause a complete redraw of the 
window, just a small part of a list (and possibly the scrollbar attached 
to the list).  Deciding who to send a post to in MT-NW's editor 
needlessly redraws the entire window even though only a check, the 
header editor area and possibly the "Post" button are changing.  I'm 
very sensitive to the overhead a GUI imposes on an essentially all-text 
task like newsreading.

I'm surprised so much effort was put into making operations work across 
apps (Applescript, Internet defaults (now the Internet control panel) to 
name a couple) but editors are still built into Mac newsreaders.  
Launching apps to perform some service like editing or spell checking 
means a *lot* of delays because these apps are so huge (Excalibur also 
has that annoying non-standard mouse pointer).

Speaking of mouse pointers, there should be a system-wide pointer+busy 
(like iCab has) so you can see the app is doing something (it's "busy") 
but not blocking.

This is getting pretty long, so I'll summarize: there are no 
show-stoppers and there are some genuinely nice concepts implemented 
well in MT-NW (multithreadedness in itself is something all newsreaders 
should have, particularly GUI ones; the filter panel and editing is 
nice; seeing the appropriate font if you're seeing a Chinese post next 
to an English one) but its limits need to be removed.

Re: slrn / score / specifying pattern
#57925
Author: Thorfinn
Date: Fri, 11 Feb 2000 00:00
40 lines
2626 bytes
In news.software.readers, on 10 Feb 2000 22:01:07 GMT
Kludge <X@Y.Z.net> wrote:
> I'm new at slrn -- having moved from tin when I recently dumped
> my old Internet Hassle Provider.  I am now a happy customer at
> a new ISP -- but they seem to run a REALLY OLDE version of
> linux --- with associated OLDE applications.
> They're running slrn 0.9.4.3   

Ewwww.  That is old. :)

> I've read the old slrn doc's here (at the ISP ) and newer doc's 
> on the web, and I am uncertain that the score file uses (full) 
> Regular Expressions for the text of Subject:/From:, etc.

No, it doesn't use full REs.  It uses slang REs.  I believe there is
documentation for them floating about somewhere, but I'm not sure
where.  I read the slang source, when I need to remember. :)

> I've gotten A LOT of scoring working for me, but for the life of
> me I cannot get one type of pattern to match:
>   Subject: ^fa\s    % kill Subject lines that start: "fa XYZ-2000.....
>   Subject: ^fs\s    % kill Subject lines that start: "fs XYZ-2000.....

\s is a perl RE only thing.  Just put a space in there, it should
work.  ie, 'Subject: ^fs ' should be fine.

Also, there's some slang RE elements that mean "end of word" and
similar, but I don't recall what they are at the moment.

Later,

   Thorf

-- 
<a href = "http://netizen.com.au/~thorfinn/">thorfinn@netizen.com.au</a>
'Pooh?' he said.  'Yes, piglet?' pooh replied. 'Nothing,' piglet
said, taking pooh's paw, 'i just wanted to make an exception.'
    -- MegaHal, trained on <gossamer@tertius.net.au>'s quotes file

Re: slrn / score / specifying pattern
#57936
Author: Kludge
Date: Fri, 11 Feb 2000 00:00
54 lines
2399 bytes
On Thu, 10 Feb 2000 21:40:44 -0600, J.B. Nicholson-Owens wrote:
>Kludge wrote:
<-snip->
>>   Subject: ^fa\s    % kill Subject lines that start: "fa XYZ-2000.....
>>   Subject: ^fs\s    % kill Subject lines that start: "fs XYZ-2000.....
>
>I don't know if you know this, but inline comments are not allowed in 
>S-Lang regular expressions--

Thanks!  I had *just* started testing for that in alt.test when
I saw your followup here.  You're correct, of course.
One or 2 example(s) I found out on the web had a few, rare in-line
comments.  I'll bet it wasn't workin' for them, either.
These were the *only* 2 such "commented" regexp's in my score file , 
and I got very suspicious of that co-incidence.

>Try:
>
>   [rec.radio.amateur.*]
>      Score: =-9999
>         Subject: ^fa[ \t]+
>         Subject: \<f\.[sa]\.:?\>
>         Subject: \<f[sa]:
>
>To kill the for sale and for auction stuff.  There are three regexes 
>instead of two so you won't kill on "fa" or "fs" as a word.  I don't 
>know if that's a concern or not, but better safe than sorry.

Thanks.  I'll use'em instead of mine (below) after I
understand them in full.  <g>
What is working for me at this time:

 [rec.radio.amateur.*]
  Score:: =-9999
  Subject: ^fs\>
  Subject: Re\:\ fs
  Subject: fs\:
  Subject: f\.s\.
  Subject: fa\:
  Subject: ^fa\>
  ...and a couple'o others.

Crude -- no doubt.  (I guess I don't need to 'escape' a blank there.)
But, testing in alt.test gives me the
results I want and no other untoward actions.

Regards,
Jonesy

-- 
Marvin L Jones  jonz--AT>>frontier.net
Gunnison, Colorado

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads