Skip to content

Instantly share code, notes, and snippets.

View jordanmontt's full-sized avatar

Sebastian Jordan Montaño jordanmontt

View GitHub Profile
@jordanmontt
jordanmontt / ensure-cleanBlocks.st
Created October 2, 2025 09:38
Clean Blocks in ensure: static analysis Pharo
"Static analysis of all the ensure: calls that are present in Pharo 14.
We analyze how many of the block that the ensure: method receives as an argument are clean blocks"
| allEnsureUsers allEnsureMessages allEnsureBlockNodes ensureCleanBlock ensureFullBlocks totalEnsureCleanBlocks totalEnsureFullBlocks|
allEnsureUsers := #ensure: senders collect: [ :compiledMethod | compiledMethod parseTree].
allEnsureMessages := allEnsureUsers flatCollect: [ :ast |
ast sendNodes select: [ :node | node selector = #ensure: ] ].
allEnsureBlockNodes := allEnsureMessages
collect: [ :msgNode | msgNode arguments first ]
@jordanmontt
jordanmontt / .st
Last active March 24, 2023 16:08
Running the experiment with Illimani
block := [
toolsToOpen := 10.
renderingTimes := 100.
"Icerberg"
toolsToOpen timesRepeat: [
IceTipRepositoriesBrowser new open.
1 to: renderingTimes do: [ :e | WorldMorph doOneCycle ] ].
"Playground"
toolsToOpen timesRepeat: [
Smalltalk tools workspace open.