Pry is more sophisticated version of the vanilla ruby irb (repl tool) that allows you to inspect, and modify code on the fly. For JRubyArt you can start up pry on your sketch as follows
k9 --live my_sketch.rb
The @MoiRouhs example is slightly confusing in that the text is overlaying the sketch. Having the sketch display in a regular window is more normal. Class wrapped sketches work better than ‘bare sketches’ (that get wrapped in class anyway before they are run).