HDTenEightyP/NetNews huggingface dataset:
From: haveson@eniac.seas.upenn.edu (Ryan A. Haveson)
Newsgroups: comp.programming
Subject: FOL resolution theorem proving programs
Summary: Looking for code of theorem provers
Keywords: FOL, Theorem Proving
Date: 8 Apr 92 23:33:34 GMT
Organization: University of Pennsylvania

I am looking for code for a FOL resolution theorem prover. If anyone has a
program like this, please either post it or e-mail it to me.
	
	thanks,
	Ryan Haveson
	haveson@eniac.seas.upenn.edu
Newsgroups: comp.programming
From: alee@chimera.UWaterloo.ca (A. Lee)
Subject: Re: Engineering philosophy in programming (was: Re: Editor theory?)
Organization: University of Waterloo
Date: Thu, 9 Apr 1992 13:42:09 GMT

Shouldn't we be trying to make a distinction between programming and the  
"engineering" aspect of programming (ie. software engineering).  It always  
seemed to me that programming dealt with more interior aspects of software (the  
actual implementation of an algorithm or data structure in a particular  
language or code).  Software engineering may be more directed to the exterior  
aspects of a program like usability, data abstraction, information hiding,  
program documentation, modularility etc...   Note that these aspects are  
exterior to the program, both with respect to the programmer and the end user.

The only reason I mention it is that it seems like we are discussing the  
"engineering" process in the context of programming.  I don't think it belongs  
their.  Engineering should be done before any code is implemented...it should  
the design stage of software development.  However, most of us (I'm especially  
guilty of this) try to do both the engineering and the programming at the same  
time (ie.  hacking the code together).

This opinion of mine stems from my own personal experience in software  
development and the courses I took in both software engineering and data  
structures and algorithms.  The main difference I saw between the two courses  
was that software engineering discussed more about the design of a entire piece  
of software whereas data structures and algorithms talked more about particular  
algorithms and data structures, their implementations, and their efficiency,  
etc...

Just my opinion.

Alex Lee
Systems Design Engineering
University of Waterloo
Ontario, Canada
email:  alee@zeus.waterloo.edu
From: miss059@uxa.ecn.bgu.edu (Pug)
Newsgroups: comp.programming
Subject: Re: Perfect hash summary....
Date: 7 Apr 92 04:18:26 GMT
Organization: Pug's Pub and Pleasure Palace

In article <STEPHEN.92Apr5190701@estragon.uchicago.edu> stephen@estragon.uchicago.edu (Stephen P Spackman) writes:
>This may seem like an odd question, but does anyone have a USE for
>minimal perfect hashing? The "obvious" one, in programming languages,
>is somewhat bogus, since in that case you have a symbol table anyway,
>and it's faster and easier just to treat keywords like identifiers
>through until the parser (unless, I suppose, your language has really
>different rules for the two classes so that the lexer is better off
>making the discimination).

The place where I was using it was the OpCode table for an Assembler I
was writing for a class. It only called for a linear search, but I just
wanted to experiment with perfect hashes so I wrote one. Admittedly you
can usually find any opcode with a linear search in 6 probes or so, but
one is awefully nice. If the function for the hash has less overhead
than 5 linear probes, then it pays off when there are lots of them. When
comparing my code against the same code with a linear search, there was
a visible difference in runtime.

I hope this is what you were wondering.

-- 
Richard Bainter          Mundanely     |       "Teachers are supposed to
Phelim Utred Gervas      Society       |        teach you *HOW* to learn 
Pug                      Generally     |        not *WHAT* to learn."   
  miss059@uxa.ecn.bgu.edu  |  pug@ccwf.cc.utexas.edu  |  pug@wixer.UUCP
From: brnstnd@nyu.edu
Newsgroups: comp.programming
Subject: --- comp.programming charter: read before you post (weekly notice)
Date: 12 Apr 92 00:06:03 GMT
Organization: IR

comp.programming	Programming issues that transcend languages and OSs.

It is a matter of courtesy to read a USENET group for at least a month
before posting anything to it. You should be familiar with this article
and with all the regular announcements in news.announce.newusers. A
newsgroup is like a crowded meeting hall filled with people who want to
talk about similar subjects. Chances are that if you just stick your
head in and shout, you'll be saying something totally inappropriate or
asking a question which someone else asked last week, and everyone will
be angry at you. To avoid this, _read_ before you post.

What you _should_ post here (the charter):

	comp.programming is an unmoderated group for discussions of
	programming issues which are not limited to a specific machine,
	operating system, or language: in particular, algorithms of all
	types. ``Programming issues'' means _practical_ programming
	issues: it is considered very bad form here to discuss issues
	with which you do not have direct programming experience.

