Show HN: Visual Brainfuck Interpreter
franklin.dyer.me
franklin.dyer.me
Multiplication here: https://www.youtube.com/watch?v=6PIZTFrkl0w , repo here: https://github.com/maweki/brainfuck2video
The problem I find with basically every brainfuck visualization (mine included): it's only useful with a few memory cells as the tape becomes full. You can't skip over or fast forward specific "widgets" (I've seen multiplication, now move along). At that point, you could find other levels of abstraction and try to allow for some macros that should always take x seconds, independent of the number of actual operations.
And I think most projects would be well-served using some simple termination arguments to prevent some simple not so well-behaved programs (of course, this is in general undecidable). But this shown interpreter for example, just does nothing on "+[]" but whether some program in some state is quiescent is easily decidable.
Writing a quine is a decent challenge. you should add that as a final challenge for when you have done the others.
[0]: https://github.com/itchyny/brainfuck/blob/master/quine3.bf
One time I took a math/number theory class in which the professor had us prove all sorts of theorems but never told us their names (presumably because he didn’t want us looking them up). Depending on the context in which you’re teaching, you might try something like that - if one of your students were to look up the language and discover that it’s called “Brainfuck” on their own time, you wouldn’t be to blame.
On the other hand, depending on who you’re teaching, the name “Brainfuck” might actually serve as an intriguing hook that captures the attention of less-mature audiences. To be perfectly honest, the clickbait-y nature of the name “Brainfuck” is probably why I discovered the language while surfing Wikipedia in the first place.