Opportunity to steal good ideas from dad ;)
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192 ----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around. About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
--
On 21 May 2015, at 15:01, phil@highoctane.be wrote:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com <mailto:sean@clipperadams.com>> wrote: Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192 <http://wiki.squeak.org/squeak/6192>
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison <http://en.wikipedia.org/wiki/Three-way_comparison>
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... <http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm...> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
--
56 <=> 43 --> -1 "abcd" <=> "defgh" --> +1 Just get a numerical result out of it. Phil On Thu, May 21, 2015 at 4:22 PM, Max Leske <maxleske@gmail.com> wrote:
On 21 May 2015, at 15:01, phil@highoctane.be wrote:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
--
On 21 May 2015, at 16:31, phil@highoctane.be wrote:
56 <=> 43 --> -1
"abcd" <=> "defgh" --> +1
I said âobject orientedâ⦠:p
Just get a numerical result out of it.
Phil
On Thu, May 21, 2015 at 4:22 PM, Max Leske <maxleske@gmail.com <mailto:maxleske@gmail.com>> wrote:
On 21 May 2015, at 15:01, phil@highoctane.be <mailto:phil@highoctane.be> wrote:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com <mailto:sean@clipperadams.com>> wrote: Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192 <http://wiki.squeak.org/squeak/6192>
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison <http://en.wikipedia.org/wiki/Three-way_comparison>
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... <http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm...> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com <http://nabble.com/>.
--
On Thu, May 21, 2015 at 4:39 PM, Max Leske <maxleske@gmail.com> wrote:
On 21 May 2015, at 16:31, phil@highoctane.be wrote:
56 <=> 43 --> -1
"abcd" <=> "defgh" --> +1
I said âobject orientedâ⦠:p
Bah, let's got with lots of ifTrue:ifFalse: ... Hopefully, a kind soul will iterate on this and make it OO :-) Object>><=> anObject self flag: #TODO. "Return nil if they are not comparable" ^[:a :b | a > b ifTrue: [ 1 ] ifFalse: [ a < b ifTrue: [ -1 ] ifFalse: [ 0 ] ] ] value: self value: anObject 10 <=> 20. 'abc' <=> 'def'. Phil
Just get a numerical result out of it.
Phil
On Thu, May 21, 2015 at 4:22 PM, Max Leske <maxleske@gmail.com> wrote:
On 21 May 2015, at 15:01, phil@highoctane.be wrote:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com <http://nabble.com/>.
--
The elegant API for multi-level sorting is more important (and orthogonal to this weird operator, there is already String>>#compare:)
On 21 May 2015, at 16:22, Max Leske <maxleske@gmail.com> wrote:
On 21 May 2015, at 15:01, phil@highoctane.be wrote:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote: Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
Phil
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
--
On 21 May 2015 at 16:22, Max Leske <maxleske@gmail.com> wrote:
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
How would you make this âobject orientedâ? Have three singleton objects âLessâ, âGreaterâ, âEqualâ (similar to âTrueâ, "Falseâ), and on those object methods âifLess:â, âifEqual:â, âifGreater:â?
In http://mc.lukas-renggli.ch/container/ Lukas defined a hierarchy of comparator classes which answer messages like equals: X to: Y less: X than: Y maximum: anIterable etc. -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
2015-05-21 10:01 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions I use them extensively. Esteban A. Maringolo
On 21 May 2015, at 16:50, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2015-05-21 10:01 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions
I use them extensively.
Esteban A. Maringolo
Cool !!!
On 21 May 2015, at 16:50, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2015-05-21 10:01 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions
I use them extensively.
Esteban A. Maringolo
I had a look. Apart from the fact that for some reason, the extensions on MAElement are in the Core package, hence loading just Core gave errors, things looked OK. This is generally useful, small and a very good example of super cool OO design. I would vote to integrate this (<=> and all). Sven
Thinking of the <=> operator, this can be useful for things like this: dataset := #(1 3 4 5 7 8 5 2 3 0). mean := dataset average. dataset collect: [ :each | mean <=> each ] --> #(1 1 -1 -1 -1 -1 -1 1 1 1) This we can also do with coll := #(1 3 4 5 7 8 5 2 3 0). mean := coll average. coll collect: [ :each | (mean - each) sign ] but still. Other use cases for <=> ? Phil On Fri, May 22, 2015 at 11:43 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 21 May 2015, at 16:50, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
2015-05-21 10:01 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <
sean@clipperadams.com>
wrote:
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions
I use them extensively.
Esteban A. Maringolo
I had a look.
Apart from the fact that for some reason, the extensions on MAElement are in the Core package, hence loading just Core gave errors, things looked OK.
This is generally useful, small and a very good example of super cool OO design.
I would vote to integrate this (<=> and all).
Sven
What is <=> because I found it quite not intention revealing. Le 22/5/15 11:19, phil@highoctane.be a écrit :
Thinking of the <=> operator, this can be useful for things like this:
dataset := #(1 3 4 5 7 8 5 2 3 0). mean := dataset average. dataset collect: [ :each | mean <=> each ]
--> #(1 1 -1 -1 -1 -1 -1 1 1 1)
This we can also do with
coll := #(1 3 4 5 7 8 5 2 3 0). mean := coll average. coll collect: [ :each | (mean - each) sign ]
but still.
Other use cases for <=> ?
Phil
On Fri, May 22, 2015 at 11:43 AM, Sven Van Caekenberghe <sven@stfx.eu <mailto:sven@stfx.eu>> wrote:
> On 21 May 2015, at 16:50, Esteban A. Maringolo <emaringolo@gmail.com <mailto:emaringolo@gmail.com>> wrote: > > 2015-05-21 10:01 GMT-03:00 phil@highoctane.be <mailto:phil@highoctane.be> <phil@highoctane.be <mailto:phil@highoctane.be>>: >> >> >> On Thu, May 21, 2015 at 2:19 PM, Sean P. DeNigris <sean@clipperadams.com <mailto:sean@clipperadams.com>> >> wrote: >>> >>> Squeak 4.6 "Spur" Release Notes >>> http://wiki.squeak.org/squeak/6192 >> >> >> Tag sort functions looks great to have around. >> >> About the spaceship operator (<=>), is this something we'd like to have >> around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison > > http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions <http://www.smalltalkhub.com/#%21/%7Eemaringolo/SortFunctions> > > I use them extensively. > > Esteban A. Maringolo
I had a look.
Apart from the fact that for some reason, the extensions on MAElement are in the Core package, hence loading just Core gave errors, things looked OK.
This is generally useful, small and a very good example of super cool OO design.
I would vote to integrate this (<=> and all).
Sven
2015-05-22 6:43 GMT-03:00 Sven Van Caekenberghe <sven@stfx.eu>:
On 21 May 2015, at 16:50, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions I use them extensively.
I had a look.
Apart from the fact that for some reason, the extensions on MAElement are in the Core package, hence loading just Core gave errors, things looked OK.
This is generally useful, small and a very good example of super cool OO design.
I would vote to integrate this (<=> and all).
For some reason the extensions of MAElementDescription where both in SortFunctions-Core and SortFunctions-Magritte. Also the dependency to Magritte in the Metacello config was wrong. Now it works as expected (please test :)). And a new stable version was uploaded to the smalltalkhub repo. Please notice my port includes the option to collate the undefined elements at the beginning or the end, in a similar fashion to ORDER BY [column] NULLS [LAST|FIRST] in SQL (Oracle/PostgreSQL at least). I would also vote to have this in the base image. It is my base image at least :) Regards! -- Esteban A. Maringolo
http://www.smalltalkhub.com/#!/~emaringolo/SortFunctions I use them extensively. Esteban A. Maringolo
I had a look.
Apart from the fact that for some reason, the extensions on MAElement are in the Core package, hence loading just Core gave errors, things looked OK.
This is generally useful, small and a very good example of super cool OO design.
I would vote to integrate this (<=> and all).
Why? Can we rewrite a large part of the system with it? If not why people cannot just load a package? We should stop to think monolithic. Stef
On 21 May 2015, at 15:01, phil@highoctane.be wrote:
Tag sort functions looks great to have around.
About the spaceship operator (<=>), is this something we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
http://objology.blogspot.be/2010/11/tag-sortfunctions.html http://objology.blogspot.be/2010/11/tag-sortfunctions-redux.html
If people wants to harvest some changes from Squeak, please do it. Collections Speed up testing different sized strings. Interval >> #sum is now O(1) instead of O(n). Introduction of Set>>#addNewElement: optimizes graph-traversal. Slightly faster SequenceableCollection >> #copyUpT (for ByteString receivers). Stricter and faster implementation of String >> #format:. Optimized Interval >> #sum, OrderedCollection >> #at: and OrderedCollection >> #at:put:. Simpler and faster Character >> #tokenish. Speed-up #endsWith: for strings. Morphic Sped up #valueOfProperty:ifAbsent: and friends. Symbol table improvements such as thread-safety and consistent enumeration. Threadsafe random.
Squeak 4.6 "Spur" Release Notes http://wiki.squeak.org/squeak/6192
----- Cheers, Sean -- View this message in context: http://forum.world.st/Opportunity-to-steal-good-ideas-from-dad-tp4827836.htm... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (7)
-
Damien Pollet -
Esteban A. Maringolo -
Max Leske -
phil@highoctane.be -
Sean P. DeNigris -
stepharo -
Sven Van Caekenberghe