HDTenEightyP/NetNews huggingface dataset:
From: rharris@rdrc.rpi.edu
Subject: March 92 PCL
Organization: The Ohio State University Department of Computer and Information Science
Date: Wed, 8 Apr 1992 08:50:01 GMT

If you are using March 92 PCL, you should get today's version.
It is faster, has several fewer bugs, has more in the notes.text file,
and includes notes on how to use clue and clio with this PCL.

  Richard Harris
Newsgroups: comp.lang.clos
From: Guy@AVON.sltd.dialnet.symbolics.COM (Guy Footring)
Subject: With-Accessors again
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 13 Apr 1992 16:56:00 GMT

CLtL2 p777 and p861 says:

"The macro with-accessors can be used to establish a lexical environment
in which specified slots are lexically available through their accessors
as if they were variables.  The macro with-accessors invokes the
appropriate accessors to access the specified slots."

However, the syntax of with-accessors doesn't specify slots (except implicitly
by virtue of the accessor presumably reading/writing a slot-value somewhere).

Would the following contrived example (note the complete lack of slots) 
be 'legal' CLOS code?

(defclass A ()
  ())

(defmethod foo ((arg A))
  (format t "~&Calling foo on ~A~%" arg)
  0)

(defmethod (setf foo) (new-value (arg A))
  (format t "~&Calling (setf foo) on ~A with new value ~A~%" arg new-value)
  new-value)

