Martin Kavalar / Nov 16 2021
⚡️ Lightning Demo
Nextjournal is a hosted notebook platform for literate programming.
Goals:
better way to present ideas compared to status quo (PDFs)
run existing code: not learn a new language
reproducibility: apply immutability to document, data and environment (docker image) to make sure things keep running
🌈 Standard Notebooks features
randn(5)1.1s
library(ggplot2)theme_set(theme_classic())# Histogram on a Continuous (Numeric) Variableg <- ggplot(mpg, aes(displ)) + scale_fill_brewer(palette = "Spectral")g + geom_histogram(aes(fill=class), binwidth = .1, col="black", size=.1) + labs(title="Histogram with Auto Binning", subtitle="Engine Displacement across Vehicle Classes")1.7s
🗃 Passing Data
Polyglot cells can exchange data by writing to a /results folder.
with open("/results/wave.txt", 'w') as f: f.write("Hello Future of Coding 👋")0.2s
Then other cells can access it.
ls wave.txt1.4s
🥾 Custom Components & API
Work-in-progress: extensibility via in-browser runtimes:
(def turtles (atom [])){:nextjournal/viewer :reagent}(into [:div] (map (fn [s] [:span {:style {:font-size s}} "🐢"])) turtles)(dotimes [_ 10] (swap! turtles conj (/ (or (last turtles) 130) 1.2)))✨ More
realtime collaboration
on demand provisioning with powerful machines + GPUs
automatic versioning
remix existing notebooks