diff --git a/hugo.toml b/hugo.toml index 1ea65e6..6dfda29 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, 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 →" + 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.18.0, since go-notebook v0.21.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. Since go-notebook v0.21.0, a Float64 A * x runs through go-blas, non-ASCII uppercase, lowercase and normalize work, and an n×0 matrix crosses. The browser playground runs them too (playground v0.20.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 b41a99b..088fb2a 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.19.0 +require github.com/go-notebook/playground v0.20.0 require ( filippo.io/age v1.3.2 // indirect @@ -70,6 +70,7 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect github.com/go-augeas/augeas v0.0.0-20260830115849-a0db83a6594a // indirect github.com/go-bignum/bigfloat v0.2.0 // indirect + github.com/go-blas/blas v0.1.0 // indirect github.com/go-commonmark/commonmark v0.1.0 // indirect github.com/go-composites/array v0.0.0-20261015235938-f7161fa2d065 // indirect github.com/go-composites/bag v0.0.0-20261017234052-8c0542744097 // indirect @@ -82,7 +83,7 @@ require ( 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.30.0 // indirect - github.com/go-embedded-julia/julia v0.17.0 // indirect + github.com/go-embedded-julia/julia v0.18.0 // indirect github.com/go-embedded-r/r v0.17.1 // indirect github.com/go-embedded-r/tre v0.1.3 // indirect github.com/go-embedded-ruby/ruby v0.8.5 // indirect @@ -108,7 +109,7 @@ require ( github.com/go-mustache/mustache v0.1.0 // indirect github.com/go-ndarray/ndarray v0.40.3 // indirect github.com/go-nokogiri/nokogiri v0.1.0 // indirect - github.com/go-notebook/notebook v0.20.0 // indirect + github.com/go-notebook/notebook v0.21.0 // indirect github.com/go-numerics/integrate v0.2.0 // indirect github.com/go-numerics/optimize v0.3.1 // indirect github.com/go-numerics/special v0.2.0 // indirect @@ -305,7 +306,7 @@ require ( github.com/go-simd/adler32 v0.1.0 // indirect github.com/go-simd/base64 v0.1.0 // indirect github.com/go-simd/crc32 v0.0.0-20260903220012-5f164e0e0487 // indirect - github.com/go-simd/floats v0.15.0 // indirect + github.com/go-simd/floats v0.17.0 // indirect github.com/go-simd/hex v0.0.0-20260903220024-a8d22a843218 // indirect github.com/go-simd/highway v0.0.14 // indirect github.com/go-sql-driver/mysql v1.10.1 // indirect diff --git a/playground/go.sum b/playground/go.sum index 1941c8d..9de39ee 100644 --- a/playground/go.sum +++ b/playground/go.sum @@ -184,6 +184,8 @@ github.com/go-augeas/augeas v0.0.0-20260830115849-a0db83a6594a h1:WnRzPthHV1yr9s github.com/go-augeas/augeas v0.0.0-20260830115849-a0db83a6594a/go.mod h1:syDsgdbvlbD/zjgs6nJktc2araTaN5DEL3a/OvPCrkM= github.com/go-bignum/bigfloat v0.2.0 h1:9sDb0Trg9ikAoSvLtjAXBLERNX2wYkbHi/w3FSqj6BQ= github.com/go-bignum/bigfloat v0.2.0/go.mod h1:YVHspp0DKscpWZ6NK+rSCXxCfVDldNNoAN2JYQ8FInk= +github.com/go-blas/blas v0.1.0 h1:MKRsvJ5yNhcZL+PxpFP2DCoJiXw3x2ROuRwLYUFERGg= +github.com/go-blas/blas v0.1.0/go.mod h1:WjhlqzQ+RA8tS473f18QtcJl5Q0GonPs3RJIxT5G7Bk= github.com/go-commonmark/commonmark v0.1.0 h1:UUjE5rIPuYYxDBi2Nj2/fNoTGDyAirp3p/t8B4TzMjE= github.com/go-commonmark/commonmark v0.1.0/go.mod h1:llCsI7zIAI9nbpH+zhewbQfL6WtyYxmkB4HWZ0YseD8= github.com/go-composites/array v0.0.0-20261015235938-f7161fa2d065 h1:WDXYARIlvdq8yAthNq8esKhDlJPBxbAgYs/7psRyI/E= @@ -208,8 +210,8 @@ 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.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-julia/julia v0.18.0 h1:YOH41vaqd0rowp1+n0XfYNhLnBhafQTPMoL4LiFByTg= +github.com/go-embedded-julia/julia v0.18.0/go.mod h1:OIx3KU2U0xVneJdwcdH73/9UXi2gDWbFZOFAbh7sBvI= github.com/go-embedded-r/r v0.17.1 h1:raX7Ac9Bvni/pw+A+7lWFO1UkJqm66d4f26uh57DH2w= github.com/go-embedded-r/r v0.17.1/go.mod h1:+SbBiE9KSTuc1kWNF6009Ixrs2tM2uQCuKxByngTWL4= github.com/go-embedded-r/tre v0.1.3 h1:MuHk9dLUO51F6kr7j8mnu01bUMVBmOpVlrmO16qObjo= @@ -267,10 +269,10 @@ github.com/go-ndarray/ndarray v0.40.3 h1:jsQnEKagtYZs484MzLNGbpcttkVvS1m8UrodoWJ github.com/go-ndarray/ndarray v0.40.3/go.mod h1:O4U0Y5pV0Pakd0iqx5ECW8VP346oxJlvm73FTeQ1rI8= github.com/go-nokogiri/nokogiri v0.1.0 h1:3Q3BewGHK16Bt34ggJeyf9xeIMJyA3dmfbIxARPgR9U= 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.19.0 h1:8RBQl90JJNdv4VYxWjHNAgSelaLMC/WWJHLE0TCMA90= -github.com/go-notebook/playground v0.19.0/go.mod h1:+hjM+eLqU2FsIqWxCsCYxGiCE0bdep3clS2stpHzCe4= +github.com/go-notebook/notebook v0.21.0 h1:5vMENhry1AKrntHVONNMIbaD5v0GOQzigHJs970GCZ0= +github.com/go-notebook/notebook v0.21.0/go.mod h1:17GARyjSbbksADGo0jcU+isopJLVV9KYALt3yTicSC0= +github.com/go-notebook/playground v0.20.0 h1:cGSE3yG0EZfgcmXmjFpNMMagZxdyOsyUBL61992D204= +github.com/go-notebook/playground v0.20.0/go.mod h1:Z6dquAL8hn5ZUBbD5LiTdPlJ7wrGUsE2RpUz7Na7H9w= 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= @@ -663,8 +665,8 @@ github.com/go-simd/base64 v0.1.0 h1:Pd5aYE5Zuflf8PDvXeYXDZqa27NQ4gvg2PTjWHnPuTQ= github.com/go-simd/base64 v0.1.0/go.mod h1:iPa0zSBQKLgChjjqixi+jckt7kjxTj2p/tG18lHq+lE= github.com/go-simd/crc32 v0.0.0-20260903220012-5f164e0e0487 h1:6JZ4TKf3j6y7xS9meu2MBQZHkkeebFWiQo8x2htKfd0= github.com/go-simd/crc32 v0.0.0-20260903220012-5f164e0e0487/go.mod h1:lickteAl0z3L24ypOqBe0AwoHPMMxxpYcxJu72aO1kw= -github.com/go-simd/floats v0.15.0 h1:0joQTqse6+Ccl78FETksCrrBGdeLhy7ZsxRJRNU6yLU= -github.com/go-simd/floats v0.15.0/go.mod h1:Aq5a6oY5pUqm9Hpi+iV2nrNmaaUb0rwHvUHIerXWSvA= +github.com/go-simd/floats v0.17.0 h1:Dv0ZmZ3k0IavvHwQgstpUz+TeIf/gGJ9HEGQ/UART8Q= +github.com/go-simd/floats v0.17.0/go.mod h1:Aq5a6oY5pUqm9Hpi+iV2nrNmaaUb0rwHvUHIerXWSvA= github.com/go-simd/hex v0.0.0-20260903220024-a8d22a843218 h1:TymapuhKzqUf8LNtsv8L4PJY/gz5bAaEbD2cpot1vFI= github.com/go-simd/hex v0.0.0-20260903220024-a8d22a843218/go.mod h1:ZwRN06+N0wTIjn+mxT2NF/CbzTMAlfH/c0CKG8q5cwU= github.com/go-simd/highway v0.0.14 h1:O3HPG00qgLGlrQyYBlMGyLYsuzZrqHA4+XNptPjV5gs=