Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

ASCII arithmetic

by martin (Pilgrim)
on Sep 29, 2010 at 10:16 UTC ( #862574=obfuscated: print w/ replies, xml ) Need Help??

$%=2,$"=6;$;=ord"\c?";print+map{$%*="@_[4,4, ]";$=-=$=;$=*=$%%=$;,$=+=ord,$=%=$;for@_;chr $=}@_=split?,*?,q=|f475!%L(wz)Hmqkcz?ar~x<m=

This one won't work correctly on an EBCDIC machine, I am afraid. But you can turn on strictures and warnings if you like.

Comment on ASCII arithmetic
Download Code
Re: ASCII arithmetic
by ambrus (Abbot) on Sep 29, 2010 at 15:19 UTC

    Beautiful. This is the best take so far on the kind of japhs

    that contain the coefficient of a polynomial which has to be evaluated to get the message. This one contains two extra twists: firstly the variable substituted is not adjacent integers, secondly you use punctuation variables in such a confusing manner that it's not at all obvious which variable is used for its original special purpose.

    The truly beautiful thing is how there are no control characters in the string encoding the coefficients (and it's even one character shorter than it should be). I don't understand how you did that, because if I try to modify this japh, then the string I get is full of control characters, making the code much longer:

    $%=2,$"=6;$;=ord"\c?";print+map{$%*="57 @_[4 ]";$=-=$=;$=*=$%%=$;,$=+=ord,$=%=$;for@_;chr $=}@_=split//,"'QV\bjC\cu-\am\cy\cr#i\"HHuM\cb`w,\t_4"
    (Sorry for the way I messed up the string at the end of the first line, I don't have patience to fix that now.)

    Update: striked out the part about the polynomial being too short, that's my mistake.

Re: ASCII arithmetic
by hbm (Hermit) on Sep 29, 2010 at 18:41 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://862574]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2014-12-29 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (193 votes), past polls