HDTenEightyP/NetNews huggingface dataset:
From: kramer893@snake.cs.uidaho.edu (KRAMER BRIAN M)
Newsgroups: comp.programming
Subject: Re: Virus Programs 4 Sale  (Virus, Trojans, etc)
Date: 26 Jan 93 18:18:12 GMT
Article-I.D.: moscow.C1H46E.G2I
Organization: University of Idaho CS Dept.

In article <1993Jan26.070707.28320@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
>
>	There are probably many bleeding heart civil libertarians
>	out there who will disagree with me, but I think it's
>	about time we got some new laws that would make it a crime
>	to distribute virus-related material, regardless of any
>	disclaimers or denials of responsibility.

Since when does code become illegal?  There is no difference between one
piece of software and another if they are made of the same binary bits.

Brian Kramer
University of Idaho

-- 
Brian Kramer
"getting to know his .signature!"
From: richard.vannoy@filebank.cts.com (Richard Vannoy)
Newsgroups: comp.programming
Subject: A PEACHY-KEEN PROGRAM
Date: 26 Jan 93 17:05:00 GMT
Article-I.D.: filebank.249.332.uupcb
Reply-To: richard.vannoy@filebank.cts.com (Richard Vannoy)
Distribution: world
Organization: The File Bank BBS - Fallbrook, CA  619-728-4318

So here's a question for programmers.

If you are allowed to pick any seven tiles in Scrabble,
what seven letters (no blanks) would you pick that would 
let you make the most seven letter words?  (Answer below.)

How do I know?  Well, out of curiosity, I wrote a program 
that takes various combinations, like:

    - Just the seven tiles you have (for the first play
      in Scrabble), and you get a list of all words in
      the English language that can be made with any 
      combination of from 2 to seven tiles.  (My Quick-
      BASIC program spits out from just a few words to 
      200 words, depending on the tiles used, in about 
      3 to 8 seconds.)

    - Input the seven tiles you have, and the cross tiles
      you can make words with.  The list shows all possible
      cross words you can make, in order of the point 
      values assigned to Scrabble tiles.

    - Enter just six tiles and you get a list of all 
      possible words you can make using a blank.

Each of the first two variations can search a specially 
prepared 55,000 word dictionary for all possible  words 
that can be made from the given letters in under 10 
seconds.

Now that I've written this wonderful, peachy-keen program,
my question is what do I do with it??  Other than a "How
to Cheat at Scrabble" program, has anyone any ideas on how
this could be packaged or marketed as Shareware in a way
that might benefit Shareware users?

And the answer to the question above is for you to pick the 
following tiles:  E I P R S S T
There are seven different seven letter words you can make 
from these tiles.  I challenge anyone else to pick a better
seven letters.
--- MegaMail 2.10 #0
                                                                                                              
----
*--------------------------------------------------------------------------*
| The File Bank BBS - 619-728-4318 - PCBoard v.14.5a/E10 - USR HST & DS    |
| 8 nodes / RIME / Internet / Largest Clipper file collection in the world |
*--------------------------------------------------------------------------*
Newsgroups: comp.programming
From: asean@armstrong.ecn.purdue.edu (Sean Ahern)
Subject: Re: is it possible to find max & next smallest in one pass?
Organization: Purdue University Engineering Computer Network
Date: 24 Jan 93 23:09:03 GMT

jos@and.nl (Jos Horsmeier) writes:

>In article <asean.727858796@armstrong.ecn.purdue.edu> asean@armstrong.ecn.purdue.edu (Sean Ahern) writes:
>|jagrant@emr1.emr.ca (John Grant) writes:
>|>Given an array of values, is it possible to find the maximum of
>|>the array and the next smallest value in a single pass?  The reason
>|>I want it in one pass, is that the array is actually a data file
>|>of a million float values.
>|
>|If you were able to do this, the algorithm should be able to extend to the
>|next smallest, and the next, with little or no trouble.
>|
>|But the requirement of the algorithm was to do this in one pass.  This would
>|give us an O(n) sorting algorithm that works on arbitrary data.  I don't
>|believe such an animal exists with only one processor.
>
>I beg to differ here. Lets do some big Oh calculations. Given n elements
>in an array, one can find the maximum value in O(n) operations. One can 
>find the next value in O(n) operations too, so both can be done in 
>O(n)+O(n)= O(2*n) operations. But constants don't count here, so the
>whole job can be done uisng O(n) operations. Finding three elements,
>takes O(3*n)= O(n) operations, and so on. But sorting all n elements
>this way takes up O(n*n) operations, which is, in fact, quite a lousy
>way of sorting an array.

I went through this same argument with myself as I went to bed and
realized my mistake.

I suppose a good way to find the k smallest elements of an array would be
to do a O(n*logn) sort and then pull off the smallest k elements.  Though I
must admit that if you only want the first 2 smallest, the O(2*n) algorithm
would be better for n>4.

--
Sean Ahern-------------------ahern@purdue.edu-----------------Purdue University
My name is Batman.  You killed my father.  Prepare to die.
From: jagrant@emr1.emr.ca (John Grant)
Newsgroups: comp.programming
Subject: Re: Virus Programs 4 Sale  (Virus, Trojans, etc)
Date: 27 Jan 93 22:36:49 GMT
Organization: Energy, Mines, and Resources, Ottawa

In article <C1H46E.G2I@moscow.uidaho.edu> kramer893@snake.cs.uidaho.edu (KRAMER BRIAN M) writes:
>In article <1993Jan26.070707.28320@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
>>
>>	There are probably many bleeding heart civil libertarians
>>	out there who will disagree with me, but I think it's
>>	about time we got some new laws that would make it a crime
>>	to distribute virus-related material, regardless of any
>>	disclaimers or denials of responsibility.
>
>Since when does code become illegal?  There is no difference between one
>piece of software and another if they are made of the same binary bits.

	That's a pretty naive comment, don't you think?

	There is no difference between the steel door
	hinges on the front door of your house and a loaded
	.357 magnum gun and the steel casing of a nuclear
	weapon, either.  After all they are all made of steel.

	Don't you think there is a difference between the *purpose*
	or *intent* of a program (or segment of a program) and
	the material from which it is made or the form in which
	it resides?
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.programming
Subject: Re: Virus Programs 4 Sale  (Virus, Trojans, etc)
Date: 26 Jan 93 21:43:20 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <1k2k6pINNdng@digex.digex.com>, alby@access (Albatross) writes:
>        Well now you can play with some of the most ruthless & destructive
>virus'es known to man. See if the Dark Avenger virus really can be detected
>by these money hungry  anti-virus software companies, or if you dollars are
>paying off.

Is it just me, or is this not a smart thing to do?

IMHO, the best thing to do with a virus is destroy every copy you come across.
Claiming you "want to see if the virus protection program works" is foolish.
What happens if it doesn't?  Suddenly, you've contaiminated your system with
a virus you have no protection against!

If you want a good virus protection program, I think you would be far better
off simply asking for recommendations from the appropriate machine-specific
group.

