Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wengchaoxi/gobf

一个用 Go 写的可扩展的 BrainFuck 语言的解释器。( An extensible Brainfuck interpreter written in Go. )
https://github.com/wengchaoxi/gobf

brainfuck go

Last synced: 22 days ago
JSON representation

一个用 Go 写的可扩展的 BrainFuck 语言的解释器。( An extensible Brainfuck interpreter written in Go. )

Awesome Lists containing this project

README

        

# Go-BF

An extensible [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter written in Go.

# Example

```go
package main

import (
"strings"
framework "github.com/wengchaoxi/gobf"
)

func UnixTidyPlugin(program string) string {
return strings.ReplaceAll(program, "\n", "")
}

func WindowsTidyPlugin(program string) string {
return strings.ReplaceAll(program, "\r\n", "")
}

func main() {
t := framework.NewTape(1024)
m := framework.NewMachine(t)

// DO WHAT THE FUCK YOU WANT TO
m.Use(UnixTidyPlugin, WindowsTidyPlugin)

m.Run("+[,.]\n")
}
```