GoPlus - The Go+ language for engineering, STEM education, and data science


The Go+ language for engineering, STEM education, and data science

Build Status Go Report Card Coverage Status GitHub release Playground VSCode Readme GoDoc

Summary about Go+

What are mainly impressions about Go+?

  • A static typed language.
  • Fully compatible with the Go language.
  • Script-like style, and more readable code for data science than Go.

For example, the following is legal Go+ source code:

a := [1, 2, 3.4]

How do we do this in the Go language?

package main

import "fmt"

func main() {
    a := []float64{1, 2, 3.4}

Of course, we don't only do less-typing things.

For example, we support list comprehension, which makes data processing easier.

a := [1, 3, 5, 7, 11]
b := [x*x for x <- a, x > 3]
println(b) // output: [25 49 121]

mapData := {"Hi": 1, "Hello": 2, "Go+": 3}
reversedMap := {v: k for k, v <- mapData}
println(reversedMap) // output: map[1:Hi 2:Hello 3:Go+]

We will keep Go+ simple. This is why we call it Go+, not Go++.

Less is exponentially more.

It's for Go, and it's also for Go+.

Compatibility with Go

All Go features will be supported (including partially support cgo, see below).

All Go packages (even these packages use cgo) can be imported by Go+.

import (

x := strings.NewReplacer("?", "!").Replace("hello, world???")
fmt.Println("x:", x)

And all Go+ packages can also be imported in Go programs. What you need to do is just using gop command instead of go.

First, let's make a directory named tutorial/14-Using-goplus-in-Go.

Then write a Go+ package named foo in it:

package foo

func ReverseMap(m map[string]int) map[int]string {
    return {v: k for k, v <- m}

Then use it in a Go package (14-Using-goplus-in-Go/gomain):

package main

import (


func main() {
    rmap := foo.ReverseMap(map[string]int{"Hi": 1, "Hello": 2})

How to build this example? You can use:

gop install -v ./...


gop run tutorial/14-Using-goplus-in-Go/gomain

Go tutorial/14-Using-goplus-in-Go to get the source code.


Go+ Playground based on Docker:

Go+ Playground based on GopherJS (currently only available in v0.7.x):

Go+ Jupyter kernel:



How to build

git clone [email protected]:goplus/gop.git
cd gop

Bytecode vs. Go code

Go+ supports bytecode backend and Go code generation.

When we use gop command, it generates Go code to covert Go+ package into Go packages.

gop run     # Run a Go+ program
gop install # Build Go+ files and install target to GOBIN
gop build   # Build Go+ files
gop test    # Test Go+ packages
gop fmt     # Format Go+ packages
gop clean   # Clean all Go+ auto generated files
gop go      # Convert Go+ packages into Go packages

When we use igop command, it generates bytecode to execute.

igop  # Run a Go+ program

In bytecode mode, Go+ doesn't support cgo. However, in Go-code-generation mode, Go+ fully supports cgo.

Go+ features

Rational number: bigint, bigrat, bigfloat

We introduce the rational number as native Go+ types. We use suffix r to denote rational literals. For example, (1r << 200) means a big int whose value is equal to 2200. And 4/5r means the rational constant 4/5.

var a bigint = 1r << 65  // bigint, large than int64
var b bigrat = 4/5r      // bigrat
c := b - 1/3r + 3 * 1/2r // bigrat
println(a, b, c)

var x *big.Int = 1r << 65 // (1r << 65) is untyped bigint, and can be assigned to *big.Int
var y *big.Rat = 4/5r
println(x, y)

Map literal

x := {"Hello": 1, "xsw": 3.4} // map[string]float64
y := {"Hello": 1, "xsw": "Go+"} // map[string]interface{}
z := {"Hello": 1, "xsw": 3} // map[string]int
empty := {} // map[string]interface{}

Slice literal

x := [1, 3.4] // []float64
y := [1] // []int
z := [1+2i, "xsw"] // []interface{}
a := [1, 3.4, 3+4i] // []complex128
b := [5+6i] // []complex128
c := ["xsw", 3] // []interface{}
empty := [] // []interface{}

Deduce struct type

type Config struct {
    Dir   string
    Level int

func foo(conf *Config) {
    // ...

foo({Dir: "/foo/bar", Level: 1})

Here foo({Dir: "/foo/bar", Level: 1}) is equivalent to foo(&Config{Dir: "/foo/bar", Level: 1}). However, you can't replace foo(&Config{"/foo/bar", 1}) with foo({"/foo/bar", 1}), because it is confusing to consider {"/foo/bar", 1} as a struct literal.

You also can omit struct types in a return statement. For example:

type Result struct {
    Text string

func foo() *Result {
    return {Text: "Hi, Go+"} // return &Result{Text: "Hi, Go+"}

List comprehension

a := [x*x for x <- [1, 3, 5, 7, 11]]
b := [x*x for x <- [1, 3, 5, 7, 11], x > 3]
c := [i+v for i, v <- [1, 3, 5, 7, 11], i%2 == 1]
d := [k+","+s for k, s <- {"Hello": "xsw", "Hi": "Go+"}]

arr := [1, 2, 3, 4, 5, 6]
e := [[a, b] for a <- arr, a < b for b <- arr, b > 2]

x := {x: i for i, x <- [1, 3, 5, 7, 11]}
y := {x: i for i, x <- [1, 3, 5, 7, 11], i%2 == 1}
z := {v: k for k, v <- {1: "Hello", 3: "Hi", 5: "xsw", 7: "Go+"}, k > 3}

Select data from a collection

type student struct {
    name  string
    score int

students := [student{"Ken", 90}, student{"Jason", 80}, student{"Lily", 85}]

unknownScore, ok := {x.score for x <- students, == "Unknown"}
jasonScore := {x.score for x <- students, == "Jason"}

println(unknownScore, ok) // output: 0 false
println(jasonScore) // output: 80

Check if data exists in a collection

type student struct {
    name  string
    score int

students := [student{"Ken", 90}, student{"Jason", 80}, student{"Lily", 85}]

hasJason := {for x <- students, == "Jason"} // is any student named Jason?
hasFailed := {for x <- students, x.score < 60}     // is any student failed?

For loop

sum := 0
for x <- [1, 3, 5, 7, 11, 13, 17], x > 3 {
    sum += x

For range of UDT

type Foo struct {

// Gop_Enum(proc func(val ValType)) or:
// Gop_Enum(proc func(key KeyType, val ValType))
func (p *Foo) Gop_Enum(proc func(key int, val string)) {
    // ...

foo := &Foo{}
for k, v := range foo {
    println(k, v)

for k, v <- foo {
    println(k, v)

println({v: k for k, v <- foo})

Note: you can't use break/continue or return statements in for range of udt.Gop_Enum(callback).

For range of UDT2

type FooIter struct {

// (Iterator) Next() (val ValType, ok bool) or:
// (Iterator) Next() (key KeyType, val ValType, ok bool)
func (p *FooIter) Next() (key int, val string, ok bool) {
    // ...

type Foo struct {

// Gop_Enum() Iterator
func (p *Foo) Gop_Enum() *FooIter {
    // ...

foo := &Foo{}
for k, v := range foo {
    println(k, v)

for k, v <- foo {
    println(k, v)

println({v: k for k, v <- foo})

Lambda expression

func plot(fn func(x float64) float64) {
    // ...

func plot2(fn func(x float64) (float64, float64)) {
    // ...

plot(x => x * x)           // plot(func(x float64) float64 { return x * x })
plot2(x => (x * x, x + x)) // plot2(func(x float64) (float64, float64) { return x * x, x + x })

Overload operators

import "math/big"

type MyBigInt struct {

func Int(v *big.Int) MyBigInt {
    return MyBigInt{v}

func (a MyBigInt) + (b MyBigInt) MyBigInt { // binary operator
    return MyBigInt{new(big.Int).Add(a.Int, b.Int)}

func (a MyBigInt) += (b MyBigInt) {
    a.Int.Add(a.Int, b.Int)

func -(a MyBigInt) MyBigInt { // unary operator
    return MyBigInt{new(big.Int).Neg(a.Int)}

a := Int(1r)
a += Int(2r)
println(a + Int(3r))

Error handling

We reinvent the error handling specification in Go+. We call them ErrWrap expressions:

expr! // panic if err
expr? // return if err
expr?:defval // use defval if err

How to use them? Here is an example:

import (

func add(x, y string) (int, error) {
    return strconv.Atoi(x)? + strconv.Atoi(y)?, nil

func addSafe(x, y string) int {
    return strconv.Atoi(x)?:0 + strconv.Atoi(y)?:0

println(`add("100", "23"):`, add("100", "23")!)

sum, err := add("10", "abc")
println(`add("10", "abc"):`, sum, err)

println(`addSafe("10", "abc"):`, addSafe("10", "abc"))

The output of this example is:

add("100", "23"): 123
add("10", "abc"): 0 strconv.Atoi: parsing "abc": invalid syntax

===> errors stack:
main.add("10", "abc")
    /Users/xsw/goplus/tutorial/15-ErrWrap/ strconv.Atoi(y)?

addSafe("10", "abc"): 10

Compared to corresponding Go code, It is clear and more readable.

And the most interesting thing is, the return error contains the full error stack. When we got an error, it is very easy to position what the root cause is.

How these ErrWrap expressions work? See Error Handling for more information.

Auto property

Let's see an example written in Go+:

import ""

doc := goptest.New(`... Go+ code ...`)!


In many languages, there is a concept named property who has get and set methods.

Suppose we have get property, the above example will be:

import ""

doc := goptest.New(`... Go+ code ...`)!


In Go+, we introduce a concept named auto property. It is a get property, but is implemented automatically. If we have a method named Bar(), then we will have a get property named bar at the same time.

Unix shebang

You can use Go+ programs as shell scripts now. For example:

#!/usr/bin/env -S gop run

println("Hello, Go+")

println(1r << 129)
println(1/3r + 2/7r*2)

arr := [1, 3, 5, 7, 11, 13, 17, 19]
println([x*x for x <- arr, x > 3])

m := {"Hi": 1, "Go+": 2}
println({v: k for k, v <- m})
println([k for k, _ <- m])
println([v for v <- m])

Go tutorial/20-Unix-Shebang/shebang to get the source code.

Go features

All Go features (including partially support cgo) will be supported. In bytecode mode, Go+ doesn't support cgo. However, in Go-code-generation mode, Go+ fully supports cgo.

IDE Plugins


The Go+ project welcomes all contributors. We appreciate your help!

Here are list of Go+ Contributors. We award an email account ([email protected]) for every contributor. And we suggest you commit code by using this email account:

git config --global [email protected]

If you did this, remember to add your [email protected] email to

What does a contributor to Go+ mean? You must meet one of the following conditions:

  • At least one pull request of a full-featured implemention.
  • At least three pull requests of feature enhancements.
  • At least ten pull requests of any kind issues.

Where can you start?

  • Issues
  • Issues
  • Issues
  • Issues
  • TODOs
  • Feature requests

    Feature requests

    在今年 ecug 大会前(2020.12.30 日前),完成 qlang v6 (alias v1.6) 版本。


    • 完全推翻重来,从动态类型转向静态类型!
    • 完全兼容 Go 语言文法。
    • 在 Go 语言兼容基础上,保留当初 qlang 动态类型版本的重要特性。比如:
    a := [1, 2, 3.4]
    // 等价于 Go 中的  a := []float64{1, 2, 3.4}
    b := {"a": 1, "b": 3.0}
    // 等价于  b := map[string]float64{"a": 1, "b": 3.0}
    c := {"a": 1, "b": "Hello"}
    // 等价于 c := map[string]interface{}{"a": 1, "b": "Hello"}


    a = 1   // 需要改为 a := 1,放弃该特性是为了让编译器更好地发现变量名冲突。
    opened by xushiwei 25
  • Download from latest release, but fatal.

    Download from latest release, but fatal.

    What happened?

    Download and run a simple example on ubuntu (Amd64).:

    uname -v 
    #35~1630100930~21.04~ae2753e-Ubuntu SMP Mon Aug 30 18:26:54 UTC 
    $./gop run
    [FATAL] /github/workspace/cmd/internal/run/run.go:91: findGoModFile: no such file or directory

    What did you expect to happen?

    Not should showing any errors

    opened by geekgao 17
  • Import package not found:

    Import package not found:

    The following program triggers an unexpected result

    println [1, 2, 3.4]

    Expected result

    [1, 2, 3.4]


    (cvlab) [email protected]:/dev/shm/go_projects# gop run
    2022/04/26 15:25:36 Import package not found:
    panic: Import package not found:
    goroutine 1 [running]:
    log.Panicln({0xc0001518d8, 0x20, 0x20})
            /usr/local/go/src/log/log.go:368 +0x65*PkgRef).EnsureImported(0xc00007f630)
            /root/go/pkg/mod/[email protected]/import.go:96 +0xc8{0x0, 0x779633}, 0xc0000744e0, 0x0)
            /root/gop/cl/builtin.go:29 +0x2a{0x7e6260, 0xc00013a200}, 0x7788fa)
            /root/gop/cl/builtin.go:64 +0xef{0x0, 0xc000072400}, {0x7788fa, 0x4}, 0xc00001efc0)
            /root/go/pkg/mod/[email protected]/package.go:284 +0x37d{0x0, 0x0}, 0xc00001ef90, 0xc000151cc0)
            /root/gop/cl/compile.go:373 +0x329*gopFiles).GenGo(0xc000072320, {0x77ba7a, 0x9e7400}, {0xc0000301a0, 0x1b})
            /root/gop/x/gopproj/gopfiles.go:131 +0x433*Context).GoCommand(0xc00001e1a0, {0x778673, 0x3}, 0xc000122850)
            /root/gop/x/gopproj/projctx.go:94 +0x213{0xc00001e1a0, 0xc00001e1a0, 0x509818})
            /root/gop/cmd/internal/run/run.go:105 +0x288, {0xc00001e1a0, 0x11, 0xc000052730})
            /root/gop/cmd/internal/run/run.go:63 +0xc5
            /root/gop/cmd/gop/main.go:108 +0x4df

    Gop Version

    Release v1.1.0-beta3

    Additional Notes

    I install Go+ from source code.

    (cvlab) [email protected]:~# cd gop
    (cvlab) [email protected]:~/gop# ./all.bash
    + go run cmd/make.go --install --autoproxy
    Installing Go+ tools...
    Start Linking.
    Link /root/gop/bin/gop to /root/go/bin/gop successfully.
    Link /root/gop/bin/gopfmt to /root/go/bin/gopfmt successfully.
    End linking.
    Go+ tools installed successfully!
    opened by XiongUp 6
  • "gop export" errir export "" error: 25:91: expected ')', found '/'

    export "" error: 25:91: expected ')', found '/' export "" error: empty exported package

    occurred error:

    type ServerTLSFile struct {
        CertFile, KeyFile   string
    func (T *ServerHTTP) LoadTLS(config *tls.Config, files []ServerTLSFile) error {

    no error:

    type ServerTLSFile struct {
        CertFile, KeyFile   string
    func (T *ServerHTTP) LoadTLS(config *tls.Config, files []*ServerTLSFile) error {

    problem is []ServerTLSFile not recognized

    opened by 456vv 6
  • Range branch with label(break/continue/goto/return)

    Range branch with label(break/continue/goto/return)

    for k, v := range [1,2,3] {
    	if k < 2 {
    		continue L
    	if k > 2{
                    println("range break")
    		break L
    	println(k, v)
    opened by JessonChan 6
  • qexp: add export const and vars

    qexp: add export const and vars

    对 ConstUnboundInt 做检查,所以在 math 库中会出现 int64 和 uint64 转换。 (因为可能使用 gopherjs 32bit 编译,所以保留了 int64 转换)

    		I.Const("MaxInt32", qspec.ConstUnboundInt, math.MaxInt32),
    		I.Const("MaxInt64", qspec.Uint64, uint64(math.MaxInt64)),
    		I.Const("MaxInt8", qspec.ConstUnboundInt, math.MaxInt8),
    		I.Const("MaxUint16", qspec.ConstUnboundInt, math.MaxUint16),
    		I.Const("MaxUint32", qspec.Uint64, uint64(math.MaxUint32)),
    		I.Const("MaxUint64", qspec.Uint64, uint64(math.MaxUint64)),
    		I.Const("MaxUint8", qspec.ConstUnboundInt, math.MaxUint8),
    		I.Const("MinInt16", qspec.ConstUnboundInt, math.MinInt16),
    		I.Const("MinInt32", qspec.ConstUnboundInt, math.MinInt32),
    		I.Const("MinInt64", qspec.Int64, int64(math.MinInt64)),
    		I.Const("MinInt8", qspec.ConstUnboundInt, math.MinInt8),
    		I.Const("Phi", qspec.ConstUnboundFloat, math.Phi),
    		I.Const("Pi", qspec.ConstUnboundFloat, math.Pi),
    opened by visualfc 5
  • 提一个很尖锐的问题





    想安利go给基础差的同事,看到许大的文章说几岁的小朋友都会,然后过来一看,发现全是英文,这这这,让我还得给同事翻译英文。那我还是直接教go吧。 许大go+的宏远是让小孩子都会,但没有中文文档?文章说几岁的小孩子都会,我只能说那是许大教得好,你直接教go都能教会。(不喜勿喷)



    opened by yjbdsky 4
  • Convert Go code style to Go+ style automatically

    Convert Go code style to Go+ style automatically


    gop fmt --smart package ...

    introduce a --smart switch to do this.

    for example:

    • no package main
    • no func main
    • fmt.Println => println
    • command line style first

    See for details.





    feature priority:high 
    opened by xushiwei 4
  • `gop run` stack overflow

    `gop run` stack overflow

    The following program triggers an unexpected result

    * `go build` success
    * `gop build` success
    * `go run main.go` success
    * `gop run main.go` failed

    Expected result

    $ go run main.go
    [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
    [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
     - using env:	export GIN_MODE=release
     - using code:	gin.SetMode(gin.ReleaseMode)
    [GIN-debug] GET    /graphql/                 --> (4 handlers)
    [GIN-debug] POST   /graphql/query            --> (4 handlers)
    [GIN-debug] Listening and serving HTTP on :8080


    $ gop run main.go
    ==> GenGo to /Users/lijie/.gop/run/g4TKA5ZxtrERYMfUORL5kw10pqYEmain.go
    runtime: goroutine stack exceeds 1000000000-byte limit
    runtime: sp=0x1403b00e3d0 stack=[0x1403b00e000, 0x1405b00e000]
    fatal error: stack overflow
    runtime stack:
    runtime.throw({0x1008daa5f, 0xe})
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/panic.go:1198 +0x54
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/stack.go:1088 +0x56c
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/asm_arm64.s:303 +0x70
    goroutine 1 [running]:
    runtime.heapBitsSetType(0x14016f9ec50, 0x10, 0x10, 0x1009c2d40)
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/mbitmap.go:822 +0xa00 fp=0x1403b00e3d0 sp=0x1403b00e3d0 pc=0x1005e46e0
    runtime.mallocgc(0x10, 0x1009c2d40, 0x1)
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/malloc.go:1100 +0x654 fp=0x1403b00e460 sp=0x1403b00e3d0 pc=0x1005dc124
    runtime.makeslice(0x1009c2d40, 0x2, 0x2)
    	/opt/homebrew/Cellar/go/1.17.2/libexec/src/runtime/slice.go:98 +0x90 fp=0x1403b00e490 sp=0x1403b00e460 pc=0x10061d000, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:46 +0x60 fp=0x1403b00e520 sp=0x1403b00e490 pc=0x100850540, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00e5c0 sp=0x1403b00e520 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00e630 sp=0x1403b00e5c0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00e680 sp=0x1403b00e630 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00e6e0 sp=0x1403b00e680 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00e770 sp=0x1403b00e6e0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00e810 sp=0x1403b00e770 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00e880 sp=0x1403b00e810 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00e8d0 sp=0x1403b00e880 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00e930 sp=0x1403b00e8d0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00e9c0 sp=0x1403b00e930 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00ea60 sp=0x1403b00e9c0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00ead0 sp=0x1403b00ea60 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00eb20 sp=0x1403b00ead0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00eb80 sp=0x1403b00eb20 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00ec10 sp=0x1403b00eb80 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00ecb0 sp=0x1403b00ec10 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00ed20 sp=0x1403b00ecb0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00ed70 sp=0x1403b00ed20 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00edd0 sp=0x1403b00ed70 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00ee60 sp=0x1403b00edd0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00ef00 sp=0x1403b00ee60 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00ef70 sp=0x1403b00ef00 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00efc0 sp=0x1403b00ef70 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00f020 sp=0x1403b00efc0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00f0b0 sp=0x1403b00f020 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00f150 sp=0x1403b00f0b0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00f1c0 sp=0x1403b00f150 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00f210 sp=0x1403b00f1c0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00f270 sp=0x1403b00f210 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00f300 sp=0x1403b00f270 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00f3a0 sp=0x1403b00f300 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00f410 sp=0x1403b00f3a0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00f460 sp=0x1403b00f410 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00f4c0 sp=0x1403b00f460 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00f550 sp=0x1403b00f4c0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00f5f0 sp=0x1403b00f550 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00f660 sp=0x1403b00f5f0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00f6b0 sp=0x1403b00f660 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00f710 sp=0x1403b00f6b0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00f7a0 sp=0x1403b00f710 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00f840 sp=0x1403b00f7a0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00f8b0 sp=0x1403b00f840 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00f900 sp=0x1403b00f8b0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00f960 sp=0x1403b00f900 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00f9f0 sp=0x1403b00f960 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00fa90 sp=0x1403b00f9f0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00fb00 sp=0x1403b00fa90 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00fb50 sp=0x1403b00fb00 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00fbb0 sp=0x1403b00fb50 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00fc40 sp=0x1403b00fbb0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00fce0 sp=0x1403b00fc40 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00fd50 sp=0x1403b00fce0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00fda0 sp=0x1403b00fd50 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b00fe00 sp=0x1403b00fda0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b00fe90 sp=0x1403b00fe00 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b00ff30 sp=0x1403b00fe90 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b00ffa0 sp=0x1403b00ff30 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b00fff0 sp=0x1403b00ffa0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b010050 sp=0x1403b00fff0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b0100e0 sp=0x1403b010050 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010180 sp=0x1403b0100e0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b0101f0 sp=0x1403b010180 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b010240 sp=0x1403b0101f0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b0102a0 sp=0x1403b010240 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b010330 sp=0x1403b0102a0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b0103d0 sp=0x1403b010330 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b010440 sp=0x1403b0103d0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b010490 sp=0x1403b010440 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b0104f0 sp=0x1403b010490 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b010580 sp=0x1403b0104f0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010620 sp=0x1403b010580 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b010690 sp=0x1403b010620 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b0106e0 sp=0x1403b010690 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b010740 sp=0x1403b0106e0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b0107d0 sp=0x1403b010740 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010870 sp=0x1403b0107d0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b0108e0 sp=0x1403b010870 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b010930 sp=0x1403b0108e0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b010990 sp=0x1403b010930 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b010a20 sp=0x1403b010990 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010ac0 sp=0x1403b010a20 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b010b30 sp=0x1403b010ac0 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b010b80 sp=0x1403b010b30 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b010be0 sp=0x1403b010b80 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b010c70 sp=0x1403b010be0 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010d10 sp=0x1403b010c70 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b010d80 sp=0x1403b010d10 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b010dd0 sp=0x1403b010d80 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b010e30 sp=0x1403b010dd0 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b010ec0 sp=0x1403b010e30 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b010f60 sp=0x1403b010ec0 pc=0x10085104c, 0x14010f76640)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:163 +0x3c fp=0x1403b010fd0 sp=0x1403b010f60 pc=0x10085162c, 0x14010f45b60)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:89 +0x40 fp=0x1403b011020 sp=0x1403b010fd0 pc=0x1008509b0, 0x14010f76690)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:186 +0x48 fp=0x1403b011080 sp=0x1403b011020 pc=0x100851968, 0x14010f5a780)
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:48 +0xc8 fp=0x1403b011110 sp=0x1403b011080 pc=0x1008505a8, {0x1009de758, 0x14010f5a780})
    	/Users/lijie/go/pkg/mod/[email protected]/dedup.go:127 +0x4dc fp=0x1403b0111b0 sp=0x1403b011110 pc=0x10085104c
    ...additional frames elided...

    Gop Version

    gop devel main(276f00f276ff797a97e943ab97f80326d1759a89) 2021-11-13_18-58-37 darwin/arm64

    Additional Notes

    No response

    opened by cpunion 4
  • gop run failed at a dir which has `go.mod` file existed.

    gop run failed at a dir which has `go.mod` file existed.

    The following program triggers an unexpected result

    x := 123.1
    println(x + 1)

    Expected result



    : no required module provides package; to add it:
    	go get
    2021/10/24 21:28:04 total 1 errors
    panic: total 1 errors

    Gop Version

    gop devel linux/amd64

    Additional Notes

    If i remove go.mod file at the target dir, then gop run command will successed.

    If i readd go.mod file and remove auto generated gop_autogen.go file, then gop run will failed again.

    The above experiment should not be run under gop repo dir, any other dir which has a go.mod file will get such error.

    opened by 92hackers 4
  • exec/bytecode bug: swap struct slice element

    exec/bytecode bug: swap struct slice element

    In bytecode mode (

    type student struct {
        name	string
        age		int
        score	int
    a := [student{"A", 13, 90}, student{"B", 12, 72}, student{"C", 12, 85}]
    a[1], a[2] = a[2], a[1]

    It got:

    [{A 13 90} {B 12 72} {B 12 72}]

    But int slice is good:

    a := [1, 3, 2]
    a[1], a[2] = a[2], a[1]

    It got:

    [1 2 3]
    bug priority:high 
    opened by xushiwei 4
The GoPlus (Go+) Programming Language
A program that generates a folder structure with challenges and projects for mastering a programming language.

Challenge Generator A program that generates a folder structure with challenges and projects for mastering a programming language. Explore the docs »

João Freitas 69 Jul 20, 2022
Self-contained Machine Learning and Natural Language Processing library in Go

Self-contained Machine Learning and Natural Language Processing library in Go

NLP Odyssey 1.2k Aug 1, 2022
Bcfm-study-case - A simple http server using the Echo library in Go language

Task 1 Hakkında Burada Go dilinde Echo kütüphanesini kullanarak basit bir http s

Caner Gülay 0 Feb 2, 2022
Gota: DataFrames and data wrangling in Go (Golang)

Gota: DataFrames, Series and Data Wrangling for Go This is an implementation of DataFrames, Series and data wrangling methods for the Go programming l

null 2.3k Aug 11, 2022 is an open source, portable runtime for training and using deep learning on time series data. is an open source, portable runtime for training and using deep learning on time series data. ⚠️ DEVELOPER PREVIEW ONLY is 741 Jul 30, 2022
Store and properly handle data.

Description: Dockerized golang API with MySQL DB. On API start MySQL DB is initialized, with proper vehicle table. OID is used as a unique identifier.

Damir Luketic 0 Jan 4, 2022
Collect gtfs vehicle movement data for ML model training.

Transitcast Real time transit monitor This project uses a static gtfs static schedules and frequent queries against a gtfs-rt vehicle position feed ge

Open Transit Tools 7 Apr 13, 2022
The open source, end-to-end computer vision platform. Label, build, train, tune, deploy and automate in a unified platform that runs on any cloud and on-premises.

End-to-end computer vision platform Label, build, train, tune, deploy and automate in a unified platform that runs on any cloud and on-premises. onepa

Onepanel, Inc. 611 Aug 9, 2022
Go types, funcs, and utilities for working with cards, decks, and evaluating poker hands (Holdem, Omaha, Stud, more) Package provides a library of types, funcs, and utilities for working with playing cards, decks, and evaluat

null 56 Jul 30, 2022
Genetic Algorithm and Particle Swarm Optimization

evoli Genetic Algorithm and Particle Swarm Optimization written in Go Example Problem Given f(x,y) = cos(x^2 * y^2) * 1/(x^2 * y^2 + 1) Find (x,y) suc

Guillaume Simonneau 24 Jul 4, 2022
k-modes and k-prototypes clustering algorithms implementation in Go

go-cluster GO implementation of clustering algorithms: k-modes and k-prototypes. K-modes algorithm is very similar to well-known clustering algorithm

e-Xpert Solutions 31 Mar 14, 2022
Probability distributions and associated methods in Go

godist godist provides some Go implementations of useful continuous and discrete probability distributions, as well as some handy methods for working

Edd Robinson 33 Apr 1, 2022
On-line Machine Learning in Go (and so much more)

goml Golang Machine Learning, On The Wire goml is a machine learning library written entirely in Golang which lets the average developer include machi

Conner DiPaolo 1.4k Aug 1, 2022
Bayesian text classifier with flexible tokenizers and storage backends for Go

Shield is a bayesian text classifier with flexible tokenizer and backend store support Currently implemented: Redis backend English tokenizer Example

Erik Aigner 152 Jun 30, 2022
Training materials and labs for a "Getting Started" level course on COBOL

COBOL Programming Course This project is a set of training materials and labs for COBOL on z/OS. The following books are available within this reposit

Open Mainframe Project 2.3k Aug 9, 2022
A curated list of Awesome Go performance libraries and tools

Awesome Go performance Collection of the Awesome™ Go libraries, tools, project around performance. Contents Algorithm Assembly Benchmarks Compiling Co

Oleg Kovalov 272 Jul 28, 2022
Deploy, manage, and scale machine learning models in production

Deploy, manage, and scale machine learning models in production. Cortex is a cloud native model serving platform for machine learning engineering teams.

Cortex Labs 7.8k Aug 4, 2022
The Go kernel for Jupyter notebooks and nteract.

gophernotes - Use Go in Jupyter notebooks and nteract gophernotes is a Go kernel for Jupyter notebooks and nteract. It lets you use Go interactively i

GopherData 3.3k Aug 7, 2022
Library for multi-armed bandit selection strategies, including efficient deterministic implementations of Thompson sampling and epsilon-greedy.

Mab Multi-Armed Bandits Go Library Description Installation Usage Creating a bandit and selecting arms Numerical integration with numint Documentation

Stitch Fix Technology 30 Jul 2, 2022