(defun bar ()
  (let ((A (make-instance 'A)))
    (with-accessors ((f foo)) A
      (incf f))))
Newsgroups: comp.lang.clos
From: Gregor@parc.xerox.COM (Gregor Kiczales)
Subject: Re: Attempting to circumvent Symbolics' Reader Method
Organization: The Ohio State University Department of Computer and Information Science
Date: Fri, 10 Apr 1992 16:38:26 GMT

   Date:	Fri, 10 Apr 1992 08:19:14 -0700
   From:	Jeff Dalton <jeff@aiai.edinburgh.ac.uk>

   Is it really the only reason?  It's certainly not the only thing
   SLOT-VALUE is used for.

Yes, I probably overstated this case before.  You aren't the first
person who has caught me on it.  I think the other reasons you mention
are, in and of themselves, good reasons to have SLOT-VALUE in the
language.  All I really wanted to say is that its important for accessor
methods to go through SLOT-VALUE so that methods on
SLOT-VALUE-USING-CLASS will be called.

   You can do an optimization, but don't you have to be able to
   de-optimize if someone later defines an applicable method on
   SLOT-VALUE-USING-CLASS?

This depends on whether you are supporting a development environment or
a delivery environment.  The text in the AMOP tries to help implementors
out by letting them off this hook for delivery environments.  Page 144
says: 

 \item Portable methods on specified generic functions specialized to portable
 metaobject classes must be defined before any instances of those classes (or
 any subclasses) are created, either directly or indirectly by a call to {\bf
 make-instance}.  Methods can be defined after instances are created by {\bf
 allocate-instance} however.  Portable metaobject classes cannot be redefined.

 \begin{ImplNote}
 The purpose of this last restriction is to permit implementations to provide
 performance optimizations by analyzing, at the time the first instance of a
 metaobject class is initialized, what portable methods will be applicable to
 it.  This can make it possible to optimize calls to those specified generic
 functions which would have no applicable portable methods.
 \end{ImplNote}

Newsgroups: comp.lang.clos
From: Laurent.ARditi@taloa.unice.fr (Laurent Arditi)
Subject: redefining keys
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 6 Apr 1992 17:37:37 GMT




	Ok, I'll try this. Thank you

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*                 Laurent Arditi (arditi@taloa.unice.fr)                     * 
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*       "If you're not now, you never were."   SUICIDAL TENDENCIES           *
* "With the lights out it's less dangerous. Here we are now. Entertain us. I *
*  feel stupid and contegious. Here we are now. Entertain us. A mulatto. An  *
*  albino. A mosquito. My libido. Yeaaaa..."    (Kurt Cobain - NIRVANA)      *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
Newsgroups: comp.lang.clos
From: jonl%kuwait@lucid.com (Jon L White)
Subject: Attempting to circumvent Symbolics' Reader Method
Organization: The Ohio State University Department of Computer and Information Science
Date: Sat, 11 Apr 1992 00:19:56 GMT

re: You can do an optimization, but don't you have to be able to
    de-optimize if someone later defines an applicable method on
    SLOT-VALUE-USING-CLASS?

The beauty of Lisp is in "lazy definition" -- that is, you can always
patch things up on the fly by redefining (or, defining for the first
time) even after some optimization has been put into place [perhaps the 
EXPORTations of the package system is one of the very few places where 
this idea is out of place; DEFSTRUCT redefinitions after compilation are 
also questionable.]  For example, "cacheing" sorts of optimizations
merely have to hook into the definer, to clear the cache at definition
time.  In the spirit of Lisp, then, I would say that the answer to your 
question should be "No, you should have to back out of the optimization 
at that time."


It ought to be possible to retract the accessor optimizations whenever
an applicable SLOT-VALUE-USING-CLASS method is added, without an overly
complicated implementation.  I know that this doesn't work in Lucid's 4.0
release, but hey not much of the formal MOP was promised for that release
anyway.  Stay tuned.



-- JonL --
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.clos
Subject: Re: no-applicable-method
Date: 16 Apr 1992 02:47:19 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <odvAqcy00iQQRD=Fo6@andrew.cmu.edu> mh5l+@andrew.cmu.edu (Mohammed M. Hakim) writes:
>Suppose I want to write a no-applicable-method that can be used to
>delegate messages to an object's prototype,  I'll have something that
>looks like this:
>
>(defclass foo () ((prototype)))
>
>(defmethod no-applicable-method ((gf standard-generic-function)
>					&rest args)
>	(let ((prototype (prototype (first args))))
>	   (if prototype
>	        (apply gf prototype (cdr args))
>	        (call-next-method))))
>
>
>This seems to work fine.  However, it blows up when it is used with a
>writer method (setf . .), because for (setf . .) the first argument in
>&rest passed to no-applicable-method is the value of the slot not the
>object instance. Is there a better way to do this. Also, how can I do
>this for multiple qualified arguments?

You can't do it this simply.  As you've noticed, not all generic functions
specialize on the first argument.  CLOS doesn't have the general notion of
"self" in methods; many ideas that make sense in Flavors, Smalltalk, or C++
don't apply to CLOS because of this difference.

A non-object-oriented way to do what you want to do is to have a CASE
statement in your NO-APPLICABLE-METHOD method, to determine the argument
that you should delegate to based on the name of the generic function that
failed.  You could modularize this by creating a separate table mapping
generic function names to argument numbers.

But it might be better to use an OO technique.  Define subclasses of
GENERIC-FUNCTION that delegate on specific arguments, and use this as the
metaclass of the generic functions that you want to be delegated.
Something like:

(defclass delegatable-normal-gf (generic-function))

(defmethod no-applicable-method ((gf delegatable-normal-gf) &rest args)
  (let ((prototype (prototype (first args))))
    (if prototype
	(apply gf prototype (cdr args))
	(call-next-method))))

(defclass delegatable-setf-gf (generic-function))

(defmethod no-applicable-method ((gf delegatable-setf-gf) new-value object)
  (let ((prototype (prototype object)))
    (if prototype
	(apply gf prototype new-value)
	(call-next-method))))

However, this won't work if you're trying to do this to generic functions
that you don't define yourself, since you can't override their metaclasses.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.clos
From: Laurent.ARditi@taloa.unice.fr (Laurent Arditi)
Subject: redefining keys
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 6 Apr 1992 16:19:11 GMT



	Yes, I readed this example in the manual. It works but only in the
	selected Fred-window. I want a function like this but which defines
	the key for all windows, all dialog items... used under MCL.

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*                 Laurent Arditi (arditi@taloa.unice.fr)                     * 
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*       "If you're not now, you never were."   SUICIDAL TENDENCIES           *
* "With the lights out it's less dangerous. Here we are now. Entertain us. I *
*  feel stupid and contegious. Here we are now. Entertain us. A mulatto. An  *
*  albino. A mosquito. My libido. Yeaaaa..."    (Kurt Cobain - NIRVANA)      *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
Newsgroups: comp.lang.clos
From: tk@HUNNY.research.ATt.COM (Thomas Kirk)
Subject: Re: no-applicable-method
Reply-To: tk@research.att.com
Organization: The Ohio State University Department of Computer and Information Science
Date: Thu, 16 Apr 1992 09:05:00 GMT

    From: barmar@think.com (Barry Margolin)
    Sender: commonloops-request@cis.ohio-state.edu
    References: <odvAqcy00iQQRD=Fo6@andrew.cmu.edu>state
    Subject: Re: no-applicable-method

    . . .

    But it might be better to use an OO technique.  Define subclasses of
    GENERIC-FUNCTION that delegate on specific arguments, and use this as the
    metaclass of the generic functions that you want to be delegated.
    Something like:

    (defclass delegatable-normal-gf (generic-function))

    (defmethod no-applicable-method ((gf delegatable-normal-gf) &rest args)
      (let ((prototype (prototype (first args))))
	(if prototype
	    (apply gf prototype (cdr args))
	    (call-next-method))))

    (defclass delegatable-setf-gf (generic-function))

    (defmethod no-applicable-method ((gf delegatable-setf-gf) new-value object)
      (let ((prototype (prototype object)))
	(if prototype
	    (apply gf prototype new-value)
	    (call-next-method))))

    However, this won't work if you're trying to do this to generic functions
    that you don't define yourself, since you can't override their metaclasses.


this will work fine. assuming that you can get at the generic functions,
just change the class of the generic function object, like so:

(defclass delegatable-normal-gf (standard-generic-function)
    ()
  (:metaclass clos:funcallable-standard-class))

(defgeneric frob (thing))

(let ((gf (symbol-function 'frob)))
  (change-class gf (find-class 'delegatable-normal-gf)))

(symbol-function 'frob) ==> #<DELEGATABLE-NORMAL-GF FROB 22011004736>
From: mh5l+@andrew.cmu.edu (Mohammed M. Hakim)
Newsgroups: comp.lang.clos
Subject: no-applicable-method
Date: 16 Apr 92 00:43:20 GMT
Article-I.D.: andrew.odvAqcy00iQQRD=Fo6
Organization: Doctoral student, Civil Engineering, Carnegie Mellon, Pittsburgh, PA


Suppose I want to write a no-applicable-method that can be used to
delegate messages to an object's prototype,  I'll have something that
looks like this:

(defclass foo () ((prototype)))

(defmethod no-applicable-method ((gf standard-generic-function)
					&rest args)
	(let ((prototype (prototype (first args))))
	   (if prototype
	        (apply gf prototype (cdr args))
	        (call-next-method))))


This seems to work fine.  However, it blows up when it is used with a
writer method (setf . .), because for (setf . .) the first argument in
&rest passed to no-applicable-method is the value of the slot not the
object instance. Is there a better way to do this. Also, how can I do
this for multiple qualified arguments?


Maher Hakim
Carnegie Mellon University
From: steven@monu6.cc.monash.edu.au (Steve Stergakis)
Newsgroups: comp.lang.clos
Subject: INFO NEEDED on OOA Methodologies
Date: 8 Apr 92 09:35:58 GMT
Organization: Monash University, Caulfield Campus


NOTE: this message has been posted for persons that either use, teach 
or have some opinion regarding current OOA methodologies being 
used...

THIS MESSAGE HAS BEEN CROSS POSTED TO MANY NEWS GROUPS.  PLEASE 
DISREGARD IT IF HAS BEEN POSTED TO AN INCORRECT AREA.

i am a postgraduate student who is currently studying OOA and 
would greatly appreciate any information regarding experience
you have had with object oriented methodologies

as i am about to write a critical review of the current OO methodologies i 
would appreciate if you could tell me which approach you prefer.. or if
you know of any article that have compared current OOA methods, that would
also be greatly appreciated...

i am especially interested in persons who use such methodologies 
in practice.. their extent of their use in your work area.. 
the type of work you do.... and your opinion!

PLEASE feel free to comment on any of the above questions.. if you do
not wish to relate specific information pertaining to your work /
work environment, then leave it out

NOTE: if possible please reply directly to me 

thanks in advance

+------------------------------------------------------------+
| Steven Stergakis      steven@monu6.monash.cc.edu.au        |
|                                                            |
|                       (Post Graduate)                      |
|                       Faculty of Computing and Information |
|                       Technology                           |
|                                                            |
|                       Monash University - Australia        | 
+------------------------------------------------------------+
Newsgroups: comp.lang.clos
From: kab@cambridge.apple.com (Kim Barrett)
Subject: Re: Attempting to circumvent Symbolics' Reader Method optimization
Organization: The Ohio State University Department of Computer and Information Science
Date: Wed, 8 Apr 1992 00:56:40 GMT

> Date: Tue, 7 Apr 1992 10:38-0500
> From: basham@aio.jsc.nasa.gov (Bryan Basham)
> 
> I have written a piece of code that dependends on the reader methods to call
> SLOT-VALUE.  However, I have discovered that Symbolics' MOP performs an
> optimization (?) that does not call SLOT-VALUE.  I would like to circumvent
> the "empty" creation of Reader Methods and place a real method (that calls
> SLOT-VALUE in its place).

I don't believe there is anything in the specification that requires (or even 
implies) that the methods defined by DEFCLASS actually call SLOT-VALUE, and I 
believe this is intentional, as it permits some significant optimizations.  The 
whole point of the class STANDARD-READER-METHOD is that it permits the 
effective method computation to notice that the only applicable method is one 
whose definition is understood by the implementation, thereby allowing the 
access to be inlined in the effective method or even "hoisted" up into the 
generic function dispatcher.

[Note: While I have a fair amount of experience with implementing CLOS, I have 
no familiarity whatsoever with Symbolics' implementation.  The following 
suggestion should be considered with that caveat in mind.]

The way to circumvent this is to cause your metaclass to not use 
STANDARD-READER-METHOD for these methods, but to instead use some other method 
class that does the appropriate thing for your metaclass.  You might also be 
able to hook into the same protocol as used with STANDARD-READER-METHOD in 
order to implement any optimizations appropriate to your class of accessor 
methods.  Not being a Symbolics wizard, I don't know what generic functions you 
might need to specialize in order to get this effect.  I would probably start 
by looking for a function called something like add-reader-method.

Newsgroups: comp.lang.clos
From: jeff@aiai.edinburgh.ac.uk (Jeff Dalton)
Subject: Re: Attempting to circumvent Symbolics' Reader Method
Organization: The Ohio State University Department of Computer and Information Science
Date: Fri, 10 Apr 1992 15:19:14 GMT

> The idea is that by defining a method on SLOT-VALUE-USING-CLASS you
> should be able to affect all accesses to the slots.  If the
> automatically generated methods don't call SLOT-VALUE this won't work.
> In fact, the only reason I know of for SLOT-VALUE being in the language
> is to support this.  Note that other CLOS-like languages without MOPs
> don't have SLOT-VALUE and seem to get along without it.

Is it really the only reason?  It's certainly not the only thing
SLOT-VALUE is used for.  People who have just learned CLOS often
use SLOT-VALUE almost all the time, because they think it will
be more efficient or because it looks like that's what they're
supposed to do.  But even if we factor out such cases, there are
times when SLOT-VALUE seems like the right thing to use.  For
instance, to do something to all slots one might get a list of
the slot names and then use SLOT-VALUE.  Indeed, how to do this
for structures is one of the most frequent questions about
DEFSTRUCT.

> Its still possible to do the significant optimization, you just have to
> be a little bit more careful.  You must notice both that the only
> applicable method on the reader generic function is one that is
> understood by the implementation and then notice further that the only
> applicable method on SLOT-VALUE-USING-CLASS is one that is known to the
> implementation.  Then you can do the same optimization.

You can do an optimization, but don't you have to be able to
de-optimize if someone later defines an applicable method on
SLOT-VALUE-USING-CLASS?

-- jeff

Newsgroups: comp.lang.clos
From: cer@Franz.COM (Chris Richardson)
Subject: Re: Attempting to circumvent Symbolics' Reader Method optimization
Organization: Franz Inc., Berkeley, CA
Date: Wed, 8 Apr 1992 03:57:59 GMT


In article <9204072351.AA24766@cambridge.apple.com> kab@cambridge.apple.com (Kim Barrett) writes:

   I don't believe there is anything in the specification that requires (or even 
   implies) that the methods defined by DEFCLASS actually call SLOT-VALUE, and I 
   believe this is intentional, as it permits some significant optimizations.  The 
   whole point of the class STANDARD-READER-METHOD is that it permits the 
   effective method computation to notice that the only applicable method is one 
   whose definition is understood by the implementation, thereby allowing the 
   access to be inlined in the effective method or even "hoisted" up into the 
   generic function dispatcher.

Certainly page 777 of cltl2 says that readers and writers are actually
implemented using slot-value and so does page 7-14 of x3j13/92-101.
The implementation can optimize accessors when it knows that the only
applicable methods for slot-value-using-class are the system supplied
methods.

--
-----
Chris Richardson, Franz Inc.	1995 University Avenue, Suite 275         
cer@Franz.COM (internet)	Berkeley, CA  94704                       
uunet!franz!cer (uucp)		Phone: (510) 548-3600; FAX: (510) 548-8253
From: gregor@parc.xerox.com (Gregor Kiczales)
Newsgroups: comp.lang.clos
Subject: Re: With-Accessors again
Date: 15 Apr 92 18:05:44 GMT
Article-I.D.: tracer-b.GREGOR.92Apr15110544
Organization: Xerox Palo Alto Research Center


    From: Guy@AVON.sltd.dialnet.symbolics.COM (Guy Footring)
    Newsgroups: comp.lang.clos
    Subject: With-Accessors again
    Date: 13 Apr 92 16:56:00 GMT

    "The macro with-accessors can be used to establish a lexical environment
    in which specified slots are lexically available through their accessors
    as if they were variables.  The macro with-accessors invokes the
    appropriate accessors to access the specified slots."

I think what is going on here is that, in some sense, the word accessors
should not appear in this passage.  (In this same sense, WITH-ACCESSORS
is misnamed.)  Or maybe it should appear, but it isn't the same as the
technical term that means "automatically generated methods that
read/write slots."  What with-accessors does is translate "lexical
variable syntax" into "calling a simple `accessor' function syntax."

    Would the following contrived example (note the complete lack of slots) 
    be 'legal' CLOS code?

I believe your contrived example is legal code and I would be surprised
if any implementation didn't make it work.
Newsgroups: comp.lang.clos
From: Laurent.ARditi@taloa.unice.fr (Laurent Arditi)
Subject: redefining keys
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 6 Apr 1992 12:17:20 GMT


		I just use MCL 2.01b, I don't know Quickeys.

	But I did a big mistake: it's not Command-keys that I want to
	redefine but Function-keys: the   "___ _" keys.
					    \__


	When I push such keys in MCL, it beeps even if there is a char in my
	font which is associated with the key. (It works into to keyboard
	accessory).


	Thank.


	
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*                 Laurent Arditi (arditi@taloa.unice.fr)                     * 
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*       "If you're not now, you never were."   SUICIDAL TENDENCIES           *
* "With the lights out it's less dangerous. Here we are now. Entertain us. I *
*  feel stupid and contegious. Here we are now. Entertain us. A mulatto. An  *
*  albino. A mosquito. My libido. Yeaaaa..."    (Kurt Cobain - NIRVANA)      *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*