From: Paul Battley Date: 2005-05-11T18:13:17+09:00 Subject: Re: [ANN] NegaPosi Compiler Here's a (long) one-liner to do the same, taking advantage of pack/unpack's "b" specifier: str.scan(/.{1,8}/m).map{ |s| s.reverse }.join.unpack('b*')[0].tr('01','-+').scan(/.{1,64}/).map{ |s| (s << (' ' * 64))[0,64]<< '_' }.join("\n") Paul.