What you _should not_ post here:

	Any issue which is limited to a specific machine, operating
	system, or language is completely inappropriate for this group.
	If you are programming under UNIX, use comp.unix.programmer. If
	you are programming a PC, use comp.os.msdos.programmer. If you
	are programming a Mac, use comp.sys.mac.programmer. If you are
	programming an Amiga, use comp.sys.amiga.programmer. If you are
	programming a game and think that your question is of interest
	to other game programmers, use rec.games.programmer. If you're
	absolutely sure that your question is on the use of the C
	language---it wouldn't make sense if you were using a different
	language---try comp.lang.c. If your question is a meta-question
	which has to do with features of various programming languages,
	use comp.lang.misc. If your question has to do with theoretical
	results which have to do with computer science rather than
	programming, try comp.theory. Finally, if you're sure that your
	question would make sense under a variety of operating systems,
	running on a variety of machines, and in a wide variety of
	programming languages, then comp.programming is probably right.

	Note added 3/9/92: If you want source code for something, you'll
	get better response in comp.sources.wanted, which was created to
	handle such requests.

Other comp.programming conventions:

	It's often difficult to talk about programming without quoting
	the results of that programming---i.e., code. There is nothing
	wrong with using a particular language to present code samples,
	as long as they _could_ have been expressed in various other
	languages. However, you are less likely to have your question
	understood if you illustrate it with a choice segment of APL
	than if you use pseudo-code, Algol, C, etc.

For future reference, comp.programming passed by a vote of 403-47. It
was created 3/1/92.

---Dan
From: nickh@CS.CMU.EDU (Nick Haines)
Newsgroups: comp.programming
Subject: Re: need a HINT on a C code parsing name-strings
Date: 6 Apr 92 14:24:58 GMT
Organization: School of Computer Science, Carnegie Mellon University
Originator: nickh@VOILA.VENARI.CS.CMU.EDU

In article <92096.184215DECBC@CUNYVM.BITNET> DECBC@CUNYVM.BITNET writes:

   I am writing a C code to parse an input string formatted in
   'lastname,firstname,middle-initial' of each field is varying
   length and total length is 30 bytes, into three separate
   strings, 'lastname,' 'firstname,' and 'middle-initial.'

30 bytes??? _30_ bytes? And _a_ middle initial??? This isn't a real
application, is it?

Nicholas David Anthony Haines, who's sick and tired of official
American forms INSISTING that everyone has ONE middle initial and a
ZIP code.
From: euamts@eua.ericsson.se (Mats Henricson)
Newsgroups: comp.programming
Subject: Re: The new international trade agreement...
Date: 8 Apr 92 09:48:28 GMT
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden

stephen@estragon.uchicago.edu (Stephen P Spackman) writes:

>In article <1992Apr6.155111.28253@helios.physics.utoronto.ca> dooley@helios.physics.utoronto.ca (Kevin Dooley) writes:
>|This is a good point, however it is still possible to earn money off of
>|PD software.  How?  Look at Donald Knuth and TeX.  The software is completely
>|free, but the program is so big and complex that you need a manual in order
>|to use it.  So he has made a lot of money selling copies of his `official'
>|TeXBook.  Then, of course, others came along to sell alternative manuals
>|and documentation, but most people prefer to buy the original.  I have
>|always liked this way of doing things because it has the great advantage
>|that, even if there is commercial software to do the same thing, people
>|will in general do the free thing.  It has the great disadvantage that it
>|only really works for software which is of a certain threshold complexity
>|(otherwise people won't buy your manuals).  Also timing of the release of
>|your manual and the release of the software is critical.  You don't want
>|anybody else beating you to the punch with a better manual and you don't
>|want to try to publish too soon or no publisher will take it.  Also it has
>|the problem that you have to be able to write well, which is not always
>|the programmer's strong suit.  Anyway, it *can* be done.

>You notice that this only works because TeX is a really BAD programme
>and you NEED a dozen chapters on how to hack it to make it useful! Now
>tell me how someone with a sense of design elegance and social
>responsability, using decent language design and modern UI technology,
>can make a living writing free software?

I cannot understand the problem! If all possible software was written,
and all of it was free for anyone to use, THEN we couldn't make a living
since all of it was done. But this will never be the case. There will
always be unwritten software, and companies need to have it written,
so they will hire us nerds to do it for them.

Mats Henricson, Sweden
From: stephen@estragon.uchicago.edu (Stephen P Spackman)
Newsgroups: comp.programming
Subject: Re: functions & return values (was Re: Reinventing the wheel)
Date: 11 Apr 92 12:09:29 GMT
	<3549@caslon.cs.arizona.edu> <sc5H&#7m6@cs.psu.edu>
	<3582@caslon.cs.arizona.edu>
Organization: University of Chicago CILS

In article <3582@caslon.cs.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
|To bring up a specific example, which would you rather have to debug --
|a program supporting this language construct:
|
|  foo a ; bar b ;
|
|  . . .
|
|  { a, b } = quux() ;
|
|or something like this:
|
|  struct foobar{ foo a ; bar b ; } ;
|
|  foo a, bar b ; foobar baz ;
|
|  . . .
|
|  baz = quux() ; a = baz.a ; b = baz.b ;
|  /* may not even be necessary to have explicit a and b vars now... */
|
|The same programming power is available with both constructs; but in the
|second, the programmer doesn't have to remember that the first value
|returned is a foo and the second is a bar; the compiler takes care of
|it instead.

I would prefer the paradigm whenever I would prefer this:

	foo a; bar b;

	quux(a, b);

(about half the time, i.e.); and the second, whenever I would prefer
this:

	struct foobar {foo a; bar b;};
	foo a; bar b; foobar baz;

	baz.a = a; baz.b = b; quuz(baz);

which is never.

Now, I can see a good case for supporting

	{a: foo; b: bar;} = quux();

to get order-independence, just as it would be nice to be able to call
functions like this:

	quux(a: foo; b: bar);

Sometimes named is clearer, sometimes positional. But no need to be
chauvinistic about direction!
----------------------------------------------------------------------
stephen p spackman         Center for Information and Language Studies
stephen@estragon.uchicago.edu                    University of Chicago
----------------------------------------------------------------------
Newsgroups: comp.programming
From: ressler@cs.cornell.edu (Gene Ressler)
Subject: Re: Programming Standards Question
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Thu, 16 Apr 1992 04:42:18 GMT

Before flames for language-specific posting,
I forgot the punch line of the previous article:

I've heard it said that the necessity for a macro
facility shows that the underlying language is
badly designed.  This says to me that macros are
`a bad thing'.  So programming issue:  If you've
_got_ macros (as in C (weak), lisp (very powerful),
TeX (the whole language) ), what are the right
ways to use them?

Gene
Newsgroups: comp.programming
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Multi-tasking kernel
Organization: Traveller
	<STEPHEN.92Apr11210424@estragon.uchicago.edu>
	<rxvjyd-.jsteele@netcom.com>
	<STEPHEN.92Apr12052026@estragon.uchicago.edu>
Date: Sun, 12 Apr 1992 23:29:54 GMT

Stephen P Spackman:
   I think you missed my point. You _cannot_ write a multitasking
   kernel to run in even vaguely portable C, not unless there are some
   interesting new library routines since I last checked. Of course
   there are hacks that might work, but setjmp/longjmp alone doesn't
   suffice, in any language except a normal-order functional language
   where it turns out to be isomorphic with a continuation (?!).

No.  Or, Yes.

You can write a non-preemptive multitasking kernel to run in portable
C, and it doesn't really need setjmp/longjmp.  It does require that
you build your own "function call" protocol, with explicit stack
management and parameter passing, however.

So it will be portable C, very ugly portable C.  And you won't be able
to use it with arbitrary C programs.

Since you lose so much of the block structure of the language, about
the only advantage of this sort of approach is that it is portable.
Or, maybe a better way of thinking of this sort of approach is:
implement a virtual machine, in C (or arbitrary language of your
choice), then implement the multi-tasking environment on that machine.

-- 
Raul Deluth Miller-Rockwell                   <rockwell@socrates.umd.edu>
Newsgroups: comp.programming
From: markh@csd4.csd.uwm.edu (Mark William Hopkins)
Subject: Re: Permutation generation
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Date: Thu, 9 Apr 1992 18:12:44 GMT

In article <4603@cluster.cs.su.oz.au> jont@cs.su.oz (Jonathon Tidswell) writes:
>Some time ago a series of articles were posted on generating specific
>permutations. ...
>Has anybody got an iterative solution to this.
...

/* This permutation program was found among the ruins of a UFO crash site */
/* Legend has it, the Baker's algorithm came from this or something similar
   following an alleged abduction of the algorithm's 'inventor' */
