Skip to content

Instantly share code, notes, and snippets.

View marlonche's full-sized avatar

chef marlonche

  • China
View GitHub Profile
@prl900
prl900 / go2_feature.md
Last active August 27, 2019 11:11
Go 2 proposal idea

Go 2: Model for distributed systems

Go has a very nice concurrency model which is based on light goroutines which can communicate through channels. This model provides a great abstraction which facilitates the design and synchronisation of concurrent processes. Go programs can naturally scale and fully utilise the resources on a machine.

However, there are some cases where a single machine, even the most powerful in the market, is not enough to solve certain problems. The required work in these cases, can be splitted and distributed between different nodes which can work colaboratively to compute the result. Go's concurrency model is intended to solve communication between goroutines within a single process but, as it is implemented now, it cannot be used for communicating between processes or nodes.

There have been attemps to extend the concept of channels to communicate with external goroutines, such as netchans. The Go team worked actively in the design and implementation of this concept but unfortu

@ota42y
ota42y / least_squares_method.go
Created February 2, 2015 22:59
Golang least squares method
package main
import "fmt"
type Point struct {
x float64
y float64
}
func LeastSquaresMethod(points *[]Point) (a float64, b float64){