-- 
Hey, everybody -- somebody said `mattress' to Mr. Lambert!  TWICE!
Newsgroups: comp.programming
From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
Subject: Re: Industry market shares
Keywords: Microsoft
Organization: Department of Chemistry, University of Toronto
Date: Thu, 21 Jan 1993 16:01:42 GMT

In article <1993Jan20.175346.14193@netcom.com> nagle@netcom.com (John Nagle)
writes:
>      The Wall Street Journal today published the PC software industry
>figures for 1992.
>
>			1992	1991
>	Microsoft	44%	29%
>	Lotus		11%	13%
>	Word Perfect	 8%	 8%
>
>	Top 5 companies	74%	60%
>
[...]
>It's especially striking in that Lotus and Word Perfect are still
>one-product companies, despite attempts to introduce other products.

     Isn't the Ami word processor doing reasonably well?  The figures
John shows give no indication of the breakdown among products within
these companies.

>There's nothing to
>stop Microsoft from having it all.

...except American law.

				Marc R. Roussel
                                mroussel@alchemy.chem.utoronto.ca
Newsgroups: comp.programming
From: eyal@fir.canberra.edu.au (Eyal Lebedinsky)
Subject: Re: is it possible to find max & next smallest in one pass?
Organization: Info Sci & Eng, University of Canberra, AUSTRALIA
Date: 27 Jan 93 08:03:29 GMT

In <1993Jan25.224200.7195@bnlux1.bnl.gov> murphy@sscdaq.phy.bnl.gov (Michael Murphy) writes:


>>jos@and.nl (Jos Horsmeier) writes:

>>>In article <asean.727858796@armstrong.ecn.purdue.edu> asean@armstrong.ecn.purdue.edu (Sean Ahern) writes:
>>>|jagrant@emr1.emr.ca (John Grant) writes:
>>>|>Given an array of values, is it possible to find the maximum of
>>>|>the array and the next smallest value in a single pass?  The reason
>>>|>I want it in one pass, is that the array is actually a data file
>>>|>of a million float values.

Well, the usual way of finding the highest-n in a list is to simply
create a priority queue. This data structure is cheap to maintain and
most alg books give a reasonable description of it.

For just the top two (max and next-smallest) it boils down to a simple
test while keeping the so-far best and next. Insted of just doing 'if
x[] > max then max = x[]' you also check to see if it second best (if it
is best then the old best is now second-best).

Then again, I may have missed the point of the question.
From: mal4@ns1.cc.lehigh.edu (Marty Lamb)
Newsgroups: comp.programming
Subject: Re: how about PRIME numbers ?
Date: 27 Jan 93 17:56:13 GMT
Organization: Lehigh University

In article <4671@sicsun.epfl.ch>, guglielmetti@elia.epfl.ch (Philippe Guglielmet
ti) writes:
>Hi!
>about primes, I've read somewhere that it is possible to check if a
>really large "candidate" number like 2^245-1 is prime or not in a
>reasonable time using "congruence", without generating all the primes and
>without looking for divisors (which is roughly equivalent) but I didn't
>really understood how it worked in practice. Does anyone have code for
>this ?
>

I haven't got code, but it's a simple (or at least simply implemented)
algorithm.  I have ABSOLUTELY NO IDEA why it works, so if anyone does I'm sure
it's interesting enough to post.

A number of the form 2^p - 1 (p is an integer) is called a Mersenne Number,
after the mathematician whose first name currently escapes me.  The algorith
goes like this:

     p = exponent to test
     MersenneNumber = 2^p - 1

     Start with L = 4
|--> set L = L^2 - 2 MOD MersenneNumber  -----|
|<----- do this p - 2 times <-----------------|
     If L = 0 then the Mersenne Number is prime.

It's amazingly quick, with the HUGE disadvantage that you have to calculate
the Mersenne Number, although I suppose a clever MOD subroutine might be able
to bypass that.


>I remember that this what makes modern "revealed key encryption" feasible
>since the public key is the the product of 2 large prime numbers (which
>form the private key used in decryption).  If I understood correctly, it
>was formally prooved that no polynomial time algorithm exists to
>decompose a number in its prim e factor...
>
>
>Ph. Guglielmetti
>


Marty Lamb
-- 

 ___________________________________________________________________________
/-------------------------------------------------------------------------/|
|  Be like the 22nd elephant with     |     Marty Lamb   (215)758-1921    ||
|  heated value in space.   Bark!     |     Box 0151                      ||
|--------------------------------------     Lehigh University             ||
|  mal4@lehigh.edu                    |     29 Trembley Dr.               ||
Newsgroups: comp.programming
From: boutell@isis.cshl.org (Tom Boutell)
Subject: Re: Virus Programs 4 Sale  (Virus, Trojans, etc)
Organization: Cold Spring Harbor Labs
Date: Tue, 26 Jan 1993 17:58:35 GMT

I urge those who are angered by this message to send mail to
postmaster@access.digex.com. I have done so. It is a very
serious matter.

Please realize that he was making a COMMERCIAL ADVERTISEMENT,
which is not permitted on the Internet in any case (because
every site is charged to forward the ad, for the direct
financial benefit of one selfish individual). Because of this
we have a very strong case indeed against the poster.

Had he announced the availability of the viruses for anonymous
FTP on a machine he owned, or made them available by mail for
copying costs only, I might feel slightly differently, as this
would lie somewhere on the boundary between protection from
bodily harm and censorship. But the commercial advertisement,
being expressly forbidden on the Internet, is the last straw.

-T

-- 
Tom Boutell, boutell@cshl.org

Clausthaler is the best non - alcoholic beer in the known universe.
From: bsmith@mickey.NoSubdomain.NoDomain (Brian Smith)
Newsgroups: comp.programming
Subject: Re: is it possible to find max & next smallest in one pass?
Date: 24 Jan 1993 05:24:27 GMT
Organization: University of California, Berkeley
Distribution: world
NNTP-Posting-Host: mickey.cs.berkeley.edu

In article <1993Jan24.040702.6193@emr1.emr.ca>, jagrant@emr1.emr.ca (John Grant) writes:
|> Given an array of values, is it possible to find the maximum of
|> the array and the next smallest value in a single pass?  The reason
|> I want it in one pass, is that the array is actually a data file
|> of a million float values.
|> 
|> If so, I guess the same single pass could also find the min and next
|> highest value too?
|> 


how about this:

/* Keep max2 >= max1 */
max1 = max2 = x[0];
for (i=1; i<N; i++) {
    if (x[i] > max1) {
	if (x[i] > max2) {
	    max1 = max2;
	    max2 = x[i];
	} else {
	    max1 = x[i];
	} 
    }
}
/* At this point, max2 is largest, min1 is next largest */

This does 2*N comparisons in the worst case, but (1+epsilon)*N comparisons
in the average case.

In an actual implementation, it'd be worth it to unroll the loop a few times
to make it run faster, unless your comparison operator is very slow.

-------
Brian C. Smith				arpa:  bsmith@cs.Berkeley.EDU
University of California, Berkeley	uucp: uunet!ucbvax!postgres!bsmith
Computer Sciences Department		phone: (510)642-9585
From: smith@ctron.com (Lawrence C Smith)
Newsgroups: comp.programming
Subject: Re: Virus Programs 4 Sale  (Virus, Trojans, etc)
Date: 27 Jan 93 20:43:57 GMT
Reply-To: smith@ctron.com
Organization: Cabletron Systems, Inc.

In article <PRENER.93Jan27014407@prener.watson.ibm.com>, prener@watson.ibm.com (Dan Prener) writes:
>In article <6577@balrog.ctron.com> smith@ctron.com (Lawrence C Smith) writes:
>> On some reflection, I have to feel that distributing well-known viruses in
>> such an above-board manner is probably a fairly neutral activity, whose

>Might there not be a simpler but overriding issue?  Does the person offering
>these programs own the legal rights (copyrights, patents) to them?

Heh, heh, heh, heh.  Well, if anyone wishes to step forward with such
a claim, I think it would be just ducky.  We can give them their copy-
right when we snap on the cuffs.

Larry Smith (smith@ctron.com)  No, I don't speak for Cabletron.  Need you ask?
-
Liberty is not the freedom to do whatever we want,
it is the freedom to do whatever we are able.
From: robert@isgtec.com (Robert Osborne)
Newsgroups: comp.programming
Subject: Re: is it possible to find max & next smallest in one pass?
Date: 26 Jan 93 21:49:41 GMT
X-Newsreader: TIN [version 1.1 PL8]

Mike Black (black@seismo.CSS.GOV) wrote:
: jagrant@emr1.emr.ca (John Grant) writes:
: >Given an array of values, is it possible to find the maximum of
: >the array and the next smallest value in a single pass?

: Why compare BOTH numbers??  If we find a new max, then the old max is
: obviously the next highest, isn't it??

No.  Consider the list 1,3,10,4,5,6 ...

But you still only need to compare one of the numbers (usually...)
If the number is less than your current 'next highest' it if
obviously not the max.  If it is larger than the 'next highest'
it may be the new max or it may be the new 'next highest'.

    /* assume array[n] != array[m] for m != n */
    double ult;  /* ultimate (ie. max) */
    double penult; /* pen-ultimate (ie. next highest ) */
    extern double array[1000000];
    
    ult = max(array[0],array[1]);
    penult = min(array[0],array[1]);
    for(i=2; i<1000000; i++)
    {
	if( array[i] > penult )
	{
	    if( array[i] > ult )
	    {
		penult = ult;
		ult = array[i];
	    }
	    else
	    {
		penult = array[i];
	    }
	}
    }


Rob.
--
Robert A. Osborne   ...!uunet.ca!isgtec!robert or robert@isgtec.com
Xref: sparky comp.programming:3602 comp.software-eng:5444 soc.culture.usa:10111
From: boutell@isis.cshl.org (Tom Boutell)
Subject: Latest Brilliant Albeygram
Organization: Cold Spring Harbor Labs
Date: Thu, 28 Jan 1993 20:33:53 GMT

>Date: Thu, 28 Jan 1993 13:53:27 -0500
>From: Albatross <alby@access.digex.com>
>To: boutell@isis.cshl.org
>		So why does this personally affect you? Are you 
>on some type of mission from GOD to stop all persons selling viruses
>since the Wonderful American Government that we live under has
>not found reasons to make Dist. Viruses a crime?  Well try your best
>because I have broken NO law in this land, and I won't quit until
>there is alaw to stop me.. I'm a 20 yr old business man out to make
>a dollar no matter what the means are.. If you wanna know moe
>about how I think, go read up on J.D. Rockefeller.
>
> I shall sell or do whatever it takes gto make a dollar,and I don't
>care who I hurt in the process. I'll under cut any company that competes
>or buy out anybody who doesn't subside.. In this busines you either
>Lead, Follow, or get outta the way....
>
>						Albatross

So remember, when some moron who bought Alby's disks spreads a virus
into the patient information system of your local hospital,
it's OK. Alby says "I don't care who I hurt in the process," ladies
and gentlemen, 'cuz it's good ol' American knowhow 'n' capitalistic
fervor, boy howdy. We're really competin' with those Japanese
now. Thanks to good old Alby they'll never knock us out of the
virus field! I'm sure J.D. Rockefeller would've been really keen on getting
into the destructive-software market. 

Funny. I don't recall Rockefeller selling bottles of bubonic plague.

-T

-- 
Tom Boutell, boutell@cshl.org

Clausthaler is the best non - alcoholic beer in the known universe.
From: imc@comlab.ox.ac.uk (Ian Collier)
Newsgroups: comp.programming
Subject: Re: how to calculate PI
Date: 25 Jan 93 12:10:14 GMT
Organization: Oxford University Computing Laboratory
X-Local-Date: Monday, 25th January 1993 at 12:09pm GMT
Originator: imc@msc3.comlab

In article <1993Jan23.080718.24306@qiclab.scn.rain.com>, Leonard.Erickson@f51.n105.z1.fidonet.org wrote:
>rogerj@aix.rpi.edu (Diversion (Jeff Rogers)) writes:
>>lowry@watson.ibm.com (Andy Lowry) writes:
>>>One of the coolest formulas I've seen in Gregory's formula:
>>>  pi/4 = 4*atan(1/5)-atan(1/239)

(earlier I explained how this formula might have been invented.  Now can
someone give me a convincing explanation for how someone came up with

 pi ~= 3*ln(640320)/sqrt(163)       [16 decimal places]

mentioned in the October notices of the AMS?)

>>Why not just 
>>   pi/4=atan(1)? 

>On several different machines I've found that 2*atan(maxreal) gives
>a more accurate value for pi than 4*atan(1).

This is presumably because a library routine probably calculates atan(x)
where x>1 by  HALFPI - atan(1/x)  (where HALFPI is a stored constant),
whereas it probably calculates atan(1) by using a modified form of the
Taylor series.  In other words, by calculating atan(maxreal) you are fetching
the pre-computed value of pi/2 whereas in asking for atan(1) you are
calculating pi/4 as the sum of several terms.  Also, since atan(epsilon) is
approximately equal to epsilon when epsilon is small, the error in the
result after setting maxreal to 1eN is only 2e-N - which is too small to
register (e.g.) in any 64-bit-float representation of pi if N is 20 or more.

Ian Collier
Ian.Collier@prg.ox.ac.uk | imc@ecs.ox.ac.uk
From: pete@minster.york.ac.uk
Newsgroups: comp.programming
Subject: Generating typical ``random'' programs
Date: 25 Jan 93 13:38:05 GMT
Organization: Department of Computer Science, University of York, England

The problem:

I am working on a software tool which generates fault trees from
programs written in an Ada subset. I want to test some ideas on how the
size of the generated fault tree relates to properties of the input code
fragments...

Clearly the more programs I throw at it the better. I've put several
examples through it and got interesting results, but what I really want to
do is get hold of hundreds/thousands of legal programs of varying sizes, with
differing mixes of statement types, to submit to the tool as input.

We don't have that many programs, so I'll have to generate some which ``look
like'' real programs from the point of view of the FTA tool. I think some
kind of Markov-model approach based on analysis of existing programs
might do the job -- it can generate reasonable travesties of human
language -- but I'd be interested to know if anyone has ever done anything
similar...

Somewhere in the literature on test case generation there must have been
work on the generation of legal but not necessarily meaningful programs which
meet given criteria on densities of particular statement types and depth of
nesting, but I haven't managed to find anything yet. 

Does anyone have any pointers to similar work? 

I'll summarise any responses to the Net.

cheers,
pete
--
*Peter Fenelon -- Research Associate -- Software Safety Assessment Procedures*
Dept. of Computer Science, University of York, York, Y01 5DD (+44/0)904 433388
EMAIL: pete@minster.york.ac.uk `There's no room for enigmas in built up areas'
Xref: sparky comp.programming:3643 comp.misc:5033
From: paj@uk.co.gec-mrc (Paul Johnson)
Newsgroups: comp.programming,comp.misc
Subject: Re: DISMANTLE MICROSOFT (Was Re: Industry market shares)
Date: 26 Jan 93 10:47:43 GMT
Reply-To: paj@uk.co.gec-mrc (Paul Johnson)
Followup-To: comp.misc
Organization: GEC-Marconi Research Centre, Great Baddow, UK

