HDTenEightyP/NetNews huggingface dataset:
From: dt4@olive.ucsb.edu (David E. Goggin)
Newsgroups: comp.lang.prolog
Subject: what is wrong here?
Summary: big problem
Keywords: wrong here
Date: 12 Jan 93 17:58:18 GMT
Distribution: comp.lang

Hi folks.

I am trying to teach myself prolog, and I am having a problem.  I
programmed a fibonacci number finder.

  fib(1,1).            /* fib(S,N) where N is the Sth fibonacci # */
  fib(2,1).
  fib(S,N) :- S>2,
              A is S-1,
              B is S-2,
              fib(A,C),
              fib(B,D),
              N is C+D.

but all I get when I try to ask fib(5,X) is error: free variable in
expression.  But there is stuff like this in C&M's book!  How do I
get the 5th fib. number?

second question: how do I get the second element of a list?
[A|B|C]?  where B is second element?  or maybe [A|[B|C]]?

thanks in advance!
*dt*

Newsgroups: comp.lang.prolog
From: hoppet@opal.cs.tu-berlin.de (Thomas Hoppe)
Subject: Re: Machine Learning Program Library
Keywords: Machine Learning
Organization: Techn. University of Berlin, Germany
Distribution: comp.lang.prolog
Date: Fri, 8 Jan 1993 12:19:58 GMT

mmh@dcs.qmw.ac.uk (Matthew Huntbach) writes:

>You ought to have Shapiro's model inference system. I am not
>sure if the code is available anywhere, but the text is given
>as an appendix to his thesis "Algorithmic Program Debugging"
>which is published in MIT's Distinguished Dissertation series.
>I wrote an improved version of it, but I used the Poplog
>system, mixing Pop-11 with the Prolog, so it wouldn't be
>translatable.
>
>Matthew Huntbach

Yes, that's right. Actually I have re-implemented it already some
years ago and it is still on my stack of programs "to be included in
the lib". Since the behavior of the re-implementation differs from the
behavior published in Shapiro's book and since I have compared the
code over and over again, it seems that the behavior difference is a
result of different Prolog dialects. Thus and because of a lack of
time this program isn't yet in the Lib. Anyway, if I find some time in
the future it will surely be included.

If somebody is interested in it, s/he can mail me directly to get it.

Thomas Hoppe
--
Thomas Hoppe  Projekt KIT-BACK		email: hoppet@cs.tu-berlin.de
Technische Universitaet Berlin		phone: 030-314-25494
Franklinstr. 28/29			fax  : 030-314-24929
1000 Berlin 10	Germany			priv.: 030-3236564
From: ken@aiai.ed.ac.uk (Ken Johnson)
Newsgroups: comp.lang.prolog
Subject: Re: How to parse "I say: 'I love you'" to [I, say, I love you]
Date: 5 Jan 93 11:08:51 GMT
Followup-To: comp.lang.prolog
Organization: William's Wonderful Wonky Widget Warehouse


In article <1i97a9INN8h@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang
Huang) writes:

# but how to parse to ["I", "say", "I love you"] ?

The following will do what you want, but I don't think what you describe
is really what you want to do.  Instead of a list, you should really
generate a term expressing the structure of the original, so [I, say, I,
love, you] should really parse to a term such as

   say('I',love('I',you)).


report([P,V|St]) --> pronoun(P), verb(V), quotation(St).

quotation([P1,V,P2]) --> pronoun(P1), verb(V), pronoun(P2).

pronoun('I') --> ['I'].
pronoun(you) --> [you].

verb(say) --> [say].
verb(love) --> [love].

This is how it works:

?-  phrase(report(R),['I',say,'I',love,you]).

     R=[I,say,I,love,you]



-- 
Son, all the pretty, intelligent,      || Ken Johnson                           healthy young women are taken.         || A I Applications Institute
It's a basic rule of the universe,     || 80 South Bridge                       and if you don't like it,              || Edinburgh,  Scotland   EH1 1HN
go somewhere else.                     || Phone 031-650 2756   Fax 031-650 6513
               -- my dad  1906-1992    || E-mail ken@aiai.ed.ac.uk
