其实也就是几十个小时的事情。起因是在看一个MIT麻省理工的计算机科学和Python编程导论的视频,里提及图灵提出的
“six primitives”,“六个原语”,使用六种原语可以表达任何程序 然后上网查了下图灵的六个原语是什么鬼。
What are the six turing primitives?
Right: Move the Machine’s head to the right of the current square 指针右移 Left: Move the Machine’s head to the left of the current square 指针左移 Print: Print a symbol on the current square 输出 Scan: Identify any symbols on the current square 输入 Erase: Erase any symbols presented o the current square 清除 Nothing/HALT: Do nothing 停止 然后我就蛋疼地搜啊搜。 发现了一个叫brainfuck的东西.... 他的语法是这个样子的: 用brainfuck来输出Hello World! 的代码是这样的: ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. fedcba9876543210是这样的:
++++++++++[->++++++++++<]>++.- .-.-.-.-.<++++++[->------<]>----.-. -.-.- .-.-. -.-.-.< 想学习brainfuck,来从底构建类似的编程语言,所以才搜了那么久...
有兴趣的同学自行搜索吧...
|