Notebook experience in your Clojure namespace
This library is an attempt to answer the following question: can we have a notebook-like experience in Clojure without leaving one's favourite editor?
Everything here is considered experimental.
Version 3, under active development, is an attempt to rethink the user experience and internals of Version 2.
It follows some ideas from our discussions of alternative notation and of evaluation semantics.
Several people's ideas and comments have affected this version.
@awb99
@behrica
@daslu
@ezmiller
@genmeblog
@jsa-aerial
@metasoarous
@nickstares
@vlaaad
See this screencast for a first experimental concept. It is a bit outdated in terms of the note kinds.
See this namespace for some more examples, or read it directly as the corresponding rendered html.
The concepts and idioms here may change. They are presented just as a basis for further discussion.
See emacs-config.el as a recommended way to connect editor keybindings to the main api functions.
Here are the main thingss that are changing here, comparing to Version 2:
For state management and event handling at Clojure JVM, we use cljfx's state management logic.
The current rendering engine is based on gorilla-notes, which is a thin wrapper of gorilla-ui.
The client side stack is based on shadow-cljs and reagent.
As with Version 2, we use tools.reader to read the code of the namespace.
Rendering is now an abstract notion, and thus Notespace can be extended with different ways of rendering. At least one of them will create static-htmls, based on gorilla-notes. Other potential renderers may rely on Oz or rmarkdown-clojure, or generate and update Pink Gorilla notebooks on the fly.
(notespace.api/init)
is a good habit for such cases.It follows some ideas from our discussions of alternative notation and of evaluation semantics.
Several people's ideas and comments have affected this version.
@awb99
@behrica
@daslu
@ezmiller
@genmeblog
@jsa-aerial
@metasoarous
@nickstares
@vlaaad
See this screencast for a first experimental concept. See this namespace for some more examples.
The concepts and idioms here may change. They are presented just as a basis for further discussion.
See emacs-config.el as a recommended way to connect editor keybindings to the main api functions.
Here are the main thingss that are changing here, comparing to Version 2:
For state management and event handling at Clojure JVM, we use cljfx's state management logic.
The current rendering engine is based on gorilla-notes, which is a thin wrapper of gorilla-ui.
The client side stack is based on shadow-cljs and reagent.
As with Version 2, we use tools.reader to read the code of the namespace.
Rendering is now an abstract notion, and thus Notespace can be extended with different ways of rendering. At least one of them will create static-htmls, based on gorilla-notes. Other potential renderers may rely on Oz or rmarkdown-clojure, or generate and update Pink Gorilla notebooks on the fly.
(notespace.api/init)
is a good habit for such cases.At the moment, Version 2 is used for documentation and testing at ClojisR and ClojisR-examples.
See the screencast to have an idea about it.
See this example namespace and its rendered html.
Hearing your comments, opinions and wishes will help!
#notespace-dev at the Clojurians Zulip.
There are several magnificent existing options for literate programming in Clojure: Marginalia, Org-Babel, Gorilla REPL, Pink Gorilla, Clojuopyter, Nextjournal, Saite, Oz. Most of them are actively developed.
Creating a separate alternative would be the least desired outcome of the current project. Rather, the hope is to compose and integrate well with some of the other projects. There has been some thoughts and experiments in that direction, and it seems promising.
Copyright © 2019 Scicloj
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close