Created
March 8, 2013 05:31
-
-
Save alandipert/5114415 to your computer and use it in GitHub Desktop.
This file contains 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
(eval((fn[program](let [n (zipmap '(+ - > < . ?)(repeatedly gensym))](letfn[(f*[ | |
s] (if (vector? s) `(while (not (~(n '?))) ~@(map f* s)) `(~(n s))))]`(let [t# ( | |
int-array 100 0)pt# (atom 0)a#(fn[c#]#(aset t# @pt#(c# (aget t# @pt#))))b#(fn[d# | |
]#(swap! pt# d#)) ~(vec (map n '(+ - > <)))(map #(%1 %2)[a# a# b# b#](cycle [inc | |
dec]))~(n '.)#(print(char(aget t# @pt#)))~(n '?)#(zero?(aget t# @pt#))]~@(map f* | |
(read-string(str "("(->> program (interpose \space) (apply str)) ")" )))))))"+++ | |
+++++[>++++++++<-]>+.[>+<-]+++++[>-----<-]>--------.[>+<-]++++++++[>++++++++<-]> | |
++++++++++++.+++.+++++.[>+<-]+++++++++[>---------<-]>---.[>+<-]++++++++[>+++++++ | |
+<-]>+++++++++++++++.---------.[>+<-]++++++++[>--------<-]>------.[>+<-]++++++++ | |
[>++++++++<-]>++++++++.-------.++.++++++++.--.+++++.-------.[>+<-]++++++++[>---- | |
----<-]>-------.[>+<-]++++++++[>++++++++<-]>+++++++++.++++++++++.[>+<-]+++++++++ | |
[>---------<-]>--.[>+<-]++++++++[>++++++++<-]>++++++++++++++++.----.-----------. | |
++++++++++++++++++++++++.----------------.+++++.-------.[>+<-]++++++++[>-------- | |
<-]>-------.[>+<-]+++++++++[>+++++++++<-]>++++++.--------------.+++++++++++.---- | |
--------.[>+<-]++++++++[>--------<-]>--------.[>+<-]++++++++[>++++++++<-]>++++++ | |
+++++++++.+++++.------------.---.+++++++++++++.[>+<-]+++++++++[>---------<-]>-.[ | |
>+<-]++++++++[>++++++++<-]>++++++++++++++++.-----------.++++++++++.+.----.------ | |
-.[>+<-]+++++++[>-------<-]>--------.------------.[>+<-]+++++++++[>+++++++++<-]> | |
++++++++.----------.++++++.[>+<-]+++++++++[>---------<-]>----.[>+<-]++++++++[>++ | |
++++++<-]>+++++++++++.+++.+.++++++++.[>+<-]++++++++[>--------<-]>-----------.--- | |
---------.[>+<-]++++++++[>++++++++<-]>+++++++.--.+++++++++++++++..-----------.++ | |
+++.-------.[>+<-]++++++++[>--------<-]>-------.[>+<-]+++++++++[>+++++++++<-]>++ | |
+.------------.---.++++++++.[>+<-]++++++++[>--------<-]>-------------.[>+<-]++++ | |
+++++[>+++++++++<-]>+++.-----.[>+<-]++++++++[>--------<-]>---------------.[>+<-] | |
++++++++[>++++++++<-]>++++.+++++++++++.[>+<-]++++++++[>--------<-]>------------- | |
--.[>+<-]+++++++++[>+++++++++<-]>++.+.--.-----------------.+++++++++++++.------- | |
.--.[>+<-]++++++++[>--------<-]>-----.[>+<-]+++++++++[>+++++++++<-]>+++.-------- | |
----.+.+++++.-------.++++++++++++.[>+<-]++++++++[>--------<-]>-----.------------ | |
--.+++++++++++++.[>+<-]++++++[>++++++<-]>++.[>+<-]+++++[>+++++<-]>++++++++.----- | |
----------.+++++++++++++++++.-----------------.[>+<-]++++++++[>--------<-]>----- | |
.[>+<-]+++++++[>+++++++<-]>++++++.++++++++++++++++++++++++.+++++++++++.--------- | |
---.-----.--------.++++++++++.[>+<-]+++++++++[>---------<-]>----------------.")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment