TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Javascript Brainfuck Interpreter and Visualizer

34 pointsby fatiherikliabout 12 years ago

8 comments

becojoabout 12 years ago
Very interesting visualization. It's always hard to wrap in mind what a Brainfuck program does while executing.<p>While reading the source of the interpreter, I found out that the "[" command is not working properly. It is suppose to jump to the next matching bracket when the value of the current pointer is zero. I'm quite sure the creator is aware of that as he wrote on the demo page what it supposed to do. Good work still !
smokelabout 12 years ago
Nice.<p>An improvement would be to highlight the currently active instruction in the source code. Also, for debugging many algorithms it is nice to see the current ASCII character alongside the numeric value in a cell.
sadkingbillyabout 12 years ago
Nice gui. It needs a fast-forward speed. It also needs to interpret the , instruction for accepting input. Maybe you could use <a href="http://www.iamcal.com/misc/bf_debug" rel="nofollow">http://www.iamcal.com/misc/bf_debug</a> (in Debug mode) as a guide.
primaryobjectsabout 12 years ago
++[&#62;++++++++++++++++++++++++++++++++++++&#60;-]&#62;.++++++.<p>It would be nice if there was a url parameter to auto-populate the source code and run it. Generated the above with <a href="http://goo.gl/aD67C" rel="nofollow">http://goo.gl/aD67C</a>
评论 #5552373 未加载
tunnuzabout 12 years ago
I don't know brainfuck, however, if you set the code to something like<p>&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;&#60;<p>the cursor moves away from the tape.
Sami_Lehtinenabout 12 years ago
Nice, I finally bothered to play with it. I have read about many languages, ut this was so nice visualisation I wrote my first BF program.
ancardaabout 12 years ago
Are there any benefits to learning Brainfuck? I can imagine it might help with learning pointers and how memory works.
评论 #5550984 未加载
评论 #5551181 未加载
mehmetteknabout 12 years ago
i like the visualization. but i still don't get how Brainfuck works. I guess I'm just not tech-savvy enough.