From: mmh@dcs.qmw.ac.uk (Matthew Huntbach)
Newsgroups: comp.lang.prolog
Subject: Re: Machine Learning Program Library
Keywords: Machine Learning
Date: 8 Jan 93 11:32:47 GMT
Organization: Computer Science Dept, QMW, University of London, UK.

In article <emde.726485815@hercules> emde@hercules.gmd.de (Werner Emde) writes:
>Additional PROLOG implementations  of Machine  Learning Algorithms are
>welcome by Thomas Hoppe who is responsible for the  maintenance of the
>program library.  Thomas Hoppe has made slight changes to the programs
>supplied by the different authors in order to make them independent of
>a specific PROLOG dialect (as far as possible).
>
You ought to have Shapiro's model inference system. I am not
sure if the code is available anywhere, but the text is given
as an appendix to his thesis "Algorithmic Program Debugging"
which is published in MIT's Distinguished Dissertation series.
I wrote an improved version of it, but I used the Poplog
system, mixing Pop-11 with the Prolog, so it wouldn't be
translatable.

Matthew Huntbach
From: kilpelai@cs.Helsinki.FI (Pekka Kilpelainen)
Newsgroups: comp.lang.prolog
Subject: Re: Logical Update View - history
Date: 11 Jan 93 19:02:13 GMT
Distribution: eunet
Organization: University of Helsinki, Department of Computer Science
NNTP-Posting-Host: hydra.helsinki.fi

In <9301111701.AA30562@ifc6000.IFComputer.de> andrew@ifc6000.IFComputer.de (Andrew Verden) writes:

> [...} where the 'logical update view' of the Prolog database stemmed from?

See T.G. Lindholm and R.A. O'Keefe: "Efficient implementation of a
defensible semantics for dynamic Prolog code" in J.-L. Lassez (ed.):
Logic Programming: Proceedings of the Fourth International Conference, Vol. 1.
MIT Press 1987. pp. 21-39.
-- 
Pekka Kilpela"inen   University of Helsinki    kilpelai@cs.helsinki.fi
                     Dept. of Comp. Sci.       +358 0 708 4227
From: lenn@du9ds4.fb9dv.uni-duisburg.de (Heiner Lennackers)
Newsgroups: comp.lang.prolog
Subject: SWI-Prolog on an Amiga
Date: 6 Jan 93 11:24:45 GMT
Organization: Universitaet Duisburg GH
NNTP-Posting-Host: du9ds4.fb9dv.uni-duisburg.de

Does anybody now something about the SWI-Prolog.
It comes from the university in Amsterdam, Netherlands. It can be installed
to many computer-architectures like sun, pc(linux) and atari. 
So it can be installed to atari, i dont see any reason, why it could not
be installed an an amiga.
Did anyone can give me some hints to do this.

Bye 
  Heiner
From: timbomb@cs.uq.oz.au (Tim Mansfield)
Newsgroups: comp.lang.smalltalk
Subject: Voluntary method typing in ST80 - HELP!
Date: 6 Jan 93 12:17:00 GMT
Reply-To: timbomb@cs.uq.oz.au

I want to add the facility to make some statement about the type of the answer
given by a message.
I'm not proposing to add a type system to Smalltalk, but for the application
I'm building it is necessary for the caller of a method to know things about
the type of its return.

The three solutions that have occured to me so far are all either inelegant or
beyond my understanding --

1) give each class a class variable which holds a dictionary of the information
   with the method names as keys.
   drawbacks: each class variable must have a different name and access methods
	      and these must be created for each new class.

2) create an abstract class which has a class variable which holds a dictionary
   of the information for all its subclasses with the class and method names as
   keys.
   drawbacks: this is just really clunky...

3) somehow modify Class itself so that each class has a dictionary of the
   information with the method names as keys.
   drawbacks: I've got no idea how to do this, even though it seems like the
	      best (if most dangerous) solution.

If you have any better ideas, or you know how to do 3), then please let me
know, either in this group or by email.

Desparate,
	Tim


--
Tim Mansfield                                         timbomb@cs.uq.oz.au
Dept of Comp Sci, Uni of Qld, Australia, 4072           +61 (0)7 365 2956
"Nothing is wrong with the idea that there would be a God...  
		who changes the water." mvs@softway.oz (Mark V. Shaney)
Newsgroups: comp.lang.smalltalk
From: oryan@dip.eecs.umich.edu (Cahan ORyan)
Subject: Smalltalk programmers wanted
Organization: University of Michigan EECS Dept., Ann Arbor, MI
Distribution: na
Date: Fri, 8 Jan 1993 18:37:57 GMT

Smalltalk software engineers wanted ASAP for large manufacturing and financial 
applications. Arbor Intelligent Systems, Inc. is located in Ann Arbor, which 
offers an excellent quality of life and is the home of the University of 
Michigan. We will be hiring three people. One to two will be on contract, 
while the third should be an applicant seeking employee status with a long 
term commitment to grow with our company. Previous Objectworks experience on 
an actual project is preferred. Object database experience with GemStone or 
Versant is also preferred. Our consulting work is mostly in Michigan now, but 
there may be travel involved in the future.

Send resume and cover letter to 506 N. State Street, Ann Arbor, MI 48104.

Send e-mail to ais.um.cc.umich.edu
Newsgroups: comp.lang.smalltalk
From: jahargra@dante.nmsu.edu (HARGRAVE III)
Subject: OS/2 2.0 port of GNU Smalltalk
Organization: New Mexico State University, Las Cruces, NM
Date: Sun, 10 Jan 1993 22:15:48 GMT

Hi,
Someone uploaded the GNU Smalltalk 1.1.1 to ftp-os2.nmsu.edu
in the file smaltalk.zip (not sure where it is now).  After
unzipping the file I found no OS/2 specific stuff (makefiles 
etc..).  Could some hot shot programmer take a look at this code 
and attempt to port it to OS/2 2.X.  I've gotten the code to
compile (with some warnings) but some of the test code fails.

It would really be nice to have a free Smalltalk for OS/2. I
think only a few hours work would be required.

                                 Thanks,
                                 Jim Hargrave
                      
                                 jhargrav@nmsu.edu
Newsgroups: comp.lang.smalltalk
From: knight@mrco.carleton.ca (Alan Knight)
Subject: Re: anything isKindOf: nil ==> true (Objectwork
Reply-To: knight@mrco.carleton.ca (Alan Knight)
Organization: Carleton University
Date: Mon, 4 Jan 1993 20:25:37 GMT

In <1993Jan4.173045.19549@prodigy.bc.ca> jbeekman@prodigy.bc.ca (Joerg Beekmann) writes:

>Try this;
>- nil is the single instance of class UndefinedObject
>- the super class of Object is undefined
>- anything isKindOf: nil (something undefined could be anything so true
>makes sense to me)

Similar reasoning would imply 
  anything = nil
is true, since an undefined could be anything.

-- 
 Alan Knight  knight@mrco.carleton.ca  +1 613 788 2600x1027 
 Dept. of Mechanical and Aerospace Engineering              
 Carleton University, Ottawa, Ontario, Canada, K1S 5B6      

Newsgroups: comp.lang.smalltalk
From: rtgrc@rc.rit.edu (Rob Gayvert)
Subject: Re: Dialog radio button text on Mac
Followup-To: comp.lang.smalltalk
Organization: RIT Research
Date: Tue, 5 Jan 1993 16:01:27 GMT

In article <Jan.3.20.46.31.1993.27968@gandalf.rutgers.edu>,
lturner@gandalf.rutgers.edu (Louis Turner) wrote:
> 
> I am trying to figure out how to set the text string of a dialog
> radio button from within a ST/V program.  i know that it can be
> changed in the resource itsel. To facilitate upgrades to this
> application and to make sure the collection indexes are in sync
> with the radio button item number it would be better if I could 
> change the text from within ST in a manner similar to the 
> setItemText: method for static and editable text fields.

To change the title of a control item, you need to add a couple of methods
which are analogous to the "setItemText:" methods. The methods below should
do the trick. For more details, see Inside Mac I-321 and I-421.

Rob Gayvert
RIT Research
rtgrc@rc.rit.edu



!MTrap class methods !

SetCTitle: controlHandle title: aTitle

    <trap: stack procedure 16rA95F handle record>

    ^ self trapFailed! !


!Dialog methods !

setControlTitle: itemNumber title: aString
    "Answer the text associated with the item."
    | itemInfo type |

    itemInfo := self getItemInfo: itemNumber.
    type := (itemInfo at: 1) bitAnd: 16r7F.

    ^ self setControlTitleFromHandle: (itemInfo at: 2)
           title: aString! !


!Dialog methods !

setControlTitleFromHandle: handle title: text
    "Set the title for the given handle."
    | answer |

    answer := text isNil
                ifTrue:  [ '' asStr255 ]
                ifFalse: [ text asStr255 ].
    MTrap SetCTitle: handle asParameter
          title: answer asParameter.! !
From: protocom@DMI.USherb.CA (protocom-Laurent turcotte)
Newsgroups: comp.lang.smalltalk
Subject: Teaching OOP concepts kids/Adults
Date: 10 Jan 93 20:32:33 GMT
Organization: Universite de Sherbrooke -- Dept. d'Informatique

>I'm looking for ANY info about TEACHING OOP to kids or adults...                
>                                                                               
>        -It could be done using smalltalk and turtle graphics...                
>                                                                               
>        -It could be done using hyperCard like programs...                     
>                                                                              
>        -It could be done with a book of some kind...                       
>                                                                               
>        -Anything (the sky is the limit)                                     
>                                                                           
>I'm thinking of doing a University school project on this 

The Project will be as follows:

Goal:
	Teaching kids/Adults at the introductory level OOP concepts

Methodology:        
	Creating a language tutoring engine in VisualWorks (Smalltalk) using:

	- guided tutorial
	- context sensitive help

	The first module would consist of teaching the "message passing" idea through examples in turtle graphics where the students types in the commands and send messages to the turtle in smalltalk syntax. Also help would be provided in a context sensitive fashion and a link (in the help engine) would be made to LOGO syntax

	Int the help part the possibility of going in the detail level DESIRED by the user would be nice to encourage curiosity


P.S. ANY FEED BACK ON THIS IS DEEPLY APPRECIATED NO MATER HOW SMALL 
-- 
Larry Turcotte                           Internet:protocom@dmi.usherb.ca
computer science student/consultant
consulting company:Protocom              Is there anybody out there.....
Newsgroups: comp.lang.smalltalk
From: terry@zoe.network23.com (Terry)
Subject: Re: Is it OK to do that kind of think IN Smalltalk ?
Organization: Mystech Associates
Date: Sun, 10 Jan 1993 01:17:39 GMT

From article <ROUSSEAF.93Jan6193620@saguenay.IRO.UMontreal.CA>, by rousseaf@saguenay.IRO.UMontreal.CA (Francois Rousseau):
> Is it standard in Smalltalk to change the interface of a view at run
> time. For example: is ghosting buttons supported easily ?
You can do almost whatever you want in Smalltalk.
> 
> What I have in mind is to add and remove buttons on my view based on
> what the user is doing. I want a context sensitive interface, am I
> getting into major programming headaches ?

From a user interface and programming perspective you would be better off
deactivating the buttons and changing their appearance to show that they
are inactive.

If you really want to visual components can be removed and added to
active containers although it can get complicated.  If you are doing this
for a class you would probably find the first approach quicker to figure
out.

Terry
-- 
terry@zoe.network23.com
{rayssd,xanth,mirror,att}!galaxia!zoe!terry
Newsgroups: comp.lang.smalltalk
From: pnsf01dw@UMASSD.EDU (Dennis J. Wilkinson)
Subject: clockEvent:/clockEvent in ST/V Mac
Reply-To: pnsf01dw@UMASSD.EDU
Organization: UMASS DARTMOUTH, NO. DARTMOUTH, MA.
Date: Mon, 4 Jan 1993 20:58:56 GMT

This may be a FAQ... I remember seeing an answer to the question a few months
back, but I don't recall what it was.

How does one get an object (actually, a pane's model) to receive clock events.
I was under the impression that all I had to do was implement #clockEvent: in my
model, but that doesn't seem to work.

It doesn't appear that clock events are even sent  (I tried putting a
"Transcript nextPut: $+." statement in TerminalStream's #clockEvent method, and
nothing happened...)

I vaguely recall someone mentioning something about a processor fork... if
someone would be so kind as to further enlighten me.... I'm working with ST/V
Mac version 1.2.

Merci.

----------------------------------------------------
Dennis J. Wilkinson, II  (pnsf01dw@umassd.edu)
University of Massachusetts Dartmouth - Design/CS Project

The opinions reflected in this post are MINE!!!! ALL MINE!!!!!
From: bush@ecs.ox.ac.uk (Mark Bush)
Newsgroups: comp.lang.smalltalk
Subject: Re: Voluntary method typing in ST80 - HELP!
Date: 6 Jan 93 15:34:53 GMT
Organization: Oxford University Computing Laboratory
Originator: bush@thom5.ecs.ox.ac.uk

In article <11599@uqcspe.cs.uq.oz.au> timbomb@cs.uq.oz.au writes:
#I want to add the facility to make some statement about the type of the answer
#given by a message.
#I'm not proposing to add a type system to Smalltalk, but for the application
#I'm building it is necessary for the caller of a method to know things about
#the type of its return.

Solution 4)
After calling one of these methods, send the message `class' to the result.

Or is this not the `type' information you wanted?

Mark
Newsgroups: comp.lang.smalltalk
From: johnson@cs.uiuc.edu (Ralph Johnson)
Subject: Re: MSCS, Experienced Smalltalk programmer, seeking Smalltalk position
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Distribution: usa
Date: Sat, 9 Jan 1993 12:16:33 GMT

There is a list of companies looking for Smalltalk programmers on
the Smalltalk archive in /pub/st-docs/smalltalk.jobs on st.cs.uiuc.edu.

Look in the Smalltalk FAQ for instructions on accessing the archive
by e-mail.  Please send me e-mail if your company would like to have
an entry in the file, or if you spot something wrong with the file.

-Ralph Johnson
From: qding@uoft02.utoledo.edu
Newsgroups: comp.lang.smalltalk
Subject: Help: about *losingFocus of ComboBox
Date: 12 Jan 93 14:58:51 EST
Organization: University of Toledo, Computer Services

Hi, there.

I am using Digitalk's Smalltalk/V 2.0 for Windows with WindowBuilder 2.0 
and SuperPanes/V 1.0. But the ComboBox's '*losingFocus' event does not 
active when the cursor is moved out of the ComboBox's entry field. 
Mr. Peters told me that is because of the Smalltalk/V 2.0's bugs. Is 
there anyone who has the same experience could give me a hand please?

Tahnks in advance.


David

Newsgroups: comp.lang.smalltalk
From: campbell@src.honeywell.com (Terry Campbell)
Subject: express tools in STV/Win
Originator: campbell@analysis.src.honeywell.com
Organization: Honeywell Systems & Research Center, Mpls. MN, USA.
Distribution: comp
Date: Fri, 8 Jan 1993 17:16:28 GMT

I have uploaded Smalltalk V/Windows source code for the express and Express-g
toolkit I previously loaded.  The source is on

     src.honeywell.com

in pub/ies/src050.zip

This source includes an Express scanner/parser, classes for interactive 
editing of graphs/nets (graphical, mouse-based, etc.), classes to bind
smalltalk classes to the Raima database etc.  I am making this available for
anyone to use - enjoy!
From: timbomb@cs.uq.oz.au (Tim Mansfield)
Newsgroups: comp.lang.smalltalk
Subject: Re: Voluntary method typing in ST80
Date: 11 Jan 93 07:33:49 GMT
Reply-To: timbomb@cs.uq.oz.au

Thanks to all who replied to how to add voluntary return value typing
to ST80.

Several people suggested that existing class methods could give me
type information (foo class returns the class of foo for instance).
This is true, however I want to add things like the ranges of integers
and so on that isn't provided by existing classes.

One person suggested that even thinking about types indicated my
design probably had problems. This I think is probably a correct
answer and I will rethink how I am approaching the problem in terms of
maybe subclasses with new informative methods.

For those of you who wondered how to do what I asked, the winning
answer IS (drum roll)

Add a Class Instance variable (which is inherited by subclasses but
only shared by instances of the class and the class itself. A new copy
is inherited by each subclass, unlike class variables) which holds the
method information dictionary for each class. For those of you (like
me) who've never heard of a class instance variable, since it's
undocumented, you add one by clicking on the class button of your
system browser while the definition of your class X is shown.  The
browser shows the definition of the metaclass which allows you to
specify the instance variables of X itself rather than  instance variables of
its instances.

This only works in ST80.

Thanks again to all who replied, all the suggestions were helpful,
even the slightly snide ones.

tim

--
Tim Mansfield                                         timbomb@cs.uq.oz.au
Dept of Comp Sci, Uni of Qld, Australia, 4072           +61 (0)7 365 2956
"Nothing is wrong with the idea that there would be a God...  
		who changes the water." mvs@softway.oz (Mark V. Shaney)
Newsgroups: comp.lang.smalltalk
From: steinman@hslrswi.hasler.ascom.ch (Jan Steinman - Bytesmiths, 3946)
Subject: Re: nice exception handling in ST80 : -c
Reply-To: steinman@hslrswi.hasler.ascom.ch
Organization: Ascom Hasler AG
Date: Mon, 11 Jan 1993 07:41:17 GMT

In article 651@cs.uow.edu.au, humm@cs.uow.edu.au (Bernhard G Humm) writes:
>Whether you believe it or not:
>
>1 perform: #+ withArguments: 1 "I know I should have written #(1) but I haven't"
>
>produces a bus error (system crash) in ParcPlace Smalltalk-80

The problem is not with the receiver, it is with the argument. The same thing
happens with {Transcript perform: #show: withArguments: 1}.

#perform:withArguments: is a primitive, and it is obviously dereferencing its
argument without ensuring that it is pointer indexable. This is yet another
reason to avoid C...

: : Jan Steinman, Bytesmiths			   steinman@hasler.ascom.ch : :
: : 2002 Parkside Court, West Linn, OR 97068-2767 USA	    +1 503 657 7703 : :
: : Beundenfeldstrasse 35, CH-3013, Bern, Switzerland	    +41 31 999 3946 : :
Nf-ID: #N:tisdec.tis.tandy.com:8400003:000:369
Nf-From: tisdec.tis.tandy.com!kevinl    Jan  6 11:39:00 1993


	I saw a passing reference that said GNU smalltalk had been
ported to OS/2.  Is this true?  Was there anything included in the
port, like support for PM calls (through the CFuncs capability or
otherwise)?

Any and all help is appreciated.
--
Kevin K. Lewis             | My opinions may be unreasonable
kevinl@tisdec.tis.tandy.com| but such is the voice of inspiration

Newsgroups: comp.lang.smalltalk
From: bmf@dlogics.com (Brian Fitzpatrick)
Subject: System error: fork with interrupts disabled.  (ST/V PM v1.4)
Organization: Datalogics, Inc.
Date: Mon, 11 Jan 93 17:25:32 GMT
Summary: Run time error "fork with interrupts disabled"
Keywords: fork error pm os/2

Has anyone seen the following error during a run-time session of
Smalltalk/V PM v1.4:

	System error: fork with interrupts disabled.

This is not a repeatable error and it has only happened once that I'm aware of.
Does this sound like a problem with Smalltalk or with OS/2 2.0?  Any ideas or
suggestions would be appreciated.  Thanks.
-- 
+---------------------------------------------------------+
| Brian Fitzpatrick * Project Leader * (bf@dlogics.com)   |
| Datalogics, Inc. * 441 W. Huron * Chicago, IL 60610     |
+---------------------------------------------------------+