On Wed, Apr 1, 2015 at 4:29 AM, Luc Fabresse <luc.fabresse@gmail.com> wrote:

and the latest repo is:��http://smalltalkhub.com/#!/~CAR/Ghost
but it has not diverged too much from the old one yet.


Luc...something that would be super super cool is to take the proxies I implemented for Marea and adapt them as custom Ghost proxies. Because the idea of Ghost was mostly the design, not the code itself. The code was very very little.�� So in Marea proxies you can see how I:

1) Created a few different proxies for different purposes. For example, I created special proxies for classes and metaclasses. And each of them implements custom messages to avoid unnecessary interception (for example,��MARMetaclassProxy implements #isMeta answering true. Both, proxy for Class and Metaclass implement:

isKindOf: aClass
^ (aClass == Class)��
ifTrue: [ true ]
ifFalse: [ super isKindOf: aClass ��] "would be intercepted"

and so on....

So basically....you are able to implement custom proxies and implement custom messages so that you avoid intercepting them.��

2) In Marea, I have multiple proxies that store the information differently. So for example, Marea proxies needed a graph id and a "position" (an integer). If both were small enough, I was doing a bitShift and storing them in a super compact proxy class that would have only one small integer.��


So....what I want to say is that while ghost code is OK, the most interesting usage and development of those proxies is in Marea, in the category��'Marea-Proxies'. ��

��
#Luc

2015-04-01 8:29 GMT+02:00 stepharo <stepharo@free.fr>:
Mariano spent a couple of years on it so...



Le 31/3/15 21:37, Denis Kudriashov a ��crit��:
Hi
if you want to build proxy look at Ghost library from��Mariano Martinez��
I not know right repository. Maybe this:http://smalltalkhub.com/#!/~CAR/Ghost/��or��http://ss3.gemstone.com/ss/Ghost

2015-03-31 19:51 GMT+03:00 Sean P. DeNigris <sean@clipperadams.com>:
From "Design Patterns" pg. 215:

�� �� You can make[8] generic proxies in Smalltalk by defining classes whose
superclass is nil and defining the doesNotUnderstand: method to handle
messages.

�� �� [8] Almost all classes ultimately have Object as their superclass. Hence
this is the same as saying "defining a class that doesn't have Object as its
superclass."

but in Pharo:
�� �� nil subclass: #MyProxy
�� �� �� �� instanceVariableNames: ''
�� �� �� �� classVariableNames: ''
�� �� �� �� category: ''
-> MessageNotUnderstood: receiver of
"subclass:instanceVariableNames:classVariableNames:category:" is nil



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Proxies-Subclassing-nil-tp4816443.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.







--