Remember the mathematical representation of Turing machine? Here comes a programming language that looks just like a 'raw' simulation to that.
http://www.muppetlabs.com/~breadbox/bf/
http://www.hevanet.com/cristofd/brainfuck/
And the best online interpreter using JavaScript: http://nayuki.eigenstate.org/page/brainfuck-interpreter-javascript
And this is qsort in this language (reference: http://codegolf.stackexchange.com/questions/2445/implement-quicksort-in-brainf)
>>>>>>>>,[>,]<[[>>>+<<<-]>[<+>-]<+<]>[<<<<<<<<+>>>>>>>>-]<<<<<<<<[[>>+
>+>>+<<<<<-]>>[<<+>>-]<[>+>>+>>+<<<<<-]>[<+>-]>>>>[-<->]+<[>->+<<-[>>-
<<[-]]]>[<+>-]>[<<+>>-]<+<[->-<<[-]<[-]<<[-]<[[>+<-]<]>>[>]<+>>>>]>[-<
<+[-[>+<-]<-[>+<-]>>>>>>>>[<<<<<<<<+>>>>>>>>-]<<<<<<]<<[>>+<<-]>[>[>+>
>+<<<-]>[<+>-]>>>>>>[<+<+>>-]<[>+<-]<<<[>+>[<-]<[<]>>[<<+>[-]+>-]>-<<-
]>>[-]+<<<[->>+<<]>>[->-<<<<<[>+<-]<[>+<-]>>>>>>>>[<<<<<<<<+>>>>>>>>-]
<<]>[[-]<<<<<<[>>+>>>>>+<<<<<<<-]>>[<<+>>-]>>>>>[-[>>[<<<+>>>-]<[>+<-]
<-[>+<-]>]<<[[>>+<<-]<]]>]<<<<<<-]>[>>>>>>+<<<<<<-]<<[[>>>>>>>+<<<<<<<
-]>[<+>-]<+<]<[[>>>>>>>>+<<<<<<<<-]>>[<+>-]<+<<]>+>[<-<<[>+<-]<[<]>[[<
+>-]>]>>>[<<<<+>>>>-]<<[<+>-]>>]<[-<<+>>]>>>]<<<<<<]>>>>>>>>>>>[.>]
Probably there are two ways to decode a Brainf*ck program properly:
1. Use a Brainf*ck->C converter
2. A seasoned TCS phd student whose research focus is Turing machine
本文介绍了Brainfuck编程语言,一种极简主义的图灵完全语言。提供了在线解释器链接及快速排序实现示例代码,并讨论了两种理解Brainfuck程序的方法:使用Brainfuck到C的转换器或由熟悉图灵机的理论计算机科学博士学生解读。
8521

被折叠的 条评论
为什么被折叠?



