Hacker News new | past | comments | ask | show | jobs | submit login
Javascript Brainfuck Interpreter and Visualizer (github.com/fatiherikli)
34 points by fatiherikli on April 15, 2013 | hide | past | favorite | 11 comments



Very interesting visualization. It's always hard to wrap in mind what a Brainfuck program does while executing.

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 !


Nice.

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.


Nice gui. It needs a fast-forward speed. It also needs to interpret the , instruction for accepting input. Maybe you could use http://www.iamcal.com/misc/bf_debug (in Debug mode) as a guide.


++[>++++++++++++++++++++++++++++++++++++<-]>.++++++.

It would be nice if there was a url parameter to auto-populate the source code and run it. Generated the above with http://goo.gl/aD67C


goo.gl/aD67C -> http://www.primaryobjects.com/CMS/Article149.aspx

  > Advantages of Brainf-ck as an AI Programming Language


I don't know brainfuck, however, if you set the code to something like

<<<<<<<<<<<<<<<<<<<<<<<<<<<

the cursor moves away from the tape.


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.


Are there any benefits to learning Brainfuck? I can imagine it might help with learning pointers and how memory works.


It will help you understand the turing machine.


At the very least, it will be fun. I can guarantee that =)


i like the visualization. but i still don't get how Brainfuck works. I guess I'm just not tech-savvy enough.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: