[Pharo-users] Re: is there a better way

2021-01-02 Thread Richard O'Keefe
What do you want the code to do? Have you profiled the code to see where the time is going? A quick look at the code shows - Paintings does one web get - each Painting does two more web gets ! and the first of those seems to be pretty pointless, as it refetches an object that Paintings a

[Pharo-users] Re: Can a class be not equal to itself?

2021-01-02 Thread ducasse
Hi konrad in fact I introduced postCopy/copy long time ago and did not get the force to clean the deepCopy and veryDeepInner mess. This is something that one day we will have to do. S > On 2 Jan 2021, at 12:17, Konrad Hinsen wrote: > > "Richard O'Keefe" writes: > >> Well, when you talk abo

[Pharo-users] is there a better way

2021-01-02 Thread Roelof Wobben via Pharo-users
Hello, I have now this code : https://github.com/RoelofWobben/Rijksmuseam but it seems to be slow. Can anyone help me with a way I can use a sort of cache so the page looks first at the cache if a image is there . If so, take the image from there , if not , ask the api for the url of the imag

[Pharo-users] Re: Can a class be not equal to itself?

2021-01-02 Thread Konrad Hinsen
"Richard O'Keefe" writes: > Well, when you talk about "THE copying machinery" you have to be a bit more > specific. There is no such thing as #deepCopy or #shallowCopy in the ANSI > Smalltalk standard. Many Smalltalks have I am referring only to Pharo, which is the only Smalltalk I have ever u

[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2021-01-02 Thread Roelof Wobben via Pharo-users
oke, im haskell  I see how things are working but pharo is not smalltalk. So how do you see this in smalltalk. Roelof Op 23-12-2020 om 01:29 schreef Richard O'Keefe: Yes, there is a better

[Pharo-users] Re: Can a class be not equal to itself?

2021-01-02 Thread ducasse
Hi Richard Indeed you are correct. We should continue to use and specialize postCopy. deepCopy and its friends such as veryDeepInnerInner …. do not smell good. Ideally I would like to remove all deepCopy and have a deepCopier that has a clear protocol and ask the objects. So may be at the end w