Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
## euler:rubinius brian$ cat script.rb def uhh(x); p x; x; end uhh(1) + uhh(2) + uhh(3) ## euler:rubinius brian$ shotgun/rubinius describe script.rb Sexp: [:block, [:newline, 1, "script.rb", [:defn, :uhh, [:scope, [:block, [:args, [:x], [], nil, nil], [:newline, 1, "script.rb", [:fcall, :p, [:array, [:lvar, :x, 0]]]], [:newline, 1, "script.rb", [:lvar, :x, 0]]], [:x]]]], [:newline, 2, "script.rb", [:call, [:call, [:fcall, :uhh, [:array, [:lit, 1]]], :+, [:array, [:fcall, :uhh, [:array, [:lit, 2]]]]], :+, [:array, [:fcall, :uhh, [:array, [:lit, 3]]]]]]] Bytecode: 0000: push_literal #<CompiledMethod:0x131 name=uhh file=script.rb> 0002: push_literal :uhh 0004: push_self 0005: send_stack #<SendSite:0x151 name=__add_method__ hits=0 misses=0>, 2 0008: pop 0009: push_int 3 0011: push_self 0012: set_call_flags 1 0014: send_stack #<SendSite:0x181 name=uhh hits=0 misses=0>, 1 0017: meta_push_2 0018: push_self 0019: set_call_flags 1 0021: send_stack #<SendSite:0x1a9 name=uhh hits=0 misses=0>, 1 0024: meta_push_1 0025: push_self 0026: set_call_flags 1 0028: send_stack #<SendSite:0x1d1 name=uhh hits=0 misses=0>, 1 0031: meta_send_op_plus 0032: meta_send_op_plus 0033: pop 0034: push_true 0035: sret = uhh (0x131) ====================== 0000: check_argcount 1, 1 0003: set_local_from_fp :x, 0 0006: push_local :x 0008: push_self 0009: set_call_flags 1 0011: send_stack #<SendSite:0x241 name=p hits=0 misses=0>, 1 0014: pop 0015: push_local :x 0017: sret euler:rubinius brian$
From the Design Piracy series on my blog: