[Pharo-users] Re: Picking neighbouring elements

2023-04-30 Thread Bernhard Pieber
Hi Richard, That sounds great. I am looking forward to playing with it. Bernhard > Am 25.04.2023 um 04:11 schrieb Richard O'Keefe : > > There is a much newer version. I've made some minor corrections today. > I really must put it up on github. > Let me get back to you about that. > > On Sat, 22

[Pharo-users] Re: Picking neighbouring elements

2023-04-25 Thread Steffen Märcker
… and after the second block #map

[Pharo-users] Re: Picking neighbouring elements

2023-04-25 Thread Steffen Märcker
Coding in mail is not easy after all. SortedCollection>>greaterThan: contains a silly mistake from editing. At the end it should read:    ^[:y | y = x] dropWhileTrue   <~ [:i | self at: i]   <~ (index to: self size)

[Pharo-users] Re: Picking neighbouring elements

2023-04-25 Thread Steffen Märcker
Dear Richard, that would be nice. Your answers certainly made me curious about your Smalltalk. :-D Regarding strict supremum/infimum, I think that transducers do not lend themselves naturally to the complete problem. How did you solve it in your library? Out of curiosity, I came up with th

[Pharo-users] Re: Picking neighbouring elements

2023-04-24 Thread Richard O'Keefe
There is a much newer version. I've made some minor corrections today. I really must put it up on github. Let me get back to you about that. On Sat, 22 Apr 2023 at 18:57, Bernhard Pieber wrote: > Hi Richard, > > I really liked your concise description about what is the point of using > an objec

[Pharo-users] Re: Picking neighbouring elements

2023-04-21 Thread Bernhard Pieber
Hi Richard, I really liked your concise description about what is the point of using an object-oriented language. It made my day. I searched the Web for your Smalltalk library and found this link: http://www.cs.otago.ac.nz/staffpriv/ok/astc-1711.tar.gz Is there a newer version available somewhe

[Pharo-users] Re: Picking neighbouring elements

2023-04-21 Thread Richard O'Keefe
I'm sorry, it appears that I failed to explain the question well enough. I thought I'd explained earlier. successor: target ^(self select: [:each | target < each]) min is trivial. What's wrong with it is that it allocates an intermediate collection and takes two passes. FIXING that is is also

[Pharo-users] Re: Picking neighbouring elements

2023-04-21 Thread Steffen Märcker
Hi Richard, Now that's much clearer to me: min{y | y in c . y > x} "strict supremum" max{y | y in c . y < x} "strict infimum" For the general case of a sequence (not sorted) of elements we can do strictSupremumOf: x in: sequence ^(sequence transduce f

[Pharo-users] Re: Picking neighbouring elements

2023-04-20 Thread Richard O'Keefe
successor of x in c = the smallest element of c that is larger than x min {y | y in c . y > x} predecessor of x in c = the largest element of c that is smaller than x max {y | y in c . y < x} On Thu, 20 Apr 2023 at 21:08, Steffen Märcker wrote: > Dear Richard, > > thanks for that additional pi

[Pharo-users] Re: Picking neighbouring elements

2023-04-20 Thread Steffen Märcker
Dear Richard, thanks for that additional piece. I'll put insert- on my list of possible variants. I think we come back to naming after the initial port is done and everyone can play with it. Generally, I made the observation to better be careful with names since it's too easy to alienate other o