Skip to content

Instantly share code, notes, and snippets.

@chendo
Created August 24, 2009 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chendo/173732 to your computer and use it in GitHub Desktop.
Save chendo/173732 to your computer and use it in GitHub Desktop.
# Daft Golf
# Encode the entire lyrics of Harder Better Faster Stronger in the least amount of characters
# without cheating. Source of lyrics: http://lyricwiki.org/Daft_Punk:Harder,_Better,_Faster,_Stronger
# First attempt without being really anal: 500b
s=%w(after better do ever faster harder hour is it make makes more never our over stronger than us work)
m1="chavnohzy3a7uvnb4iw21ogt3xwazyiw6gqsoaihdjw36q8encnd1oxfpy2eomjfxfr9"
m2="5vjlr1vcd8f7rdjb3c3zfk0kh6cjxc2l8dzvzk2hhfrwkg2n2ln04mpli1tq5gnfu7nvxc6dbk8yq9uxnfboimh5902mqtggizhhaakr2nk2xsh4qar5b8aypdocmeakqelscg11evw57i3ttep2ott0pqteclmae5sckhc"
def d(e, a)
t=e.to_i(36).to_s(2)
t[0]=''
t.scan(/.{5}/).map{|b|a[b.to_i(2)]}
end
ws = d(m1, s).join(' ').split(' ')
puts d(m2, ws).join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment