Go is a compiled language, but with very fast compilation, that allows one to use it in a REPL (Read-Eval-Print-Loop) fashion, by inserting a "Compile" step in the middle of the loop -- so it's a Read-Compile-Run-Print-Loop — while still feeling very interactive. GoNB leverages that compilation speed to implement a full-featured (at least it's getting there) Jupyter notebook kernel. As a side benefit it works with packages that use CGO — although it won't parse C code in the cells, so it can't be used as a C kernel. It already includes many goodies: cache between cell of results, contextual help and auto-complete (with gopls), compilation error context (by mousing over), bash command execution, images, html, etc. See the tutorial. It's been heavily used by the author (in developing GoMLX, a machine learning framework for Go), but should still be seen as experimental — if we hear success stories from others, we can change this.

Features

  • Auto-complete and contextual help while coding
  • Rich content display: HTML, markdown (with latex), images, javascript, svg, videos, etc.
  • (NEW) Widgets (sliders, buttons) support: interact using HTML elements. Create your own widgets
  • Uses standard Go compiler: 100% compatibility with projects, even those using CGO. It also supports arbitrary Go compilation flags to be used when executing the cells
  • Faster execution than interpreted Go, used in other similar kernels -- at the cost of imperceptible increased start up, since each cell is compiled
  • Run cell's Test* and Benchmark* functions with go test, simply adding %test to cell
  • Support for go.mod and go.work, to allow local development. Including importing specific versions of libraries

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow GoNB

GoNB Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GoNB!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2023-12-20