From 50711c67dd34e6e8f53644b3a17820e3465884d2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 16 Nov 2026 01:03:46 +0100 Subject: [PATCH] landing: playground v0.19.0 (Fortran budget), Fortran blurb updated The embedded playground moves to v0.19.0, which brings go-embedded-fortran v0.30.0: a counted 512 MiB memory budget (arrays, derived types, character data, pointer targets), a nested-call bound weighted by statement nesting, and pointers. The Fortran blurb said playground v0.16.0 and listed no memory bound. It now names v0.19.0 and the budget. Co-Authored-By: Claude Opus 5.5 --- hugo.toml | 2 +- playground/go.mod | 4 ++-- playground/go.sum | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hugo.toml b/hugo.toml index 4663724..1ea65e6 100644 --- a/hugo.toml +++ b/hugo.toml @@ -59,7 +59,7 @@ disableKinds = ['taxonomy', 'term', 'rss', 'sitemap', '404'] name = "notebook" kind = "kernel · command" href = "https://github.com/go-notebook/notebook" - blurb = "The kernel, the notebook command (run, html, watch, serve, irb) and the HTML export: format parses the Markdown, analysis builds the dependency graph from the syntax, gen writes the Go program, kernel compiles and drives it through runtime and keeps results and values, export writes the page. Ruby cells (```ruby) run on rbgo, a Ruby written in Go, with the go-scikit bindings (Stats, Special, Optimize, Integrate, DataFrame, Plot, NDArray), and share their variables with the Go cells. --timeout and --memory stop a runaway cell in either language. notebook irb is the same Ruby as an interactive session, as irb: => inspect after each input, _, multi-line input decided by rbgo's parser, Tab completion and history in a pure-Go line editor (go-ruby-reline), each input in a worker that --timeout, --memory or Ctrl-C can stop without losing the prompt, and --save to keep the session as a notebook. More → Julia cells (```julia) are parsed with go-embedded-julia's parser and checked (syntax errors at their line with julia's message, names in the dependency graph under Julia's scope rules), and, since go-notebook v0.18.0, run by its interpreter (v0.17.0, since go-notebook v0.19.0) in one kernel shared by the Julia cells: a global or a function a cell defines is there in the next one, a top-level loop updates a global as in IJulia (55 for a sum of 1 to 10), and a failure, a MethodError included, is julia's own text. The kernel boots from a prebuilt Base image, fetched on the first Julia cell and loaded only if its SHA-256 is the pinned one (cold start about a second). A cell may run 30 s and 50 million statements, within a memory budget of 512 MiB counted as 16 bytes per array element (a floor, not the heap: strings are not counted, and one array may have at most 2^24 elements). Julia variables cross with Go cells in both directions (Int64, Float64, Bool, String, and vectors and matrices of Float64 or Int64; Go int and []int as Int64): a Julia value of another type stays in Julia and the Go reader is deferred, naming the type, and a Go value Julia cannot take fails the Julia cell. Inputs are measured before any copy (2^24 elements per array, a cell's inputs together within its memory limit, so a cell can hold up to twice its limit). This breaks v0.18.0, where Julia variables were not shared. Known limitations: a Float64 A * x needs BLAS (go-embedded-julia#67), a non-ASCII uppercase needs utf8proc (#65), and Get refuses an n×0 matrix (#76). The browser playground runs them too (playground v0.18.0), in a third core that the page loads only when a Julia cell is first run (about 28 MB and about 20 s), with Julia variables kept apart from Go's: 512 MiB, 20 million statements and 20 s per cell, and a new worker after each Julia run. More → R cells (```r) are parsed with go-embedded-r's parser, identical to R 4.6.2 on R's own sources, and checked in the same way: syntax errors at their line in R's words, names in the graph, and a cell that cannot be analysed from its text (<<-, eval, library) depending on every cell above it. They run on go-embedded-r's evaluator in one shared environment (v0.10.0), and since v0.12.0 each cell is bounded: 512 MiB of vectors, 50 million steps, 30 s. The browser playground runs them too (playground v0.15.0), in its second core, with R variables kept apart from the other languages: 512 MiB, 20 million steps, 10 s per cell, and a crash restarts the core with a message on the cell. More → Fortran cells (```fortran) are checked and run with go-embedded-fortran (since go-notebook v0.17.0, go-embedded-fortran v0.17.0: its sema session for the names and errors, its eval.Session for the running; free form, implicit typing off) and highlighted with go-rouge's fortran lexer. The Fortran cells share one session: a cell sees the variables (with the values the earlier cells left), procedures, modules and derived types of the Fortran cells before it. Fortran variables stay in Fortran, as R's do: they are not shared with Go, Ruby, Julia, R or C cells in either direction yet. A cell may make at most 2^32 loop iterations and calls and run 30 s, and a failure is reported at its line and column. The browser playground runs them too (playground v0.16.0), in its second core, with Fortran variables kept apart from the other languages: 200 million steps and 10 s per cell, and an endless do ends with a message and leaves the page usable. More →" + blurb = "The kernel, the notebook command (run, html, watch, serve, irb) and the HTML export: format parses the Markdown, analysis builds the dependency graph from the syntax, gen writes the Go program, kernel compiles and drives it through runtime and keeps results and values, export writes the page. Ruby cells (```ruby) run on rbgo, a Ruby written in Go, with the go-scikit bindings (Stats, Special, Optimize, Integrate, DataFrame, Plot, NDArray), and share their variables with the Go cells. --timeout and --memory stop a runaway cell in either language. notebook irb is the same Ruby as an interactive session, as irb: => inspect after each input, _, multi-line input decided by rbgo's parser, Tab completion and history in a pure-Go line editor (go-ruby-reline), each input in a worker that --timeout, --memory or Ctrl-C can stop without losing the prompt, and --save to keep the session as a notebook. More → Julia cells (```julia) are parsed with go-embedded-julia's parser and checked (syntax errors at their line with julia's message, names in the dependency graph under Julia's scope rules), and, since go-notebook v0.18.0, run by its interpreter (v0.17.0, since go-notebook v0.19.0) in one kernel shared by the Julia cells: a global or a function a cell defines is there in the next one, a top-level loop updates a global as in IJulia (55 for a sum of 1 to 10), and a failure, a MethodError included, is julia's own text. The kernel boots from a prebuilt Base image, fetched on the first Julia cell and loaded only if its SHA-256 is the pinned one (cold start about a second). A cell may run 30 s and 50 million statements, within a memory budget of 512 MiB counted as 16 bytes per array element (a floor, not the heap: strings are not counted, and one array may have at most 2^24 elements). Julia variables cross with Go cells in both directions (Int64, Float64, Bool, String, and vectors and matrices of Float64 or Int64; Go int and []int as Int64): a Julia value of another type stays in Julia and the Go reader is deferred, naming the type, and a Go value Julia cannot take fails the Julia cell. Inputs are measured before any copy (2^24 elements per array, a cell's inputs together within its memory limit, so a cell can hold up to twice its limit). This breaks v0.18.0, where Julia variables were not shared. Known limitations: a Float64 A * x needs BLAS (go-embedded-julia#67), a non-ASCII uppercase needs utf8proc (#65), and Get refuses an n×0 matrix (#76). The browser playground runs them too (playground v0.18.0), in a third core that the page loads only when a Julia cell is first run (about 28 MB and about 20 s), with Julia variables kept apart from Go's: 512 MiB, 20 million statements and 20 s per cell, and a new worker after each Julia run. More → R cells (```r) are parsed with go-embedded-r's parser, identical to R 4.6.2 on R's own sources, and checked in the same way: syntax errors at their line in R's words, names in the graph, and a cell that cannot be analysed from its text (<<-, eval, library) depending on every cell above it. They run on go-embedded-r's evaluator in one shared environment (v0.10.0), and since v0.12.0 each cell is bounded: 512 MiB of vectors, 50 million steps, 30 s. The browser playground runs them too (playground v0.15.0), in its second core, with R variables kept apart from the other languages: 512 MiB, 20 million steps, 10 s per cell, and a crash restarts the core with a message on the cell. More → Fortran cells (```fortran) are checked and run with go-embedded-fortran (since go-notebook v0.17.0, go-embedded-fortran v0.17.0: its sema session for the names and errors, its eval.Session for the running; free form, implicit typing off) and highlighted with go-rouge's fortran lexer. The Fortran cells share one session: a cell sees the variables (with the values the earlier cells left), procedures, modules and derived types of the Fortran cells before it. Fortran variables stay in Fortran, as R's do: they are not shared with Go, Ruby, Julia, R or C cells in either direction yet. A cell may make at most 2^32 loop iterations and calls and run 30 s, within a counted memory budget of 512 MiB (since go-notebook v0.20.0), and a failure is reported at its line and column. The browser playground runs them too (playground v0.19.0, go-embedded-fortran v0.30.0), in its second core, with Fortran variables kept apart from the other languages: 512 MiB counted before each allocation (arrays, derived types, character data, pointer targets), 200 million steps, 10 s per cell and a nested-call bound weighted by statement nesting, so an endless do, a runaway recursion or a memory bomb ends with the evaluator's message and leaves the page usable. More →" [[params.repos]] name = "playground" kind = "wasm · page" diff --git a/playground/go.mod b/playground/go.mod index f23ade5..b41a99b 100644 --- a/playground/go.mod +++ b/playground/go.mod @@ -2,7 +2,7 @@ module github.com/go-notebook/go-notebook.github.io/playground go 1.27.4 -require github.com/go-notebook/playground v0.18.0 +require github.com/go-notebook/playground v0.19.0 require ( filippo.io/age v1.3.2 // indirect @@ -81,7 +81,7 @@ require ( github.com/go-dataframe/dataframe v0.1.0 // indirect github.com/go-datetime/dates v0.2.0 // indirect github.com/go-embedded-c/c v0.2.1 // indirect - github.com/go-embedded-fortran/fortran v0.24.1 // indirect + github.com/go-embedded-fortran/fortran v0.30.0 // indirect github.com/go-embedded-julia/julia v0.17.0 // indirect github.com/go-embedded-r/r v0.17.1 // indirect github.com/go-embedded-r/tre v0.1.3 // indirect diff --git a/playground/go.sum b/playground/go.sum index a6a59b9..1941c8d 100644 --- a/playground/go.sum +++ b/playground/go.sum @@ -206,8 +206,8 @@ github.com/go-datetime/dates v0.2.0 h1:5zXrMqTgw3ljlQfghRsdJRtXYqnR6jYqTgMvA3kG8 github.com/go-datetime/dates v0.2.0/go.mod h1:FmzSHylloy714Cc8MEkRjREYP7TcslqjmzsFMQXglAg= github.com/go-embedded-c/c v0.2.1 h1:LCNcLHJ1T3Ry0adJwO+jK9RnoFwrMd6yR/0bb0muHIc= github.com/go-embedded-c/c v0.2.1/go.mod h1:MhuXRqUtTZTUnm/3fVjho1HiL6QCFylChzOQ+Tu9eiQ= -github.com/go-embedded-fortran/fortran v0.24.1 h1:hp0Rx5xhoLhNXVsVRmI/B3QdKz+Stxseklb9B5TX3Ro= -github.com/go-embedded-fortran/fortran v0.24.1/go.mod h1:UUtUFdyuO7fWnDoBjbjGZNGXg7bH2fW2DLp1D4QOAkg= +github.com/go-embedded-fortran/fortran v0.30.0 h1:istuoEzsA+a1NEkl6LwOmgx1Sh4CdYmpEWjPSf8XmNs= +github.com/go-embedded-fortran/fortran v0.30.0/go.mod h1:UUtUFdyuO7fWnDoBjbjGZNGXg7bH2fW2DLp1D4QOAkg= github.com/go-embedded-julia/julia v0.17.0 h1:lCsAJ6bsvfqC1OGM3d5LUGbZlpdvDq+MoXFv/Bo+VVo= github.com/go-embedded-julia/julia v0.17.0/go.mod h1:WkSyHRvyKTls2QhqjwORXAcDOJCeoO6zIx2wedBPLpk= github.com/go-embedded-r/r v0.17.1 h1:raX7Ac9Bvni/pw+A+7lWFO1UkJqm66d4f26uh57DH2w= @@ -269,8 +269,8 @@ github.com/go-nokogiri/nokogiri v0.1.0 h1:3Q3BewGHK16Bt34ggJeyf9xeIMJyA3dmfbIxAR github.com/go-nokogiri/nokogiri v0.1.0/go.mod h1:zjghooYIK8Xfg+fL4/OUhROslx51xGsM3JKtB2TI0tg= github.com/go-notebook/notebook v0.20.0 h1:puHnpLw1qupEVT+9PYgm0WnKlQCJf0yoiw5vNCzDMBk= github.com/go-notebook/notebook v0.20.0/go.mod h1:UuafSbeeR/l6bA/dg817XK0/ns6azBubh9uJmiys9bY= -github.com/go-notebook/playground v0.18.0 h1:P/u6ypZhfOZM3Q5wjSDLL/MVn6VUhVvcxSoHKQy9qFo= -github.com/go-notebook/playground v0.18.0/go.mod h1:jaO8J8X4ieIzFmBGgSwJ0syswQlKdt7ALX88nWUfigo= +github.com/go-notebook/playground v0.19.0 h1:8RBQl90JJNdv4VYxWjHNAgSelaLMC/WWJHLE0TCMA90= +github.com/go-notebook/playground v0.19.0/go.mod h1:+hjM+eLqU2FsIqWxCsCYxGiCE0bdep3clS2stpHzCe4= github.com/go-numerics/integrate v0.2.0 h1:IkJhDimTc7nQETCixEvbbHhtOF36GbANBKJI3mJB3Kw= github.com/go-numerics/integrate v0.2.0/go.mod h1:ABjpcWy8ZSOg8j6S+7YRsvMJ2LpVkH4E64/CGet2gCw= github.com/go-numerics/optimize v0.3.1 h1:eYkT9BpORKSwXnDtEJxXfZ19qJT0cI2RH6xEL3VLZSU=