pablojorge / brainfuck

Collection of BF interpreters/translators in C/C++/ASM/JS/Python/Rust + others
http://pablojorge.github.io/brainfuck
MIT License
246 stars 35 forks source link

New Golang Interpreter #5

Closed phikal closed 8 years ago

phikal commented 8 years ago

As promised, I got around to implementing bf in Go.

Surprisingly is seems to outperform the C implementation (time says real 4m24.731s vs real 6m2.560s), on my rather old Laptop (Fedora 23).

I wrote the eval function to work with the abstract io.Reader and is.Writer interface, so that it could be extended to work as a server, so that's a thing that could be done in the future.

I hope all is ok, so just complain if something is wrong.

pablojorge commented 8 years ago

Thanks @phikal, it's really cool to have a Go interpreter now!