

Interesting C code - geekzgalore
http://a1k0n.net/2011/06/26/obfuscated-c-yahoo-logo.html

======
tintin
_"in six lines of C"_

I'm not impressed. It could be done in 1 line of C when he left out the line-
breaks.

I don't think obfuscated code is interesting. It's unreadable. And therefore
it's hard to learn something from it.

But it's nice he is explaining the code. Now that is interesting!

~~~
a1k0n
I could have said "in 454 characters of C" but that wouldn't have been as
linkbaity. Thanks for clicking!

Yes, the aim was compression (golfing), not obfuscation. Compression of silly
ASCII things has been sort of a hobby of mine for a while and I intend to blog
about that in particular. Another little compressed snippet is my "email
signature" at the bottom of my site root. Try clicking on it.

~~~
chamakits
Both of these (the signature, and the post) are amazing!

.... _jealous_

~~~
huhtenberg
<http://a1k0n.net/2006/09/15/obfuscated-c-donut.html>

Jesus Christ. I love you, dude. Your site must have the highest awesomeness-
per-bit ratio on the Internet :)

~~~
a1k0n
Thanks. :) I'm most proud of my IOCCC 2006 winner (the IOCCC organizers
announced the winners, but not the actual entries, then disappeared from the
planet): <http://a1k0n.net/2006/09/20/obfuscated-c-donut-2.html>

------
jseban
Interesting indeed. But weird that he uses obfuscated code when doing a piece
of explaining how it's done. Or do people actually write for loops like those?
:P

~~~
LukeShu
This is basically the a C equivalent of a JAPH. A JAPH is a usually short bit
of perl code that prints "Just Another Perl Hacker", but it isn't obvious that
that's what it does. Trying to figure out how it works without cheating is
part of the fun.

~~~
sofuture
a.{~(/:a+c=:_29 14 _60 12 8 0 _2 5 3 2 11 6 14 _1 8
13){+/\a=:(#.1,5$0),1,(#.1,6$0),0,(2$2),(#:20),~(3*1 1r3,|.i.3)

------
mrpollo
the javascript port is awesome too

<http://jsfiddle.net/mrpollo/jeNau/>

tho i cant make it run yet on jsfiddle

~~~
petercooper
Copied and pasted that into JSBin and it worked like a champ:
<http://jsbin.com/osihah/edit>

~~~
mrpollo
Awesome!, thanks, it runs great

------
johnx123-up
My favorite is world map code by Brian Westley
<http://www.ioccc.org/1992/westley.hint>

    
    
                 main(l
            ,a,n,d)char**a;{
        for(d=atoi(a[1])/10*80-
       atoi(a[2])/5-596;n="@NKA\
      CLCCGZAAQBEAADAFaISADJABBA^\
      SNLGAQABDAXIMBAACTBATAHDBAN\
      ZcEMMCCCCAAhEIJFAEAAABAfHJE\
      TBdFLDAANEfDNBPHdBcBBBEA_AL\
       H E L L O,    W O R L D! "
         [l++-3];)for(;n-->64;)
            putchar(!d+++33^
                 l&1);}
    

BTW, how to convert C to JavaScript?

------
sirk390
Wow, impressive. And I love your humour about warnings :)

------
vegai
I sometimes wonder if code golfing has the risk that some junior developers
might confuse it as good code.

------
aralib
Now I really want to learn ray tracing (and computer graphics in general).

------
xedarius
'warnings which real programmers ignore' ... That tells me pretty much all I
needed to know about that article.

~~~
Bogdanp
I can't speak for the author, but I'm pretty sure that was a joke.

~~~
a1k0n
I can, and it obviously was.

~~~
CPlatypus
Well played, sir. Brief in text as well as code. :)

