Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: ASCII arithmetic

by ambrus (Abbot)
on Sep 29, 2010 at 15:19 UTC ( [id://862628]=note: print w/replies, xml ) Need Help??


in reply to ASCII arithmetic

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://862628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found