abtrout / go-brainfuck-yourself

A Brainfuck interpreter that I wrote myself in Go
0 stars 0 forks source link

Better `:d[ump]` formatting and binary SerDe #6

Closed abtrout closed 9 months ago

abtrout commented 10 months ago

The complete cmds or cells could be hard to format in the REPL, since they are large (cmds arbitrarily; there are 3e4 cells).

Change :d[ump] behavior to just print the current instruction and data pointer, and the current command and cell value.

Add support to :d[ump] <filename> and store the complete interpreter state in some binary format. Then we can add a new REPL command to :r[estore] from binary snapshot.

abtrout commented 10 months ago

I think I'll leave :dump as is, but add a :snapshot and :restore as described above.

abtrout commented 9 months ago

On second thought, I'm not going to do this.