Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
User Journal

Journal JDWTopGuy's Journal: 165 characters! 8

And it's still valid C! Thanks to my anonymous helper, plus some more experimenting on my own... the practically sig-sized JDWTopGuy.c (165 characters):

#include <stdio.h>
int main(){char c=0,x[]={37,34,43,1,42,55,1,56,35,1,58,1,60,1};while(printf("%c"+((c<14)?0:2),((x[++c]==1)?1:0)+(x[c]*2)));printf("\n");return 0;}

Obviously slashdot is messing with it, everything past the include should be on one line. BTW, this version prints "JDWTopGuy", not "JDWTOPGUY".

I haven't had a chance to test it on an linux box, but it compiles fine with gcc 3.1 on Mac OS X 10.2.8.

This discussion has been archived. No new comments can be posted.

165 characters!

Comments Filter:
  • by Feztaa ( 633745 )
    You might like perl [google.com]:)

    • The problem is, if you can obfuscate it that much and still have a working program, how the hell can it be useful for regular programming? (j/k)

      I like REBOL for its easy, clean syntax. I like Java for its rich and well-documented API. Python looks good too, but I haven't done too much with it yet.
  • #include
    main(){char
    c=0,x[]={37,34,43,1,42,55,1,56,35,1 ,58,1,60,1};whi le(printf("%c"+((c14)?0:2),((x[++c]==1)?1:0)+(x[c] *2)));return;}

    Take that JDWTopGuy's ego!
    • #include <stdio.h>
      main(){char
      c=0,x[]={37,34,43,1,42,55, 1,56,35,1,58,1,60,1};while(printf("%c"+((c<14)?0:2 ),((x[++c]==1)?1:0)+(x[c]*2)));return;}
      Hope this works (2nd try)
      • I knew what was missing, so I was able to compile the first post. But it still doesn't print a newline, and you need to declare main as returning an int, and return 0.
    • You forgot something: mine's valid, rule-abiding C. You also didn't print a newline. Not only that, you forgot to use the <ecode></ecode> tags.

      Take that, JM Apocalypse's ego!
      • Ouch! My Ego!

        But, you are failing to realize that it still compiles.
        • Of course it compiles, but mine is not only tiny and obfuscated, it's also obeys the rules. (Compiling with -Wall does warn that the array subscript is a char... but that's still valid.)

          I could change "char" to "int" and save one character... w00t!

"All the people are so happy now, their heads are caving in. I'm glad they are a snowman with protective rubber skin" -- They Might Be Giants

Working...