Hello Martin,
I have refined the search a little bit, and we have a new winner with
Stephane Ducasse as author in annotations.
PSMCMergeMorph>>model: aMerger
"Set the model and update the window."
|grouped sorted|
super model: aMerger.
grouped := aMerger operations
groupBy: [:o | o targetClassName ifNil: [o shortSummary]]
having: [:g | true].
sorted := OrderedCollection new.
grouped keys asSortedCollection do: [:k |
sorted addAll: ((grouped at: k) asSortedCollection: [:a :b | a
shortSummary <= b shortSummary])].
self patchMorph model: sorted
This is the code I have used:
| allMethods |
allMethods := SystemNavigation default allMethods.
UIManager default displayProgress: 'Scanning all methods...'
from: 1
to: allMethods size
during: [ : bar | | current |
current := 0.
allMethods select: [ : each |
current := current + 1.
bar value: current.
each ast arguments notEmpty and: [
(each ast allChildren anySatisfy: #isAssignment) and: [
(each ast allChildren anySatisfy: #isBlock) and: [
each ast temporaries notEmpty and: [
each ast superMessages notEmpty and: [
(each ast allChildren anySatisfy: [ : node | node isMessage
and: [ node selector isUnary ] ]) and: [
(each ast allChildren anySatisfy: [ : node | node isMessage
and: [ node selector isBinary ] ]) and: [
(each ast allChildren anySatisfy: [ : node | node isBlock and:
[ node arguments size = 2] ]) and: [
(each ast allChildren anySatisfy: [ : node | node isBlock and:
[ node arguments size = 1] ])
] ] ] ] ] ] ] ] ] ].
Cheers,
Hernán
2014-07-08 18:48 GMT-03:00 MartinW <[email protected]>:
> I removed the question, but only after it was already marked to be closed
> by
> several people. Their argument was, that the question was "to broad". Once
> a
> discussion like this starts on Stackexchange sites there's always a herd
> behavior that's hard to stop.
>
> Can you share the code you used for your search, Hernán?
>
>
> Hernán Morales Durand wrote
> > The contest is gone?
> >
> > Anyway, the closest useful method I have found by iterating all ASTs in
> > standard 3.0 image :
> >
> > - Declares arguments
> > - Has assignment
> > - Has sequence
> > - Has blocks with 0 and 2 arguments
> > - Declares temporaries
> > - Has binary messages
> > - Has unary messages
> > - Has keyword messages
> > - Has super messages
> > - Has cascade
> > - Has return
> > - Uses String and Integer
>
>
>
>
>
> --
> View this message in context:
> http://forum.world.st/Smalltalk-Syntax-in-a-Postcard-contest-tp4766793p4767121.html
> Sent from the Pharo Smalltalk Developers mailing list archive at
> Nabble.com.
>
>