Created
December 8, 2015 13:37
-
-
Save Uko/0549e822f475edfb190a to your computer and use it in GitHub Desktop.
Mining critics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
critics := (self | |
collect: | |
[ :pharoV | | |
(pharoV files | |
reject: [ :criticF | criticF basename = '.done' ] | |
thenCollect: #basename) | |
select: | |
[ :crit | | |
Smalltalk globals | |
at: crit asSymbol | |
ifPresent: [ :class | class new severity = #error ] | |
ifAbsent: [ false ] ] ]) fold: [ :a :b | a intersection: b ]. | |
self | |
reject: [ :pharoV | pharoV files size = 1 ] | |
thenCollect: [ :pharoV | | |
pharoV basename | |
-> | |
(pharoV files | |
reject: | |
[ :criticF | criticF basename = '.done' "| (critics includes: criticF basename) not" ] | |
thenCollect: | |
[ :criticF | | |
criticF contents = Character lf asString | |
ifTrue: [ 0 ] | |
ifFalse: [ (criticF contents select: [ :c | c = Character lf ]) size ] ] ) | |
sum ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| b ds | | |
b := RTGrapher new. | |
b extent: 700 @ 300. | |
ds := RTData new. | |
ds points: self. | |
ds connectColor: Color red. | |
ds y: #value. | |
b add: ds. | |
b axisXWithNumberOfTicks: 4. | |
b axisYWithNumberOfTicks: 4. | |
b build. | |
^ b view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment