On Tue, Nov 4, 2014 at 4:56 PM, Luc Fabresse <luc.fabresse@gmail.com> wrote:
Hi Phil,

Ok I missed the details so I've just refreshed my mind.

yes the latest repository is this one: ��http://www.smalltalkhub.com/#!/~CAR/Ghost/
I've just tried in Pharo 3.0 and it works now (yes oups I forgot that it was for Pharo 2.0 ;-)).
Ghost is really small so I've just fixed it

Thanks a lot!
��

Try it: ConfigurationOfGhost load��
Tests are green for me.

I loaded the configuration:

Gofer it
smalltalkhubUser: 'CAR' project: 'Ghost';
package: 'ConfigurationOfGhost';
load.
(#ConfigurationOfGhost asClass project version: #stable) load.

Tests are all green.


No I did not push the config in the right place to have it in the ConfigurationBrowser.

I've put it in the Metarepo for 3.0
��

You can find infos+examples on how to achieve Method wrapper in Mariano's PhD (p116) using Proxies for Methods.


I didn't had that one, thanks!��

and also look at the test case method named #testSimpleForwardingForMethodUsingBecome

Yes, seen that.
��

Cheers,

Much appreciated! Ghost is quite nice and useful. Could do with some more class comments as there is none. I'll try to put in some as I use it.

Phil��

Luc

2014-11-04 15:48 GMT+01:00 phil@highoctane.be <phil@highoctane.be>:

On Tue, Nov 4, 2014 at 2:09 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:

The language you are thinking of is most probably PHANtom:��http://pleiad.cl/phantom But (as author of the language) I think it is overkill to use it for just a memoization cache. Idem for AspectS (I don���t know if it works on Pharo though). Right now, I would use MethodWrappers instead, and when Reflectivity is working use that.

On Nov 4, 2014, at 1:50 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:

Hi

There is AspectS package at old squeaksource site. I not know is it working in Pharo.
And there was presentation at Esug few years ago about another implementation of aspects in Pharo ( i not remember project name)

04 ��������. 2014 ��. 9:04 ������������������������ "phil@highoctane.be" <phil@highoctane.be> ��������������:


Le 3 nov. 2014 22:13, "Hilaire" <hilaire@drgeo.eu> a ��crit :
>
> What's wrong with?
>
> myData
> ��^ data ifNil: [data := self computeMe]

That I do have a lot of places like this and do not want these data littering the code.

Aspects would solve this but we do not have that.

Also I need the mechanism to be removable.

So, I read something about MethodWrapper, ghost, slots... Can't one use any of these things to do this memoization cleanly?

Phil

>
>
>
> Le 03/11/2014 16:10, phil@highoctane.be a ��crit :
> > How can I do memoization in Pharo?
> >
> > I mean, a generic mechanism that will help me wrap the caching around
> > the method invocations / messages.
> >
> > I have expensive calls that do not have to refresh their results as
> > often as they are called.
> >
> > TIA
> > Phil
>
>
> --
> Dr. Geo - http://drgeo.eu
> iStoa - http://istoa.drgeo.eu
>
>
>




---> Save our in-boxes!��http://emailcharter.org <---

Johan Fabry �� - ����http://pleiad.cl/~jfabry
PLEIAD lab ��- ��Computer Science��Department (DCC) ��- ��University of Chile