the darker side of ruby

Discussion in 'Ruby' started by Alexander Kellett, Feb 15, 2005.

  1. 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

    ----
    p
    ((((((((((((((((?A)-?L)-?E)%?X)/?A)-?N)*?D)%?E)%?R)*?K)-?E)*?L)-?L)/?
    E)*?T)/?T)
     
    Alexander Kellett, Feb 15, 2005
    #1
    1. Advertising

  2. On Wed, 16 Feb 2005 00:53:37 +0900, Alexander Kellett
    <> wrote:
    > 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.

    --
    Simon Strandgaard
    '-NEON-EYE-'.unpack('C*').inject(0){|a,b|a+b} #-> 666
     
    Simon Strandgaard, Feb 15, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Chau
    Replies:
    0
    Views:
    634
    Andy Chau
    Nov 20, 2003
  2. yaya coco
    Replies:
    1
    Views:
    425
    Rajesh Tiwari
    Jul 4, 2003
  3. S.K. Dutta
    Replies:
    2
    Views:
    1,918
    Yan-Hong Huang[MSFT]
    Jul 30, 2003
  4. Juan Posadas
    Replies:
    4
    Views:
    1,508
    Jacob Yang [MSFT]
    Aug 26, 2003
  5. Oren
    Replies:
    10
    Views:
    198
    Ken Bloom
    Aug 19, 2009
Loading...

Share This Page