Show newer

okay so i was trying to blit an image to the screen and it was loading fine until i realized that it was loading in upside down so that's fun

see the fun part is theoretically i can just blit a image to that sdl window by running memset and having it fill the pixel space with a very long number that represents the image

python script that opens a SDL window which fades from black to white and then closes (using only NATIVE LIBRARIES) 

from ctypes import*
from struct import*
from time import*
S=CDLL('libSDL-1.2.so.0')
u=S.SDL_SetVideoMode(640,480,32,0)
r=unpack('iPiihP',string_at(u,40))
f=S.SDL_Flip
for a in range(0,0xff):
memset(r[5],a,r[4]*r[3])
f(u)
sleep(0.01)

S.SDL_Quit()

Show thread

HAHA YES I GOT SURFACE FLIPPING WORKING
I FEEL THE MAGIC

Show thread

im actually pretty proud of this because if you extend the length of that string_at, what comes after the second "xxh" in that unpack is a pointer to the memory where the pixels for that window are stored, meaning i'll be able to just grab the sdl window's contents and play with them instead of having to mess with "rectangles" and stuff

Show thread

"but boots, why would you need to use netcat, curl does just fine?"
curl can't send "GET /../../ HTTP/1.1" or really "GET [some fuzz] HTTP/1.1" in general

Show thread

im pretty sure i've used netcat as curl enough times that i could be considered an http client

sorry that was just still in the outbox i had to clean it out to continue posting

read bio boosted

‧‬¯0?¾AÑ ⁝@⁊‏ ‱⃡ À~ f@`⁢ç⁙‫⃦î <3Yò‌ ¯_ð‛ ⃩t~ ¢]N⃒⃭ <‫‬Δ‐á ⃣‖¦ |⁈\u† Q‿ Ç‛…․ ß­⁂ V]ñ ⁈›I⁁ýÔ ‹⁋ó‰‫ ⃜~û‰"︢︣³ ⁂Ë ³«)_P⁤1 ‶§⁔ùs À¦]

instead of using css files, simply have javascript procedurally generate css

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!