io is a user on rva.party. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

I taught some C to my sis today and it's hard because she is smart and has questions
like, I wasn't prepared to have to explain PRNGs but I had to coz she wanted to know how random number generation is done because I mentioned that "int x;" gets a random number and she asked "so if I want a random number I should just look at some random memory location" and I couldn't in good conscience say "yeah, that is a perfectly valid way to do RNG"

@grainloom function that gets a random uint8_t by continually spawning a subprocess that attempts to dereference a random memory address. when eventually one doesn't segfault, it returns that byte. warning: random number distribution is heavily biased to 0 and also quite biased to 255

@jk upon reading this toot Dennis Ritchie's ghost manifested in my room, took the UNIX manual from my shelf and smashed my laptop with it

@starbreaker @grainloom the implementation isn’t silly enough im afraid

@djsundog @jk @starbreaker @grainloom reimplement libc with a focus on maximizing implementation silliness

io @io

@djsundog @jk @starbreaker @grainloom oh wait that's just called msvc whooooops