pouët.net

Random line of code thread

category: code [glöplog]
xeron: "out of range" ??
added on the 2009-05-07 16:18:22 by d0DgE d0DgE
d0DgE: you are too slow. :D
added on the 2009-05-07 16:19:52 by StingRay StingRay
skrebbel:
if you have ? and & etc and you dont url-encode it you will have them breaking the parametersystem...
added on the 2009-05-07 16:20:50 by Hatikvah Hatikvah
Sting0r: yea, using CPU too much instead of chipset *muahaha*
added on the 2009-05-07 16:21:35 by d0DgE d0DgE
Code::evil_timer_offset_wtf => 0.2,
added on the 2009-05-17 02:51:38 by chanman chanman
#define intarnet int
#define LOL float
#define lamer bool
#define flamewar vsx_string
#define yes true
#define no false

lamer you = yes;
intarnet internet = 0xDEADBEEF;
flamewar = you?"WINDOWS IS BETTER THAN LINUX":"LINUX IS BETTER THAN WINDOWS";
float www = (LOL)intarnet;
added on the 2009-05-17 03:07:28 by jaw jaw
crap, i made a TYPO.

it should be:
flamewar hallowas = you?"WINDOWS IS BETTER THAN LINUX":"LINUX IS BETTER THAN WINDOWS";
added on the 2009-05-17 03:11:26 by jaw jaw
float www = (float) int;

i guess you are right, the lamer is you.
added on the 2009-05-17 03:49:25 by Hatikvah Hatikvah
DOS Command 4 a cool demo:

fsutil file createnew simpledemo.exe 1234567890

added on the 2009-05-17 03:59:49 by BiasZ BiasZ
Quote:
fsutil file createnew simpledemo.exe 1234567890


Error: There is not enough space on the disk.
Code: #define _ define #_ u unsigned #_ w char* #_ j(x)(*(*(x*)&T)++) #_ H j(short*) #_ K j(w) #_ e j(u*) #_ r register u #_ R(b)write(A,T=h,4*b); #_ S (u*)sbrk(Q*4+U*8)+U #_ E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; #_ V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q #_ W while( #_ Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g #_ Y W(F= *s++)&16)*T=10**T+F-'0';T++ #_ D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; #_ P if(i^z){x=Q+(n=D(x,n) #_ C if(i){q=Q*4+(s=(w)D(q,s) u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i;w q,*h=(w)X,* T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{H=1;W *s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H=17004;H=11;e=0;e=0;i=66==*h ;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K; T+=I/4*4+8*U;I=e;T+=16;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; e=0;R(4)N=F+8192;K=53;K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4 )Q=J*U;c=S;d=S;L(c);W 1){P}C}y=0;W y<J){K=72;K=0;g=J-y;H=6+U*(g>f?g=f:g);e=N;e =F;H=U*32;H=g;H=0;H=y;K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=61;K=0;H=4;e=I; e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid();W A<T)*A++=X=3*X^X/2;}v(n ,O)u*n,*O;{r*A,F=U,*L=n-F,*G=L+Q,I,c,d,M,f,g,N,q,i=0,X,T,v,s,x,*y,*z;W L<n){*L = *G;G++[F]=L++[F];}W i<J){z=O+i*F;y=n+i*F-F;i+=30;L=y-1;A=L+U*32;W L<A){L+=F; E(X,*L,x)E(q,X,s)}X=0;W X++<F){L=y++;G=z++;V;c=g|f&d;I=f^d;V;W L<=A){M=0;Z;N=d ;T=f;v=g;V;Z;c^=I&d;*G=c&~M&(I^d|N);G+=F;c=v|T&N;I=T^N;}}}z=O;y=n;I=J;W--I!=-1 ){f= *z>>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+=F;}}
added on the 2009-05-17 15:19:41 by stfsux stfsux
wget -O - http://flash-gordon.me.uk/ansi.c.txt|grep -B2 "ct to m"
added on the 2009-05-17 16:47:55 by 216 216
Code: BitReverseShuffle: ; ---------------------------------------- ; bit-reversal shuffle for fft ; edi: Ptr to Array ; eax: length of array (must be pow2) ; ---------------------------------------- dec eax xor ebx, ebx xor ecx, ecx bsr esi, eax .theloop: bsf ebp, eax mov edx, esi btc ebx, ebp sub edx, ebp btc ecx, edx cmp ecx, ebx jge .SkipSwap mov edx, [edi + ebx*4] xchg edx, [edi + ecx*4] mov [edi + ebx*4], edx .SkipSwap: dec eax jnz .theloop ret
added on the 2009-05-26 00:55:06 by torus torus
Code:/* x = A[2]*((B[1]-B[2]*A[1]/A[2])*t-A[3]+B[3])/(B[2]*A[0]-B[0]*A[2]); y = t; z = (-B[3]-B[1]*y-B[0]*x)/B[2]; */
added on the 2009-05-26 01:41:37 by xernobyl xernobyl
Code: public function getTilesetImage() { $iImage = imagecreatetruecolor(320,(($this->aOffsets['tiles']/10)*32)); imagefill($iImage, 1, 1, imagecolorallocate($iImage, 87, 0, 203)); //"JCS blue" //Every byte in the Map array points to a tile index in $_ImageData (1024 bytes per tile) $aMap = unpack('V*', substr($this->_TilesetInfo, 1024+4+2*$this->iMaxTiles, ($this->iMaxTiles*4)));
added on the 2009-05-26 01:45:28 by stijn stijn
if (!notcareabouteverything) epicfail(ImGod);

who does .. alles langweilig d-.-b
added on the 2009-05-26 02:45:36 by yumeji yumeji
Not a line, but yes, is random:

Code: IDENTIFICATION DIVISION. PROGRAM-ID. PSEUDO-RANDOM-NUMBER-GENERATOR. DATA DIVISION. WORKING-STORAGE SECTION. 01 X PIC 9(4) VALUE 8048. 01 Y PIC 9(4) VALUE 21. 01 Z PIC 9(4) VALUE 31. 01 I PIC 9(5) VALUE 0. 01 A PIC 9(4). 01 B PIC 9(4). 01 N PIC 9(2) VALUE 1. PROCEDURE DIVISION. 0001. DISPLAY "ENTER LIMIT:". ACCEPT N. DISPLAY "RANDOM SERIES:". PERFORM 0002 N TIMES. STOP RUN. 0002. COMPUTE A = Y * I + Z. DIVIDE X INTO A GIVING B REMAINDER I. DISPLAY I. ADD 1 TO I.


Eat that :P
added on the 2009-05-26 11:19:20 by Aeko Aeko
Code:/* I am thankful that I'm not writing COBOL */
added on the 2009-05-26 11:39:09 by Preacher Preacher
Preacher:

Most reading, than writing :)

But you know, it you want to translate something you have to know what someone is telling. Anyway is fun, it has some poetry. i.e. a simple for:

Code: PERFORM VARYING n FROM 10 BY 1 UNTIL n= 15 (...) END-PERFORM
added on the 2009-05-26 13:15:51 by Aeko Aeko
Code: mov r1,r2 add #-1,r2 mov.l _8,r9 dmulu.l r9,r1 sts mach,r3 shlr r3 add #1,r3 _1: mov r3,r4 _2: cmp/gt r2,r4 bt _6 mov r4,r5 sub r3,r5 mov.l @(r0,r4),r6 _3: mov.l @(r0,r5),r7 cmp/ge r6,r7 bt _4 bra _5 add r3,r5 _4: mov r5,r8 add r3,r8 mov.l r7,@(r0,r8) cmp/gt r3,r5 bf _5 bra _3 sub r3,r5 _5: mov.l r6,@(r0,r5) bra _2 add #1,r4 _6: mov #1,r8 cmp/eq r8,r3 bt _7 dmulu.l r9,r3 sts mach,r3 shlr r3 bra _1 add #1,r3 _7: rts nop .align 2 _8: .long 0xAAAAAAAB
added on the 2009-05-26 13:36:21 by mic mic
Hatikvah, then don't use the parameter system :-)
added on the 2009-05-26 20:54:16 by skrebbel skrebbel
mic, that is compiler output, isn't it?

added on the 2009-05-26 21:08:40 by torus torus
@torus: nope, just obfuscated a bit. shouldn't be too hard to see what it is for someone familiar with sorting algorithms though.
added on the 2009-05-26 21:15:23 by mic mic
Code:#include<SDL/SDL.h>/*! <~~~~~~~~~~~ Paintfucker :*: by Decipher ~~~~~~~~~~~> !*/ SDL_Surface*a;SDL_Rect b={0,0,5,5};int g,k;int c(int x,int y){return*((int*)a-> pixels+x+y*200);};int main(int d, char**e){char*h,*i;if(d<2)return 0;FILE*f=fop\ en(e[1],"r");fseek(f,0,2);g=ftell(f);fseek(f,0,0);h=malloc(g);i=h;fread(h,g,1,f) ;fclose(f);a=SDL_SetVideoMode(200,200,32,0);SDL_FillRect(a,0,0);SDL_Event j;whi\ le(1){if(SDL_PollEvent(&j)&&j.key.keysym.sym==27)break;else if(i!=h+g){switch(*i ){case'e':b.x+=5;if(b.x>195)b.x=0;break;case'w':b.x-=5;if(b.x<0)b.x=195;break;c\ ase's':b.y+=5;if(b.y>195)b.y=0;break;case'n':b.y-=5;if(b.y<0)b.y=195;break;case '*':if(!c(b.x+1,b.y+1))SDL_FillRect(a,&b,0xFFFFFFFF);else SDL_FillRect(a,&b,0); break;case'[':if(!c(b.x+1,b.y+1)){k = 0;while(i<h+g){if(*i=='[')++k;else if(*i== ']')if(!--k)break;++i;}}break;case']':k=0;while(i>=h){if(*i==']')++k;else if(*i =='[')if(!--k){--i;break;}--i;}break;}++i;}SDL_Flip(a);}free(h);return 0;}

I coded this obfuscated paintfuck interpreter some time ago, just for the fun of it under 20 minutes. Here's how to use it:
Code:paintfucker <file-name>

It is pretty cross-platform (tested on windows xp / vista and ubuntu 9.04) as well. You just need SDL to compile it.
added on the 2009-05-26 21:24:40 by decipher decipher
apparently backslashes still don't work on pouet... sigh every syntax error is a backslash jsyk :P
added on the 2009-05-26 21:25:43 by decipher decipher

login