Add external package to metacello using versionner

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Add external package to metacello using versionner

NorbertHartl
I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration. If I add the package via versionner the package is added but without repository information. That fails on loading?

How to do? Bug?

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

Sean P. DeNigris
Administrator
NorbertHartl wrote
I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration
The more religious MetaC practitioners will tell you never to to this and to just make a configuration yourself ;) I've found this can be overkill in simple cases.

IIRC you can add a repository to the spec for just that package i.e. something like:
  spec package: 'Neo-Caching' with: [ spec repository: ...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

Sven Van Caekenberghe-2
In reply to this post by NorbertHartl
Hi Norbert,

Neo-Caching was an experiment, a proof of concept, it has been integrated in Pharo.
See category 'System-Caching', the hierarchy AbstractCache, LRUCache and TTLCache.

HTH,

Sven

On 28 Jul 2014, at 13:48, Norbert Hartl <[hidden email]> wrote:

> I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration. If I add the package via versionner the package is added but without repository information. That fails on loading?
>
> How to do? Bug?
>
> Norbert


Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

NorbertHartl
In reply to this post by Sean P. DeNigris

Am 28.07.2014 um 14:17 schrieb Sean P. DeNigris <[hidden email]>:

> NorbertHartl wrote
>> I try to give Neo-Caching a shot in a project of mine. Neo-Caching does
>> not have a metacello configuration
>
> The more religious MetaC practitioners will tell you never to to this and to
> just make a configuration yourself ;) I've found this can be overkill in
> simple cases.
>
Hell, yes! I'm not sure a configuration is a good thing if the configuration has twice as much code as the package it makes loadable. Oh, wait a second…skip that…I'm absolutely sure it is not a good thing!

> IIRC you can add a repository to the spec for just that package i.e.
> something like:
>  spec package: 'Neo-Caching' with: [ spec repository: …
>
I did that, thanks. I just wanted to know if there is a possibility doing it with versionner.

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

NorbertHartl
In reply to this post by Sven Van Caekenberghe-2

Am 28.07.2014 um 14:19 schrieb Sven Van Caekenberghe <[hidden email]>:

> Hi Norbert,
>
> Neo-Caching was an experiment, a proof of concept, it has been integrated in Pharo.
> See category 'System-Caching', the hierarchy AbstractCache, LRUCache and TTLCache.
>
Ah, good to know, thanks. That's even better because it seems to be in pharo3.

Regarding the TTLCache: If I want obsolete keys to vanish as early as possible the best way might be to have a thread that calls #removeStaleValues periodically, right?

Norbert

> HTH,
>
> Sven
>
> On 28 Jul 2014, at 13:48, Norbert Hartl <[hidden email]> wrote:
>
>> I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration. If I add the package via versionner the package is added but without repository information. That fails on loading?
>>
>> How to do? Bug?
>>
>> Norbert
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

Sven Van Caekenberghe-2

On 28 Jul 2014, at 14:59, Norbert Hartl <[hidden email]> wrote:

>
> Am 28.07.2014 um 14:19 schrieb Sven Van Caekenberghe <[hidden email]>:
>
>> Hi Norbert,
>>
>> Neo-Caching was an experiment, a proof of concept, it has been integrated in Pharo.
>> See category 'System-Caching', the hierarchy AbstractCache, LRUCache and TTLCache.
>>
> Ah, good to know, thanks. That's even better because it seems to be in pharo3.
>
> Regarding the TTLCache: If I want obsolete keys to vanish as early as possible the best way might be to have a thread that calls #removeStaleValues periodically, right?

Yes, that is correct. But I would not overdo it, there is a real cost to this operation (scanning everything). In general I think it is better to amortise the cost over multiple operations.

> Norbert
>
>> HTH,
>>
>> Sven
>>
>> On 28 Jul 2014, at 13:48, Norbert Hartl <[hidden email]> wrote:
>>
>>> I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration. If I add the package via versionner the package is added but without repository information. That fails on loading?
>>>
>>> How to do? Bug?
>>>
>>> Norbert
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Add external package to metacello using versionner

NorbertHartl

Am 28.07.2014 um 15:14 schrieb Sven Van Caekenberghe <[hidden email]>:


On 28 Jul 2014, at 14:59, Norbert Hartl <[hidden email]> wrote:


Am 28.07.2014 um 14:19 schrieb Sven Van Caekenberghe <[hidden email]>:

Hi Norbert,

Neo-Caching was an experiment, a proof of concept, it has been integrated in Pharo.
See category 'System-Caching', the hierarchy AbstractCache, LRUCache and TTLCache.

Ah, good to know, thanks. That's even better because it seems to be in pharo3. 

Regarding the TTLCache: If I want obsolete keys to vanish as early as possible the best way might be to have a thread that calls #removeStaleValues periodically, right?

Yes, that is correct. But I would not overdo it, there is a real cost to this operation (scanning everything). In general I think it is better to amortise the cost over multiple operations.

Sure. The reason to do is to remove the strong reference to the object. But it is just a test and I might not need it. Thanks!

norbert


Norbert

HTH,

Sven

On 28 Jul 2014, at 13:48, Norbert Hartl <[hidden email]> wrote:

I try to give Neo-Caching a shot in a project of mine. Neo-Caching does not have a metacello configuration. If I add the package via versionner the package is added but without repository information. That fails on loading?

How to do? Bug?

Norbert