3 ms·
My team is doing a lot of cli-based hacking on notebooks. They’re an interesting developing format. I would love early HN feedback on Notebook Ninja, which is
by alfl 5y ago
My team is doing a lot of cli-based hacking on notebooks. They’re an interesting developing format.
I would love early HN feedback on Notebook Ninja, which is (pre-)alpha here: https://notebook.ninja https://notebook.ninja
- whitten 5y agoWhat features does Noteback Ninja have that aren't present in the nbterm system ?
- alfl 5y agoGreat question. Right now Ninja is web-only for the public. Internally it's a CLI (releasing soon). nbterm is "notebooks in the terminal", Ninja is "materialized notebook executions". So, for example, whereas nbterm will display cell outputs, ninja will materialize them to disk and make them available via (eg) HTTP. Whereas nbterm is a CLI-based notebook development environment, Ninja is a notebook production execution environment. Ninja continues the thought from "how do I build notebooks better" to "how do I get into production".
- whitten 5y agoSo Notebook Ninja has a flag that means write the notebook and its calculated cells to an html page or some other form that would capture a snapshot at a particular step in the process, and thus be suitable to be served by a web server without being "re-executed" ? Why doesn't nbterm allow for production execution of code ? I thought that was the point of its existence, just that they are done in an terminal window rather than a web window.
- alfl 5y agoIn essence, yes. Ninja is based around the idea of reproducable science: a given execution of a notebook is immutable and accessible consistently. It writes out cell outputs depending on their mimetype (this is included in Jupyter Notebook metadata). It writes out all declared variables, per-cell, and makes them accessible in several formats (for pre-alpha, as JSON objects). It then exposes all of these via our web servers, so it's really easy to connect them to other services. Or, for example, generate a permanent link to the execution of a particular cell.
- whitten 5y agoI'm glad to see that you can link to the execution of a particular cell. Just to clarify, if the cell had the execution for the Age of a particular person, I don't know if the link to the cell is of the age of that person as of the particular day and time when it was executed, or if is stored in an unevaluated form, the execution would yield an age dependent upon the calculation and using "Now" as the value that is compared to the Date of Birth to find out what the age may be. (IE: is the "NOW" evaluated lazily to the date+time of execution, and thus the age will change as time passes) OR (is the "NOW" evaluated eagerly to the date+time of when the execution first occurs, and the value of the age of the person as of that date+time is stored unchanging as the value of the AGE cell ?
- alfl 5y agoIt's evaluated eagerly. The notebook is executed and materialized at upload. We're enabling re-triggering notebooks soon, which will allow things like scheduled and parameterized executions, and those will be eagerly evaluated as well.