>>110065925
>A proof isn't dogma. It is a proof.
WHEN POLACK SAY A DOGMA —IS PROOF, WHEN MATHIE SAY A PROOF —IS DOGMA111
>>110065954
Jesus fuck retard, just say you're too dumb read pseudocode, here's the same in your fucking cnile lang:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
/* write your fucking magic halting problem decidability algorithm here */
extern int halting_magic(const char *program, const char *input);
void H(const char *program, const char *input)
{
int terminates = halting_magic(program, input);
exit(terminates ? 0 : 1);
}
void D(const char *x)
{
pid_t child = fork();
if (child == -1) {
perror("fork");
exit(2);
}
if (child == 0) {
H(x, x);
}
int status;
if (waitpid(child, &status, 0) == -1) {
perror("waitpid");
exit(2);
}
if (!WIFEXITED(status))
exit(2); /* who the fuck knows */
switch (WEXITSTATUS(status)) {
case 0: /* H says this program halts. */
for (;;) {} /* so fuck you, imma loop instead */
case 1: /* H says this program runs forever. */
exit(0); /* so fuck you, imma exit instead */
default:
exit(2); /* fuck off, you were supposed to return 0 or 1 */
}
}
/* compile, link your fucking magic function in and run with `./contrarian "$(cat contrarian.c)"` */
int main(int argc, char **argv)
{
if (argc != 2)
return 2;
D(argv[1]);
}
Or are you gonna pretend you don't know how `fork` works to avoid being owned?