Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Christmas obfuscation
Index -> Programming, C -> C Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
btiffin




PostPosted: Mon Jan 19, 2009 4:22 pm   Post subject: Christmas obfuscation

I got this from an acquaintance; didn't write it, wouldn't write it, couldn't write it.

I hope posting here is not a copyright infringement, but it's pretty neat.
c:

main(t,_,a )
    char *a;
{
    return !0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86, 0, a+1 )+a)):1,t<_?main( t+1, _, a ):3,main ( -94, -27+t, a )&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main( _, t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/"):t<-50?_==*a ?putchar(31[a]):main(-65,_,a+1):main((*a == '/') + t, _, a + 1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);
}

Compiles clean and you may be surprised by the output. And as far as I know; there are no Nasty McNasties buried in there, but ... buyer beware, just in case.

Cheers
Sponsor
Sponsor
Sponsor
sponsor
CodeMonkey2000




PostPosted: Mon Jan 19, 2009 7:43 pm   Post subject: RE:Christmas obfuscation

Wow that's pretty amazing. I still don't understand how the code works.
Vertico




PostPosted: Mon Jan 19, 2009 7:56 pm   Post subject: RE:Christmas obfuscation

Thats some intense recursion.
Vermette




PostPosted: Tue Jan 20, 2009 2:14 pm   Post subject: RE:Christmas obfuscation

It's been the first example offered on the wiki page for Obfuscated Code for some time. Doesn't change how awesome it is.
btiffin




PostPosted: Wed Jan 21, 2009 8:56 pm   Post subject: RE:Christmas obfuscation

Ok; cool. I was worried it was snagged out of a book with associated copyright.

So everyone knows, the code was authored (according to the above listed Wikipedia entry) by James Coplien, http://en.wikipedia.org/wiki/Jim_Coplien

Cheers
A.J




PostPosted: Wed Jan 21, 2009 10:45 pm   Post subject: Re: Christmas obfuscation

thanks btiffin!

and I thought my code was messy Razz
GiffordBruno




PostPosted: Tue May 25, 2010 8:30 am   Post subject: Re: Christmas obfuscation

Can you plz represent it in simple manner. It is beyond my capacity. Thanks
chrisbrown




PostPosted: Tue May 25, 2010 10:28 am   Post subject: Re: Christmas obfuscation

Welcome to CompSci.ca. Feel free to ask questions, but please don't revive threads that haven't been replied to in more than a few months at most.


GiffordBruno @ Tue May 25, 2010 8:30 am wrote:
Can you plz represent it in simple manner. It is beyond my capacity. Thanks

That's the point of obfuscation.
Sponsor
Sponsor
Sponsor
sponsor
Velocity




PostPosted: Mon Jan 16, 2012 11:22 am   Post subject: RE:Christmas obfuscation

wow, do you have a ph.d in math or something?
That is amazing.
SNIPERDUDE




PostPosted: Mon Jan 16, 2012 11:40 am   Post subject: Re: RE:Christmas obfuscation

Velocity @ January 16th 2012, 11:22 am wrote:
wow, do you have a ph.d in math or something?

btiffin wrote:
So everyone knows, the code was authored (according to the above listed Wikipedia entry) by James Coplien, http//en.wikipedia.org/wiki/Jim_Coplien


1) Read through the posts before asking a question.
2) The last time this topic was alive was in 2010, please no necro-posting (unless there is a valid enough reason).
QuantumPhysics




PostPosted: Wed Aug 08, 2012 11:39 pm   Post subject: RE:Christmas obfuscation

This is amazing.
Display posts from previous:   
   Index -> Programming, C -> C Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: