Liking cljdoc? Tell your friends :D

Version 3

At the moment, Version 3 is used for documentation at scicloj.ml, at the scicloj-data-science-handbook draft, and at various individual projects and study groups notes.

Usage

See the tutorial, that was generated by this namespace.

2021-08-19 screencast

A recorded study meeting from March 2nd, 2021

2020-08-24 screencast (a bit outdated)

Editor-agnostic workflow

You can use Notespace alongside with any editor or IDE by listening to file save events (needs to be dodumented better).

Editor integration

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.

Background

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

Main changes

Here are the main thingss that are changing here, comparing to Version 2:

  • Version 3 offers a different notion of what notespaces and notes are. Arguably, this notion is less strange to the usual Clojure concepts and idioms.
  • Very little extra notation is necessary, and it is just some tiny amount of metadata that determines how things should be rendered.
  • A small set of API functions allows to evaluate code in a way that informs the browser notebook about changes.
  • Time-related Clojure semantics such as futures and delays can be handled in a way that respects and informs the notebook too when values are realized.
  • The new implementation makes things more flexible and easier to extend and experiment with.
  • Data visualizations based on gorilla-ui Hiccup extensions are supported.

Implementation

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.

Renderers

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.

Known issues

  • Many of the notions, ideas and behaviours of Version 2 are not supported by Version 3 at the moment. Most of them are enabled in a different way. We need to discuss whether to create some backwards compatibility layer.
  • Currently things tend to break when moving across several namespaces. For now, calling (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

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close