HDTenEightyP/NetNews huggingface dataset:
From: hmm@heeg.de (Hans-Martin Mosner)
Newsgroups: comp.lang.smalltalk
Subject: Re: Yet Another Beginner's Question...
Date: 13 Aug 92 08:19:11 GMT
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG

In article <1992Aug12.133736.1@uwovax.uwo.ca> brent@uwovax.uwo.ca (Brent Sterner) writes:
>
>   Me again with another beginner's question.
>
>   I have the following code fragment in the displayOn method for a view:
>
>		(self graphicsContext)
>			paint: ColorValue black;
>			displayRectangle: graphBar.
>
>   I would like to vary the colour from black to other colours, depending
>   on various conditions.  I cannot get the simplest case to work:
>
>		| colour |
>		colour := black.
>
>        	(self graphicsContext)
>                	paint: ColorValue colour;
>	                displayRectangle: graphBar.
>
>   I'm told 'colour' is a new message.  I guess it is, but the concept
>   eludes me.  Your help is again appreciated.  Thanks,  b.
>--
>Brent Sterner                       Manager, Academic Technical Support
>Fast:       <BRENT@uwo.ca>          <129.100.2.13>
>Telephone:  (519)661-2151 x 6036    Fax:   (519)661-3486
>Slow:  Computing & Communications Services, Natural Sciences Building
>       The University of Western Ontario, London, Ontario, Canada  N6A 5B7

To send messages with variable selectors, you must use the perform:
message, as in

displayOn: aGraphicsContext
	| colour |
	colour := #black.

	aGraphicsContext
		paint: (ColorValue perform: colour);
		displayRectangle: graphBar.

Also note that the message selector is a Symbol and has to start with the
hash sign (#).  One last hint: When the above code is used in a displayOn:
method, you already have a perfectly good GraphicsContext to display on.
So instead of 'self graphicsContext' you can use 'aGraphicsContext' which is
a little bit faster and more general when different kinds of GraphicsContext
are involved (does not happen in standard st80, but in The Analyst for
printing or wysiwyg display)

Hans-Martin
-- 
+---------------------------------------------------------+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+---------------------------------------------------------+
Newsgroups: comp.lang.smalltalk
From: muhr@opal.cs.tu-berlin.de (Thomas Muhr)
Subject: Re: Classes as a dirty trick to get globals.
Organization: Techn. University of Berlin, Germany
Date: Sun, 16 Aug 1992 21:35:53 GMT

riks@ogicse.ogi.edu (Rik Fischer Smoody) writes:

>>>Future engineers might decide that there needs to be another "instance"
>>>    of this globally known object.  I have seen an example (identity
>>>    of perpetrators withheld to protect the unconvicted) where the
>>>    second instance was implmented as a sub-class, with numerous methods
>>>    over-written to access a different class variable.
(Me!):
>>I do not understand the above. What is meant by "second instance impl.
>>as subclass"?
>Let's suppose that they implemented a class CheckBook.  On the assumption
>that you only have ONE CheckBook, they put all the behavior in the class.
>It had class variables #Balance and #CheckNumber.
>Later, a second bank account was opened (or they got married?) and a
>second CheckBook was needed.  A subclass CheckBookB was created, with
>class variables #BalanceB and #CheckNumberB.  All methods that accessed
>either variable were over-written.
>
>I think there should have been a class CheckBook with an instance
>installed as #MyCheckBook (or something).  The second instance
>could then simply be instantiated and installed as #MyCheckBookB.
Isn't the above example a clear case for misuse of classvariables? The
data should exist in some  persistent state, in a global Dictionary
residing in the image as the simplest solution. 
If subclassing and the "a class for every instance" is preferred
(which in itself is not object-oriented anymore (besides
meta-class/class relationship)), class instance variables should be
used, allowing you to overload the class var names, thereby
eliminating the need for any method changes.
>>>On Smalltalk V/MAC, a quick scan found (Color MTrap Compiler and LCompiler )
>>Compiler & LCompiler aren't merely holders of global variables, they
>>have a lot of hidden code, thou.
>I checked: while there is hidden code on the Class side, there were not
>even any messages in the Instance side.  The method dictionary was empty.
But this "instance" of "Compiler class" really does a lot of work.
This use of the static "object"-concept for what have been
functions in earlier days ("Compiler") is something which I find is
dissolving the object-oriented view a bit.
>
>In the world as we know it, use the dirty tricks with care and pwoer.
>But in the next Object-Comprised world, let us be more careful that
>the programming environment helps us to implement clean designs cleanly.
>-Rik
Well, there is really a LOT to do in this respect (hope some vendor is
listening)....
- Thomas
--
Thomas Muhr - Project ATLAS - Technical University of Berlin
voice: +49 30 314 27882  
BITNET: muhrth@db0tui11  INTERNET: muhr@cs.tu-berlin.de
Compu$erve: 100013,377
Newsgroups: comp.lang.lisp
From: saxena@cs.albany.edu (Tushar Saxena)
Subject: run-program in kcl
Originator: saxena@tarski.albany.edu
Keywords: run-program, common lisp, kcl, load.
Organization: The University at Albany, Comp. Sci. Dept.
Date: Thu, 13 Aug 1992 19:46:57 GMT

There is a function in common lisp called RUN-PROGRAM in Sun Common Lisp.
First of all, has anyone ever heard of it? Secondly, what does this
function do? And lastly, what is its counterpart in kcl. I know for sure
that my version of kcl does not support it.

Another thing that I would like to know is about the -load option of invoking
common lisp. In common lisp, you can invoke lisp by an option -load <filename>
which will load a given file into the interpreter before getting into it. I
was wondering what its counterpart in kcl is. I know (again) for sure that
my version of kcl does not do anything for -load or -l.

Thanks in advance for the help.

ttfn
        -Tush.

--------------------------------------------------------------------------------
And any fool knows a dog needs a home, A shelter from pigs on the wing.
        -Roger Waters
--------------------------------------------------------------------------------
email : saxena@cs.albany.edu                        Computer Science Department
Phone : 518-442-3388                                SUNY Albany
Tushar Saxena                                       Albany NY 12222 (USA)
--------------------------------------------------------------------------------
Newsgroups: comp.lang.lisp
From: york@oakland-hills.lucid.com (Bill York)
Subject: Re: Comparison BTW Franz/Lucid
Reply-To: York@Lucid.COM
Organization: Lucid, Inc.
Date: 17 Aug 92 11:31:50

In article <1992Aug16.100525.24502@mercury.unt.edu> mi@ponder.csci.unt.edu (Mark Interrante) writes:

   From: mi@ponder.csci.unt.edu (Mark Interrante)
   Date: Sun, 16 Aug 1992 10:05:25 GMT

   I am developing some code on Sun Commonlisp (which I just found out is 
   discontinued)  and need t otherefore port to the code to another product.
   The code makes use of the lightwieght threads facility in SunCL and I 
   would like the new environment to support a similar flavor of threads.

Well, since Sun Common Lisp IS Lucid Common Lisp, I think that your
compatibility problems will most easily be handled by Lucid :-)

Seriously, Lucid now does direct distribution and support of Lisp on
the Sun platforms.

   This has already been discussed, what is the net wisdom about the relative
   merits between Franz and Lucid? I will summarize if there are enough 
   responses.  Thanks,

I disqualify myself on the grounds of bias.
Newsgroups: comp.lang.lisp
From: raman@cs.cornell.edu (T. V. Raman)
Subject: Defsystem: Is this is a feature or a bug?
Summary: Why does defsystem behave as follows?
Keywords: defsystem packages including systems
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Sun, 23 Aug 1992 13:03:46 GMT


Hi!

I am using defsystem to build a system that is made up of several
other systems.

Each subsystem has its own package and these systems have also been
defined using defsystem, and the dependencies correctly declared. 

I have: 

