LRUCache to Balloon?

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

Re: LRUCache to Balloon?

Nicolas Cellier
No, I don't think it's that rubbish. The categories are primarily for helping the user to classify/find things.
So that would mean that packages have to divorce from categories, like the Pharo team did.
I don't know, maybe it is necessary for proper packaging, but it's far from simple...

Maybe the kind of solution you are seeking is to split packages one level further like Pharo did.
This way you can load only some kernel collections.


2013/11/22 Frank Shearar <[hidden email]>
On 22 Nov 2013, at 16:59, Chris Muller <[hidden email]> wrote:

> You said there are already two places where it's used, right?  If
> there's even just ONE MORE place that pops up, we'll find that clearly
> Balloon (WTH?) is the wrong place for it.
>
>   http://www.codinghorror.com/blog/2013/07/rule-of-three.html
>
> I think you should stay consistent in your statements about
> "modularity."  It wraps a Dictionary, it supplies #at: for access.
> You said if it walks and quacks like a collection, it goes in
> Collections.

No, I said that was a rubbish reason for grouping things together :)

frank

> On Fri, Nov 22, 2013 at 4:58 AM, Frank Shearar <[hidden email]> wrote:
>> On 22 November 2013 10:09, Tobias Pape <[hidden email]> wrote:
>>> On 22.11.2013, at 11:04, Frank Shearar <[hidden email]> wrote:
>>>
>>>> On 22 November 2013 01:03, David T. Lewis <[hidden email]> wrote:
>>>>> On Fri, Nov 22, 2013 at 01:31:37AM +0100, Levente Uzonyi wrote:
>>>>>> On Thu, 21 Nov 2013, Chris Muller wrote:
>>>>>>>
>>>>>>> On Thu, Nov 21, 2013 at 4:51 PM, Frank Shearar <[hidden email]>
>>>>>>> wrote:
>>>>>>>> I'm sorely tempted to move LRUCache to Balloon. It's in System at the
>>>>>>>> moment, making Balloon depend on System.
>>>>>>
>>>>>>> LRUCache is generic, so how about Collections?
>>>>>>
>>>>>> It's generic, but the implementation is not generally useful.
>>>>>>
>>>>>
>>>>> I don't see how the concept of a LRU cache is in any way related to Balloon.
>>>>> It seems to me that if it is useful enough to be included in the system at
>>>>> all, then it should live in a package category that reflects the actual meaning
>>>>> of the class.
>>>>>
>>>>> Suppose for the sake of argument that Balloon was being maintained as an
>>>>> external package outside of the trunk image. Suppose also that an LRU cache
>>>>> was something worth having in the trunk. What package would you put it in?
>>>>
>>>> I would put it in its own package, called Cache. I anticipate heated
>>>> discussion around yet another package with a single class.
>>>>
>>>> But really, LRUCache is _not_ generic, because _noone uses it_.
>>>
>>> Yea, that's why Seaside implements its own…
>>>
>>> </sarcasm> <!-- sorry -->
>>
>> Meh. The fundamental problem I'm trying to address is to tease these
>> packages apart. If I make deliberate mistakes, and put LRUCache in
>> Balloon only because that's the most basic user and doesn't add any
>> additional dependencies, _that is a win_. It's one slightly less
>> horrible dependency.
>>
>> If someone else takes umbrage at such a ridiculous idea, and makes a
>> new package, or puts it in Collections, _and doesn't add a new
>> ridiculous dependency_, then that's even better.
>>
>> No, LRUCache doesn't belong in Balloons. It may well be generally
>> useful. But moving it there fixes a real problem. What I don't want is
>> to be paralysed with discussions like "but this is not theoretically
>> perfect!".
>>
>> frank
>>
>>> Best
>>>        -Tobias
>>>
>>>
>>>
>>
>




Reply | Threaded
Open this post in threaded view
|

Re: LRUCache to Balloon?

Nicolas Cellier
In reply to this post by David T. Lewis
Oups, I should have read all the answers before responding...


2013/11/22 David T. Lewis <[hidden email]>
> On 22 Nov 2013, at 16:58, Chris Muller <[hidden email]> wrote:
>
>>> Yes, you are right there.
>>> I would think, spinning of a new, small package would be a good
>>> compromise?
>>
>> For THREE METHODS?  My God, PLEASE, no!
>
> Bingo! :) But seriously, why do you even care about the number of
packages in the image?
>

Because package categories exist for the benefit of human beings who want
to be able to read and understand the system.

Dave






Reply | Threaded
Open this post in threaded view
|

Re: LRUCache to Balloon?

Frank Shearar-3
In reply to this post by Chris Muller-4
On 22 November 2013 19:43, Chris Muller <[hidden email]> wrote:
>
>> > You said there are already two places where it's used, right?  If
>> > there's even just ONE MORE place that pops up, we'll find that clearly
>> > Balloon (WTH?) is the wrong place for it.
>> >
>> >   http://www.codinghorror.com/blog/2013/07/rule-of-three.html

Three strikes & refactor is a great rule. And I'm happy for someone 6
months from now to go "what the hell, why did Frank put LRUCache into
Balloon. It has the obviously right place <here>." But we've now
expended more effort between 3+ people than would have taken for me to
put LRUCache into Balloon AND pay for inventing the right place AND
still have time left over for beer.

>> > I think you should stay consistent in your statements about
>> > "modularity."  It wraps a Dictionary, it supplies #at: for access.
>> > You said if it walks and quacks like a collection, it goes in
>> > Collections.
>>
>> No, I said that was a rubbish reason for grouping things together :)
>
>
> What then?  A separate package for every kind of Collection?

I think we're both guilty of strawmanning each other :) No, of course
not. Having each class in a separate package ruins the point of a
package. I mean, it _packages_, so a package must _group_.

For Collections, I want to push all the collections that Kernel uses -
OrderedCollection, Array, ... - into Kernel. For any that are left, I
don't particularly care, as long as they don't cause unnecessary
coupling between packages. That shouldn't be a problem for
Collections, except that Collections depends on System.

But back to the point: LRUCache clearly doesn't belong to System.
There's no obviously right place for it in any of the other packages.

So we have a class that doesn't really belong to any other package.
It's only used by Balloon and Morphic (and Morphic depends on
Balloon). So we can
* put LRUCache in Collections and hold our noses, or
* put LRUCache in Balloon and hold our noses, or
* put LRUCache in its own package, Caches, and hold our noses.

frank

Reply | Threaded
Open this post in threaded view
|

Re: LRUCache to Balloon?

Chris Muller-4
Hi Frank, thanks for hanging in there -- this stuff sometimes requires patience to work through!
 
>> > I think you should stay consistent in your statements about
>> > "modularity."  It wraps a Dictionary, it supplies #at: for access.
>> > You said if it walks and quacks like a collection, it goes in
>> > Collections.
>>
>> No, I said that was a rubbish reason for grouping things together :)
>
>
> What then?  A separate package for every kind of Collection?

I think we're both guilty of strawmanning each other :) No, of course
not. Having each class in a separate package ruins the point of a
package. I mean, it _packages_, so a package must _group_.

Frank, I'm not posing strawman arguments, at least not intentionally.  The only thing you left me to work with was that organization along a particular semantic was "rubbish".  I don't know how to make forward progress knowing only what you _don't_ like.  Please tell me what you _like_.  So I was just trying to ask, if not that, WHAT, should it be?  Then way we can rave and critique about a particular vision, and move on it, or not.
 

For Collections, I want to push all the collections that Kernel uses -
OrderedCollection, Array, ... - into Kernel. For any that are left, I

Awesome, I agree with that!  I think we'll also need Set and Dictionary (and their superclasses, of course).  It doesn't bother me to have Collection defined in Kernel, and I think there's no choice.

don't particularly care, as long as they don't cause unnecessary
coupling between packages. That shouldn't be a problem for
Collections, except that Collections depends on System.

But back to the point: LRUCache clearly doesn't belong to System.
There's no obviously right place for it in any of the other packages.

So we have a class that doesn't really belong to any other package.
It's only used by Balloon and Morphic (and Morphic depends on
Balloon). So we can
* put LRUCache in Collections and hold our noses, or
* put LRUCache in Balloon and hold our noses, or
* put LRUCache in its own package, Caches, and hold our noses.

For me, it's always seemed obvious.  The only raves/critiques in the whole thread I can find [1] related to putting it in Collections seem to amount to it not being useful enough, and yours that, viscerally, it doesn't feel right (which I don't understand).

But based on these facts --

  - we have currently 2 users where merely 3 we agree to consider "useful"?
  - we have the option to integrate Seasides more-useful LRU Cache, which has just 7 methods instead of 3, would put us at 3 users.
  - the idea that LRU Cache is a "holder of objects" with #at: access.  No need to hold my nose.

That's why I support your option 1, Collections.  I think it's the best fit both semantically and pragmatically.  Note based on our plans, Kernel is an option too.  But I still prefer Collections.

I totally respect the will of the community if you prefer a different package.  I only implore we do not create a separate package for something we're all saying has little value.

Thanks,
  Chris

[1] --
    1) > It's generic, but the implementation is not generally useful.
    2) > But really, LRUCache is _not_ generic, because _noone uses it_.
    3) > Yea, that's why Seaside implements its own…  </sarcasm> <!-- sorry -->
    4) > If someone else [...] makes a new package, or puts it in Collections, _and doesn't add a new
ridiculous dependency_, then that's even better.
    5) > the fact that Seaside needs an LRUCache shows that the _concept_ of an LRUCache is needed in at least 3 places.
    6) > put LRUCache in Collections and hold our noses




frank



Reply | Threaded
Open this post in threaded view
|

Re: LRUCache to Balloon?

Frank Shearar-3
On 23 November 2013 21:58, Chris Muller <[hidden email]> wrote:

> Hi Frank, thanks for hanging in there -- this stuff sometimes requires
> patience to work through!
>
>>
>> >> > I think you should stay consistent in your statements about
>> >> > "modularity."  It wraps a Dictionary, it supplies #at: for access.
>> >> > You said if it walks and quacks like a collection, it goes in
>> >> > Collections.
>> >>
>> >> No, I said that was a rubbish reason for grouping things together :)
>> >
>> >
>> > What then?  A separate package for every kind of Collection?
>>
>> I think we're both guilty of strawmanning each other :) No, of course
>> not. Having each class in a separate package ruins the point of a
>> package. I mean, it _packages_, so a package must _group_.
>
> Frank, I'm not posing strawman arguments, at least not intentionally.

I didn't mean the arguments :) I meant "Chris is the guy who hates
small packages" and "Frank is the guy who just wants to rip everything
apart".

>  The
> only thing you left me to work with was that organization along a particular
> semantic was "rubbish".  I don't know how to make forward progress knowing
> only what you _don't_ like.  Please tell me what you _like_.  So I was just
> trying to ask, if not that, WHAT, should it be?  Then way we can rave and
> critique about a particular vision, and move on it, or not.

I don't think that grouping collections together _just because_
they're collections isn't useful. I might invent some highly specific
kind of collection suitable only for my needs: that should _not_
belong in Collections.

>> For Collections, I want to push all the collections that Kernel uses -
>> OrderedCollection, Array, ... - into Kernel. For any that are left, I
>
>
> Awesome, I agree with that!  I think we'll also need Set and Dictionary (and
> their superclasses, of course).  It doesn't bother me to have Collection
> defined in Kernel, and I think there's no choice.

OK, cool. This is the approach I think we should use - a package
should serve a particular _function_. Just like a method or a class, a
package should try to do just one thing. It's just that that one
thing's at a larger scale. System (my favourite!) does _many_
large-scale things, which often aren't related other than being
"infrastructure". Kernel ought to do one thing - "the smallest
foundation on which we can build". ToolBuilder does one thing -
provide a means for us to define UI elements.

>> don't particularly care, as long as they don't cause unnecessary
>> coupling between packages. That shouldn't be a problem for
>> Collections, except that Collections depends on System.
>>
>> But back to the point: LRUCache clearly doesn't belong to System.
>> There's no obviously right place for it in any of the other packages.
>>
>>
>> So we have a class that doesn't really belong to any other package.
>> It's only used by Balloon and Morphic (and Morphic depends on
>> Balloon). So we can
>> * put LRUCache in Collections and hold our noses, or
>> * put LRUCache in Balloon and hold our noses, or
>> * put LRUCache in its own package, Caches, and hold our noses.
>
>
> For me, it's always seemed obvious.  The only raves/critiques in the whole
> thread I can find [1] related to putting it in Collections seem to amount to
> it not being useful enough, and yours that, viscerally, it doesn't feel
> right (which I don't understand).
>
> But based on these facts --
>
>   - we have currently 2 users where merely 3 we agree to consider "useful"?
>   - we have the option to integrate Seasides more-useful LRU Cache, which
> has just 7 methods instead of 3, would put us at 3 users.
>   - the idea that LRU Cache is a "holder of objects" with #at: access.  No
> need to hold my nose.
>
> That's why I support your option 1, Collections.  I think it's the best fit
> both semantically and pragmatically.  Note based on our plans, Kernel is an
> option too.  But I still prefer Collections.

OK, I can live with it going into Collections. I don't think all of
Collections will/should go into Kernel, so the "4.6 Collections" will
be "Collection-y stuff that Kernel doesn't use".

> I totally respect the will of the community if you prefer a different
> package.  I only implore we do not create a separate package for something
> we're all saying has little value.

I can agree with that last point. If it has so little value, why
should it get an entire package all to itself?

frank

> Thanks,
>   Chris
>
> [1] --
>     1) > It's generic, but the implementation is not generally useful.
>     2) > But really, LRUCache is _not_ generic, because _noone uses it_.
>     3) > Yea, that's why Seaside implements its own…  </sarcasm> <!-- sorry
> -->
>     4) > If someone else [...] makes a new package, or puts it in
> Collections, _and doesn't add a new
> ridiculous dependency_, then that's even better.
>     5) > the fact that Seaside needs an LRUCache shows that the _concept_ of
> an LRUCache is needed in at least 3 places.
>     6) > put LRUCache in Collections and hold our noses
>
>
>
>>
>> frank
>
>

12