TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why you should learn brainfuck (or: learn you a brainfuck for great good)

7 点作者 skilldrick超过 14 年前

4 条评论

pedrocr超过 14 年前
Just went out and wrote a simple interpreter in 65 lines of Ruby. It's pretty slow but seems to be correct.<p>One thing you didn't mention is that the cells are supposed to be bytes, and thus increment and decrement need to be modulo 256. That may not be part of the actual definition but the sample programs I found all relied on it.<p>I also found it pretty funny that "apt-cache search brainfuck" returns a total of 3 interpreters in the Debian archive.
评论 #2249900 未加载
radq超过 14 年前
There's a really cool program that will convert programs written in an assembly-like language to brainfuck code.<p><a href="http://inshame.blogspot.com/search/label/My%20Progs%3A%20FuckBrainfuck" rel="nofollow">http://inshame.blogspot.com/search/label/My%20Progs%3A%20Fuc...</a><p>I've been meaning to figure out how the program works, but the source code doesn't have a lot of comments so it isn't going so well.
yuvadam超过 14 年前
Worth mentioning that the intent of brainfuck was to create a language with the smallest possible compiler.<p>Wikipedia claims [1] that most brainfuck compilers are &#60; 200 bytes.<p>[1] - <a href="http://en.wikipedia.org/wiki/Brainfuck" rel="nofollow">http://en.wikipedia.org/wiki/Brainfuck</a>
评论 #2249908 未加载
评论 #2250674 未加载
schwabacher超过 14 年前
This looks awesome, but god damn it! My todo list of things to play around with is growing faster than I can get to them.
评论 #2249333 未加载