Jump to the tool

Jupyter Notebook is very popular amongst python developers and data scientists. It gives a simple interface for experimenting in python for testing code or for experimental analysis. Jupyter Notebook provides this application by running what is known as a “kernel” in the backend and giving back the results to the ui for display. It is an open source and free to use tool. Thus it has become extremely popular.

There is no similar tool for Javascript. There are online tools like jsfiddle/codepen etc but none that can be downloaded and used as a free tool or embedded on other solutions. There are a few solutions like ObservableHQ, Jbook and IJavaScript. But none of them have a usage anywhere close to Jupyter Notebook. The first one of these (Obeservable HQ) is not a open source product to download and use but it is rather an online platform. Hence it comes with limitations like not being free and not being modifiable. The second one (jbook) is nifty tool and it is the closest what I was looking for. But it requires nodejs to run, that’s a put off for me. The third one (IJavascript) puts javascript kernel in Jupyter Notebook. This ensures Javascript is used in the same familiar interface of Jupyter. But this requires both node.js and Python to run.

Pure Javascript and libraries can ideally run without the need for a backend code like node or Python. Javascript is built to run by default in the browser. Optimization of the browser tech by Chromium (i.e. V8) has ensured Javascript is the browser is fast and efficient. Thus we can build a good notebook tool using just front end technologies. I call this a “nodeless” app for two reasons - 1. it does not require node and npm to use.. 2. it does not require a server (I didnt want to use the word “serverless” as that word has been polluted by Amazon). Backend can still be used for saving the notebooks to the cloud and for collaboration.

I’ve been looking for such a solution for quite sometime mainly to test out some of the open source JS libraries and also for building some new open source projects. As I couldn’t find any solution I have built a simple tool to run javascript in notebooks. I call it Scribbler (so much for creativity). It is available as an open source solutions — free to use and modify. The source code is here. It does not require any backend technology. Users can download and use it in the file system or host it in webserver to use it on the internet. I have used Github Pages to host it. As it does not require backend, I need not buy/host a server to do that (ain’t it beautiful?). You can have a look at it: Hello World

As the notebook does not have backend, it cannot store the notebooks on the cloud. But there is an easier way to save notebooks: download in local machines (it saves the notebook as json file with .jsnb extension). The file can be loaded back into the tool later on to edit/run it. To share with others the file can also directly loaded into the app by suffixing the url of the file after “#” something like: https://gopi-suvanam.github.io/jsnb/#link_to_file.jsnb. The url of the file should be accessible by the browser through GET method. This is how the “Hello World” link above works. The whole notebook or just the output can also be downloaded as a static HTML file.

For adding more functionality import an external library through import(…) or by adding

Go crazy with experimenting!