#include <stdio.h>
#define N 5
main(void) {
   int I, Z, X[N], Y[N];
   for (I = 0; I < N; I++) X[I] = Y[I] = I;
SHOW:
   for (I = 0; I < N; I++) printf(" %d", X[I]); putchar('\n');
   for (I = 0; I < N; I++) {
      if (Y[I] < I) Z = X[I], X[I] = X[Y[I]], X[Y[I]] = Z;
      if (--Y[I] >= 0) {
         Z = X[I], X[I] = X[Y[I]], X[Y[I]] = Z; goto SHOW;
      }
      Y[I] = I;
   }
}
From: pk@cs.tut.fi (Kellom{ki Pertti)
Newsgroups: comp.programming
Subject: Re: functions & return values (was Re: Reinventing the wheel)
Date: 15 Apr 92 09:48:58 GMT
	<10212@goanna.cs.rmit.oz.au> <3608@caslon.cs.arizona.edu>
Organization: Tampere Univ. of Technology, Finland.

In article <3608@caslon.cs.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
   Just like subroutines give you code encapsulation, structs give you data
   encapsulation.  And in the same way that two pieces of code going together
   suggests that they should be encapsulated together, I think that two pieces
   of data going together suggest that they should be encapsulated together
   too.

One frequently occuring situation is that I want to return a useful
value, and a status value that tells whether the operation was
succesful or not, for example in hypothetical Scheme (the syntax is
not very good, but it should make the point):

(multi-let (((status result) (read)))
  (if status
      ...))

There is no need to bundle the status and the result together.

I don't particularily like the way this is done in eg. scanf(), where
the status information is returned as the return value of the
function, and the usefule value is communicated via a side effect to an
argument.  I know this is just a matter of taste, but being a Scheme
person, I'd like information to flow into procedures via arguments,
and out of procedures via return values.
--
Pertti Kellom\"aki (TeX format)  #       These opinions are mine, 
  Tampere Univ. of TeXnology     #              ALL MINE !
      Software Systems Lab       #  (but go ahead and use them, if you like)
From: psu@cs.duke.edu (Peter Su)
Newsgroups: comp.programming
Subject: Re: need a HINT on a C code parsing name-strings
Date: 8 Apr 92 13:43:03 GMT
Followup-To: comp.programming
Organization: Duke University CS Dept., Durham, NC
In-reply-to: dean2@garnet.berkeley.edu's message of 6 Apr 92 02:19:35 GMT

Ahem.

This is what AWK is for.

Pete
--
Department of Computer Science, Duke University, Durham, NC 27706
Internet:	psu@cs.duke.edu
UUCP:		mcnc!duke!psu
Newsgroups: comp.programming
From: dougm@rice.edu (Doug Moore)
Subject: Re:    need a HINT on a C code parsing name-strings
Originator: dougm@cs.rice.edu
Reply-To: dougm@rice.edu (Doug Moore)
Organization: Rice University
Date: Mon, 6 Apr 1992 01:06:37 GMT


In article <92096.184215DECBC@CUNYVM.BITNET>, <DECBC@CUNYVM.BITNET> writes:
|> Hello everyone,
|> 
|> I am writing a C code to parse an input string formatted in
|> 'lastname,firstname,middle-initial' of each field is varying
|> length and total length is 30 bytes, into three separate
|> strings, 'lastname,' 'firstname,' and 'middle-initial.'
|> 
|> My code doesn't satisfy the efficiency required by my demanding
|> boss. So, folks, I really appreciate it if u would give me some hints.

hello.
of course, we'd be happy to help.
maybe you could show us all your first
effort, so we could all suggest
ways to improve that program;
or you could tell us what your boss
really complained about.  he may not
know what's efficient and what's not.

Doug Moore
(dougm@cs.rice.edu)
From: elgaard@diku.dk (Niels Elgaard Larsen)
Newsgroups: comp.programming
Subject: Re: Permutation generation
Date: 8 Apr 92 21:09:49 GMT
Organization: Department of Computer Science, U of Copenhagen

jont@cs.su.oz (Jonathon Tidswell) writes:

>Some time ago a series of articles were posted on generating specific
>permutations.
>I have a slightly problem.
>    I want all possible permutations of n numbers ( n known at compile time ).
>    I dont need more than one permutation at a time.
>    And calling permutation( array, index, length ) n! times is I think not
>    optimal.
>    I did it in recursion, but since I use C, this is painful.

>Has anybody got an iterative solution to this.

I changed the recursive solution, I posted earlier:

/* Permutation of N integers */
/* Iterative solution      */
/* Niels Elgaard Larsen  */
#define N 6
int i,m,pl[N],is[N-1],plms[N];
int perm()
{
    i++;
    while (1) {
	while (i==N) {
	    if (!m) return 1;
	    i=is[--m];
	    pl[i]=pl[m];
	    pl[m]=plms[m];
	    i++;
	}
	if (m==N-1) return 0;
	pl[m]=pl[i];
	pl[i]=plms[m];
	if (m<N-1){
	    is[m]=i;
	    i=++m;
	    plms[m]=pl[m];
	}
	else i++;
    }
}

void initp(){
    int j;
    for(j=0;j<N;j++) pl[j]=j+1;
    plms[0]=pl[0];
    i=-1;
    m=0;
}
	    
int main(){
    int j;
    initp();
    while (!perm()) {
	for(j=0;j<N;j++) printf("%d ",pl[j]); 
	printf("\n");
    }
    return 0;
}







-- 
         Niels Elgaard Larsen          
         Institute of Datalogy,        
         University of Copenhagen      
         E-mail: elgaard@diku.dk 
Newsgroups: comp.programming
From: narayan@aravali.everest.tandem.com (Pankaj Narayan)
Subject: Difference between SCCS and RCS
Keywords: RCS, SCCS
Reply-To: narayan@aravali.everest.tandem.com (Pankaj Narayan)
Organization: Tandem Computers Inc., Cupertino CA
Date: Fri, 10 Apr 1992 16:47:23 GMT

Which of thesae is better, and why ?
I get the feeling that people are moving from RCS to SCCS, but
haven't been able to figure out why. I use RCS, and find it sufficient.

Anyone out there who is a SCCS diehard may know more about this.

------------------------------------------------------------------------
Pankaj Narayan			Email: narayan_pankaj@tandem.com
Tandem Computers			Voice: 408 285 6047 (work)  
19333 Vallco Pkwy, Loc 3-06		Voice: 408 243 5459 (home)
Cupertino, CA 95014-2599		Fax:   408 285 7079
From: tpradeep@cs.tamu.edu (Pradeep K Tapadiya)
Newsgroups: comp.programming
Subject: Need a topic for PhD dissertation in computer science
Date: 7 Apr 92 17:43:36 GMT
Organization: Computer Science Department, Texas A&M University

The time has come for me to file my degree plan. My  field of interest
is Software Engineering. I wish I could do my research in the area of
user-interfaces, preferably using MS-Windows as a tool.

Any suggestions/ideas?

Thank you for your help.

Pradeep
tpradeep@cs.tamu.edu
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.programming
Subject: Re: Programming Standards Question
Date: 15 Apr 92 06:43:27 GMT
Organization: U of Arizona CS Dept, Tucson

In article <1992Apr14.195317.3081@cs.cornell.edu> allan@cs.cornell.edu (James Allan) writes:
[...]
|Heh.  I have a friend who worked at a COBOL (gasp!) shop that
|interpreted it to mean that you should never have a negative in the
|the IF clause.  So instead of,
|
|	IF A NOT = B
|		do something.
|
|you had to write,
|
|	IF A = B
|		NEXT SENTENCE
|	ELSE
|		do something.

Not that I'd ever admit to any such thing, but when I took a C*b*l class, the
teacher insisted we spell out GREATER and LESS than, explaining that it was
"too easy to get > and < confused".

What's even worse is that we were expected to write out the code on coding sheets
(getting everything in just the right column, natch), as well as drawing out nice
neat flow charts before sitting down to type in the program.

All things considered, I think I'd have to be just about brink-of-starvation
desperate to take money to write Cobol...

-- 
Dave Schaumann			dave@cs.arizona.edu
Newsgroups: comp.programming
From: ssr@gibbs.caltech.edu (Steve Roy)
Subject: Re: How To Calculate Logarithm?
Organization: Caltech Applied Mathematics
Distribution: comp
Date: Fri, 10 Apr 1992 17:42:34 GMT

In article <PAUL.92Apr10104516@nsx.kagaku.se.fujitsu.co.jp> paul@kagaku.se.fujitsu.co.jp (Paul Donnelly) writes:
>Can anyone help me with calculating logarithms - either natural
>logarithms or base 2 logarithms? 

The standard reference for this sort of thing is Cody and Waite, I
forget the exact title.  What you are going to want for logarithms is
either to use some other polynomial set -- like Chebyshev -- or a
rational polynomial to model the log on 1 < mantissa < 2 and a table
lookup for the exponent.  They have all the constants you need and a
good discussion of what the sources of error are when calculating
trancendental functions.

Steve Roy