Skip to main content
deleted 112 characters in body
Source Link
Chowlett
  • 211
  • 1
  • 5

Ruby, 7171 50 bytes

a=0;$*[0]$*[0].scansplit(/./?#).each{|c|a+=1if ?;==c;if ?#==c;print |p|$><<(a%127p.count(?;)%127).chr;a=0;endchr}

Not much to say about thisEdit: Complete rewrite. $* == ARGV, so $*[0]manatwork's solution is the first (and only) command line argument. Otherwisestill shorter, it's just an exercise in how many spaces can be trimmed. I'mbut this does it a slightly annoyed it's not shorter.different way!

Ruby, 71 bytes

a=0;$*[0].scan(/./){|c|a+=1if ?;==c;if ?#==c;print (a%127).chr;a=0;end}

Not much to say about this. $* == ARGV, so $*[0] is the first (and only) command line argument. Otherwise, it's just an exercise in how many spaces can be trimmed. I'm slightly annoyed it's not shorter.

Ruby, 71 50 bytes

$*[0].split(?#).each{|p|$><<(p.count(?;)%127).chr}

Edit: Complete rewrite. manatwork's solution is still shorter, but this does it a slightly different way!

Source Link
Chowlett
  • 211
  • 1
  • 5

Ruby, 71 bytes

a=0;$*[0].scan(/./){|c|a+=1if ?;==c;if ?#==c;print (a%127).chr;a=0;end}

Not much to say about this. $* == ARGV, so $*[0] is the first (and only) command line argument. Otherwise, it's just an exercise in how many spaces can be trimmed. I'm slightly annoyed it's not shorter.