@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
@grainloom @jk There's a standard library function for this.
@starbreaker @grainloom the implementation isn’t silly enough im afraid
@jk @starbreaker @grainloom go look again, it's randomly silly
@djsundog @jk @starbreaker @grainloom reimplement libc with a focus on maximizing implementation silliness
@djsundog @jk @starbreaker @grainloom oh wait that's just called msvc whooooops
@io @grainloom @starbreaker @jk @djsundog reimplement libc by shelling out to, well, shell utilities.
did I reinvent plan9 yet?
@grainloom @Shamar @io @starbreaker @jk @djsundog memory should be a file.
the only syscalls should be mmap and system.
@Shamar @grainloom @io @starbreaker @jk @djsundog strcpy(mmap("/sys/mkfile", ???), "/tmp/memory"); mmap("/tmp/memory", ???); etc
@jk @grainloom what is worrying is its probably feasible. one Asterisk telephone exchange at work (soon going to be replaced) has version of Asterisk/Zaptel that segfaults on British Telecom line test signals, that are sent late every evening, then restarts as if nothing has happened (other than console warning and the core dump in /tmp).
So it must be possible to use a script to keep running the cursed code and eventually return the "good" values 😉
@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