my head actually hurts!
ascii codes are mandatory in bf programing, so to guide me in making my first program i coded a helper function in c like so:
ascii.c
/** char to ascii code converter
* brainf*ck helper program i wrote for fun.
*/
#include
#include
void t(char *stepy) {
while (*stepy) {
printf("%c : %d\n",*stepy, *stepy);
stepy++;
}
}
int main()
{
char *stepy;
stepy = strdup("I Love You Steph!\n");
t(stepy);
free(stepy);
return 0;
}
when compiled and run, ascii.c will print out the string and its ascii code, character by character.
ok so the easy part is done. i now had to convert those encodings to something that bf can understand. the finished product? here it is. took me roughly 10 minutes to complete this!
steph.bf ++++++++++[>+++++++<-]>+++.>+++[>++++++++++<-]>++. >++++++++++++[>++++++>+++++++++>+++++++++>++++++++<<<<-] >++++.>+++.>++++++++++.>+++++.>+++[>++++++++++<-]>++. >++++++++++[>+++++++++>+++++++++++>++++++++++++<<<-]>-. >+.>---.>+++[>++++++++++<-]>++.>++++++++++[>++++++++ >++++++++++++>++++++++++>+++++++++++>++++++++++ >+++<<<<<<-]>+++.>----.>+.>++.>++++.>+++.>++++++++++.
time waster for sure. but i had a good time. oh well, goodnight and sweet dreams.
