Comment

Comment by NilsIRL

Generated C:

  #include <stdio.h>
  
  char mem[30000] = {  };
  
  #define OUTPUTS 0
  char outputs[OUTPUTS] = {  };
  
  int main() {
      char* ptr = mem + 0;
      fwrite(outputs, sizeof(char), OUTPUTS, stdout);
  
      ptr[2] = getchar();
      ++ptr[2];
      while (ptr[2]) {
          ptr[2] -= 11;
          while (ptr[2]) {
              ptr[2] -= 22;
              while (ptr[2]) {
                  ++ptr[3];
                  --ptr[1];
                  while (ptr[1]) {
                      ++*ptr;
                      ++ptr[1];
                  }
                  ptr[2] = 0;
              }
              ptr[2] = 0;
          }
          ptr[1] = 0;
          ptr[1] += ptr[3] * 1;
          ptr[3] = 0;
          ptr[2] = getchar();
          ++ptr[2];
      }
      ptr[1] = 0;
      ptr[3] += *ptr * 1;
      ptr[2] += *ptr * 1;
      *ptr = 0;
      *ptr += ptr[3] * 1;
      ptr[3] = 0;
      ++ptr[1];
      while (ptr[2]) {
          --ptr[1];
          while (ptr[2]) {
              ptr[3] += 10;
              while (ptr[2]) {
                  --ptr[2];
                  --ptr[3];
                  while (ptr[3]) {
                      ++ptr[4];
                      ptr += 3;
                  }
                  while (ptr[4]) {
                      ++ptr[4];
                      ptr[3] += ptr[4] * 1;
                      ptr[4] = 0;
                      ++ptr[5];
                      ptr += 3;
                  }
                  ptr -= 3;
              }
              ptr[3] = 8;
              ptr[2] += ptr[3] * 6;
              ptr[3] = 0;
              ptr[2] += ptr[4] * 1;
              ptr[4] = 0;
              ptr[3] += ptr[5] * 1;
              ptr[5] = 0;
              ++ptr;
          }
          ++ptr;
      }
      while (ptr[1]) {
          --ptr[1];
          ptr[3] += 8;
          ptr[2] += ptr[3] * 6;
          ptr[3] = 0;
          ptr += 2;
      }
      while (ptr[0]) {
          putchar(ptr[0]);
          *ptr = 0;
          --ptr;
      }
      ptr[1] += 10;
      putchar(ptr[1]);
  
      return 0;
  }
parent NilsIRL 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton