🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #54801

Re: Article numbering and handling article number rollover

#54801
From: Murray Peterson
Date: Wed, 24 Oct 2001 19:34
34 lines
2572 bytes
Howard Siegel <not.interested@nospam.invalid> wrote in 
news:9r74ak$nss$1@news.panix.com:

> On the other hand, I did specifically say that I was only interested
> in the answers to my questions and not in a general discussion of
> what I'm trying to do, on what platform, on what OS, etc., etc., etc.
> 
> So, can we please get back to the questions at hand and stop the
> driftage.
> 

OK -- here's the "correct" answer to just your question:

Write your newsrc handler to do proper modulus arithmetic, so that 
"rollover" isn't an issue.  In other words, don't use greater-than or less-
than comparisons -- just calculate the distance from the previously read  
articles.  e.g. 1 - 2^32-1 == 1 and so on.  Your newsrc can now handle 
ranges that read (for example):

alt.test: 1-4294967292,4294967294-42,44,48-50

This will correctly handle the server resetting the article numbers at any 
point in time, not just rollover when max-int has been reached.

The problem with answering "just what you asked", is that this solution now 
precludes using many pre-written newsrc handlers.  Is this what your really 
want?  Well, we really don't know, so all we can do is give you theoretical 
answers.

-- 
Murray Peterson
Email: murray_peterson@home.com (remove underscore)
URL:   http://members.shaw.ca/murraypeterson/
Technical Details
Message-ID: <Xns91448A8E27F23farkle@24.71.223.45>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!nntpserver.com!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news1.calgary.shaw.ca.POSTED!not-for-mail
References: <9r5agg$7ma$1@news.panix.com> <9r6r3r$279$1@marduk.litech.org> <9r6tn3$lk4$1@news.panix.com> <Xns914477A31369Efarkle@24.71.223.45> <9r74ak$nss$1@news.panix.com>

Show Full Headers
Complete Article Headers
Message-ID: <Xns91448A8E27F23farkle@24.71.223.45>
Subject: Re: Article numbering and handling article number rollover
Date: Wed, 24 Oct 2001 19:34:39 GMT
From: mwp@home.com.invalid (Murray Peterson)
References: <9r5agg$7ma$1@news.panix.com> <9r6r3r$279$1@marduk.litech.org> <9r6tn3$lk4$1@news.panix.com> <Xns914477A31369Efarkle@24.71.223.45> <9r74ak$nss$1@news.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!nntpserver.com!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news1.calgary.shaw.ca.POSTED!not-for-mail
Newsgroups: news.software.readers,news.software.nntp
Organization: None
User-Agent: Xnews/4.05.11
Lines: 33
NNTP-Posting-Host: 24.81.161.103
X-Complaints-To: abuse@shaw.ca
X-Trace: news1.calgary.shaw.ca 1003952079 24.81.161.103 (Wed, 24 Oct 2001 13:34:39 MDT)
NNTP-Posting-Date: Wed, 24 Oct 2001 13:34:39 MDT