HDTenEightyP/NetNews huggingface dataset:
Return-Path: <@OHSTVMA.ACS.OHIO-STATE.EDU:REXXLIST@UCF1VM.BITNET>
Organization: New York State Legislative Bill Drafting Commission
Newsgroups: comp.lang.rexx
Date:         Thu, 28 Jan 1993 13:36:51 EST
From:         Peter Flass <FLASS@LBDRSCS.BITNET>
Subject:      OS/2 Linein

How do I "close" (deaccess, whatever) a file I have read using 'Linein'
when I am done with it.  I would like to read a few lines of a file and delete
it, but I get "File in use by another process".

=====================================================================
= PETER FLASS                               FLASS@LBDRSCS           =
= Systems Programmer                        tel (518)458-5114       =
= NYS Legislative Bill Drafting Commission                          =
= 1450 Western Ave.                                                 =
= Albany, NY  12203                                                 =
=====================================================================
Newsgroups: comp.lang.rexx
From: SEB1525@MVS.draper.com (Steve Bacher)
Subject: Re: rexx in tso environme
Reply-To: seb1525@draper.com
Organization: Draper Laboratory
Date: Thu, 21 Jan 1993 22:15:00 GMT

>>> 1) How does one create a Rexx program in TSO?
>>Put it in a file called 'pgname.CLIST' with the first line of
>>the file being a REXX comment e.g.   /* REXX */
>
>You can also put it in a file called MYFILE.EXEC and call it using
>EXEC MYFILE EXEC.  ...

You can also set things up so that you can just type MYFILE and it
will execute it (provided there isn't a built-in TSO command called
MYFILE).  To do this, you need to take the following steps (some of
which may already be done in your environment):

 (1) Create a partitioned data set (aka library or PDS) - let's call it
     MY.CLIST - which will contain REXX execs as members.

 (2) Allocate that data set to file (ddname) SYSPROC via the TSO
     ALLOC command, or have whoever administers TSO set things up
     so that you get this set up at logon time.

 (3) Create your REXX exec as a member of MY.CLIST called MYFILE.
     Make the first line contain the comment string /* REXX */ .

 (4) You can now type MYFILE and get your exec.  Note:  If MYFILE
     does happen to conflict with a built-in program name, you can
     get yours to run by typing %MYFILE with a percent sign.

Note: You can avoid the need to use the /* REXX */ comment by using
the file SYSEXEC instead of SYSPROC and doing a few other things,
but my experience has found the above far easier than trying to
maintain separate TSO CLIST and TSO REXX libraries.

One good reason to want to do it this way is that it's much easier
to pass parameters.  If your exec takes the string DON'T DO IT as
a parameter, then using one of other methods you'd have to type

 EX MYFILE 'DON''T DO IT'   /* possibly with EXEC afterwards */

With this method you can just type

 MYFILE DON'T DO IT

Consult a TSO manual, or (better) talk to any moderately well-informed
TSO person for assistance.

--
Steve Bacher (Batchman)                 Draper Laboratory
Internet: seb@draper.com                Cambridge, MA, USA
From: dac@prolix.apana.org.au (Andrew Clayton)
Newsgroups: comp.lang.rexx
Subject: Re: Funny thing about date() - ARexx 1.15
Date: 27 Jan 93 12:58:16 GMT
Organization: More like Dis~, really.
X-Newsreader: Arn V1.00

In article <paul.04ez@dragons.DIALix.oz.au>, Paul O'Neill writes:

> I was recently using the date() function under ARexx 1.15 and discovered that you
> can provide a second argument being the day number since, well, somewhen.
> 
> If I call date('n', daynum) I get a date string that is correct for that day.
> 
> If I call date('d', daynum) I get the wierdest day of the month!!!
> 
> I set up daynum to be for February 3rd and date('d', daynum) returned 35!!

D is Days since beginning of the year in question.

C is Days since beginning of century

B is Days since Jan 1 0001

W is the weekday.

All in the Arexx manual.

