non nntp usenet
am 18.01.2008 10:27:35 von Frank Silvermann
How can Outlook Express pick up usenet messages that net::nntp can't?
--
Reagan Revision
To sum up: 1. The cosmos is a gigantic fly-wheel making 10,000 revolutions a
minute. 2. Man is a sick fly taking a dizzy ride on it. 3. Religion is the
theory that the wheel was designed and set spinning to give him the ride.
-- H L Mencken, "Coda," in Smart Set (New York, Dec. 1920; repr. in A
Mencken Chrestomathy, pt. 1, 1949).
Re: non nntp usenet
am 18.01.2008 16:25:52 von smallpond
On Jan 18, 4:27 am, "Regan Revised" wrote:
> How can Outlook Express pick up usenet messages that net::nntp can't?
>
> --
>
> Reagan Revision
Extraordinary claims require extraordinary evidence.
--S
Re: non nntp usenet
am 26.01.2008 07:59:41 von Frank Silvermann
"smallpond" wrote in message
news:dd222dbd-3ece-4d65-adfd-e2b5de7195e4@s13g2000prd.google groups.com...
> On Jan 18, 4:27 am, "Regan Revised" wrote:
>> How can Outlook Express pick up usenet messages that net::nntp can't?
>>
>> --
>>
>> Reagan Revision
>
>
> Extraordinary claims require extraordinary evidence.
> --S
To my mind, I'd already proved the point.
#!/usr/bin/perl -w
use strict;
use Net::NNTP ();
use constant NUMBER_OF_ARTICLES => 100;
use constant GROUP_NAME => 'comp.whatever';
use constant SERVER_NAME => 'newsgroups.comcast.net';
use constant NNTP_DEBUG => 0;
my $nntp = Net::NNTP->new(SERVER_NAME, 'Debug' => NNTP_DEBUG) or die;
my $USER = 'mpjensen7@comcast.net';
my $PASS = '';
$nntp->authinfo($USER,$PASS) or die $!;
my($article_count, $first_article, $last_article) = $nntp->group(GROUP_NAME)
or die;
# Which XOVER fields contain Subject: and From:?
my $count = 0;
my %xover_fmt = map( ($_, $count++), @{ $nntp->overview_fmt or die} );
die unless exists $xover_fmt{'Subject:'};
my $subject_offset = $xover_fmt{'Subject:'};
my $from_offset = $xover_fmt{'From:'};
my(@xover, $start_article);
RETRIEVE: while ($#xover+1 < NUMBER_OF_ARTICLES and $last_article >=
$first_article) {
# How many articles do we need? Stop retrieving if we have enough
my $articles_required = NUMBER_OF_ARTICLES - ($#xover+1) or last
RETRIEVE;
# Fetch overview information for the articles
$start_article = $last_article - ($articles_required-1);
$start_article = $start_article > $first_article ? $start_article :
$first_article;
my $xover_query = $start_article == $last_article ?
$start_article :
[$start_article, $last_article];
my $xover_ref = $nntp->xover($xover_query) or die;
# Store headers for the articles we've retrieved
foreach (sort {$b <=> $a} keys %$xover_ref) {
push @xover, $xover_ref->{$_};
}
} continue {
# Move the pointer forward to fetch previous articles
$last_article = $start_article - 1;
}
# Disconnect from the NNTP server
$nntp->quit;
print join("\n", map ($_->[$subject_offset].' from '.$_->[$from_offset],
@xover)),"\n";
#end source
My claim is that I've already shown that net::nntp can't find the mi5
persecution dude, Keith Thompson, or me. This goes out just shy of midnight
mountain time, about UTC neagtive six or so. If, within the day, you alter
the above script with appropriate parameters, e.g. changing the group, the
login, the password asnd the newsfeed, you can either "see" this message or
this precedes:
On Jan 24, 12:25 pm, xhos...@gmail.com wrote:
> I need a work queue, but I don't really care about the order (LIFO, FIFO,
> random) in which things come out of it. Either is pretty simple and
> efficient with a Perl array, and either would suffice. But I want the
> queue to not hold duplicate entries. I could use an array as a stack or
> queue, with a parallel hash to be checked to prevent duplicates from being
> entered. But why keep parallel data structures? Just use the hash as the
> queue:
>
> while (key %hash) {
> my $to_do=each %hash;
> delete $hash{$to_do};
> ## do stuff with $to_do, which might make new entries in %hash
>
> };
>
if "do stuff" might make entries in %hash, how do you guarantee you
won't be operating on a duplicate entry, since you delete
$hash{$to_do}?
#end quote
If someone can show that this article exists, using NNTP, it would be a
counter-example.
--
The most common of all follies is to believe passionately in the palpably
not true. It is the chief occupation of mankind.
-- H L Mencken, A Mencken Chrestomathy (1949)