In article <1993Jan22.073622.21914@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:

>  If the U.S. Government can't or wont stand up to them, who can or will?


Actually, I sort of suspect that Microsoft is about to drown in its
own waste product (MS-DOS).

We have just reached the point where a standard PC is Unix-capable.
Meanwhile Unix is making major inroads in the traditional business
mini/mainframe market.  Any month now DP managers are going to notice
that they can run the same OS on everything from the corporate
mainframe to the clerk's PC, and that this OS comes with networking,
email, file sharing, multi-tasking, GUIs and any other buzzword they
pick (and its an "open system" as well).

The thing that stands in the way of this dream is the current practice
of marketing Unix spreadsheets etc at 2-5 times the price of the
equivalent MS-DOS version (if at all).  But if a few major
organisations go for Unix PCs (they can negotiate organisation
licenses for these things, at saner prices) then we should reach the
boostrap point and Microsoft is doomed.

If you have any shares in Microsoft, sell them now.

Followups redirected to comp.misc

Paul.

-- 
Paul Johnson (paj@gec-mrc.co.uk).	    | Tel: +44 245 73331 ext 3245
--------------------------------------------+----------------------------------
These ideas and others like them can be had | GEC-Marconi Research is not
for $0.02 each from any reputable idealist. | responsible for my opinions
Newsgroups: comp.programming