Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
%%{ machine hello; expr = "h"; main := expr @ { puts "hello world!" } ; }%% %% write data; def run_machine(data) puts "Running the state machine with input #{data}..." p = 0 pe = data.length cs = 0 %% write init; %% write exec; puts "Finished. The state of the machine is: #{cs}" end run_machine "h" run_machine "~h"
This paste will be private.
From the Design Piracy series on my blog: