🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #80858

Re: [slrn] Implementing a thread killer

#80858
From: Jurriaan (note: this is a workin...
Date: Tue, 26 Jun 2001 18:54
110 lines
5994 bytes
On 26 Jun 2001 12:08:23 GMT, J.B. Nicholson-Owens
<jbn@forestfield.org> wrote:
> I'm working on a thread killing macro.  The idea is you position the cursor
> on some article and press a key.  Every article in that thread (which I'll
> call the "offensive" thread) is instantly killed now and forever.  I think
> there is a need for such functionality.  In time this could be extended to
> offensive subjects and offensive authors.  I'm going for a correct and full
> implementation which requires maintaining a list of offending message-IDs.

hehe - I'm working on this too, but from another point.

> 
> I can (mostly) implement this in two ways:
> 
>   (A) Have the macro keep a file of offending message-IDs and go over the
>       article list finding child articles (adding them to the offensive
>       list) and somehow killing them.
> 
>   (B) Add offending message-ID entries to a scorefile so slrn will do the
>       killing.  I prefer this plan because so much is already done for me.

I am keeping the offending message-id's in a gdbm-database.

key: message-id
data: score, expiry-date, flags

> 
> There are problems with both plans:
> 
> In plan A, it's not clear how a macro would efficiently kill an article.
> Setting the score of an article to the kill score doesn't kill the article.
> 
> Plan A's offending message-ID list would grow without bound (which scales
> poorly) and I'd have to reinvent the wheel to handle timed entries (i.e.,
> kill this thread for 30 days).  Personally, I have no use for timed entries,
> but I understand others would want it.  This suggests using the score engine
> slrn already has (which, in combination with cleanscore, could do timed
> entries and keep the scorefile to a reasonable size).
> 
> Plan B, the scorefile approach, requires knowing which article(s) are being
> killed.  The message-IDs of these articles need to be added to the scorefile
> so their descendant articles can be killed too.  How can a macro get the
> message-IDs of the articles killed by a *particular* scorefile or scoring
> operation?  To implement this properly, I'll need to distinguish between
> scoring for this macro and all other scoring.  Scoring with a particular
> value will not work because there's no way to guarantee that score won't be
> used anywhere else.

I have struggled with this also, and have decided that in my
implementation, the := score will be preferred, and a strong warning
with example of what goes wrong when not using := will be given in the
documentation.

> 
> Plan B could require scoring a group more than once (which could scale
> poorly).  If adding offending message-IDs were done iteratively re-scoring
> scales the worst.  It is advantageous to add all offending message-IDs to
> the scorefile and score (at most) twice--once using whatever the extant
> scorefile catches and a second pass to catch child articles not killed on
> the first pass.  If no message-IDs are to be added, all the killing can be
> done in one pass.
> 
> Thinking of a worst-case scenario where a bunch of AOL[1] posters are
> posting followups to each other, each generating articles linked by one
> message-ID in the References: header, it's easy to see the macro would be
> best off exploiting some hierarchically arranged list of message-IDs in RAM.
> Does such a thing exist in slrn already or was such a thing planned?  I'm
> guessing something like this is built every time one enters article mode.
> 
I'm planning to test all the entries in the References: header in art.c,
just before returning in apply_score().

Given your example, would it be possible to encounter the following:

article3, references article2
article2, references article1

in other words, can I encounter articles in an incorrect order? I'm
still not sure about that - perhaps I'll have to do the scoring after
thread_headers() or something like that - or keep scoring all headers
until no new headers have been scored - like bubble-sort.

> Comments?
> 
The concept is clear, the need is clear, the implementation needs work.
I think I have the basic functionality in place, but I lack a gdbm-test
in configure, I don't yet know if the expiring works, I haven't checked
if gdbm is available for cygwin (but I'm 99% sure), and I haven't tested
if these out-of-order messages occur.

Still, I hope to have 

[*] [Hopeless Troll]
Persistent Score:= -9999
Expires: 12/31/2099
  From: psychoberry@hetnet.nl

in my scorefile before long :-)

Good luck,
Jurriaan

[ if you want to see any of my code, please respond privately]
-- 
All this being the case, I feel that the off-worlder's opinions should
be carefully heeded.
True, said Morlock, especially in view of the powerful warship.
	Jack Vance - Nightlamp
GNU/Linux 2.4.5-ac18 SMP/ReiserFS 2x1402 bogomips load av: 0.61 0.15 0.05
Technical Details
Message-ID: <slrn9jhlof.5h6.no_spam_here@middle.of.nowhere>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!not-for-mail
References: <slrn9jgumv.fog.jbn@forestfield.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrn9jhlof.5h6.no_spam_here@middle.of.nowhere>
Subject: Re: [slrn] Implementing a thread killer
Date: Tue, 26 Jun 2001 18:54:33 +0000
From: no_spam_here@rivierenland.xs4all.nl (Jurriaan (note: this is a working address!))
References: <slrn9jgumv.fog.jbn@forestfield.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!not-for-mail
Newsgroups: news.software.readers
Organization: XS4ALL Internet BV
Lines: 109
NNTP-Posting-Host: rivierenland.xs4all.nl
X-Trace: news1.xs4all.nl 993581673 27952 194.109.14.47 (26 Jun 2001 18:54:33 GMT)
X-Complaints-To: abuse@xs4all.nl
NNTP-Posting-Date: 26 Jun 2001 18:54:33 GMT
X-Face: b$-F+98,@$_I=*ODq'<K2(OA)qC&,(GP=z2^`4dwQwy&e;!|R?>")k9FH3?YC+%*kF\=<Rx"Hy2_eyMtnFSiO8
User-Agent: slrn/0.9.7.1-jwk (Linux)