Toggle, Print, Repeat
Ruby, 171



-&gt;w{s=[0]*8
w.chars.flat_map{|c|z=0..7
*m,i=z.map{|j|z.select{|k|s[k]!=z.map{|i|c.ord[i]}.rotate(j)[k]}&lt;&lt;j}.min_by &amp;:size
m.map{|m|s[m]=1-s[m];"t #{7-m}"}+["p #{i}"]}*?\n}


A Ruby function that's only double the size of the reference implementation. :)

Try it online: http://ideone.com/ysYyFP

The program is pretty straighforward: it starts off with the 8 bits set to 0 and iterates through the characters. At each step, it takes the shortest route from the current state to a state that would allow printing the character. It returns a string in the specified format.

The initial (less golfed) version of the program is available here.