Show newer

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

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

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

i just realized with the SDL thing if i wanted to i could just memory map some assembly up there and call it to render stuff instead of doing pure python
hhhhhh
it's cheating but it's also Really Speed computerfairi.es/media/fCJKuDN

i just wrote this code: 

def render(a=[0]):
a[0]+=1;t=a[0]

i would be a great dnd dm because i am really good at improvising reasons that something is some way on the spot

i mean SDL makes you implement a fucking *audio callback function* to play audio though so

programmer says to me "but boots, python wasn't built for real-time video and audio generation using ctypes SDL and an aplay subprocess!!"
"Fuck you nerd" i reply and then drive into the sunset, blazing along at 4-16 fps

here's a fun edit to do: after line 13, add "f(u)" into the for loop! it's slower, but you can watch it *as it loads in!!*

Show thread

here's the most smallest i could get it!!

ghostbin.com/paste/aupxt

pops a SDL window and loads a test image into it!!

this basically
turns the image from a digit into a boolean list
and then loads in the image data from the *bottom of memory*

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