🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #1312

Re: Testing ADDGROUP-with-'real'-names

#1312
From: Chris Croughton
Date: Thu, 30 Nov 1995 00:00
50 lines
2579 bytes
In article <817747310snz@wash.demon.co.uk>
           john@wash.demon.co.uk "John Washington" writes:

>Someone could write a small test program, using nicename.c, to
>generate a list of filenames for the whole of the current
>'active.dis'.  The list would be output to another file.
>That could then be scanned, for non-uniqueness, anomalies,
>what-have-you.

Well, I just wrote that program, and with the aid of a couple of
programs (sort and a couple of command-line awk scripts) ran it on the
active list (as of yesterday) and got some stats:

# newsgroups:   13956
# duplications:  2128 (that's duplicate names your code generates)
max. dupl.:        24 (max. same name generated)

That's without your code to see if the file exists already, of course.
Most of the duplications are on newsgroups ending in .misc, .general and
.test, of course, but there were a large number ending .bug as well
<g>.  So in the worst case, your code would need to generate 24 unique
names - I think your code just replaces the last character with a digit,
which won't be enough.

One suggestion could be to replace the underscore with a digit as well,
or hyphen (there aren't many other characters legal in DOS filenames -
quote, hash, bang?)...

On my active file, with 28 newsgroups, there were no duplications...

If you're interested, the awk script I used (on a sorted file with each
line having the generated filename, scace and then the newsgroup name)
was as follows (de-obfuscated - the commandline version is shorter <g>):

{
    if (prev == $1 || last)
    {
        if (!last) print blank;
        print prevline;
    }
    last = (prev==$1);
    prev = $1;
    prevline = $0;
}

***********************************************************************
*  chris@keris.demon.co.uk      *                                     *
*  chriscr@cix.compulink.co.uk  *  FIAWOL (Filking Is A Way Of Life)  *
*  100014.3217@compuserve.com   *                                     *
***********************************************************************
Technical Details
Message-ID: <817773091snz@keris.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <817661125snz@keris.demon.co.uk> <817747310snz@wash.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,32d7a9ff38d6545d
X-Google-Attributes: gid10bb05,public
From: Chris Croughton <chris@keris.demon.co.uk>
Subject: Re: Testing ADDGROUP-with-'real'-names
Date: 1995/11/30
Message-ID: <817773091snz@keris.demon.co.uk>
X-Deja-AN: 120612272
x-nntp-posting-host: keris.demon.co.uk
references: <817661125snz@keris.demon.co.uk> <817747310snz@wash.demon.co.uk>
organization: Keristor Systems
newsgroups: demon.ip.developers