Don't click here unless you want to be banned.

LSL Wiki : clever

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are wwwb-gen1.us.archive.org
Comments [Hide comments/form]
LOL.
-- ChromalBrodsky (2004-03-25 05:39:25)
We should have a "how to be Clever" page with lots of examples of Clever code. It'd be fun. And informative.
-- PrioSerpentine (2004-06-09 10:55:33)
lol, i dont have a problem with the "semi-good" code :P
-- SchitsoMonkey (2005-08-18 15:58:57)
You people should have a look at some of the IOCCC entries. They are examples of über clever code. C is insane sometimes...

Example:
#define O B F U S C A T E D
#define I 8;}t(p){r(p?W:o);XClearWindow(V,m);}main(i,f)char**f;{M((T(h=f),
#define K Y(o,XMapRaised(V,e);)x=3;x--;)for(y=3;y--;r(G))XMapRaised(V,R[D]
#define N z(x+i,(z(H-x-i,x),x)))x<i||z(x-i,x)|z(H-x+i,x)Y(W,)l=k;l>20&&l>x
#define XIMOfIC Z;XID(*w)()=XCreateWindow,m,e,o[2],W[2],G[2],R[2][O]);}GC*g
#define E (++D)));}r(XID*z){XSetWindowBackgroundPixmap(V=d[D],m=R[D][x][y],z[
#define L ;XStoreName(V,e=w(V,RootWindow(V,s),0,0,152,152,2,0,1,0,0,0),"II"+D
#define B 3][3];Display*V,*d[2];char**h,k=25,b[2500],H=50,D,s,x,y,i;T(){float
#define S +k),z(k-P=w(V,e,H*x,H*y,H,H,1,0,1,0,2048,&c));}XEvent J;M(){XFlush(
#define Y(z,y) ;for(z[D]=XCreatePixmapFromBitmapData(Q,x=0,H*H);x<H;x++)y for(
#define A x][y]&&!b[x+k*y]++?t(D),t(!(D^=1)):D);M();}z(x,y){b[x/8+y*7]|=1<<x%I
#define P x,y)-z(y,x+k)+z(y,k-x)*z(x+k,y=H-y),z(k-x,y),z(y,k-x),z(y,k+x)K[x][y]
#define Q V,e,b,H,H,BlackPixel(V,s),WhitePixel(V,s),DefaultDepth(V,s)),memset(b
#define C d[!D]);x=3;for(XNextEvent(V,&J);x--;)for(y=3;y--;J.xany.window==R[D][
#define F l;XSetWindowAttributes c;s=XDefaultScreen(V=d[D]=XOpenDisplay(*(h+=!!
#define U *h)))L)Y(G,)i=c.event_mask=4;i--;x+i>H||N;l-=.5)z(x+k,y=sqrt(l*l-x*x)
#include <math.h>
#include <X11/Xlib.h>

This is a multiuser tictactoe game.
-- KeknehvPsaltery (2005-08-19 14:58:54)
Clever, the anti-stupid.
-- IceBrodie (2005-08-25 07:53:49)
Yep! ^.^
-- SchitsoMonkey (2005-08-25 08:23:06)
I was reading someones code, and they used llSensorRepeat("",llGetowner(),PASSIVE,1,1,0.1); and the no_sensor() event as a secondary timer. Should this be added or not?
-- SchitsoMonkey (2005-09-02 11:04:44)
That is a pretty neat trick. Commendations to whoever thought of that one!

Yes, of course you should add it.
-- KeknehvPsaltery (2005-09-02 12:29:00)
Lol, thanks, I wasn't sure if I should say it was my code or not because I thought it might be the bad kind of clever! =P I'll be sure to add that right away!
-- SchitsoMonkey (2005-09-02 14:14:14)
Whats wrong with it BW?
-- SchitsoMonkey (2005-09-02 21:08:03)
nothing except it goes against my instincts, it's like, why cause a little lag with one loop when you could have two for twice the price?

But there are advantages to using that for two indenendant loops. Just makes me cringe thats all.
-- BlindWanderer (2005-09-04 02:51:11)
Reverted page to non-vandalized version. dunno if it's possible to delete the edit comments though. I'm not so good with this wiki system.
-- CPE0012172dba8d-CM000a73a14e62.cpe.net.cable.roger (2007-07-16 21:51:05)
Attach a comment to this page: