the darker side of ruby

A

Alexander Kellett

during a few bored moments last night i wrote some code to make this:

ruby -e "p
((((((((((((((((?A)-?L)-?E)%?X)/?A)-?N)*?D)%?E)%?R)*?K)-?E)*?L)-?L)/?
E)*?T)/?T)"

from a name;

first put in your name or whatever:
g="ALEXANDERKELLETT";c=0;loop{t=[];v=(g.unpack"c*").inject{|s,n|l=%w(+
* - / %)[rand 5];t<<l;;break if (l=="/"||l=="%")&&n==0;s.__send__
l,n};if v==666;puts "got it in #{c} tries! with
#{t.join}";break;end;c+=1}

then make l the output of above:
l="--%/-*%%*-*-/*/";t=0;
h=("ALEXANDERKELLETT".unpack"c*").map{|b|s="?"+b.chr+")"+l[t,1];t+=1;
s}.join;"("*(l.size+1)+h

and you'll get your string :)
some ain't possible. i guess those people are pure or something :p

Alex
 
S

Simon Strandgaard

during a few bored moments last night i wrote some code to make this: [snip]
some ain't possible. i guess those people are pure or something :p

It looks evil.. hmm nice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top