Thread View: news.software.readers
6 messages
6 total messages
Started by Jonathan A.
Sat, 08 Nov 2003 18:37
[slrn] Why is my scorefile entry being skipped?
Author: Jonathan A.
Date: Sat, 08 Nov 2003 18:37
Date: Sat, 08 Nov 2003 18:37
45 lines
2616 bytes
2616 bytes
I'd be grateful if someone could help me understand what's happening
here. I noticed that a scorefile entry wasn't behaving as expected
last night, and have boiled it down to this:
If I create a score file with just the entries...
[*]
Score: =300 %300 for really hot topic
Subject: Something Really Interesting
[news.software.readers]
Score: =150 %150 for slrn in news.software.readers
Subject: slrn
[*]
Score: =100%100 for slrn in any group
Subject: slrn
... a header with the subject "slrn" in news.software.readers gets
assigned the "100 for slrn in any group" score. If I comment out
the "300 for really hot topic" score, or place it below the "slrn in
n.s.r." entry, a header with the subject "slrn" in n.s.r. gets the
"150 for slrn in news.software.readers" score, as expected.
Also, if I change the "*" in the "300 for really hot topic" entry to
"news.software.readers" (or "foo.bar", for that matter), then the
subject "slrn" in n.s.r. gets the "150 for slrn in n.s.r." score.
According to score.txt, the score should be applied and processing
of a header should stop when a score is preceded by an equal sign,
and it seems to be so, unless a wildcard entry appears before it. But
why should the wildcard entry in the example above have any effect
at all on the entry for "150 for slrn in news.software.readers"?
I'm missing something, but what?
ciao,
Jonathan
--
Don't just hit reply. Email address is broken. Thank
your friendly neighborhood spammer. Email replies to:
user: jnthn1 domain: earthlink<dot>net
Re: [slrn] Why is my scorefile entry being skipped?
Author: J.B. Nicholson-Owens
Date: Mon, 10 Nov 2003 22:53
Date: Mon, 10 Nov 2003 22:53
26 lines
1932 bytes
1932 bytes
Jonathan A. wrote:
> ... a header with the subject "slrn" in news.software.readers gets
> assigned the "100 for slrn in any group" score.
I confirmed this with the following version of slrn and it appears to me to
be a bug. slrn should score "slrn" posts in news.software.readers 150
points.
$ slrn --version
Slrn 0.9.8.0 [2003-08-25]
S-Lang Library Version: 1.4.9
Compiled at: Aug 26 2003 01:10:55
Operating System: Linux
COMPILE TIME OPTIONS:
Backends: +nntp -slrnpull -spool
External programs / libs: -canlock -inews +ssl -uudeview
Features: +charset_mapping +decoding +emphasized_text +end_of_thread
+fake_refs +gen_msgid -grouplens +mime -msgid_cache +piping +rnlock
+slang +spoilers -strict_from
DEFAULTS:
Default server object: nntp
Default posting mechanism: nntp
Default character set: isolatin
SUPPORTED CHARACTER SETS:
isolatin ibm850 ibm852 ibm857 ibm737 NeXT koi8
Re: [slrn] Why is my scorefile entry being skipped?
Author: Jonathan A.
Date: Tue, 11 Nov 2003 21:19
Date: Tue, 11 Nov 2003 21:19
46 lines
2730 bytes
2730 bytes
On 10 Nov 2003 22:53:51 GMT, J.B. Nicholson-Owens
<jbn@forestfield.org> appears to have said:
>
> I confirmed this with the following version of slrn and it appears to me to
> be a bug. slrn should score "slrn" posts in news.software.readers 150
> points.
>
> $ slrn --version
> Slrn 0.9.8.0 [2003-08-25]
Hmm... I thought it was misunderstanding on my part. If it truly is
a bug, it's been around for a while. I neglected to mention the version
in my OP. It was 0.9.7.4, but I just compiled a fresh copy of 0.9.8.0,
and still see the same behavior with...
Slrn 0.9.8.0 [2003-08-25]
S-Lang Library Version: 1.4.9
Compiled at: Nov 11 2003 15:47:49
Operating System: Linux
COMPILE TIME OPTIONS:
Backends: +nntp +slrnpull +spool
External programs / libs: -canlock -inews -ssl +uudeview
Features: +charset_mapping +decoding +emphasized_text +end_of_thread
+fake_refs +gen_msgid -grouplens +mime -msgid_cache +piping +rnlock
+slang +spoilers -strict_from
DEFAULTS:
Default server object: nntp
Default posting mechanism: nntp
Default character set: isolatin
SUPPORTED CHARACTER SETS:
isolatin ibm850 ibm852 ibm857 ibm737 NeXT koi8
Just for laughs I ran slrn-0.9.7.4 against libslang.so.1.4.5 and got
the same results. Unless someone can show that it is not a bug, I'll
file a bug report on it sometime in the next couple of days.
ciao,
Jonathan
--
Don't just hit reply. Email address is broken. Thank
your friendly neighborhood spammer. Email replies to:
user: jnthn1 domain: earthlink<dot>net
Re: [slrn] Why is my scorefile entry being skipped?
Author: Thomas Schultz
Date: Thu, 20 Nov 2003 12:46
Date: Thu, 20 Nov 2003 12:46
111 lines
4733 bytes
4733 bytes
* J.B. Nicholson-Owens [2003-11-10 22:53] :
[...]
> I confirmed this with the following version of slrn and it appears to
> me to be a bug. slrn should score "slrn" posts in
> news.software.readers 150 points.
It is indeed a bug (or rather, a misfeature); I'll try to explain it:
When parsing the scorefile, slrn puts the rules into different chains,
depending on the section (specified in square brackets) they are in.
When scoring the article later, it uses the chains that apply to the
current group - the advantage of this is that the test "Does this rule
apply to this group?" has to be done only once per chain, not once per
rule.
In our example, both rules that apply to all groups get added to the
same chain and as the chain existed before the chain for
news.software.readers, they are both applied before the special rule
for nsr.
What I did now was to remove the logic that finds out whether a chain
with the same label already exists - instead, I'm now simply appending
a new chain whenever you start a new section in your score file. This
might make scoring a little bit slower in case the sections in your
score file are very "fragmented", but will lead to the expected
behaviour in any case.
Here is the patch:
--- slrn-0.9.8.0/src/score.c 2003-07-29 21:09:29.000000000 +0200
+++ slrn/src/score.c 2003-11-13 10:15:29.000000000 +0100
@@ -201,7 +201,7 @@
}
static Group_Score_Type *Group_Score_Root;
-static Group_Score_Type *Group_Score_Next;
+static Group_Score_Type *Group_Score_Tail;
static Score_Type *Score_Root, *Score_Tail;
int Slrn_Apply_Score = 1;
@@ -789,36 +789,22 @@
if (new_group_flag)
{
- Group_Score_Type *gst, *tail;
+ Group_Score_Type *gst;
+
+ gst = (Group_Score_Type *) slrn_safe_malloc (sizeof (Group_Score_Type));
- tail = Group_Score_Next = Group_Score_Root;
- while (Group_Score_Next != NULL)
- {
- if ((Group_Score_Next->gsnt.next == NULL)
- && (Group_Score_Next->gst_not_flag == gst_not_flag)
- && !strcmp ((char *) group, Group_Score_Next->gsnt.name))
- break;
- tail = Group_Score_Next;
- Group_Score_Next = Group_Score_Next->next;
- }
+ if (-1 == compile_group_names ((char *)group, gst))
+ return NULL;
- if (Group_Score_Next == NULL)
+ gst->gst_not_flag = gst_not_flag;
+
+ if (Group_Score_Root == NULL)
{
- gst = (Group_Score_Type *) slrn_safe_malloc (sizeof (Group_Score_Type));
-
- if (-1 == compile_group_names ((char *)group, gst))
- return NULL;
-
- gst->gst_not_flag = gst_not_flag;
-
- if (Group_Score_Root == NULL)
- {
- Group_Score_Root = gst;
- }
- else tail->next = gst;
-
- Group_Score_Next = gst;
+ Group_Score_Root = gst;
}
+ else
+ Group_Score_Tail->next = gst;
+ Group_Score_Tail = gst;
}
/* Now create the PseudoScore type and add it. */
@@ -835,13 +821,13 @@
else
pst->description = slrn_safe_strmalloc ((char *)"");
- if (Group_Score_Next->pst == NULL)
+ if (Group_Score_Tail->pst == NULL)
{
- Group_Score_Next->pst = pst;
+ Group_Score_Tail->pst = pst;
}
else
{
- PScore_Type *last = Group_Score_Next->pst;
+ PScore_Type *last = Group_Score_Tail->pst;
while (last->next != NULL) last = last->next;
last->next = pst;
}
--
Thomas Schultz <tststs@gmx.de> News on slrn: http://slrn.sf.net/news.html
.-----------------------------. [2003-08-25] Released slrn 0.9.8.0
| Home of the slrn newsreader | [2003-08-19] New slrn FAQ available
| http://slrn.sourceforge.net | [2003-07-31] First beta with offline reading
Re: [slrn] Why is my scorefile entry being skipped?
Author: Jonathan A.
Date: Thu, 20 Nov 2003 23:43
Date: Thu, 20 Nov 2003 23:43
19 lines
1762 bytes
1762 bytes
On Thu, 20 Nov 2003 12:46:32 +0000 (UTC), Thomas Schultz <tststs@gmx.de> appears to have said: > Here is the patch: > > --- slrn-0.9.8.0/src/score.c 2003-07-29 21:09:29.000000000 +0200 > +++ slrn/src/score.c 2003-11-13 10:15:29.000000000 +0100 Excellent! Thanks much. I'm happy to report that the patch works on 0.9.7.4 as well. (Still using 0.9.7.4 for the test_incomplete feature of the "jwk" hack.) ciao, Jonathan -- Don't just hit reply. Email address is broken. Thank your friendly neighborhood spammer. Email replies to: user: jnthn1 domain: earthlink<dot>net
Re: [slrn] Why is my scorefile entry being skipped?
Author: J.B. Nicholson-Owens
Date: Mon, 24 Nov 2003 01:53
Date: Mon, 24 Nov 2003 01:53
6 lines
1403 bytes
1403 bytes
Thomas Schultz wrote: > It is indeed a bug (or rather, a misfeature); I'll try to explain it: Thanks for the explanation and patch. I am trying a patched slrn 0.9.8.0 with a 17.6k scorefile (no comments) on a slow machine and I don't notice a slowdown in scoring speed.
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