Dac
--
dac@prolix.apana.org.au              David Andrew Clayton.           // _| _  _
dac@prolix.sserve.cc.adfa.oz.au      Canberra, Australia           \X/ (_](_](_
                    <Using ARN on an Amiga 4000. Yay!>
From: SG919C@gwuvm.gwu.edu (Raad Alhamdan)
Newsgroups: comp.lang.logo
Subject: Where is FAQ?
Date: 26 Jan 1993 03:15:38 -0600
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

Is there a FAQ file for this group? if so, where can I find it via FTP?

--Raad
From: sandfort@cs.arizona.edu (Jeff Sandfort)
Newsgroups: comp.lang.logo
Subject: WANTED: Logo grammar
Date: 28 Jan 93 19:13:31 GMT

I know this was requested once but I never saw an answer or summary.  
Anyway,  I am working on a small logo interpreter for a math (that's
right) class and I would like to see a grammar (yacc compatible would
be good) that someone else has done.  I'm not looking to steal someone
elses code but would like to see how it should be done.  I know there 
is really no standard but what would you consider to be the standard
core of commands.  Thanks in advance,

Jeff Sandfort

P.S.  I'll post a summary of anything I get.
From: ken@aiai.ed.ac.uk (Ken Johnson)
Newsgroups: comp.lang.prolog
Subject: Re: Help: making a binary predicate reversibly equal
Date: 26 Jan 93 11:08:38 GMT
Followup-To: comp.lang.prolog
Organization: William's Wonderful Wonky Widget Warehouse


In article <C1C63u.J6n@watserv1.uwaterloo.ca> jssloka@monet.uwaterloo.ca
(Scott Sloka) writes:

#  I have a list of facts such as: nextto(a,b) and I would like nextto(a,b)
#  to be equivalent to nextto(b,a). 


This is a common problem. The usual solution is

next_to(A,B) :-
	next_to_fact(A,B).

next_to(A,B) :-
	next_to_fact(B,A).


next_to_fact(e,r).
next_to_fact(i,o).
next_to_fact(o,p).
next_to_fact(q,w).
next_to_fact(r,t).
next_to_fact(t,y).
next_to_fact(u,i).
next_to_fact(w,e).
next_to_fact(y,u)


Example run

| ?- next_to(q,w).

yes
| ?- next_to(w,q).

yes
| ?- next_to(a,b).
no


-- 
Son, all the pretty, intelligent, healthy     #    I have discovered of this
young women are taken. It's a basic rule of   #    basic rule of the universe
the universe, and if you don't like it, go    #    a most remarkable proof,
somewhere else.        -- my dad  1906-1992   #    which this .signature is too
From: j_hamer@cs.aukuni.ac.nz (j_hamer)
Newsgroups: comp.lang.prolog
Subject: Re: Help !!
Date: 25 Jan 93 21:47:21 GMT
Article-I.D.: john-ha.j_hamer-260193102423
 <lenn.726916615@du9ds4><j_hamer-210193105028@john-ha.cs.aukuni.ac.nz> <93021.154835U35395@uicvm.uic.edu>
Followup-To: comp.lang.prolog
Organization: computer Science

In article <93021.154835U35395@uicvm.uic.edu>, C. M. Sperberg-McQueen
<U35395@uicvm.uic.edu> wrote:
> 
> If you wanted to write it in Pascal, why didn't you just compile it
> in Pascal?  Heiner's program may well run longer than yours.  On the
> other hand it is shorter, and much easier to see that it is correct.
> Since my machines spend far more time waiting for my keystrokes than
> they do working, I see no reason to worry about making code run faster
> unless it is now running too slow.  Sufficient unto the day is the
> evil thereof; why should I worry about trivial 'inefficiencies' like
> those you see in Heiner's code, until they are making my work
> unacceptably slow?
> 
> -C. M. Sperberg-McQueen
>  University of Illinois at Chicago

I am not particularly worried about the performance of Heiner's program (it
is lousy, but this is no immediate concern to a beginner).  It seemed to me
that Mike's original posting was asking for some guidance, not a quick
hack.  Quite simply, if you want to develop from a Prolog beginner into a
proficient Prolog programmer, then you will spend your time studying good
code.

-- John Hamer                           Email: J_Hamer@cs.aukuni.ac.nz
-- Department of Computer Science
-- University of Auckland, New Zealand.
From: dsc3pzp@nmrdc1.nmrdc.nnmc.navy.mil (Philip Perucci)
Newsgroups: comp.lang.prolog
Subject: PROLOG source?
Date: 24 Jan 93 19:04:20 GMT
Organization: Naval Medical Research & Development Command

Are there any anonoymous ftp sites where PROLOG source-code is archived?
Even simple programs like "tower of hanoi" would help.
Anything?  Anywhere?
BTW- I use SWI-Prolog.

-- 
===========================================================================
  phil perucci                | "Any opinions expressed are my own views, 
  ssb1pzp@imcvms.med.navy.mil |  not the position of any organization"
===========================================================================
Newsgroups: comp.lang.prolog
From: magc@ghost.dsi.unimi.it (claudio magri)
Subject: Help on Prolog III
Keywords: Prolog Constraints
Organization: Computer Science Dep. - Milan University
Date: Thu, 21 Jan 1993 11:45:21 GMT

	Hy,
	my name is Claudio and I'm working in the Expert Systems Lab. at the Computer Science Dept., University of Milan.
	I'm having a lot of trouble in using Prolog III (vers. 1.2 MS-DOS),
	especially a certain lack of documentation. For example, is it possible to run Prolog III under Windows 3.1? And which are the tricks to do so?
	I would also appreciate some ideas and suggestions from people working
	with Prolog III.

			Thank you for your help.
			E-mail: magc@ghost.sm.dsi.unimi.it
Newsgroups: comp.lang.prolog
Subject: Re: Prolog is declarative
From: jacob@latcs1.lat.OZ.AU (Jacob L. Cybulski)
Date: Fri, 22 Jan 1993 02:36:22 GMT
Organization: Comp Sci, La Trobe Uni, Australia

In article <90458@ncratl.AtlantaGA.NCR.COM>, hroth@ncratl.AtlantaGA.NCR.COM (Harris Roth) writes:
|> What is the definition of declarative?
A declarative language provides a descriptive rather than prescriptive
solution to the problem. So for instance if you have to sort an array
of numbers, you'd specify the initial state of the array (any order),
the final state of the array (in order) and the relation between these
two states (the two sets of numbers are to be identical). Depending on
how you are going to set the relationship between the two states you may
imply the use of bubble sort, a quick sort, etc...

|> What other languages are declarative?
E.g. SQL, SNOBOL

|> What term describes languages which are not declarative?
Procedural - e.g. Cobol
Functional - e.g. Lisp


Jacob
-- 
=============================================================================
Jacob L. Cybulski,  Deputy  Director,  Amdahl  Australian  Intelligent  Tools
Programme,  Dept of  Comp Sci  &  Comp Eng,  La Trobe  University,  Bundoora,
Vic. 3083, Australia. Ph: +613 479 1270, Fax: +613 470 4915, Telex: AA 33143,
E-Mail: jacob@latcs1.lat.oz.au.                                     ... G'Day
=============================================================================
From: j_hamer@cs.aukuni.ac.nz (j_hamer)
Newsgroups: comp.lang.prolog
Subject: Re: Efficiency and 'good' Prolog (was: Help !!)
Date: 25 Jan 93 22:15:43 GMT
Article-I.D.: john-ha.j_hamer-260193104919
Followup-To: comp.lang.prolog
Organization: computer Science

In article <93022.184813U35395@uicvm.uic.edu>, C. M. Sperberg-McQueen
<U35395@uicvm.uic.edu> wrote:
> 
> > Because some of us do write large Prolog programs that depend on efficiency,
> > and it's better to instill good programming habits from the beginning than to
> > overcome bad programming practice later on.
> 
> Proof, I guess, that using a logic programming language does not make us
> logical.  If I were willing to accept your equation of 'good programming
> habits' with fast code, I wouldn't have posted my note about writing
> Prolog as though it were Pascal with commas.  If you want to make anyone
> believe it, you should provide an argument or two in favor of it, not
> just say it again.

