Hello all,
I screwed up yesterday and widened the rift in our community. To me this means that I've volunteered to close the rift. Oops. *That's* not going to be trivial.
I need a way to diff two images. I need to be able to roll some metrics around "how different are these two images."
By "mutually missing," I mean specifically any case were one image needs a selector the other hasn't got. This merged list is what I mean by "mutually missing."
For a first stab, I will be glad to ignore mutable state in the images and focus entirely on source code. I'd like to simply know:
1) how many selectors are mutually missing
2) how many methods are different (it might make sense to compare compiled methods, rather than source methods in this particular case if it will ignore stylistic differences to any extent)
3) How many classes are mutually missing
...and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt.
Could be a fool's errand, but at least from a technical perspective, I want to understand our differences better than I do now, and this is the best way that I know how.
The real problem, the cultural divide, cannot be approached without full comprehension of the differences between our respective goal-sets. With my Software Anthropology hat on, the only way I know how to study these dynamics is to examine the artifacts left behind by the two groups after the split.
In my heart I believe that we will some day arrive upon a base system which will be well suited to addressing all of our multifaceted concerns. Until that happens, though, the best thing I can do is try to read the diff.
This is my penance.
I'm writing to ask for advice. Does the approach I've outlined make sense to you? Is there a better way that you know of to diff the code contents of two images? If so, I want to know about your ideas on the matter. You may have pieces of the puzzle that I don't have.
Thanks for reading all the way to the bottom.
Until all are one.
C
On 6/2/11 3:20 AM, "Casey Ransberger" casey.obrien.r@gmail.com wrote:
- How many classes are mutually missing
...and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt.
What I was doing for long time is On A Smalltalk classNames saveOnFileNamed: 'AImageClasses'. On B Smalltalk classNames saveOnFileNamed: 'BImageClasses'
I drag and drop ' AImageClasses.obj' on B or 'BImageClasses.obj' on A
On the panel code of Inspector I evaluate
Smalltalk classNames difference: self.
Ready, you have the list of "missing" class names
All this and more in the SqueakLight series.
I export the sources using the still in the image ill fated ReleaseBuilderFor3dot11 , see sources managment category.
All the 'sqz' generated for 3.8 3.9, 3.10 was in the ftp.squeak.org/ Experiments folder of ftp.
I now have for Pharo and Cuis also
You could retrieve any and see the differences using PseudoClass.
This days another Argentina student, Martin Dias tinchodias@gmail.com, is working on Fuel, so soon we have more to read and experiment.
Yours.
Edgar
Casey
In the past when I wanted to compare images or validate the presence of certain methods I created a file containing the method signature and a CRC of the compiled bytecodes of each method. Validating then becomes a matter of reading the file and calculating the CRC.
Terry
=========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 traymond@craftedsmalltalk.com http://www.craftedsmalltalk.com ===========================================================
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Casey Ransberger Sent: Thursday, June 02, 2011 2:21 AM To: The general-purpose Squeak developers list; Pharo-project@lists.gforge.inria.fr Subject: [squeak-dev] Diff
Hello all,
I screwed up yesterday and widened the rift in our community. To me this means that I've volunteered to close the rift. Oops. *That's* not going to be trivial.
I need a way to diff two images. I need to be able to roll some metrics around "how different are these two images."
By "mutually missing," I mean specifically any case were one image needs a selector the other hasn't got. This merged list is what I mean by "mutually missing."
For a first stab, I will be glad to ignore mutable state in the images and focus entirely on source code. I'd like to simply know:
how many selectors are mutually missing
how many methods are different (it might make sense to compare compiled methods, rather than source
methods in this particular case if it will ignore stylistic differences to any extent)
- How many classes are mutually missing
...and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt.
Could be a fool's errand, but at least from a technical perspective, I want to understand our differences better than I do now, and this is the best way that I know how.
The real problem, the cultural divide, cannot be approached without full comprehension of the differences between our respective goal-sets. With my Software Anthropology hat on, the only way I know how to study these dynamics is to examine the artifacts left behind by the two groups after the split.
In my heart I believe that we will some day arrive upon a base system which will be well suited to addressing all of our multifaceted concerns. Until that happens, though, the best thing I can do is try to read the diff.
This is my penance.
I'm writing to ask for advice. Does the approach I've outlined make sense to you? Is there a better way that you know of to diff the code contents of two images? If so, I want to know about your ideas on the matter. You may have pieces of the puzzle that I don't have.
Thanks for reading all the way to the bottom.
Until all are one.
C
It would be great to have this comparison with the current Squeak and Pharo implementation.
Maybe first just for the names of the classes to find out which classes are in Pharo and not in Squeak and vice-versa.
With this we might find out which new classes of Pharo we want to include into Squeak.
An issue are the method annotations (pragmas) and the Preferences editor.
--Hannes
On 6/2/11, Terry Raymond squeak-craft@cox.net wrote:
Casey
In the past when I wanted to compare images or validate the presence of certain methods I created a file containing the method signature and a CRC of the compiled bytecodes of each method. Validating then becomes a matter of reading the file and calculating the CRC.
Terry
=========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 traymond@craftedsmalltalk.com
http://www.craftedsmalltalk.com
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Casey Ransberger Sent: Thursday, June 02, 2011 2:21 AM To: The general-purpose Squeak developers list; Pharo-project@lists.gforge.inria.fr Subject: [squeak-dev] Diff
Hello all,
I screwed up yesterday and widened the rift in our community. To me this means that I've volunteered to close the rift. Oops. *That's* not going to be trivial.
I need a way to diff two images. I need to be able to roll some metrics around "how different are these two images."
By "mutually missing," I mean specifically any case were one image needs a selector the other hasn't got. This merged list is what I mean by "mutually missing."
For a first stab, I will be glad to ignore mutable state in the images and focus entirely on source code. I'd like to simply know:
how many selectors are mutually missing
how many methods are different (it might make sense to compare compiled
methods, rather than source methods in this particular case if it will ignore stylistic differences to any extent)
- How many classes are mutually missing
...and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt.
Could be a fool's errand, but at least from a technical perspective, I want to understand our differences better than I do now, and this is the best way that I know how.
The real problem, the cultural divide, cannot be approached without full comprehension of the differences between our respective goal-sets. With my Software Anthropology hat on, the only way I know how to study these dynamics is to examine the artifacts left behind by the two groups after the split.
In my heart I believe that we will some day arrive upon a base system which will be well suited to addressing all of our multifaceted concerns. Until that happens, though, the best thing I can do is try to read the diff.
This is my penance.
I'm writing to ask for advice. Does the approach I've outlined make sense to you? Is there a better way that you know of to diff the code contents of two images? If so, I want to know about your ideas on the matter. You may have pieces of the puzzle that I don't have.
Thanks for reading all the way to the bottom.
Until all are one.
C
Hi Casey,
Casey Ransberger wrote:
... I need a way to diff two images. I need to be able to roll some metrics around "how different are these two images."
By "mutually missing," I mean specifically any case were one image needs a selector the other hasn't got. This merged list is what I mean by "mutually missing."
For a first stab, I will be glad to ignore mutable state in the images and focus entirely on source code. I'd like to simply know:
how many selectors are mutually missing
how many methods are different (it might make sense to compare compiled methods, rather than source methods in this particular case if it will ignore stylistic differences to any extent)
How many classes are mutually missing
....and certainly many, many other things I'll learn that I need later. My plan is to just iterate over and enumerate these objects. It will probably take some time to do, no doubt.
Could be a fool's errand, but at least from a technical perspective, I want to understand our differences better than I do now, and this is the best way that I know how. ...
What I do in such cases (did it several times) is to fileOut all the code in both images. Then, in each image, I open it with the ChangeList browser the file with the code from the other image. First step, is 'remove all up-to-date'. Then, on each image, you have as new methods those that are missing and as changed methods those that changed. This is good for taking statistics, studying, merging, etc.
HTH.
Cheers, Juan Vuletich
squeak-dev@lists.squeakfoundation.org