Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hidekuno/go-scheme
Subset Scheme implements
https://github.com/hidekuno/go-scheme
docker golang gtk2 scheme sicp wasm
Last synced: 27 days ago
JSON representation
Subset Scheme implements
- Host: GitHub
- URL: https://github.com/hidekuno/go-scheme
- Owner: hidekuno
- Created: 2018-06-26T13:01:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T06:41:59.000Z (7 months ago)
- Last Synced: 2024-10-04T22:01:18.305Z (about 2 months ago)
- Topics: docker, golang, gtk2, scheme, sicp, wasm
- Language: Go
- Homepage:
- Size: 868 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Implementation of Scheme (subset version) by Go Lang
=================## Overview
- 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.## Quality
- Level at which a simple program works
- https://github.com/hidekuno/go-scheme/blob/master/scheme/lisp_test.go
- I confirmed that the SICP graphic language program works.
- https://github.com/hidekuno/picture-language## TEST & Run (CLI interpreter)
### Requirement
- 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
```### TEST coverage(C0)
```
cd ${HOME}/go-scheme/scheme
go test -cover -coverprofile /tmp/cover.out
go tool cover -func=/tmp/cover.out
```### TEST Benchmark
```
cd ${HOME}/go-scheme/scheme
go test -bench .
```## TEST & Run (Scheme on GUI for Draw)
### Requirement
- X server is running.```
cd ${HOME}/go-scheme/draw
go test -v
go run cmd/lisp/main.go
```
- Then type "(draw-init)"## TEST & Run (Scheme on Web API Server)
```
cd {HOME}/go-scheme/web
go test -v
go run cmd/api/main.go
```## Build & Run (Scheme on Web Assembly)
```
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
```## Run on docker
### Requirement
- docker is running.
- X Server is running.(XQuartz 2.7.11 for mac)### Build(my operation log)
```
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
```### macOS
```
docker pull hidekuno/go-scheme
xhost +
docker run -it --name go-scheme -e DISPLAY=docker.for.mac.localhost:0 hidekuno/go-scheme /root/glisp
```### Linux
```
docker pull hidekuno/go-scheme
xhost +
docker run -it --name go-scheme -e DISPLAY=${HOSTIP}:0.0 hidekuno/go-scheme /root/glisp
```### Windows11+WSL2+WSLg
```
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
```### For environments where the X server is not running
```
docker pull hidekuno/go-scheme
docker run -it --name go-scheme hidekuno/go-scheme /root/lisp
```