Administrator
|
| s1 s2 ss |
-- s1 := Set with: #ActionButtonSpec. s2 := Set with: #ActionButtonSpec. ss := Set with: s1 with: s2. Array with: ss size with: s1 = s2 This answers (2 true) when it should answer either (2 false) or (1 true). The latter is the preferred answer. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
It looks like the problem is in the #with:with: method. (Set with: s1) add: s2 works as expected. If I was you, I'd report the #with:with: method as a bug according to the info on http://www.instantiations.com/support/index.html#contact .
-- All the with:with:...with: methods are a problem. Inside those methods for the Set class it should not call "self new:" but "self new". On Wednesday, September 11, 2013 6:24:02 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Richard Sargent
Richard -
-- The problem is that Set is missing an implementation of #hash. Try adding this method to Collection (you will then get (1 true)):
John On Wednesday, September 11, 2013 6:24:02 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
Administrator
|
Thanks, John. Will this be the official fix in the next version? On Tue, Sep 24, 2013 at 1:57 PM, John O'Keefe <[hidden email]> wrote:
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
Richard -
-- Yes, unless I did it wrong :-) John On Tuesday, September 24, 2013 5:14:07 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by bgridley-2
Brian -
-- I do see a difference in results between Set with:with: and (Set with:) with: -- at the moment I am unable to explain this, but I will study a little more and the answer should come clear. John On Tuesday, September 24, 2013 12:20:48 PM UTC-4, [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by John O'Keefe-3
Richard -
-- I'm still playing around with the arbitrary number of elements to see if I can get a better hash distribution without spending too many cycles, so this may change also. John On Tuesday, September 24, 2013 5:20:35 PM UTC-4, John O'Keefe wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by John O'Keefe-3
Richard - Sorry, I've found a failing case with the code I posted -- it gets a StackOverflow exception if a set recursively includes itself. Back to the drawing board. John On Tuesday, September 24, 2013 5:20:35 PM UTC-4, John O'Keefe wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |