pouët.net

Random line of code thread

category: code [glöplog]
Code: while (%z.load.count <= $lines($scriptdirdata\scripts.txt)) {
added on the 2009-02-09 19:35:27 by ___ ___
SetInt
sei
lda #<IntRout
sta $0314
lda #>IntRout
sta $0315
cli
rts

IntRout
inc $d020
jmp $ea31
added on the 2009-02-09 21:12:08 by dcclark dcclark
$tpl->assign($oDownload->getAllData());
$tpl->assign('rating', round($oDownload->info('rating'), 1));
$tpl->assign('reviewSort', $sSort);
$tpl->assign('satisfaction',round($oDownload->info('satisfaction') * 100));
$tpl->assign('zipContents', $aZip);
added on the 2009-02-09 21:53:19 by stijn stijn
// backface culling:
if (dot(cross(positions[1] - positions[0], positions[2] - positions[0]), vec3(gl_ModelViewProjectionMatrixInverse * vec4(0,0,1,1)))>=0) {
added on the 2009-02-09 21:53:55 by xTr1m xTr1m
Code: import BASIC main = runBASIC $ do 10 LET X =: 1 20 PRINT "Hello BASIC world!" 30 LET X =: X + 1 40 IF X <> 11 THEN 20 50 END

now, try and guess the language :)
added on the 2009-02-09 22:19:40 by blala blala
void CalculateLife()
{
for (int i=0; i<GridSize; i++)
{
bool s = *(p_grid1 + i);
int n = GetNeighbours(p_grid1, i);

if (s)
{
if (n<2 || n>3)
s = false;
else
s = true;
}
else
{
if (n==3)
s = true;
else
s = false;
}

*(p_grid2 + i) = s;
}
}
added on the 2009-02-09 22:53:21 by Optimus Optimus
if (dot(cam->pos, face->normal) >= face->plane_dist-cam->max_pos_change_in_next_few_frames) { ...
added on the 2009-02-09 23:03:19 by 216 216
oh, another almost related, not a oneliner though. happy deobfuscating:)

static int chkbox(Mesh *o, Plane *p) {
float f=p->d+
p->n.x*((Vector*)((int)&o->box0+((int)&o->box1-(int)&o->box0&*(int*)&p->n.x>>31)))->x+
p->n.y*((Vector*)((int)&o->box0+((int)&o->box1-(int)&o->box0&*(int*)&p->n.y>>31)))->y+
p->n.z*((Vector*)((int)&o->box0+((int)&o->box1-(int)&o->box0&*(int*)&p->n.z>>31)))->z;
return ~(*(int*)&f>>31);
}
added on the 2009-02-09 23:10:18 by 216 216
Code: return true ? (true ? (true ? (true ? (true ? (true ? true : false) : false) : false) : false) : false) : false;
10 PRINT "Hello World"
20 GOTO 10
added on the 2009-02-09 23:43:45 by h4xor h4xor
stijn, may i recommend mplate instead?
added on the 2009-02-09 23:44:47 by skrebbel skrebbel
HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERROR!"
KTHXBYE
added on the 2009-02-10 00:10:37 by Noctis Noctis
Code: #define _ -F<00||--F-OO--; int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO() { _-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_ _-_-_-_ }
added on the 2009-02-15 15:50:23 by stfsux stfsux
I saw that circle program some year ago and I think it's really beautiful!
added on the 2009-02-15 16:02:49 by linde linde
Hey. this JAPH is actually a demo (taken from the wikipedia site, terminal need to be 150x50)
Code: # sub j(\$){($ P,$V)= @_;while($$P=~s:^ ([()])::x){ $V+=('('eq$1)?-32:31 }$V+=ord( substr( $$P,0,1,""))-74} sub a{ my($I,$K,$ J,$L)=@_ ;$I=int($I*$M/$Z);$K=int( $K*$M/$Z);$J=int($J*$M /$Z);$L=int($L*$M/$Z); $G=$ J-$I;$F=$L-$K;$E=(abs($ G)>=abs($F))?$G:$F;($E<0) and($ I,$K)=($J,$L);$E||=.01 ;for($i=0;$i<=abs$E;$i++ ){ $D->{$K +int($i*$F/$E) }->{$I+int($i*$G/$E)}=1}}sub p{$D={};$ Z=$z||.01;map{ $H=$_;$I=$N=j$H;$K=$O=j$H;while($H){$q=ord substr($H,0,1,"" );if(42==$q){$J=j$H;$L=j$H}else{$q-=43;$L =$q %9;$J=($q-$L)/9;$L=$q-9*$J-4;$J-=4}$J+=$I;$L+=$K;a($I,$K,$J,$ L); ($I,$K)=($J,$L)}a($I,$K,$N,$O)}@_;my$T;map{$y=$_;map{ $T.=$D->{$y} ->{$_}?$\:' '}(-59..59);$T.="\n"}(-23..23);print"\e[H$T"}$w= eval{ require Win32::Console::ANSI};$b=$w?'1;7;':"";($j,$u,$s,$t,$a,$n,$o ,$h,$c,$k,$p,$e,$r,$l,$C)=split/}/,'Tw*JSK8IAg*PJ[*J@wR}*JR]*QJ[*J'. 'BA*JQK8I*JC}KUz]BAIJT]*QJ[R?-R[e]\RI'.'}Tn*JQ]wRAI*JDnR8QAU}wT8KT'. ']n*JEI*EJR*QJ]*JR*DJ@IQ[}*JSe*JD[n]*JPe*'.'JBI/KI}T8@?PcdnfgVCBRcP'. '?ABKV]]}*JWe*JD[n]*JPe*JC?8B*JE};Vq*OJQ/IP['.'wQ}*JWeOe{n*EERk8;'. 'J*JC}/U*OJd[OI@*BJ*JXn*J>w]U}CWq*OJc8KJ?O[e]U/T*QJP?}*JSe*JCnTe'. 'QIAKJR}*JV]wRAI*J?}T]*RJcJI[\]3;U]Uq*PM[wV]W]WCT*DM*SJ'. 'ZP[Z'. 'PZa[\]UKVgogK9K*QJ[\]n[RI@*EH@IddR[Q[]T]T]T3o[dk*JE'. '[Z\U'. '{T]*JPKTKK]*OJ[QIO[PIQIO[[gUKU\k*JE+J+J5R5AI*EJ00'. 'BCB*'. 'DMKKJIR[Q+*EJ0*EK';sub h{$\ = qw(% & @ x)[int rand 4];map{printf "\e[$b;%dm",int(rand 6)+101-60* ($w ||0);system( "cls")if$w ;($A,$S)= ($_[1], $ _[0]);($M, @,)= split '}';for( $z=256 ;$z>0; $z -=$S){$S*= $A;p @,} sleep$_ [2];while ($_[3]&&($ z+=$ S) <=256){ p@,}}("". "32}7D$j" ."}AG". "$u}OG" ."$s}WG" ."$t","" ."24}(" ."IJ$a" ."}1G$n" ."}CO$o" ."}GG$t" ."}QC" ."$h}" ."^G$e" ."})IG" ."$r", "32}?" ."H$p}FG$e}QG$r". "}ZC" ."$l", "28}(LC" ."" ."". "$h}:" ."J$a}EG". "$c" ."}M" ."C$k}ZG". "$e" ."}" ."dG$r","18" ."}(" ."D;" ."$C" )}{h(16 ,1,1,0 );h(8, .98,0,0 );h(16 ,1,1,1) ;h(8.0 ,0.98,0, 1); redo}### #written 060204 by #liverpole @@@@@@@ #@@@@@@@@@@@
added on the 2009-02-15 19:00:55 by Joghurt Joghurt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,
added on the 2009-02-16 06:23:52 by bdk bdk
void TrippleBumpMapping(int *SomeTexture)
{

// implement TrippleBumpMapping
added on the 2009-02-17 14:50:08 by LovCAPONE LovCAPONE
#!/bin/bash
# Is today the first weekday of a month?
# Exit Code 0 = Yes
# Exit Code 1 = No

diff <(date +%d|sed 's/^0//') <(cal $(date "+%m %Y") | awk '(NR==3) && (NF<7) && (NF>1) { a=$1 } (NR==3) && (NF=7) || (NR==4) && (a<0) { a=$2 } END { print a }') &>/dev/null
added on the 2009-02-18 16:54:48 by arcane arcane
this.heartbeat = function() {
if(!this.start) {
this.construct();
}
var offset = (this.ticker*this.cfg['speed']);
for(var i=0;i<this.cfg['textLength'];i++) {
if(offset>(dims[0])) {
this.ticker = 0-Math.ceil((this.cfg['textLength']*this.sizex)/this.cfg['speed']);
}
$(this.cfg['textChars'][i]).css('left', (i * this.sizex)+(this.ticker*this.cfg['speed'])+'px');
$(this.cfg['textChars'][i]).css('top', (Math.sin(this.ticker/this.cfg['yspeed']+(i/this.cfg['speed']))*this.cfg['amplitude'])+this.top+'px');
}
this.ticker++;
}
added on the 2009-02-18 17:12:41 by stijn stijn
[sender setText:[numberFormatter stringFromNumber:[numberFormatter numberFromString:[sender text]]]];
added on the 2009-02-18 17:18:40 by psonice psonice
mov al,13h
int 10h
;i can has pixels!
added on the 2009-02-18 17:21:31 by unic0rn unic0rn
g_pd3dDevice->CreateTexture(RENDERTARGET_WIDTH, RENDERTARGET_HEIGHT, 1,0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT,
&sm_renderTarget, 0);
added on the 2009-02-18 17:29:54 by Preacher Preacher
julia.data.c.value = [Math.sin(getTimer()/1222),Math.cos(getTimer()/1444)];
added on the 2009-02-18 17:31:56 by unic0rn unic0rn
Preacher, no more OGL anymore ?
added on the 2009-02-18 17:32:41 by Aeko Aeko
Aeko: This is work code :)

I'm still using OGL at home, at least for now. My next demo(s) will still be in OGL and open source.
added on the 2009-02-18 17:36:56 by Preacher Preacher

login