Main system MAIN which depends on SUB1 SUB2 SUB3.

SUB(i) have their own packages.

SUB1 itself has sub11 as a subsystem and sub11 has its own package. 

The system definition for each of the systems contains a line at the
top of the file of the form

(unless (find-package ..) (make-package ..)) for that particular
system. 

With the above setup if I do:
(load-system 'main)

I get the following error:
package sub1 is not valid: supply a new package.

The problem disappears if I put the lines

(unless (find-package sub1) (make-package ..) )  along  with similar
declarations for sub2 sub3 and sub11 in the file main.system

I feel that this is uncalled for since main.system should be loading
sub1.system and not expect to see the package declaration for sub1
before this time.

All explanations/tips welcome, maybe there is a good reason why
defsystem does the above.

--Raman
-- 
   T. V. Raman <raman@cs.cornell.edu>Tel: (607)255-9202  R 272-3649
                       Office: 4116 Upson Hall,
Department of Computer Science, Cornell University Ithaca NY 14853-6201
                Res: 226 Bryant Avenue Ithaca NY 14850
Xref: sparky comp.lang.lisp:2219 comp.lang.clos:641 news.answers:2480
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: power
Date: 19 Aug 1992 03:59:53 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <IeYOkQy00iQQ8sCkN7@andrew.cmu.edu> Gary Hooyman <gh1h+@andrew.cmu.edu> writes:
>Does anyone have a general (power base-number power-number) that works
>better than Lucid's implementation of (expt bn pn)?  
>
>-> (expt 0.658 .5)
>1.8641498069802828E9

What kind of system are you on?  It works fine for me in Sun CL 4.0.{0,1},
LCL/SPARC 4.1 beta, and LCL/VAX 2.5.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Calling C function from LCL
Date: 19 Aug 1992 18:23:45 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <Bt8G1E.229@iai.kfk.de> harry@issun1.kfk.de writes:
>1) What is this missing symbol __DYNAMIC

You can ignore that.  It's related to Sun's dynamic linking implementation,
but Lucid's FFI only loads static libraries.

>2) The contents of the array are all multiplied by 4. Has this something
>   to do with the type of the lisp object? I always thought, it is coded in the high order
>   bits of the data.

C ints correspond to Lisp fixnums, but you passed an untyped array.  Lucid
(and many other Lisp implementations) puts some tag bits information in the
low-order two bits of objects; they're ordinarily unused, since all the
types that are accessed through pointers require full-word alignment.
Fixnums have the type tags 00 (positive fixnum) and 11 (negative fixnum);
this has the property that the tagged value is the result of an arithmetic
shift of the untagged value, which allows them to be added without
untagging, and multiplied by shifting the result rather than the arguments.

The arrays you pass to the foreign function must be created with

(make-array 4 :element-type 'fixnum)

>3) What is wrong in my declaration of the foreign function, that make all these things happen?

Nothing.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Xref: sparky comp.lang.lisp:2218 comp.lang.scheme:2026 news.answers:2479
From: saxena@cs.albany.edu (Tushar Saxena)
Subject: Re: run-program in kcl
Summary: I wanted the counterpart of run-program and -load option in kcl
Originator: saxena@tarski.albany.edu
Keywords: run-program, common lisp, kcl, load.
Organization: The University at Albany, Comp. Sci. Dept.
Date: Mon, 17 Aug 1992 17:11:03 GMT



OK, For run-program counterpart in kcl I got the following two functions
to work with :

1] run-process - My version of kcl (1.599) does not support it.

2] exclp - I have not yet checked it.

As far as "system" is concerned, it will surely not work. I need a stream
for input and output. This is not possible with system.

About the -load option, I really need that, but do not know how to do
it. Solve the following problem for me :

I want to have some way of loading some file before I get into kcl.
Note that init.lsp will not work because that will always load the
same file. You can say that I can change the init.lsp file, but I
am calling kcl through another program using rsh, and at various
points in the program, I want different files to be loaded!

If the above makes sense, please reply.

ttfn
	-Tush.

--------------------------------------------------------------------------------
And any fool knows a dog needs a home, A shelter from pigs on the wing.
        -Roger Waters
--------------------------------------------------------------------------------
email : saxena@cs.albany.edu                        Computer Science Department
Phone : 518-442-3388				    SUNY Albany
Tushar Saxena					    Albany NY 12222 (USA)
--------------------------------------------------------------------------------
From: pl140048@academ01.mty.itesm.mx (Leonardo Garrido)
Newsgroups: comp.lang.lisp
Subject: FTP sites for Common Lisp on DOS or UNIX ?
Date: 18 Aug 92 18:08:47 GMT

Hello,

I am looking for FTP sites for Common Lisp on DOS or UNIX .

Please, if you can help me do it. I would appreciate any help !!!
Thank you very much in advance.

Leonardo Garrido-Luna.
E-mail: PL140048@academ01.mty.itesm.mx.

Newsgroups: comp.lang.lisp
From: Jesse
Subject: Correction of [Summary of Church Numeral]
Summary: Church Numeral
Originator: cyen@ponder.csci.unt.edu
Keywords: Church Numeral
Organization: Computer Science Dept .of UNT
Date: Sat, 15 Aug 1992 09:33:56 GMT

Days ago I said when m=zero the mult and expt functions will go wrong.
Maybe because of the evaluation order of ML , these functions cannot be
tested right.

The lambda expression of these two functions are absolutely right.

mult=\m.\n.\f.\x. m (n f) x
expt=\m.\n.\f.\x. m n f x

Besides the substraction function of two Church Numerals is:

sub=\m.\n.n pre m

whereas pre=\n.\f.\x.snd (n (prefn f) (pair x x))
        prefn=\f.\p.pair (f (fst p))(fst p)
        pair=\x.\y.\f.f x y
        fst=\p.p true
        snd=\p.p false
        true=\x.\y.x
        false=\x.\y.y

Sorry for the mistake I made in the last post, please post if you know
any interesting stuff on Church Numeral.

Jesse
Newsgroups: comp.lang.lisp
From: leander@rkw-risc.cs.up.ac.za (Leander Conradie)
Subject: Re: looking information about lambda calculus
Date: 21 Aug 92 18:17:34 GMT
Organization: University of Pretoria, South Africa
Keywords: lambda calculus

ojuarez@mtecv2.mty.itesm.mx (Octavio Juarez Espinosa) writes:



>Hi,

>I'll appreciate if you send me some regerences about lamda calculus for
>beginers.

>Thanks in advanace.

>Sincerely,

>Octavio Juarez Espinosa

>-- 
>Octavio Juarez Espinosa
>Gabriel Valerio 1134 
>Saltillo, Coahuila    CP 25000
>Mexico  email ojuarez@mtecv2.mty.itesm.mx

Try any of the functional programming books, such as Chris Reade's Elements of Functional programming or Field and Harrison's Functional Programming. Both are Addison Wesley titles.

Leander Conradie
----------------->
leander@up.ac.za
From: hall@aplcen.apl.jhu.edu (Marty Hall)
Newsgroups: comp.lang.lisp
Subject: Re: looking information about lambda calculus
Keywords: lambda calculus
Date: 19 Aug 92 14:08:07 GMT
Reply-To: hall@aplcen (Marty Hall)
Organization: AAI Corp AI Lab, JHU P/T CS Faculty

In article <5984@mtecv2.mty.itesm.mx> ojuarez@mtecv2.mty.itesm.mx 
(Octavio Juarez Espinosa) writes:

>I'll appreciate if you send me some regerences about lamda calculus for
>beginers.

Since you posted this in comp.lang.lisp, you may be interested in references
in the context of LISP. If so, take a look at "LISP, Lore, and Logic: An
Algebraic View of LISP Programming, Foundations, and Applications", by
Richard Stark. Springer-Verlag 1990.

					- Marty
(proclaim '(inline skates))
Xref: sparky comp.lang.lisp:2262 comp.lang.clos:681 comp.lang.misc:2746 comp.object:3275 comp.std.misc:106 comp.lang.scheme:2063 comp.ai:3161
From: chyde@pecos.ads.com (Clinton Hyde)
Newsgroups: comp.lang.lisp,comp.lang.clos,comp.lang.misc,comp.object,comp.std.misc,comp.lang.scheme,comp.ai
Subject: Re: Common Lisp is a dpANS in Public Review
Date: 20 Aug 92 19:27:58 GMT
Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415)
	960-7300


this is cool. how about if an electronic copy (which I understand to
be both Tex and DVI versions) gets into an anon-ftp site?

 -- clint
--

Clint Hyde		"Give me a LispM or give me death!" -- anonymous

Advanced Decision Systems	Internet:  chyde@chesapeake.ads.com
2111 Wilson Blvd #800
Arlington, VA 22201		(703) 875-0327
From: chyde@pecos.ads.com (Clinton Hyde)
Newsgroups: comp.lang.lisp
Subject: An Allegro CL question
Date: 19 Aug 92 17:06:06 GMT
Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415)
	960-7300


I want to have a load-only file in my defsystem (actually, I want
several). IOW, I want it to NOT get compiled, just loaded. I haven't
been able to figure out how this can be done (other than significant
hacking to modify/add-on-to the defsystem stuff)

any suggestions?

the obvious one is to have one file get compiled, and it calls load on
the desired load-only files. I would prefer that the defsystem handled
it directly (I remember it doing so on lispms with no trouble).

 -- clint
--

Clint Hyde		"Give me a LispM or give me death!" -- anonymous

Advanced Decision Systems	Internet:  chyde@chesapeake.ads.com
2111 Wilson Blvd #800
Arlington, VA 22201		(703) 875-0327
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Weird lucid behaviour: calling macros inside files at top level
Date: 13 Aug 1992 08:56:51 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com
Keywords: macros, automatic defstructs

In article <1992Aug12.123449.5482@cs.cornell.edu> raman@cs.cornell.edu (T. V. Raman) writes:
>barmar@think.com (Barry Margolin) writes:
>>I suspect your problem is that you aren't assigning the list to the
>>variable at compile time (i.e. with (EVAL-WHEN (COMPILE) ...)), or you're
>>side effecting a constant.
>
>I suspect that the reason is the above. I have never used eval-when
>and in my code I simply have
>
>(defvar *list-of-dimensions* ...)
>
>and some calls at top level in the file that push items on to this
>list using
>(push item *list-of-dimensions*)

The problem is that ordinary forms are executed only when the file is
loaded.  Thus, the PUSH won't happen until then.  However, macros are
expanded by the compiler.  So if you have a macro that expands into a
DEFSTRUCT, and it wants to use a global variable in computing the
expansion, then you must make sure that this variable has been assigned
before the macro is expanded.

You can do this in two ways.  One is to load the file that contains the
DEFVAR and PUSHes before compiling anything that uses the macro.

But if you want to use the macro in the same file as those forms appear,
you have to use EVAL-WHEN to force them to execute during the compilation
of the file.

(eval-when (compile load eval)
  (defvar ...)
  (push ...)
  ...)
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Xref: sparky comp.lang.lisp:2278 comp.lang.clos:689 comp.lang.misc:2755 comp.object:3292 comp.std.misc:109 comp.lang.scheme:2072 comp.ai:3172
From: johnl@iecc.cambridge.ma.us (John R. Levine)
Newsgroups: comp.lang.lisp,comp.lang.clos,comp.lang.misc,comp.object,comp.std.misc,comp.lang.scheme,comp.ai
Subject: Re: Common Lisp is a dpANS in Public Review
Date: 21 Aug 92 16:34:03 GMT
Followup-To: comp.std.misc
Organization: I.E.C.C.

>if one were to [put copies of the Lisp standard on CD-ROM], it should
>probably include beaucoup other ANSI std dox also, for many other prog
>languages ...

ANSI gets most of their revenue from selling their copyrighted standards
documents, which cost about $50 each.  So a CD-ROM with copies of 25
standards would have to cost about $1000 to give them similar revenue.

Everyone agrees that particularly for computer standards it would be
really nice to make them available via FTP, CD-ROM, etc.  But so far
nobody has come up with a plausible way to make up for the lost revenue
that ANSI needs to stay in business.  An advantage of the current system
is that standards are paid for by people who actually use them.

-- 
John R. Levine, IECC, POB 349, Cambridge MA 02238, +1 617 492 3869
johnl@iecc.cambridge.ma.us, {ima|spdcc|world}!iecc!johnl
Re-elect Vice President Potatoe-Head !
Newsgroups: comp.lang.lisp
From: mw@ki.fht-mannheim.de (Marc Wachowitz)
Subject: Re: lisp interpreters
Date: Fri, 14 Aug 92 06:34:07 GMT
Organization: Fachhochschule fuer Technik Mannheim
X-Newsreader: Tin 1.1 PL4

Ben Sharp <marvin@bluemoon.rn.com> wrote:
: can anyone direct me toward low-cost lisp interpreters that i could use on 
: a macintosh se or an ibm xt?
Try XLisp (anonymous ftp is probably sufficiently low cost :-)

You should be able to find it on some SIMTEL mirror near to you, and many
other ftp servers.

-------------------------------------------------------------------------------
Marc Wachowitz, mw@gandalf.ki.fht-mannheim.de, 75742@novell1.rz.fht-mannheim.de
  *  wonder everyday    *    nothing in particular    *    all is special  *
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: "Next-iteration" clause in Loop macro?
Date: 14 Aug 92 07:53:00 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <16eujtINNhma@agate.berkeley.edu> konstan@cs.berkeley.edu (Joe Konstan) writes:
>Is there a clause or macro within loop to cause execution to continue 
>at the next iteration?  

I don't think so.  There's a macro to terminate the entire loop,
LOOP-FINISH.

>			 If not, is adding a label at the start of the 
>loop-body and "go"ing there guaranteed to work--or might that not properly
>execute the loop stepping code (which would mean that I need to instead
>go to the bottom of the loop).  

It's not going to work at all, since you can't put GO tags in loop bodies.
Symbols are treated as LOOP keywords, not tags.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: kend@data.rain.com (Ken Dickey)
Newsgroups: comp.lang.lisp
Subject: Re: looking information about lambda calculus
Keywords: lambda calculus
Date: 19 Aug 92 16:24:13 GMT
Organization: Microtek DSD, Hillsboro, OR

ojuarez@mtecv2.mty.itesm.mx (Octavio Juarez Espinosa) writes:

>I'll appreciate if you send me some regerences about lamda calculus for
>beginers.

I would recommend Michael Gordon's _Programming Language Theory and 
its Implementation_, Prentice Hall, 1988, ISBN 0-13-730417-X.


The classic (although somewhat heavy going) is Barendregt's
_The Lambda Calculus, Its Syntax and Semantics_, North Holland,
1981, ISBN 0-444-87508-5.


-Ken
From: konstan@cs.berkeley.edu (Joe Konstan)
Newsgroups: comp.lang.lisp
Subject: "Next-iteration" clause in Loop macro?
Date: 14 Aug 1992 00:26:37 GMT
Organization: Picasso Research Group, UCB Computer Science Division
Distribution: world
NNTP-Posting-Host: elmer-fudd.cs.berkeley.edu

Is there a clause or macro within loop to cause execution to continue 
at the next iteration?  If not, is adding a label at the start of the 
loop-body and "go"ing there guaranteed to work--or might that not properly
execute the loop stepping code (which would mean that I need to instead
go to the bottom of the loop).  

I've looked back and forth through chapter 26 of CLtL II, and once though 
I'd seen it, but haven't seen it since.

Thanks

Joe Konstan
konstan@cs.berkeley.edu