Ok, so here are some reasons.  The most important one is that the code I
posted follows a regular and common pattern that Prolog programmers the
world over will quickly recognise and understand.  If you want to
communicate, you must speak the language (and I don't mean syntax).  As a
bonus, the introduced relation max/3 is useful in its own right, such as
when you wish to take the maximum over a second list.  As for you
(apparent) claim that Heiner's code is more "declarative", I count 3 cuts
(one is redundant) vrs. one (local) cut in my version.  Who are you trying
to kid???

> The real problem for me in your note, however, is your assertion that
> relying on Prolog's declarative semantics is 'bad programming practice'.
> The relative clarity of its declarative interpretation is one of the
> most appealing things about Prolog -- God forbid we should begin to
> think of it as a 'bad habit' if we take advantage of one of the best
> features of the language!
>
> If you write big systems that have to be optimized to be fast, you have
> a right to worry about writing fast code.  You do not have the right to
> spread the pernicious falsehood that speed is the only criterion of good
> code.
> 

There is nothing particularly optimised about my code; it was written to
take best advantage of Prolog's strengths (esp. pattern matching), while
avoiding obvious non-declarative inelegancies (the cut).  It just happens
to be fast.  This is the daily experience of the proficient Prolog
programmer -- write your code as cleanly as you can, and performance will
come naturally.

-- John Hamer                           Email: J_Hamer@cs.aukuni.ac.nz
-- Department of Computer Science
-- University of Auckland, New Zealand.
Newsgroups: comp.lang.prolog
From: bernhard@ai.univie.ac.at (Bernhard Pfahringer)
Subject: Re: Efficiency and 'good' Prolog (was: Help !!)
Organization: Dept. Med.Cybernetics & Artif.Intelligence, Univ.Vienna, Austria, Europe
Date: Thu, 28 Jan 1993 16:06:10 GMT

/* OK, so I could not resist.
   If you really want efficient and 'clean' code, here's a version 
   using one of the tricks to be found in ROK's 'CRAFT OF PROLOG':

   - no cuts
   - twice as quick as max_hamer/2 (at least using Sicstus on a Sparc)

*/

max_of_list( [X|L], Max) :-
	max_of_list1( L, X, Max).

max_of_list1( [], Max, Max).
max_of_list1( [X|L], MaxSoFar, Max) :-
	compare( Rel, X, MaxSoFar),
	( Rel = =, max_of_list1( L, MaxSoFar, Max)
	; Rel = <, max_of_list1( L, MaxSoFar, Max)
	; Rel = >, max_of_list1( L, X,        Max)
	).


/*
--------------------------------------------------------------------------
Bernhard Pfahringer
Austrian Research Institute for  
Artificial Intelligence          bernhard@ai.univie.ac.at 
Schottengasse 3                  Fax:   (+43 1) 532-0652
A-1010 Vienna, Austria           Phone: (+43 1) 533-6112
*/
Newsgroups: comp.lang.prolog
From: dc@dcs.qmw.ac.uk (Daniel Cohen)
Subject: Re: Prolog is declarative
Organization: Computer Science Dept, QMW, University of London
Date: Fri, 22 Jan 1993 11:43:57 GMT

In <1993Jan22.023622.23284@latcs1.lat.oz.au> jacob@latcs1.lat.OZ.AU (Jacob L. Cybulski) writes:
>
>|> What other languages are declarative?
>E.g. SQL, SNOBOL
>
>|> What term describes languages which are not declarative?
>Procedural - e.g. Cobol
>Functional - e.g. Lisp

This seems a little unfair to the functional programming paradigm.
I know that Lisp as used by most Lisp programmers is about as
non-declarative as you can get, but pure functional programming has a
declarative reading just like pure logic programming, only the language
involved is that of mathematics rather than logic. Just interpret
function calls as mathematical expressions with some value, and
function definitions as definitions of mathematical functions.

I suspect that declarativeness in a language is closely related to the
degree of referential transparency in the language; any alternative
formulations?

Daniel Cohen              Department of Computer Science 
Email: dc@dcs.qmw.ac.uk   Queen Mary and Westfield College
Tel: +44 71 975 5245/4/9  Mile End Road, London E1 4NS, UK
Fax: +44 81 980 6533      *** Glory, Glory, Hallelujah ***
Newsgroups: comp.lang.prolog
From: wunderwa@informatik.tu-muenchen.de (Jens Wunderwa)
Subject: Re: Help: making a binary predicate reversibly equal
Organization: Inst. fuer Informatik, TU Muenchen, Germany
Date: Mon, 25 Jan 1993 15:13:09 GMT

In article <C1C63u.J6n@watserv1.uwaterloo.ca> jssloka@monet.uwaterloo.ca (Scott Sloka) writes:
>
>   Howdy.  My name is Scott Sloka and I am an AI enthusiast at the University of
>   Waterloo.  I have a list of facts such as: nextto(a,b) and I would like
>   nextto(a,b) to be equivalent to nextto(b,a).  This does not work:
>
>   nextto(X,Y):-nextto(Y,X).
>
>   because an endless loop is set up.  I am just beginning Prolog programming
>   because I am doing a project on abstraction and I would like to include this
>   parameter switch equalization in my routines for some of my predicates.  Any
>   pointers would be greatly appreciated.  Thanks in advance.
>
>		   -Scott

Just define

nextto_sym(X,Y) :- nextto(X,Y).
nextto_sym(X,Y) :- nextto(Y,X).

Ciao Jens
From: colinb@.ic.ac.uk (Dr C. Bridgewater)
Subject: Map Colouring Problem with Four Colours
Organization: Imperial College
Distribution: comp.lang.prolog
Date: Tue, 26 Jan 93 14:23:13 GMT

Hi Folks,

There is a classic problem where a 2-D map of regions needs to be coloured
in such a way that no adjacent region has the same colour. It turns out 
that the maximum number of colours needed to fill in the map is four. Does 
anyone happen to have a solution to this problem on-line ? 

Cheers,

Colin

****************************************************************************
*  Colin Bridgewater		     *    c.bridgewater@uk.ac.ic   * \   / *
*  Head Robot Wrangler		     * tel:+44-(0)71-589-5111x4842 *  \ /  *
*  Construction Robotics Research    * BE KIND TO SPIDERS & SNAILS * --*-- *
*  Department of Civil Engineering   *  -------------------------  *  / \  *
*  Imperial College, London, UK.     *  alias 'the happy hacker'   * /   \ *
****************************************************************************

Newsgroups: comp.lang.prolog
From: dave@quintus.com (David Bowen)
Subject: Re: Modules...do they improve efficiency?
Organization: Quintus Corporation, Palo Alto, CA
Date: Thu, 21 Jan 1993 01:52:07 GMT

In article <1993Jan18.142453.1@vaxa.strath.ac.uk>, cnbv01@vaxa.strath.ac.uk writes:
> Excuse my ignorance, but is there any efficiency advantage to having modules.
> 
> I have developed, what I would call, a large application in Quintus
> Prolog which is spread over many files.  I would like it to run faster...
> now thats a new one!!...and am presently checking for determinacy in the
> rules.  (I'm just realising all the beauties of Quintus Prolog 3.1.1 on
> a DECstation after years of version 2.4 on a VAX.)  In addition I've
> heard and read alot about modules... and I have not used modules ie. all
> my rules are in module user.  
> Is there any benfit to having modules?...Are rules called faster if they
> belong to modules with fewer rules in them?
> 
> ...any ideas
> 
> Thanks,
> Graeme Burt

Sorry, there is no performance advantage in using modules.  The purpose
of modules is to divide up the predicate name space, so that you don't need
to worry about inadvertently using the same name for two different predicates.

Getting any unintended non-determinacy out of your program could be a big win.
library(det) is a crude but useful static analysis tool to help with this.
Using the debugger and skipping through sections of your program can also be
a good way to find non-determinacy.

In a future release there will be a profiler, which I know many people will
find useful for identifying performance bottlenecks.

-- 
David Bowen				Vice President Product Engineering
Quintus Corporation                     InterNet:       dbowen@quintus.com
2100 Geng Road                          FAX:            415 494 7608
Palo Alto, California 94303             Phone:          415 813 3800
Newsgroups: comp.lang.prolog
From: brady@cs.tcd.ie (Michael Brady)
Subject: Re: ISO Prolog (Was ISO Prolog Error?)
Followup-To: comp.lang.prolog
Organization: University of Dublin, Trinity College
Date: Thu, 21 Jan 1993 14:44:31 GMT

In article <C16Iuo.4Cz@nmrdc1.nmrdc.nnmc.navy.mil>,
dsc3pzp@nmrdc1.nmrdc.nnmc.navy.mil (Philip Perucci) wrote:
> 
> ISO PROLOG draft?  Excellent!
> [...]
> Any timeframe anticipated for ISO acceptance?

I don't know. I was referring to the draft proposal dated March 27, 1992.
It is available from some FTP sites (maybe someone else knows one?).

---------------------
Mike Brady
Computer Science Department, Trinity College Dublin, Ireland
From: kwakkel@cwi.nl (Fred Kwakkel)
Newsgroups: comp.lang.prolog
Subject: WANTED: Prolog program to find and simplify deratives
Date: 25 Jan 93 14:11:33 GMT
Organization: CWI, Amsterdam

Hello Netters,

I'm looking for a program to find and simplifies deratives of a
function. For example:

! % derive(+Function,+DerVariable,+Derative)
! %
!
! ?- derive(a*x + b*x^2, x, Answer).
!
! Answer = a + 2*b*x

I've looked at the archive, but couldn't find the thing I needed:
src.doc.ic.ac.uk:/computing/programming/languages/prolog/pd-software

Thanks for your help!

-- Fred

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
kwakkel@cwi.nl - centre for mathematics and computer science, amsterdam
From: mwc@aifh.ed.ac.uk (Matthew Crocker)
Newsgroups: comp.lang.prolog
Subject: Re: Help: making a binary predicate reversibly equal
Date: 25 Jan 93 13:03:46 GMT
Organization: Dept AI, Edinburgh University, Scotland
To: jssloka@monet.uwaterloo.ca (Scott Sloka)

if your database has nextto(a,b), nextto(c,d) etc. then use a different
predicate to define the symmetric version of the relation. I.e.

next-to(A,B) :- nextto(A,B).
next-to(A,B) :- nextto(B,A).

Matt.

-------Dr. Matthew Crocker-----------------------------------------
 Dept. of Artificial Intelligence  | Phone: DAI: +44 -31 650 2702 
   Centre for Cognitive Science    |        CCS: +44 -31 650 4432
     University of Edinburgh       |        FAX: +44 -31 226 2730
         80 South Bridge           | E-mail: M.Crocker@ed.ac.uk or,
   Edinburgh, Scotland, EH1 1HN    |         mwc@aisb.ed.ac.uk
From: lxl@cs.bham.ac.uk (Lunjin Lu)
Newsgroups: comp.lang.prolog
Subject: information on library for menu manipulations
Date: 26 Jan 93 12:15:53 GMT
Organization: School of Computer Science, University of Birmingham, UK

I am currently prototying an interactive program. I need predicates for menu 
manipulations on a textual screen.  In my program, a menu is represented as 
a list of item-action (an action is a goal) pairs. I need a procedure to 
display the menu, let the user to select an item ,and takes the associated
action. 

I wonder if there is any existing library for this purpose. Your help will be 
appreciated.  Thank you in advance.

Lunjin Lu
L.Lu@cs.bham.ac.uk
Newsgroups: comp.lang.prolog