Replies: 7 comments 15 replies
-
My thinking for next steps:
|
Beta Was this translation helpful? Give feedback.
-
Is it possible to embed markdown in comments and have that work in both regular file editors and notebooks? I'm thinking that when a file is opened as a notebook it would treat all line comment content as markdown. And when saving notebooks, any markdown blocks would be prepended with line comment markers (semicolons). |
Beta Was this translation helpful? Give feedback.
-
As mentioned on Slack, to use a notebook to edit and test production code, you need some way to have evaluable cells that are not just top-level forms -- akin to how RCFs ( I don't know how that maps to the notebook "mindset" but for me it's really important that all the exploratory code, examples, and REPL-based "tests" stay in the production code files (as |
Beta Was this translation helpful? Give feedback.
-
There's kind of a big foundational decision that we need to make for notebooks: (defn foo []
(println "bar"))
(defn bar []
(println "bar"))
This Clojure file can produce these two cells if we keep all the whitespace (\n is in there so github shows the lines): (defn foo []
(println "bar")) \n
\n
(defn bar []
(println "bar")) Or we could clean it up and remember the whitespace as metadata on the cells: (defn foo []
(println "bar")) (defn bar []
(println "bar")) As for rich comments: (comment
(+ 40 2)
42) With everything version: (comment \n
(+ 40 2) \n
\n
42 ) Or without: (+ 40 2) 42 As you can see, idents make it even more difficult. I've now built the latest PRs in the "clean" style and saving does work correctly. It does get a lot more difficult when you create new cells that don't have inherent metadata so I have to make some decisions around adding whitespace on save. The reason I'm trying to make a decision now is that it's hard to change to something different later. This is pretty much baked into the representation and will also have to be built into clojure-lsp handling of notebooks since it will also get the cells and will have to translate them into a file representation. |
Beta Was this translation helpful? Give feedback.
-
Having used the current implementation of Clojure Notebooks (as of Calva v2.0.321), I have some feedback. This is based on me watching the sci-clj presentation and then trying it out for the first time in a real use-case I have. The use case We have a namespace called The current workflow
How do notebooks come into play First impressions
I have a few ideas about how the UI could work differently, perhaps with a few specific metadata (e.g. annotate namespaces or comment blocks with something like In any case, many thanks to everyone involved in this, it has the feeling of something really big in the Clojure tooling space! |
Beta Was this translation helpful? Give feedback.
-
FWIW, my workflow, when I connect to QA or production for some debugging is essentially the same (steps 1-5 above), so the RCF issue is a big obstacle for me to use the Notebook format. In development, it's less of a worry since my RCFs wouldn't be too problematic if they accidentally got evaluated (in general -- but not always!). I also have multiple RCFs in a file quite often. Currently, for debugging QA/production, I'm starting a headless Portal web server in one of our processes (and an nREPL server), then setting up two ssh tunnels (one for nREPL, one for Portal), and then opening a Simple Browser in VS Code pointing at the remote web server and connecting Calva to the remote nREPL. |
Beta Was this translation helpful? Give feedback.
-
VSCode seems to be exposing two kinds of UI for cells:
Currently the Calva notebooks show the UI but do nothing, but perhaps it could be one possible solution for cell customisation (the cell tag could be stored as metadata on the expression). |
Beta Was this translation helpful? Give feedback.
-
This is related to the #1824 feature so we can have a public discussion where to take this and what decisions we made.
Beta Was this translation helpful? Give feedback.
All reactions