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, but is arguably becoming very useful.
Version 3 is the one under active development, and it is the one we recommend using in a new project.
See the tutorial, that was generated by this namespace.
The recorded study meeting from March 2nd, 2021 can be quite useful as an intro.
(The screencast is outdated -- should be refreshed soon.)
You can use Notespace alongside with any editor or IDE. (details coming soon)
You can have tighter integration with your editor, using the main API functions.
See emacs-config.el as a recommended way to do it. We wish to offer similar solutions in other editors and IDEs.
The creation of version 3 has followed 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
@mchampine
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. To avoid the dependency of JavaFX, we copied the relevant parts of cljfx under notespace.cljfx.*
.
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
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, Clojupyter, 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? These fine people already did:
daslu, Brandon Ringe, Daniel Slutsky & Carsten BehringEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close