things i have learned:
1. calling SDL_UpdateRect per-pixel is so much better than SDL_Flip every frame
2. 0xFF is longer than 255
3. having a square window saves bytes just because you dont need seperate w,h variables
4. arrays suck use really long numbers containing all of your values and iterate them with bitwise operators
@aeonofdiscord if you can figure out how to add a donk to Rule 90 (cellular automata)
@aeonofdiscord that would be extremely hard to do especially considering the demo is currently 495 bytes out of 500
unless you mean like record the demo and add a donk to it
this was Really Heckin Hard to golf down to 500 characters but it's a really neat demo with both sound and picture stuff!!!
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)
πβ πβ π£β πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ πβ π‘β π’β πβ πβ πβ πβ πβ πβ πβ πα·πα·πβ πβ πβ π β πβ πβ πβ πβ π’α·πβ πβ πα·πβ πβ πβ πβ πβ πα·πβ π β πα·πβ πβ πα·πα·πβ π‘β πβ πβ πβ π’β πβ πβ πβ πβ πβ πα·πα·πα·πα·π‘α·πα·πβ πβ πβ πβ π α·πβ πβ πβ π£α·πβ π£α·πβ πα·πα·πα·πβ πα·π‘β πα·πα·πα·πα·πα·πβ πβ πα·π‘β πβ πβ πα·πβ πα·πα·πα·π‘β πα·πα·πβ πα·πα·πα·πα·πα·πβ πα·πα·πα·πα·πα·πα·πα·πα·πα·πα·πβ πβ πα·πα·πα·π‘α·πα·πα·πα·πα·πα·πα·π£β π‘α·π α·πα·πα·πα·πα·πα·πα·
@aeonofdiscord nope, it's probably doing the same thing as me though, because im just writing the audio data to pixel memory
@aeonofdiscord i meant like "this code is not very optimal at all"
also the end effect is not exactly what i wanted which is "screenflips and audio run at same time"
@Gargron prayers
@Elizafox dicot
remember that login prompt vnc wget thing i found? well i found another server it really tried to go at too!! i like how it stretches out some letters it makes it look really eager https://computerfairi.es/media/9H0s0Fsz_INAXZrVL6k
@blackle that returns "aaa!"
i will no longer be on computerfairi.es
please follow @boots