- Implemented a Lisp for Go Lang lessons. (It's Scheme base)
- As an implementation goal, we will provide an environment for easily operating a graphic program.
- Level at which a simple program works
- I confirmed that the SICP graphic language program works.
- go lang installed.
cd ${HOME}
git clone https://github.com/hidekuno/go-scheme
cd go-scheme/scheme
go test -v
go run cmd/lisp/main.go
cd ${HOME}/go-scheme/scheme
go test -cover -coverprofile /tmp/cover.out
go tool cover -func=/tmp/cover.out
cd ${HOME}/go-scheme/scheme
go test -bench .
- X server is running.
cd ${HOME}/go-scheme/draw
go test -v
go run cmd/lisp/main.go
- Then type "(draw-init)"
cd {HOME}/go-scheme/web
go test -v
go run cmd/api/main.go
cd {HOME}/go-scheme/web/wasm
cp /usr/local/go/misc/wasm/wasm_exec.js .
GOARCH=wasm GOOS=js go build -o lisp.wasm lisp_wasm.go
cd {HOME}/go-scheme/web
go run cmd/wasm/main.go
- docker is running.
- X Server is running.(XQuartz 2.7.11 for mac)
cd ${WHERE}/go-scheme/docker
docker build --target=go-scheme -t hidekuno/go-scheme --file=./Dockerfile .
docker login
docker push hidekuno/go-scheme
docker logout
docker pull hidekuno/go-scheme
xhost +
docker run -it --name go-scheme -e DISPLAY=docker.for.mac.localhost:0 hidekuno/go-scheme /root/glisp
docker pull hidekuno/go-scheme
xhost +
docker run -it --name go-scheme -e DISPLAY=${HOSTIP}:0.0 hidekuno/go-scheme /root/glisp
docker pull hidekuno/go-scheme
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:0 --name go-scheme hidekuno/go-scheme /root/glisp
docker pull hidekuno/go-scheme
docker run -it --name go-scheme hidekuno/go-scheme /root/lisp