Created
April 7, 2011 13:39
-
-
Save hiromu/907788 to your computer and use it in GitHub Desktop.
givemac2 ソーシャルネットワークの未来像 - @hiromu1996
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
brainfuckのソースコードを実行すると、小論文が表示されます。 | |
注意: UTF-8で表示させてください。 | |
注意: インタープリタの実装によっては表示されないかもしれませんが、仕様に基づいた実装のbfやbeefなどでは動作を確認しています。 | |
また、原文からbrainfuckの変換に使用したプログラムのソースコードも添付しております。 | |
ライセンスはGPLv3です。 | |
容量は以下のようになっているので、制限内です。 | |
brainfuckのソースコード 14KB | |
変換プログラムのソースコード 2.1KB | |
より多くの方にbrainfuckに触れていただくために原文を添付していませんが、応募期間終了後に公開します。(http://tl.gd/9nb1ih) |
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
++++++++++++++++++++[>>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++<<<<<<<<<<<<<-]>>>>>>>>>>>>++++++++.<<+++++++.<<--.>>>>-.<<<<--------.++.>>>>.<<<<----.+.<<<+++.-----.+++++.>>>>>>>.<<<<.>>------------.<<<<<++++.>+.---.>>>>>>.<<<<.>>-.>>+.<<++++++++++.<<-.>>>>+++.<<<+++++++++++.++++.>>>----.<<<<++.++++++++++++++++.>>>>+++.<<<<-------.------.>>>>---.<<<<----.>------------.>>>.<<<<.>+++.>>>.<<<<.+++.>>>>.<<<<--.+++++++++.>>>>.<<<<<+++++++++.>>++.>>>+++++.<<<.<<-.>>>>>-----.<<<<<+.>>-----.>>>.<<<<<.>>+++.>>>.<<<<<+..>>>>>++++++.<<<<<-.>+++.>>>>-.<<<++.<<-.>>>>>-----.<<<<<+.>>-.>>>.<<<<<.>>++++++++.>>>.<<<<<.>>-----.>>>.<<<<<.+++.>>>>>.<<<<<---.>>----------.>>>.<<<<<+.>-.>>>>.<<<<<-.+++++.>>>>>.<<<<<------.++.<<<<<<++++++++++.>>>>>>>>>>>+.<<++++++.<<--.>>>>-.<<<<<-.>---.>>>>.<<<<<.>>>--------------.>>.<<<<<-.+.<<---.>>----------.<+++++++.>---..<----.>--.>>>>>.<<<<-------.>>-.>>+++.<<<----------.<++++++.>>>>-.<<--.<+.>>>--.<<<<------.>>------.>>.<<<<+.>>++++++++++++.>>.<<<<+.>++++++++.>>>.<<<<.>++++++.>>>.<<<<.++++++++.>>>>.<<<<---------.>>--.>>.<<<<+.>>+++++++++++.>>.<<<<-.>>-----.>>.<<<<+.>++.>>>.<<<<.>>----.>>.<<<<-.++++++++++++++++.>>>>++.<<<<---.+++++++.>>>>--.<<<<<++++++++++++++++.+++++++++.>>>>>.<<<<<----------.>>-------.>>>.<<<<<.>-----.>>>>.<<<<<.>>>-----.>>.<<<<<++.+.>>>>>.<<<<<-.>>>>------------.>.<<<<<.>>>---.>>.<<<<<--.>>>----.>>.<<<<<.>>>++++++++.>>.<<<<<+..>>>>>.<<<<<-.>>>.>>.<<<<<+.++.>>>>>.<<<<<---.>>>-----.>>.<<<<<.>--.>>>>.<<<<<.>>>.>>.<<<<<.>>+++.>>>.<<<<<.>>+++.>>>.<<<<<.+++.>>>>>.<<<<<--.>----.>>>>.<<<<<--.++.<<<<<<.>>>>>>>>>>>.<<<<<+.>.>>>>.<<<<<.>>-.>>>.<<<<<.>>>>.>.<<<<<-.>>>>---.>.<<<<<.++.>>>>>+++.<<<---------.<<----.>>>>>.<<<------.>++++++.>>.<<<<<+++.++.>>>>>-.<<<++++++++++.>+.>>--.<<<<<----.>>>---.>>++.<<<<<++++.>>+++++.>>>+.<<<<--.++.>>>>---.<<<<<----.>>++.>>>.<<<<<.>++.>>>>.<<<<<.>>--------.>>>.<<<<<+.>---.>>>>.<<<<<--.+.>>>>>++++.<<<.++++++.>>>+.<<-.<-------------.>>>-----.<<<<<+.++.>>>>>++++++.<<<+++++.+++++.>>>--.<<<---------.>>++++.>----.<<<<<---.+++.>>>>>+++.<<<<<-.++.>>>>>-.<<<+++++++.>++++.>>--.<<<<<---.>++++++++.>>>>++.<<<<<+++.>>>.>>+.<<<----.<<++++.>>>>>---.<<<<<--------.>>>----------.>>.<<<<<.>-----.>>>>.<<<<<.>>+++.>>>.<<<<<+.>---.>>>>.<<<<<--.+.<<<++++++++.>-------.>>>>>>>.<<<<<.>>>.>>.<<<<<++.>>++.>>>.<<<<<.>>>>-.>.<<<<<.>>>++++.>>.<<<<<-.>++++++++.>>>>+.<-.<<++.>>>+++.<<<<++.>>---.>>----.<<<<<-.>+++++.>>>>.<<<<<+.+++++++++.>>>>>.<<<<<----------.>------.>>>>.<<<<<.>>>.>>.<<<<<+..>>>>>.<<<<<-.>>>-.>>.<<<<<.>------.>>>>.<<<<<+.>--.>>>>.<<<<<-.>>---.>>>.<<<<<+.>++.>>>>.<<<<<-.+++++.>>>>>.<<<<<------.++.<<<<<<.>>>>>>>>>>>.<<<<<-.>++++++++.>>>>.<<<<<+.+++++++.>>>>>.<<<<<--------.>>>++++.>>.<<<<<+.>>>>------.>.<<<<<+.>>>>+++++++.>.<<<<<.++++++.>>>>>.<<<<<------.>----.>>>>.<<<<<.>>>>.>.<<<<<.+++.>>>>>.<<<<<----.>>+++.>>>.<<<<<-.>>>---.>>.<<<<<.>>>++++++.>>++++++.<<<<<-.>>.>>>---.<<<<-.>>>--.>---.<<<<<+.>>>---.>>.<<<<<+.++++++.>>>>>.<<<<<-------.>>.>>>.<<<<<.>>+++.>>>.<<<<<-.+.>>>>>++.<<<<<+++++.>+++++++++.>>>>++.<<<<+++.+++.>>>>----.<<<<<---.>>>>+.>++.<<<<<++++++++.++++++++++.>>>>>++.<<<<<-.>>>>.>----.<<<<<-------------------.>>>+++.>>++.<<<<<++++.>>>+++.>>+.<<<<---.<++++.>>>>>---.<<<<<---------.+.>>>>>.<<<<<+.>>--.>>>.<<<<<+.>---.>>>>.<<<<<.>>>++.>>.<<<<<.+++++.>>>>>.<<<<<-------.>>>-----.>>++.<<<<--------.-------.>>>>++.<<<-----.++++++.>>>----.<<<<<+.++.>>>>>++.<<<<+++++.<--.>>>>>.<<<<-----.>-----.>>>+++.<<<<<--.+++++.>>>>>-----.<<<<<----.>>>.>>++++.<<.<+.>>>.<<<<++++++.<+++++.>>>>>----.<<<<<-----.>>>----.>>.<<<<<.>>>-.>>.<<<<<+..>>>>>.<<<<<-.>>>--.>>.<<<<<.>---.>>>>.<<<<<+.>--.>>>>.<<<<<.>---.>>>>.<<<<<-.>--.>>>>.<<<<<.>>>++++.>>.<<<<<.>>>-.>>.<<<<<.>>++.>>>.<<<<<.>>+++.>>>.<<<<<.>--.>>>>.<<<<<+.>+++++++.>>>>.<<<<<--.++.<<<<<<.>>>---.>+++.-------.>>>>>>>.<<<<<.>+++++++.>>>>+.<++.++.>-.<<<<<-.+++++++.>>>>>.<<<<<-------.>>>++++++.>>+++.<<<+.<++++++.>>>>---.<<<<<-.+++++.>>>>>.<<<<<----.>>+++.>>>.<<<<<+.>>>+++++.>>.<<<<<+.>>>>---.>.<<<<<.>-----.>>>>.<<<<<-.>>>>---.>.<<<<<.>-.>>>>+.<++++.<<<++++++++++.>>>>-.<<<<<.+++++++++.>>>>>.<<<<<----------.>---------.>>>>.<<<<<.>>--.>>>.<<<<<.>-------.>>>>.<<<<<.>>-.>>>.<<<<<.>+.>>>>.<<<<<-.+.>>>>>++.<<<<++.>>------.>>+++.<<<<<++.>>>>.>--.<<<<<---.>>.>>>---.<<<<<+.>>>.>>++++.<<<<<+++.>>------.>>>++.<<<--------.<+.>>>>----.<<<+++++++++++.+++.>>>--.<<<<<---.>>.>>>.<<<<<.+.>>>>>.<<<<<.>------.>>>>.<<<<<--.+.>>>>>.<<<<<++.>+++++++++.>>>>.<<<<<-.>>>>-----.>.<<<<<+.>------.>>>>.<<<<<-.>>>>+.>.<<<<<-.>>+.>>>.<<<<<.>++++++++++.>>>>.<<<<<.>>--.>>>.<<<<<.>>>-.>>++.<-.<<<<+.>>>>>.<<<------.>>----.>--.<<<<<..>>>>>+++.<<<<<+++++++++.>>+.>>>-.<<<+++.+++.>>>--.<<<<<----------.>.>>>>.<<<<<.>>-.>>>.<<<<<.+++.>>>>>.<<<<<---.>--------.>>>>.<<<<<.>>++.>>>+++.<<<<<-.>>-----------.>>>---.<<<<<++.>.>>>>.<<<<<.>---.>>>>.<<<<<.>-.>>>>.<<<<<--.++.<<<<<<.>>>>+++++++++++.>>-----------.<++++.>---..<----.>--.>>>>>.<<<<---------.>-----------.>>>.<<<<+.+++++.>>>>.<<<<-----.>>----.>>.<<<<-.>>++.>>.<<<<+.>>>++++++++.>.<<<<--.>>----.>>.<<<<.>+++++.>>>.<<<<.>>--.>>.<<<<-.+.>>>>.<<<<.>--.>>>.<<<<.>>>++.>.<<<<.>+.>>>.<<<<.>>>.>.<<<<.>>++++.>>+.<----..>-.<<<<.>----------.>>>++.<<<++++.---.>>>--.<<<<+.>+++++.>>>+.<--.<<<++++++++.>>>>-.<<<<---------.>.>>>.<<<<-.+.>>>>.<<<<.>>-----------.>>.<<<<.>---.>>>.<<<<.>++++++.>>>.<<<<+.>--.>>>.<<<<-.>>>----------.>+++++.<+++++.<<<++++++.>>>>--.<<---.>-------.>---.<<<<------.>-------.>>>+++.<<-----.>-------.>---.<<<<-.+++++.>>>>++.<<<-.>--.>>--.<<<<----.+++.>>>>.<<<<---.>>>+.>.<<<<.+++.>>>>.<<<<--.>.>>>.<<<<--.++.<<<<<<<.>>>>>>>>>>>.<<<<-.+++.>>>>.<<<<--.>++.>>>.<<<<-.+++.>>>>.<<<<--.>.>>>.<<<<-.>>>++++.>.<<<<+.>>>+++++++++++.>.<<<<.>>+++++++++++++++.>>.<<<<+.+++++.>>>>.<<<<-------.>>+++++++.<<<<<.>>+++++.<++++.>---..<----.>--.>>>>>.<<<<+.++.<<<<+++++.>>----.++.++.---.>---..----.>>>>>.<<<<---.>>+++.>>.<<<<+.>>--.>>.<<<<.>>>+++.>.<<<<.>>-----.>>.<<<<+..>>>>.<<<<.+++++.>>>>.<<<<-------.>-.>>>++.<<--------.<-.>>>--.<<<<+.-.>>>>+++++.<++++++.--.>-----.<<<<.>>>++.>.<<<<+.>+.>>>.<<<<-.>>+++++++.>>.<<<<.+++.>>>>.<<<<--.>-.>>>.<<<<-.>>++++++++.>>.<<<<+.>+++++++.>>>+++++.<<--------.<-------.>>>-----.<<<<-.>>.>>.<<<<+..>>>>.<<<<--.+.<<<+++.>+++.---.>>>>>>.<<<<.>+.<<<<----.-----.+++++.>>>>>>>.<<<<+.>++++++.>>>+.<------.<+++++++.>>+.<+++++++.<<<+.>>>>--.<<<<--.>>--.>>++.<<<+++++++++.+++.>>>--.<<<<+.++++++++.>>>>.<<<<---------.>>++++.>>.<<<<.>------.>>>.<<<<+.-.>>>>.<<<<.>+++++++.>>>.<<<<.>>-------.>>+++++.<<.<<-.>>>>-----.<<<<+.+++++++.>>>>.<<<<------.+++++++++.>>>>.<<<<----------.>>.>>+++.<<<<-.>--.>>>---.<<<<+.+++++.>>>>.<<<<------.++.<<<<<<<.>>>>>>>>>>>.<<<<-.>------.>>>.<<<<.++++++++++.>>>>.<<<<----------.>.>>>.<<<<-.+.<<<.-----.+++++.>>>>>>>.<<<<.>>+++++++.>>+++.<<<--.>++++++++.>>-.<<------.<<++++.>>>>--.<<<<----.>---------.>>>++++++.<<------.<++++++++++++.>>>------.<<<<.+++.>>>>.<<<<---.>>---.>>.<<<<.+++.>>>>.<<<<---.+++++.>>>>+.<-----..>-.<<<<----..>>>>.<<<<-.+++.>>>>.<<<<--.+++++++++.>>>>.<<<<----------.>++++++++.>>>.<<<<+.+++++++++++.>>>>.<<<<------------.+++++.>>>>.<<<<-----.>---------.>>>.<<<<-.+.>>>>.<<<<.>++++++.>>>.<<<<+.++++++++++.>>>>+.<+.<---.>>+.<<<<---.++++.>>>>--.<<<<------------.>>++++++.>>++.<++++.<.>>++++.<<<<.>>--.>>------.<<<<.>>++.>>++.<<<<+++++++.>>--.>>++.<<<---------.>-.>>----.<<<<-------.>>-.>>.<<<<.>-------.>>>.<<<<+.>--.>>>++++.<<<+++++++.>+++++++++.>>--.<<--------------.<<+.>>>>--.<<<<--.>------.>>>.<<<<.>>++++++++.>>.<<<<.+++.>>>>.<<<<---.>>--.>>.<<<<.+++.>>>>.<<<<---.+++++.>>>>+.<-----..>-.<<<<----..>>>>.<<<<-.+++.>>>>.<<<<---.>>--.>>.<<<<-.+.<<<.-----.+++++.>>>>>>>.<<<<.>>++++++++.>>++.<+++.<+++.>>++++.<<------------------.>++.>------.<<<<.>>++++++++++++++++.>>++++++.<<<+++++++++++++.---------.>>>------.<<<<+.+++++++.>>>>.<<<<-------.>----.>>>.<<<<-.>>---------.>>.<<<<.+++.>>>>.<<<<--.>-.>>>.<<<<-.>>++++++++.>>.<<<<.>+.>>>++++.<<<+++.>>-.>.<<<-----.>++++++++.>>----.<<<<.>++++++++++++++++++++++.>>>.<<<<-.++.<<<<<<<.>>>>>>>>>>>++++.<<<+++++++.<-.>>>>----.<<<<.>>-------.>>.<<<<-.+.<<<.-----.+++++.>>>>>>>.<<<<.+++++++++++.>>>>.<<<<-----------.>----------.>>>.<<<<+.++++++++++.>>>>.<<<<----------.+++++++.>>>>.<<<<--------.>>-.>>++.<<<--------.------.>>>++++.<<-------------.<---.>>>--.<<<<+.>>>-----.>----.<<<<.>++++++.>>>+.<.<<+++++.>>>-.<<<<.++++++++.>>>>+++++.<---.<<<.>>>>-----.<<<<---------.+++++++.>>>>.<<<<-------.>>+++++.>>++++.<<--.>++++++++.>---.<--.<<+++.>>>+.<<<+++++.>>--.>++.<<<----.>.>>----.<<<<.>>++++++++++.>>.<<<<.>>++++.>>.<<<<.>>----------.>>.<<<<.>>----.>>.<<<<.>>+++++++.>>.<<<<.>>-.>>.<<<<+.+++++++++.>>>>+++.<<<----.>-----.>>---.<<<<----------.+++++++++++.>>>>+++.<<<++++++.>.>>---.<<<<----------.+++++++++.>>>>.<<<<----------.>>+++.>>+++.<<<<-.>.>>>---.<<<<+.>>-----.>>.<<<<.>>+++.>>.<<<<.+++.>>>>.<<<<--.+++++++++.>>>>.<<<<-----------.++.<<<<<<<.>>>>.-----.+++++.>>>>>>>.<<<<-.>>+++++++++.>>.<<<<+.>>++++.>>.<<<<+.>>.>>.<<<<.>---------.>>>.<<<<.>>--------------.>>.<<<<.>>>++.>.<<<<-.>>>+++.>.<<<<+.>>>---.>.<<<<-.++.>>>>.<<<<-.>-------.>>>.<<<<..>>>>.<<<<.+++++.>>>>.<<<<-----.>>++++++++++.>>.<<<<.>>>.>.<<<<-.>>.>>.<<<<.>+++++.>>>+++.<<<<++.>---.>>>++.<<--.<+++++++++.>>>-----.<<<<---.>+.>>>.<<<<+.+++++++++.>>>>.<<<<----------.>------.>>>.<<<<.>>-----.>>.<<<<.>>++.>>.<<<<.>----.>>>++.<<<<+++++++.>>-.>>++.<<<+++++.>-.>>----.<<<<-------.>>-.>>.<<<<.>-------.>>>.<<<<+.>--.>>>.<<<<.>---.>>>.<<<<-.>--.>>>.<<<<.>>++++.>>.<<<<.>>-.>>.<<<<+.>++++.>>>.<<<<--.+.>>>>+.<+.++.>+++.<<<++++++++++.>--.>>+.<<<<-.+++++.>>>>-----.<<<<----.>>++++++.>>++++.<<<.+++++++++++.>>>-.<<++++++.>----.>---.<<<<.>>------.>>+.<---.<<<-.>>>>+++++.<<<<+++.>>------.>>------.<<<<--.>>.>>.<<<<.>--------.>>>.<<<<.>>--.>>++.<+++++.<<----.>>>--.<<<<.>>-------.>>.<<<<+.++++++++.>>>>++.<<<<-.++++.>>>>--.<<<<------------.>>+++++++++++++++.>>++.<<-.<+++++.>>>.<<<++++.>-----.>>--.<<<<.>>.>>.<<<<.>>++.>>.<<<<.>+++++++.>>>.<<<<.>+++.>>>.<<<<.+++.>>>>.<<<<---.++++++++++++++.>>>>.<<<<---------------.++.<<<<<<<.>>>>>>>>>>>++++++.<<<-----------.>>--.>-.<<-.++++++++.>>-----.<<<<.++.>>>>.<<<<-.>++++++.>>>.<<<<.>>>+.>.<<<<.>>------.>>.<<<<---.+.>>>>.<<<<++.+++.>>>>.<<<<---.>>+.>>.<<<<.>--------------.>>>.<<<<-.++.>>>>+++.<<<+++.>++++.>>++.<<<<---.>++++++++.>>>-----.<<<<.>>------.>>.<<<<.>>-.>>.<<<<.>>+++++.>>++.<+.----.>.<<<<++++++++.>>++++.>>--.<<<<-------.>------------.>>>++.<<<<++++.-.>>>>.<<<------.<.>>>>--.<<<<----.>+++++++++++++.>>>.<<<<+.+++++++++.>>>>.<<<<----------.>+++++++.>>>.<<<<.>---------------.>>>.<<<<.>>-----------.>>.<<<<.>>+++.>>.<<<<.>--.>>>.<<<<-.+.>>>>+++++.<<--.<<-.>>>>.<<++.------------.>>-----.<<<<++.++.>>>>++.<<++.>-----.>+.<<<<+++++.---------.>>>>---.<<<<+.>>>---------.>++.<<-----.-.>>--.<<<<+.>.>>>.<<<<.>---.>>>.<<<<-.>>>-.>.<<<<.+++.>>>>+++.<<----.>++++++.>---.<<<<---.>>+.>>.<<<<.+++.>>>>+.<++++++++++..>+++++.<<-.---.>>.<<+++.++++++++++++.>>-----.<+++++.<<<--.>>>>-.<<<<.>++++++.>>>++++.<<+++++++++++++.<<+++++++.>>>>----.<<<<--------.>-.>>>.<<<<+.>------.>>>++.<<---------------.>-----------.>--.<<<<-.>>++++++++.>>.<<<<.>++++++++++++.>>>.<<<<.>>--.>>++.<<<<++++.>>++.>>-.<++++.<<-.>>>+++.<<<-.<+++++++.>>>>----.<<<<-----------.>>-.>>++.<<<<+++++++.>>++.>>++.<<<-.>-.>>----.<<<<-------.>+.>>>.<<<<+.>---------.>>>.<<<<.>-.>>>.<<<<--.++.<<<<<<<.>>>>>>>>>>>.<<<<-.>>-----------.>>.<<<<.>>------.>>.<<<<.>>+++++++++++++++.>>.<<<<-.+.>>>>+.<+++.<<-.>>>-.<<<<.>>>+++.>.<<<<.>>+.>>.<<<<.>>+++++++.>>.<<<<+.>--.>>>.<<<<-.>--.>>>.<<<<.>>---.>>++.<<+++.---------------.>>++++.<<-----.+.>>------.<<<<.>>>----------------.>+.<++++++++++.<-----.>>+++.<<-.<++++++.>>>----.<<<<.>>>----------------.>+.<+++++++++++++++++.<+.>>+++++.<<+++++.+++++++.>>------.<<<<.>+++++++++++.>>>.<<<<.>>---.>>++.<<<<+++++++.>>++++++.>>--.<<<<-------.>>+++++++++.>>+.<-.<<-.>>>+++.<<<-.---------.>>>----.<<<<.>>-------.>>.<<<<.>>++++++++.>>.<<<<.>>-----.>>.<<<<.>+++.>>>.<<<<-.+.>>>>.<<<<++.>>.>>.<<<<-.>>--------.>>.<<<<+.>>+++++++++.>>.<<<<--.>>---.>>.<<<<.>>----.>>.<<<<.>>++++++.>>.<<<<.>---.>>>.<<<<.>>-------.>>.<<<<.>>----.>>.<<<<-.+.>>>>++.<+++.-----.>++++.<<<+++++++++.>>+.>-----.<+.<<<+++++++++.>>>>-.<<<<---------.>>++++++++++++.>>++.<<++.<+++.>>>.<<<++++.>-----.>>--.<<<<.>---.>>>.<<<<+.+++++++++.>>>>+.<.<<---.>>>+++.<<<-.<+.>>>>----.<<<<-----------.>>.>>.<<<<.>++.>>>.<<<<.>>--.>>.<<<<.>>+++.>>.<<<<+.>----.>>>.<<<<-.>>.>>.<<<<+.>.>>>++.<+++++.<++++++++.>>++++.<<<++++++++++++.>>++.>------.<<<<.>-------------.>>>++.<-----.<<<+.>>>>--.<<<<--.>.>>>.<<<<.>>-----------.>>.<<<<.+++.>>>>.<<<<---.>---.>>>.<<<<-.++.<<<<<<<.>>>>++++.>+++.---.>>>>>>.<<<<-.>>++.>>.<<<<.+++.>>>>.<<<<---.+++++.>>>>+++.<<----------.++.>>---.<<<<----.>+++.>>>+++++.<----.<<<+++.>>>>-----.<<<<----.+++++++.>>>>.<<<<-------.>>++++++.>>.<<<<-.+.<<<----.-----.+++++.>>>>>>>.<<<<.>------.>>>.<<<<.>>>----.>.<<<<.>>++.>>.<<<<.>>----.>>.<<<<.>>>----.>.<<<<+.>>.>>.<<<<+.>>>+++++.>.<<<<.>+++++++++.>>>.<<<<.>>+++++.>>.<<<<--.>>-.>>.<<<<.>++.>>>.<<<<.>>--.>>++++.<<--.>+++++++++++.>---.<--.<<+++.>>>-.<<<<+.>--------.>>>+++.<<<++.>+++++++++++.>>---.<<<<-.+++++++.>>>>.<<<<-------.>>---------.>>.<<<<.+++.>>>>.<<<<--.+++++++++.>>>>.<<<<-----------.+.>>>>.<<<<.>+++++++++.>>>.<<<<+.>----------.>>>.<<<<-.>>++++.>>+.<----.<<+++.>>>+++.<<<-.---------.>>>----.<<<<.>>+.>>.<<<<.>>-.>>.<<<<+.>-.>>>.<<<<-.>>++++.>>.<<<<+..>>>>.<<<<-.>>-----------------.>>.<<<<.+++++.>>>>++++++.<<<<-----.>>+++.>>------.<<<<.>++++.>>>.<<<<.>>>---------.>.<<<<.>>>-----.>.<<<<.+++.>>>>.<<<<---.>>>--.>+++.<<<<-.>>---.>>---.<<<<+.>>>-----.>.<<<<.>>>+++.>.<<<<.+++.>>>>.<<<<--.>----.>>>.<<<<--.++.<<<<<<<. |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int mem[13], i, j, m, n, buf, ptr = 0; | |
char c; | |
printf("++++++++++++++++++++["); | |
for(i = 0; i < 13; i++) { | |
mem[i] = i * 20; | |
printf(">"); | |
for(j = 0; j < i; j++) | |
printf("+"); | |
} | |
for(i = 0; i < 13; i++) | |
printf("<"); | |
printf("-]>"); | |
while(scanf("%c", &c) != EOF) { | |
buf = (int)c; | |
if(buf < 0) | |
buf = 256 + buf; | |
m = 256; | |
for(i = 0; i < 13; i++) { | |
if(abs(buf - mem[i]) < abs(m)) { | |
m = buf - mem[i]; | |
n = i; | |
} | |
} | |
mem[n] = buf; | |
if(ptr < n) | |
for(; ptr < n; ptr++) | |
printf(">"); | |
else | |
for(; ptr > n; ptr--) | |
printf("<"); | |
if(0 < m) | |
for(i = 0; i < m; i++) | |
printf("+"); | |
else | |
for(i = 0; i < abs(m); i++) | |
printf("-"); | |
printf("."); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment