Ryan Leavengood wrote:
>
> P.S. I'll post it later, it isn't on my current machine.

If anyone is interested, here is my NegaPosi generator:

def generate_np(str, width=64)
  (str+"\0").gsub(/./) do |b|
    ("%08b"%b[0]).tr('01','-+')
  end.scan(/[-+]{#{width}}|[-+]+/) do |line|
    puts line.reverse.ljust(width)+'_'
  end
end

It can take a parameter to output different widths (which don't affect the
processing of the NegaPosi "code.") I took a more functional approach in
this, but I suspect SASADA Koichi's is more efficient.

Ryan