From f157186e907f77971c5c2eca679e0c87a61692e8 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 26 Oct 2026 10:55:55 +0100 Subject: [PATCH] go-notebook card: a Playground link go-notebook.github.io now serves its own playground (Go and Ruby cells in WebAssembly): the org card gets the Playground link the other playground orgs have, and the notebook section names it with go-statistics' and go-numerics'. Co-Authored-By: Claude Opus 5.5 --- hugo.toml | 1 + layouts/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hugo.toml b/hugo.toml index fc20f25..df82f12 100644 --- a/hugo.toml +++ b/hugo.toml @@ -99,6 +99,7 @@ disableKinds = ['taxonomy', 'term', 'rss', 'sitemap', '404'] lib = "notebook" state = "notebook v0.4.0" live = true + playground = "https://go-notebook.github.io/playground/" brand = true blurb = "A notebook is a Markdown file whose go and ruby blocks are cells. The kernel compiles it into a real Go program, orders the cells of both languages by what they use, and runs only what changed, keeping values across runs. Ruby cells run on go-embedded-ruby, with the go-scikit bindings." [[params.orgs]] diff --git a/layouts/index.html b/layouts/index.html index 54fcbf2..10ea895 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -125,7 +125,7 @@

A first notebook, in four commands.

# notebook html first.md writes first.html # notebook serve first.md the same, live in the browser, editable -

Run it again and every cell is kept: a cell whose code and inputs did not change is not run again, across runs. The go-notebook documentation gives the cell rules; to try the arrays and the transforms without installing anything, the go-ndarray and go-fft playgrounds run them compiled to WebAssembly in the browser, and the go-statistics and go-numerics playgrounds run whole notebooks there, Go and Ruby cells alike: edit the cells, run them, see the figures.

+

Run it again and every cell is kept: a cell whose code and inputs did not change is not run again, across runs. The go-notebook documentation gives the cell rules; to try the arrays and the transforms without installing anything, the go-ndarray and go-fft playgrounds run them compiled to WebAssembly in the browser, and the go-notebook, go-statistics and go-numerics playgrounds run whole notebooks there, Go and Ruby cells alike: edit the cells, run them, see the figures.

A ruby cell runs on go-embedded-ruby, a Ruby written in Go, so the notebook stays one Go program with no Ruby to install. It sees the values the Go cells above it defined (here x, a Go []float64), and the Go cells below it see what it defines; the kernel orders and re-runs cells of both languages by what they use. From Ruby, the stack is reached through go-scikit/ruby, which the kernel adds by itself: Stats, Special, Optimize, Integrate, DataFrame and Plot call the same Go functions, with the same answers. The Ruby cells page gives the rules, and the -timeout and -memory limits that stop a runaway cell.