Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

ASCII arithmetic

by martin (Friar)
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
Replies are listed 'Best First'.
Re: ASCII arithmetic
by hbm (Hermit) on Sep 29, 2010 at 18:41 UTC
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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2015-11-27 09:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls