Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
~/NetBeansProjects/jruby ➔ ../rubinius/bin/rbx vm_thing.rb in parent: 1 child = 2 in child: 2 parent = 1 ~/NetBeansProjects/jruby ➔ jruby vm_thing.rb in parent: 7214088 child = 2950275 in child: 2950275 parent = 7214088 ~/NetBeansProjects/jruby ➔ cat vm_thing.rb begin require 'jruby/vm' rescue LoadError; end child_vm = Rubinius::VM.spawn('-e', <<'END') puts "in child: #{Rubinius::VM_ID}" parent = Rubinius::VM.get_message puts "parent = #{parent}" Rubinius::VM.send_message(parent, Rubinius::VM_ID) END puts "in parent: #{Rubinius::VM_ID}" Rubinius::VM.send_message(child_vm.id, Rubinius::VM_ID) child = Rubinius::VM.get_message puts "child = #{child}" puts child_vm.stdout.readpartial(1024) ~/NetBeansProjects/jruby ➔ ../rubinius/bin/rbx vm_thing.rb in parent: 1 child = 2 in child: 2 parent = 1 ~/NetBeansProjects/jruby ➔ jruby vm_thing.rb in parent: 7214088 child = 1389308 in child: 1389308 parent = 7214088
This paste will be private.
From the Design Piracy series on my blog: