🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Mike Mimic Sun, 04 Aug 2002 23:25
News::NNTPClient module
#59826
Author: Mike Mimic
Date: Sun, 04 Aug 2002 23:25
25 lines
1888 bytes
Hi!

I am programing a Perl program as NNTP client. And I have
a question about that. In News::NNTPClient module there is
function "group". I think that this is only a Perl
interface to the NNTP command. So I think that this question
can be answered here.

So, this function returns first and last article numbers.
But do all messages between those numbers exist? I think
that I read somewhere that if the message was canceled the
message number is skipped. Are those numbers the same?

If so, how can a client knows without looking for message for
every article number? I found out that there is "listgroup"
function, which return list of those. Should I call this
or will group function be enough.

And another question. How clients determine which articles
belong to the same thread? By subject?


Mike

Re: News::NNTPClient module
#59827
Author: itsy bitsy meowbot
Date: Sun, 04 Aug 2002 23:36
38 lines
2669 bytes
Mike Mimic <ppagee@yahoo.com> writes:

> Hi!
>
> I am programing a Perl program as NNTP client. And I have
> a question about that. In News::NNTPClient module there is
> function "group". I think that this is only a Perl
> interface to the NNTP command. So I think that this question
> can be answered here.
>
> So, this function returns first and last article numbers.
> But do all messages between those numbers exist?

There's no guarantee of that at all.  The GROUP command also returns a
third number, the number of articles in the group, but that also may
or may not be accurate (and it of course may change between the time
you execute the GROUP command and start fetching articles).

> I think that I read somewhere that if the message was canceled the
> message number is skipped. Are those numbers the same?

Yes.

> If so, how can a client knows without looking for message for
> every article number? I found out that there is "listgroup"
> function, which return list of those. Should I call this
> or will group function be enough.

That would work, but the usual thing is to use XOVER or XHDR, so that
you can get the headers you require and find out what exists in one
step.

> And another question. How clients determine which articles
> belong to the same thread? By subject?

That's used as a fallback when articles are mangled, but the primary
thing that ties articles together is the References: header.
Re: News::NNTPClient module
#59828
Author: Jøhnny Fävòrítê (it means "Japan...
Date: Sun, 04 Aug 2002 23:47
41 lines
2937 bytes
Mike Mimic wrote:
> So, this function returns first and last article numbers.
> But do all messages between those numbers exist?

Nope.  There will be holes.

> If so, how can a client knows without looking for message for
> every article number?

You can't.  Another value you get back from the GROUP command is an
estimate of the total number of messages in the group, which is a help,
but to know if any particular message number exists, you just have to
ask for it and find out.

That shouldn't be a problem, though.  If you want, say, the 50 most
recent messages and the range is 100-5000, you ask for 5000, 4999, 4998,
and so on, skipping over the "holes" as you encounter them, until you've
downloaded 50 messages.

> I found out that there is "listgroup" function, which return list
> of those. Should I call this or will group function be enough.

It probably performs the LIST command, which tells you the newsgroups
that exist on the server.  You need to know which groups exist before
you know which ones you can plug into the GROUP command.

A word of warning, though: in my experience the list of groups you get
back is often a *mess*.  It will contain a few entries that are not
actually newsgroups, it may have duplicates, and it won't be in
alphabetical order.  So it requires substantial clean-up.

> And another question. How clients determine which articles
> belong to the same thread? By subject?

No, by examining the References: header of all articles.  There are a
few others you might examine but that's the big one.  Subject: should
only be used as a last resort.  Personally in my newsreader I never use
it at all because it's prone to failure.  I'd rather err on the side of
not having two articles in the same thread that should be rather than
possibly threading together two articles that shouldn't be.
Re: News::NNTPClient module
#59829
Author: Andrew - Supernews
Date: Mon, 05 Aug 2002 01:12
42 lines
2405 bytes
In article <3D4DB7EF.4030204@yahoo.com>, Mike Mimic wrote:
> Hi!
> 
> I am programing a Perl program as NNTP client. And I have
> a question about that. In News::NNTPClient module there is
> function "group". I think that this is only a Perl
> interface to the NNTP command. So I think that this question
> can be answered here.
> 
> So, this function returns first and last article numbers.
> But do all messages between those numbers exist?

not necessarily. If messages have been cancelled or expired, then there
may be gaps. On some systems there may also be gaps for articles that
never existed.
 
> If so, how can a client knows without looking for message for
> every article number?

normally the client will download a range of overview entries. For example
if articles up to 500 have been previously read, and the group command
returns a high-mark of 600, then the client will fetch overview entries
for 501-600.

> I found out that there is "listgroup"
> function, which return list of those. Should I call this

avoid LISTGROUP. It has the serious disadvantage that it can't be limited
to a specific range of the available articles, which means that if you do
it on a busy group or on a server with long retention, you may get a _lot_
of data returned.

> And another question. How clients determine which articles
> belong to the same thread? By subject?

no, by the References header (which is why References is in the data
returned by the XOVER command).

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Re: News::NNTPClient module
#59832
Author: DevilsPGD
Date: Mon, 05 Aug 2002 01:37
19 lines
1890 bytes
In message <<PM0003A76B71DEB458@minion.nashville.comcast.net>> J�hnny
F�v�r�t� (it means "Japanese Sandman") <this.is@totally.fake.com> did
ramble:

>> I found out that there is "listgroup" function, which return list
>> of those. Should I call this or will group function be enough.
>
>It probably performs the LIST command, which tells you the newsgroups
>that exist on the server.  You need to know which groups exist before
>you know which ones you can plug into the GROUP command.

It may also be the result of the LISTGROUP function, which lists all
valid articles in a given group.

-- 
UNIX Sex
{look;find;talk;grep;touch;finger;find;flex;unzip;mount;workbone;
fsck;yes;gasp;fsck;yes;eject;umount;makeclean;zip;split;done;exit}
Re: News::NNTPClient module
#59833
Author: Mike Mimic
Date: Mon, 05 Aug 2002 01:59
32 lines
2017 bytes
Hi!

Mike Mimic wrote:

> Hi!
> 
> I am programing a Perl program as NNTP client. And I have
> a question about that. In News::NNTPClient module there is
> function "group". I think that this is only a Perl
> interface to the NNTP command. So I think that this question
> can be answered here.
> 
> So, this function returns first and last article numbers.
> But do all messages between those numbers exist? I think
> that I read somewhere that if the message was canceled the
> message number is skipped. Are those numbers the same?
> 
> If so, how can a client knows without looking for message for
> every article number? I found out that there is "listgroup"
> function, which return list of those. Should I call this
> or will group function be enough.
> 
> And another question. How clients determine which articles
> belong to the same thread? By subject?


Thanks to all of you. You really helped me.


Mike

Re: News::NNTPClient module
#59879
Author: Mike Castle
Date: Thu, 15 Aug 2002 09:13
16 lines
1574 bytes
In article <3D4DB7EF.4030204@yahoo.com>, Mike Mimic  <ppagee@yahoo.com> wrote:
>Hi!
>
>I am programing a Perl program as NNTP client. And I have
>a question about that. In News::NNTPClient module there is

My *limited* experience has been that News::NNTPClient is buggy.  I use
Net::NNTP now (it's part of the perl core, least for the 5.8.0 I'm using).

mrc

-- 
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
Re: News::NNTPClient module
#59891
Author: Eric Edwards
Date: Fri, 16 Aug 2002 00:14
30 lines
2308 bytes
On Thu, 15 Aug 2002 09:13:06 GMT, Mike Castle <dalgoda@ix.netcom.com> wrote:
>In article <3D4DB7EF.4030204@yahoo.com>, Mike Mimic  <ppagee@yahoo.com> wrote:
>>Hi!
>>
>>I am programing a Perl program as NNTP client. And I have
>>a question about that. In News::NNTPClient module there is
>
>My *limited* experience has been that News::NNTPClient is buggy.  I use
>Net::NNTP now (it's part of the perl core, least for the 5.8.0 I'm using).

Great.  I was going to switch over to News:NNTPClient because of
perceived bugs in Net::NNTP.  I get a lot of messages like this in my
logs:

Use of uninitialized value in join at /usr/local/lib/perl5/site_perl/5.6.0/Net/Cmd.pm line 171.
Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.6.0/Net/Cmd.pm 
line 171.

All I've been able to deduce is that it is being called from Net::NNTP.

Of course, it is still possible that it's my fault.  The code is an
extensive modification of code written by someone else.  It is in need
of a top to bottom rewrite so that I have a better handle on what is
happening.  'Still, it is depressing to think that the same obscure
problem may persist.

-- 
Use the From: header.  Sending mail to ese002@news8.exile.org 
or ese002@news7.exile.org will only result in frustration.
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