Skip to content

Instantly share code, notes, and snippets.

@Techbrunch
Created July 8, 2018 09:34
Show Gist options
  • Save Techbrunch/999e229934711ff26cdf7d9629212764 to your computer and use it in GitHub Desktop.
Save Techbrunch/999e229934711ff26cdf7d9629212764 to your computer and use it in GitHub Desktop.
Intercal Decoder
arr = [238,140,120,0,112,154,194,172,72,32,24,240,160,232,26,52]
def decode(pos = 0, array)
array.map { |x|
pos = (256 + pos - x) % 256
pos.to_s(2)
.rjust(8, '0')
.reverse
.to_i(2)
.chr
}.join
end
puts decode(arr)
# Happy Birthday!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment