demo!! 

from ctypes import*
from struct import*
from subprocess import*
p=480
k=p*4
S=CDLL('libSDL.so')
u=S.SDL_SetVideoMode(p,p,32,0)
r=unpack('iPiihP',string_at(u,40))
f=S.SDL_UpdateRect
a=0
c=range(p)
e=1<<(p/2)
s=Popen(['aplay','-r2000','-N','-B0'],stdin=-1)
while True:
a+=1;
for i in c:
e=eval('0b'+''.join('01'[(e>>max(0,j-1)&1)^(e>>(j+1)&1)]for j in c))
for x in c:
h=(255,0)[e>>x&1]
memset(r[5]+(x*4+a*k)%(p*k),h,4)
s.stdin.write(chr(e>>x&255));
f(u,x,a,1,1);
if a&8:f(u,0,0,p,p)

Follow

this was Really Heckin Hard to golf down to 500 characters but it's a really neat demo with both sound and picture stuff!!!

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!