Last active
October 5, 2024 18:58
-
-
Save cbrwn/10449729 to your computer and use it in GitHub Desktop.
Green Eggs and Ham in Brainfuck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[----->+<]>-----<[-]>>[-]<<-[--->>>++++++++++[<++++>-]<<<]>>-------<<[-] | |
>>>>[-]<<<<+++[>>>>+++++++++++<<<<-]++[>>++++<<-]>>.>>-.<<<.<++[>++++++<-] | |
>.>>.>.<<<<++[>>+++++<<-]>>.<<++[>------<-]>.<++[>++++++<-]>.<++++++++++.. | |
[-]++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.>>.>.<<<<++[>>++++ | |
+<<-]>>.<<++[>------<-]>.<++[>++++++<-]>.<++++++++++.[-]>>.<<+++[>----<-]> | |
.<+++[>++++<-]>.>>>.<<<<++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<++[>++++++< | |
-]>.<++++++++++..[-]++[>>+++++<<-]>>+.<-----.<++[>---<-]>-.<+++[>++++++<-] | |
>+.>>>.<<-.<<++++[>-----<-]>+.<+++[>++++<-]>.<+++[>>>>++++<<<<-]>>>>+.<<<< | |
++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.<+++[>>>>----<<<<-]>> | |
>>.<<<<++++++++++.[-]++[>>+++++<<-]>>+.<-----.<++[>---<-]>-.<+++[>++++++<- | |
]>+.>>>-.<<-.<<++++[>-----<-]>+.<+++[>++++<-]>.<+++[>>>>++++<<<<-]>>>>+.<< | |
<<++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.<+++[>>>>----<<<<-] | |
>>>>.<<<<++++++++++.[-]>>.>>-.<<<<++[>----<-]>-.<++[>+++++<-]>+.>>>.<<<-.+ | |
.+++++.>>>.<<<<++[>----<-]>.---.++.------.<++++++++++.[-]+++[>+++++<-]>.<+ | |
++[>----<-]>.<++[>---<-]>-.<+++[>++++++<-]>+.>>>.<<<<++[>>+++++<<-]>>.<<++ | |
+[>------<-]>-.<+++[>++++<-]>.<+++[>>>>++++<<<<-]>>>>+.<<<<++[>>-----<<-]> | |
>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.<+++[>>>>----<<<<-]>>>>.<<<<++++++++ | |
++..[-]>>-----.<++.>>>-.<<<<++[>+++++<-]>.<++[>-----<-]>.<++[>+++<-]>.>>>. | |
<<<<++[>-----<-]>+.---.++.<++[>---<-]>.<++++++++++.[-]>++.<++[>+++++<-]>+. | |
<+++[>----<-]>-..<++[>++++<-]>+.>>>.<<<<++[>----<-]>-.++..<+++[>++++<-]>.> | |
>>.<<<<++++[>-----<-]>++.<+++[>++++<-]>+.<++[>-----<-]>.>>>.<<<++++.<++[>- | |
--<-]>-.<+++[>++++<-]>.>-----.<<++++++++++..[-]++[>>+++++<<-]>>.>>.<<<<++[ | |
>----<-]>-.<++[>+++++<-]>+.>>>.<<<-.+.+++++.>>>.<<<<++[>----<-]>.---.++.<+ | |
+[>---<-]>.>>>.<<<<+++[>+++++<-]>.<+++[>----<-]>.---.<++[>++++<-]>.<+++[>> | |
>>++++<<<<-]>>>>.<<<<++++++++++.[-]++[>>+++++<<-]>>.<<+++[>----<-]>.<+++[> | |
++++<-]>.>>>+.<<<<++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.>>> | |
+.<<<<++++++++++.[-]>>.<<+++[>>>>----<<<<-]>>>>--.<<<<++[>----<-]>-.<+++[> | |
++++<-]>-.>>>.<<<-.+.+++++.>>>.<<<<++[>----<-]>.---.++.------.<++++++++++. | |
[-]>++.<+++[>++++<-]>-.<+++[>----<-]>-..<++[>++++<-]>+.>>>.<<<<++[>----<-] | |
>-.++..<+++[>++++<-]>.>>>.<<<<++++[>-----<-]>++.<+++[>++++<-]>+.<++[>----- | |
<-]>.>>>.<<<++++.<++[>---<-]>-.<+++[>++++<-]>.<++[>>>>+++++++<<<<-]>>>>.<< | |
[- Section of Dr Seuss' "Green Eggs and Ham" | |
Written by Cameron Brown : quentin(dot)sx | |
Output(; represents period/comma and _ represents hyphen): | |
"I am Sam | |
I am Sam | |
Sam I am | |
That Sam_I_am! | |
That Sam_I_am! | |
I do not like | |
that Sam_I_am! | |
Do you like | |
green eggs and ham? | |
I do not like them; | |
Sam_I_am; | |
I do not like | |
green eggs and ham;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment