🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Ken Keen Thu, 01 Oct 1998 00:00
[slrn] When does article_mode_hook() run? Before or after sorting? (Was [slrn] How to kill all "Re:" articles ...)
#43492
Author: Ken Keen
Date: Thu, 01 Oct 1998 00:00
37 lines
1904 bytes
On 27 Sep 1998 20:23:57 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu>
wrote in thread called "[slrn] How to kill all "Re:" articles except the ones
I have scored 9999":

> [1] I know article_mode_hook() runs before sorting, but I didn't test to see
> if it runs after scoring, hopefully, for you, it does.

Anybody know the answer? 

Fwiw, I want to run article_mode_hook() *before sorting* and then (and this is
a rough design):

   1. Scan through *all* new headers for the current newsgroup and build 
      an array (say, variable Non-re-headers = String_Type [1000];) of all
      subjects *without* the prepending string "Re:".
 
      then,
 
   2. Rescan again each header and:
 
      If a header is on the array created in 1, then set_header_score = 1
 
      Otherwise, set_header_score = -1.
 
Then, scorefile would list all the threads I was interested in following.  The
scorefile would add 1 to these threads changing their score from -1 to 0.
 
Is this design even possible? E.g.,:
 
      1. Is it possible in article_mode_hook() to actually scan all headers?
 
      2. Is it possible to do it a second time (step 2)?

-- 
Man From Utopia

Re: [slrn] When does article_mode_hook() run? Before or after sorting? (Was [slrn] How to kill all "Re:" articles ...)
#43518
Author: Ken Keen
Date: Fri, 02 Oct 1998 00:00
129 lines
5740 bytes
On 2 Oct 1998 02:27:32 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu>
wrote:

> [group.wildmat(s)]
>     Score: =1                                    % non-Re: articles
> 	 ~Subject: ^Re:
> 
>     Score: =-1                                   % everything else
> 	  Subject: .

> 
> Actually, I think scoring happens before article_mode_hook() runs, so the
> scorefile would have scored the articles first.  Unless you mean to set an
> article's score and have it somehow reflected in the scorefile, in which
> case, that won't happen.

No, not reflected in the scorefile. Just set the score in the header
(set_header_score) before sorting.

> I don't get what you miss by using the scorefile alone, however.  

I implemented the above scorefile programming (per your valuable help, of
course) without the =-1 but with only -1 and then followed by interesting
articles Score 1. But two problems occurred:

     1. That all of the threaded followups to non-Re: articles are marked
        as read. This you knew would happen.

     2. Some people, when following up, somehow manage to lack references in
        the headers.

        *These* follow-ups are naturally not threaded with the non-Re:
        articles and its followups. So I could get this unexploded header 
	list:

	Flags Score  Number  Subject		 My Notes
	----- -----  ------  ------------------- -------------------
	!     9999   3	     Re: Fascinating	 This is my must see thread
	!     1	     3	     New thread		 New thread I want 
	      0	     2	     Re: Old thread	 Old thread listed in scorefile
	D     -1     4	     Re: Boring old	 Ignore boring old threads
	D     -1     2	     Re: New thread	 New thread follow-ups I want 
						 to see but there are no 
						 reference headers.

My sorting method is 7 and hence threads first but it won't thread the two
last followups with the original and its followups (with proper
references). Then it sorts by score and good bye the last followups.

The point of my design solution was to grab a list of the New Threads' subject
names and then, with this table at hand, be sure I score *all* followups to
them (properly referenced or not) as a score of 1. This would solve both
problems (all followups marked as read *and* the lost followups). My list
would then be:

	Flags Score  Number  Subject		 My Notes
	----- -----  ------  ------------------- -------------------
	!     9999   3	     Re: Fascinating	 This is my must see thread
	!     1	     3	     New thread		 New thread I want 
	!     1	     2	     Re: New thread	 New thread follow-ups I want 
						 to see but there are no 
						 reference headers.
	      0	     2	     Re: Old thread	 Old thread listed in scorefile
	D     -1     4	     Re: Boring old	 Ignore boring old threads

If scoring occurs before article_mode_hook(), then my macro would have to look
at the score (get_header_score) and not touch it if it is 0 or 9999 as set by
the scorefile already. The scorefile would be:

    Score: -1                                   % everything 
    Subject: .

    Score: 1
    Subject: interesting subject

    etc.

which would leave the other work of setting New Threads and its followups to
1 to the macro.
    
> Also, I think using an array for this will get you some errors when you
> enter big groups (forcing you to waste memory by making the array big enough
> to hold the largest group).

Yes, the rough design as written is absurd. Typically I ignore limitations at
this state of design. Later I would either limit this functionality to a small
limited group (as is typical in my reading), say a 100. I could, if I desired
to make this function work without limitation (which I would do in the type of
software we write) is this: if I couldn't anticipate the memory availability,
I would write the list to a temporary file.

> If you can use the scorefile alone, it'll be faster,

Absolutely.

> not error-prone 

Absolutely -- KISS lives.

> and far more intuitive when you want to change it.

Well, I'm not too challenged by this relatively simple design and I write well
structured and documented code. But you are correct that this is not as simple
by any means as:

    Score: =1                                    % keep non-Re: articles.
         ~Subject: ^Re:

    Score: -1                                    % no equal sign here.
          Subject: .

    Score: 1
	   Subject: interesting thread

But it has its flaws as noted. And in the software we manufacture, we would
not deliver it in that state.

But as a personal-use functionality, maybe "what they hey" is the proper
response. 

My basic curiosity was this: Can I get access to the entire header list at
article_mode_hook or where else would set_header_score be useful?

Thanks again for all the help!

-- 
Man From Utopia

Re: [slrn] When does article_mode_hook() run? Before or after sorting? (Was [slrn] How to kill all "Re:" articles ...)
#43522
Author: Dawn Owens-Nicholson
Date: Fri, 02 Oct 1998 00:00
37 lines
2195 bytes
Ken Keen <TroubleEveryDay@Dangerous.Kitchen> wrote:
> Anybody know the answer? 

The docs say it runs after downloading but before sorting.  Scoring, on the
other hand, happens after downloading but before article_mode_hook() runs, I
believe.

> Fwiw, I want to run article_mode_hook() *before sorting* and then (and this
> is a rough design):

You could use more scoring rules to get the sequence of scores you want
without a macro:

>       If a header [doesn't match "^Re:"], then set_header_score = 1
>       Otherwise, set_header_score = -1.

[group.wildmat(s)]
    Score: =1                                    % non-Re: articles
	 ~Subject: ^Re:

    Score: =-1                                   % everything else
	  Subject: .

> Then, scorefile would list all the threads I was interested in following.

Actually, I think scoring happens before article_mode_hook() runs, so the
scorefile would have scored the articles first.  Unless you mean to set an
article's score and have it somehow reflected in the scorefile, in which
case, that won't happen.

I don't get what you miss by using the scorefile alone, however.  Also, I
think using an array for this will get you some errors when you enter big
groups (forcing you to waste memory by making the array big enough to hold
the largest group).  If you can use the scorefile alone, it'll be faster,
not error-prone and far more intuitive when you want to change it.

Trying to understand the problem without wasting Usenet bandwidth
#43632
Author: Dawn Owens-Nicholson
Date: Sat, 10 Oct 1998 00:00
7 lines
1154 bytes
Ken Keen, please post with a lower wrapping column and a legitimate e-mail
address in either your From: or Reply-To: header.  Spam detection should be
handled at your mailer daemon.  Phony addresses just make it harder to help
you.  It's obvious by now that other people aren't posting in this thread--a
good sign to either drop the matter entirely or take it to e-mail.

Bad logic in scoring idea
#45241
Author: Dawn Owens-Nicholson
Date: Mon, 07 Dec 1998 00:00
33 lines
2182 bytes
[I'm not sure if this article ever got out.  I posted it a long time ago,
 but I recently discovered a bug with INN (or perhaps my server's
 installation of it) where articles posted during the expire run are made
 available to people at that server and propagated /much/ later or lost and
 never made available to anyone.]

Ken Keen <TroubleEveryDay@Dangerous.Kitchen> wrote:
>    1. Scan through *all* new headers for the current newsgroup and build 
>       an array (say, variable Non-re-headers = String_Type [1000];) of all
>       subjects *without* the prepending string "Re:".
>  
>       then,
>  
>    2. Rescan again each header and:
>  
>       If a header is on the array created in 1, then set_header_score = 1
>       Otherwise, set_header_score = -1.
>
> [...this would list headers to new threads...]

Most articles whose Subject: headers match "^Re:" are followups (this one is
an exception; most people don't make sure the Subject: header matches what's
actually being discussed).

If a followup to an interesting thread (a thread you want to follow) arrives
on your news server before the article that started the thread, you will
probably mark it as read (score is -1) and probably disregard it.  Later if
the thread starting article arrives, you might deem it interesting but it'll
be too late.  Some of the interesting followups might have expired by then.
Making assumptions about the order in which articles will arrive on your
server (no matter how well-connected) is ill-advised.

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