Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/u2takey/gopyter


https://github.com/u2takey/gopyter

Last synced: 15 days ago
JSON representation

Awesome Lists containing this project

README

        

# gopyter

Gopyter provide a template to develop kernels with golang. Now gopyter provide two built-in kernels: starlark-go and lua-go

## Install Starlark-go

```go
go install github.com/u2takey/gopyter@latest
mkdir -p `jupyter --data-dir`/kernels/starlark-go
cp ./kernel/kernel_starlark_go.json `jupyter --data-dir`/kernels/starlark-go/kernel.json
```

## Install Lua-go

```go
go install github.com/u2takey/gopyter@latest
mkdir -p `jupyter --data-dir`/kernels/lua-go
cp ./kernel/kernel_lua_go.json `jupyter --data-dir`/kernels/lua-go/kernel.json
```

## How to Implement new Kernel

Just implement interface KernelInterface and do RegisterKernel

```go
type KernelInterface interface {
Init() error
Eval(outerr OutErr, code string) (val []interface{}, err error)
Name() string
}
```