diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b34e6b..8c33bef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: - go-version: '1.27.2' + go-version: '1.27.3' - run: go version # Not on Windows: its checkout converts line endings to CRLF. - name: gofmt @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: - go-version: '1.27.2' + go-version: '1.27.3' - name: govulncheck run: go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... - name: Fuzz the binding arguments for 60 s @@ -73,7 +73,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: - go-version: '1.27.2' + go-version: '1.27.3' - run: go vet ./... && go test ./... && go test -tags rbgo_core ./... arch-qemu: @@ -91,7 +91,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: - go-version: '1.27.2' + go-version: '1.27.3' - run: sudo apt-get update && sudo apt-get install -y qemu-user-static - name: Vet + test under qemu (${{ matrix.goarch }}) run: | @@ -105,7 +105,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-go@v7 with: - go-version: '1.27.2' + go-version: '1.27.3' - name: go test -c for each target, both builds shell: bash run: | diff --git a/README.md b/README.md index 42eb084..226c771 100644 --- a/README.md +++ b/README.md @@ -419,17 +419,36 @@ parameters as readers. `a` `cdf` `entropy` `inspect` `interval` `isf` `kurtosis` `loc` `logcdf` `logpmf` `logsf` `mean` `median` `moment` `pmf` `ppf` `rvs` `sf` `skew` `std` `support` `to_h` `validate` `var` `new` - ---- PASS: TestPrintBindings (0.02s) -PASS -ok github.com/go-scikit/ruby 1.227s ## Notebooks -Package [cells](cells/) runs the Ruby cells of a -[go-notebook](https://github.com/go-notebook/notebook) notebook: one -interpreter per worker, whose top-level locals persist from cell to cell, and -the exchange of variables with the Go cells. Its documentation states the -conversion rules both ways; a notebook links it, you do not call it. +These bindings are what a ` ```ruby ` cell of a +[go-notebook](https://github.com/go-notebook/notebook) notebook (v0.3.0 and +later) runs on. A notebook can mix Go and Ruby cells, and their variables +cross both ways: + +````markdown +```go +xs := []float64{2.1, 3.4, 1.9, 5.6, 4.4, 3.3, 2.8, 4.9} +``` + +```ruby +fit = Stats::Normal.fit(xs) # xs is a Ruby Array of Floats here +loc, scale = fit.loc, fit.scale +``` + +```go +import "fmt" + +fmt.Printf("loc %.3f, scale %.3f\n", loc, scale) // float64s here +``` +```` + +Package [cells](cells/) runs those cells: one interpreter per worker, whose +top-level locals persist from cell to cell, and the exchange of variables with +the Go cells. Its documentation states the conversion rules both ways; a +notebook links it, you do not call it. The notebook's kernel requires this +module in its work module by itself, so a notebook's own `go.mod` only needs +go-notebook. ## Build tags