Show newer

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

bits[x] = bits[max(0,x-1)]^bits[x+1] for x in bits
that's literally the basis of the entire demo

@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

it actually continues forever but that's the first loop

Show thread

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

Show thread

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)

i actually like this better than the sierpinski i was going for

Show thread
read bio boosted

πŒŒβƒ πŒβƒ πŒ£βƒ πŒœβƒ πŒˆβƒ πŒβƒ πŒβƒ πŒ‘βƒ πŒžβƒ πŒ‘βƒ πŒ”βƒ πŒŒβƒ πŒ‡βƒ πŒŠβƒ πŒƒβƒ πŒ€βƒ πŒ™βƒ πŒ•βƒ πŒβƒ πŒβƒ πŒ–βƒ πŒ„βƒ πŒ‘βƒ πŒ’βƒ πŒβƒ πŒšβƒ πŒβƒ πŒƒβƒ πŒ—βƒ πŒ€βƒ πŒ‹βƒ πŒ‡α·πŒα·πŒ”βƒ πŒœβƒ πŒ‹βƒ πŒ βƒ πŒƒβƒ πŒ˜βƒ πŒœβƒ πŒ‘βƒ πŒ’α·πŒ™βƒ πŒ‰βƒ πŒ’α·πŒ‡βƒ πŒƒβƒ πŒβƒ πŒβƒ πŒ‚βƒ πŒα·πŒŒβƒ πŒ βƒ πŒ‚α·πŒ„βƒ πŒŽβƒ πŒ•α·πŒ™α·πŒ„βƒ πŒ‘βƒ πŒŒβƒ πŒβƒ πŒ–βƒ πŒ’βƒ πŒ†βƒ πŒ˜βƒ πŒœβƒ πŒ‹βƒ πŒ“βƒ πŒ›α·πŒ‡α·πŒŒα·πŒ‡α·πŒ‘α·πŒ˜α·πŒ—βƒ πŒβƒ πŒ‚βƒ πŒœβƒ πŒ…α·πŒ„βƒ πŒβƒ πŒœβƒ πŒ£α·πŒβƒ πŒ£α·πŒ’βƒ πŒ‹α·πŒŒα·πŒ•α·πŒ›βƒ πŒœα·πŒ‘βƒ πŒŒα·πŒα·πŒ„α·πŒ•α·πŒžα·πŒβƒ πŒ‹βƒ πŒα·πŒ‘βƒ πŒŠβƒ πŒ€βƒ πŒŠα·πŒ‰βƒ πŒ™α·πŒ™α·πŒα·πŒ‘βƒ πŒα·πŒ‚α·πŒβƒ πŒšα·πŒ‹α·πŒŒα·πŒ‹α·πŒα·πŒŽβƒ πŒ‡α·πŒšα·πŒ†α·πŒŽα·πŒšα·πŒ†α·πŒŒα·πŒ™α·πŒœα·πŒ‰α·πŒ˜βƒ πŒŠβƒ πŒŒα·πŒ™α·πŒŠα·πŒ‘α·πŒα·πŒœα·πŒˆα·πŒ‚α·πŒ‹α·πŒ‘α·πŒ£βƒ πŒ‘α·πŒ α·πŒ“α·πŒ–α·πŒ“α·πŒ’α·πŒ–α·πŒ‡α·

@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"

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 computerfairi.es/media/9H0s0Fs

@blackle arr[Infinity] returns "aaa?", same for ["Infinity"]

Show older
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!