Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: perl v/s C

by liverpole (Monsignor)
on Nov 13, 2005 at 21:32 UTC ( #508152=note: print w/ replies, xml ) Need Help??

in reply to perl v/s C

The first time I saw the C version of this, I was amazed.  It was my first experience with obfuscated code in any language.

Here's my attempt at a Perlish version:

sub __{$_[0]=~y-=#&!~_`'.+,/<>():;?- .,eintsrahgldmfopv-;print@_} sub _{($,,$:)=split/=/,$_[0],2;$* =$*?"$:$*":$:;__ "O_=`,!=$,=>+y=:)=C,r~'`(+'=(y=`.u!=<:?!=/+?!=`:=(!$/$*#$/$/"}map{_$_ }")~.'`=+=;+.`.~>/!=~_=+=;!+.=`.!!","'!c:_>=`w:=`u.`<!=>:?!'=+_>=" ,"`,~.>=`,.!!=).!_c,=,!_'&=","):u.`,=):u.=c+<<~_/=b~.>'&$/" ,")~)`,=)~?!=/:<>!_=.~_/'&=","'~x`,='~x=/!!'!=+-<+y~_/&=" ,"'!?!_`,='!?!_='w+_'=+-'w~((~_/&$/","!~/,`,=!~/,`=(+~>'=+-(~<k~_/&=" ,"_~_`,=_~_!=<+>~!'=>+_c~_/&=","`!_`,=`!_=<:.>'=+-<!+;~_/&$/" ,"!<!?!_`,=!<!?!_=;~;!.'=;~;~_/&=","`w!<)`,=`w!<?!=>.u((!.'=>.u((~_/&= +"

Comment on Re: perl v/s C
Download Code
Replies are listed 'Best First'.
Re: a poem
by ambrus (Abbot) on Jan 05, 2006 at 11:27 UTC

    Wow, this is 90 chars shorter than what I get if I LZ77-compress it (see this old obfu of mine: LZ77 compression).

    sub j{'dr~Tt~~~wM~|t[~}r{~}ly~|dW~{sI~|n~}|aG~[tz~}iu~}d}}Sh1~{ w~}ry~ }n"~}h|~}hB||s~~~,|~|wQ}Gfm~}uD~|hr~Tf\\{{ "~}aX~}l<~|g|~}bw|{s9|{hH|3 iw~}tX{RiV~zoX~}d|~}r${{s~~~;.{ h&~{i~~~xY{RsIx| ?~|e$~| p~}-X~}ao~}i# {|,x~{vYy r3~mvB||tFxReRv{ t~}wB}|sqw{sR}}id~}m${{,{w aA}Wev~}gz~}tX{S eCtz d~|i|z| pw|mv~}l~~~kkwys"v e;|An<~|tX{Sn<~|eY~|aq~}iE}| q~|n"~}ij wzers g!{*tQvPt v{lm~}rjsyl6~|pouynMq lTy eNtslSvNeRly dn|py~}rb~|pxk| ijwztrn esw r9}^wSl|f@oQwSl|vJ}{r[~}mK~|rDq{roh{i=qyl~k nxu tN}Q'=~ /./g?ord$&:die$_}do{$_.=chr(j).substr($_,12096-&j-95*j,126-&j)until 0} if s""On the first day of Christmas my true love gave to me a partridge in a pear tree.\n\nOn the secon"
Re^2: perl v/s C
by prad_intel (Monk) on Nov 14, 2005 at 10:04 UTC
    Kudos liverpole,

    I knew one of the monk here could write the same with perl and am happy to see a result of my objective of posting it here. I have seen other obfuscations here and the best ever would be ...the Saturn rings ... which almost everyone has made it the best node ...

    happy to just be here ( and 'hear' the prayers of other monks ), more happiness to contribute and much more happiness if i am blessed with a long life in this monastery.



Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2016-02-10 00:09 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (329 votes), past polls