Skip to content

Instantly share code, notes, and snippets.

@samhann
Created August 3, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samhann/2e471243aa68f4d76da25448234d7e97 to your computer and use it in GitHub Desktop.
Save samhann/2e471243aa68f4d76da25448234d7e97 to your computer and use it in GitHub Desktop.
/* This is a translation of bfint.txt, generated by bftoc.py (by Paul Kaefer)
* It was generated on Monday, August 03, 2020 at 02:48PM
*/
#include <stdio.h>
void main(void)
{
int size = 1000;
int tape[size];
int i = 0;
/* Clearing the tape (array) */
for (i=0; i<size; i++)
tape[i] = 0;
int ptr = 0;
ptr += 3;
tape[ptr] += 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
}
ptr += 2;
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
}
tape[ptr] += 2;
ptr += 1;
tape[ptr] += 1;
ptr += 1;
tape[ptr] += 7;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] += 4;
ptr += 2;
tape[ptr] += 2;
ptr -= 1;
tape[ptr] -= 1;
}
tape[ptr] += 2;
ptr += 2;
tape[ptr] += 1;
ptr += 1;
tape[ptr] += 1;
ptr += 1;
tape[ptr] += 5;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] += 2;
ptr += 1;
tape[ptr] += 6;
ptr -= 2;
tape[ptr] -= 1;
}
tape[ptr] += 1;
ptr += 3;
tape[ptr] = getchar();
ptr -= 1;
tape[ptr] += 2;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr += 1;
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
ptr += 2;
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr += 2;
}
ptr -= 2;
tape[ptr] -= 1;
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
}
ptr -= 1;
tape[ptr] += 1;
ptr += 2;
while (tape[ptr] != 0)
{
ptr += 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] += 1;
ptr += 1;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] += 1;
ptr += 1;
tape[ptr] -= 1;
}
ptr += 1;
}
ptr -= 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
}
ptr -= 1;
}
tape[ptr] += 2;
ptr -= 1;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] += 9;
ptr += 1;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] -= 1;
ptr += 1;
tape[ptr] -= 1;
}
ptr += 2;
}
ptr += 2;
}
}
ptr -= 2;
}
ptr -= 1;
}
ptr -= 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr -= 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr += 1;
}
ptr += 2;
while (tape[ptr] != 0)
{
ptr += 2;
}
tape[ptr] += 1;
while (tape[ptr] != 0)
{
ptr -= 2;
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
}
ptr -= 1;
tape[ptr] += 1;
ptr += 2;
tape[ptr] -= 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
ptr += 1;
}
tape[ptr] += 1;
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
ptr += 2;
}
ptr -= 4;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr -= 2;
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
}
tape[ptr] += 1;
ptr -= 2;
while (tape[ptr] != 0)
{
tape[ptr] += 1;
ptr += 1;
tape[ptr] += 1;
ptr -= 2;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] -= 2;
ptr += 1;
tape[ptr] += 1;
ptr -= 2;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] += 1;
ptr -= 1;
while (tape[ptr] != 0)
{
ptr += 2;
tape[ptr] += 1;
ptr -= 2;
tape[ptr] -= 1;
}
}
}
ptr += 1;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] += 1;
ptr += 1;
tape[ptr] -= 1;
}
ptr -= 1;
}
tape[ptr] += 2;
ptr += 2;
tape[ptr] -= 2;
ptr += 1;
while (tape[ptr] != 0)
{
ptr += 1;
}
ptr += 2;
while (tape[ptr] != 0)
{
ptr += 2;
}
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 2;
tape[ptr] += 1;
ptr -= 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr -= 1;
}
ptr -= 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
while (tape[ptr] != 0)
{
ptr -= 2;
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
}
tape[ptr] += 1;
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
ptr -= 1;
tape[ptr] += 1;
ptr += 2;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
ptr -= 2;
tape[ptr] += 1;
ptr += 1;
tape[ptr] += 2;
ptr += 1;
tape[ptr] -= 1;
while (tape[ptr] != 0)
{
ptr -= 1;
tape[ptr] -= 1;
ptr += 1;
while (tape[ptr] != 0)
{
ptr -= 2;
tape[ptr] += 1;
ptr += 2;
tape[ptr] -= 1;
}
}
}
ptr -= 1;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] += 1;
ptr -= 1;
tape[ptr] -= 1;
}
ptr += 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
ptr += 1;
}
ptr += 1;
}
ptr += 1;
while (tape[ptr] != 0)
{
ptr += 2;
}
ptr += 2;
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 2;
tape[ptr] += 1;
ptr += 2;
tape[ptr] += 1;
ptr += 2;
}
ptr -= 2;
while (tape[ptr] != 0)
{
tape[ptr] -= 1;
ptr += 8;
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 1;
printf("%c",tape[ptr]);
ptr += 7;
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] -= 1;
ptr += 5;
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] = getchar();
ptr += 3;
}
ptr -= 2;
while (tape[ptr] != 0)
{
ptr += 1;
tape[ptr] += 1;
ptr += 1;
}
ptr -= 2;
while (tape[ptr] != 0)
{
tape[ptr] += 1;
ptr -= 2;
}
ptr -= 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment