6 ms·
I think a notebook is VERY different than an ephemeral REPL. I think that is worth considering when thinking about generating docs, tests and source code from
by mloncode 3y ago
I think a notebook is VERY different than an ephemeral REPL. I think that is worth considering when thinking about generating docs, tests and source code from a single source of truth (as opposed to separate files).
- hoosieree 3y agoDo you know what org-mode is? [editing to be less snarky and more helpful] I agree with your comment, but I do in fact use org-mode as a single source of truth document that can export documentation, tests, source code, and all that jazz. From what I can tell nbdev and org-mode are about the same in terms of features. It doesn't need any special post-processing to make git-diff useful, because org-mode's file format is plain text.
- mloncode 3y agoNo snark interpreted at all. Yes I am well aware of org mode and love it! I think it is fantastic. There are some key differences that I think make notebooks a bit more interesting - however it sounds like you've made a system you are happy with? I would love to see what you have! Mind sharing it?
- hoosieree 3y agoCool, I also wanted to say that I think nbdev looks great, and while I think it and org-mode get similar results, the user experience is surely quite different compared to emacs. My org-mode workflows start with doom-emacs[1] because otherwise Emacs customization is too much of a time sink. I've written a couple peer-reviewed papers in org-mode (exporting to pdf), my blog is written org-mode (exported to html), and I've done the "literate" thing witih code+docs+tests in one file. For me, org-mode is better as a file format because it's plain text. I don't mind making quick edits in GitHub or vim if I'm away from Emacs for some reason. But it's definitely best to work with org-mode from within Emacs. Notebooks are more enjoyable to look at while you're editing them, whereas org-mode generally needs a separate "export" step to be pretty. Here's a representative example from a blog post: https://gitlab.com/hoosieree/hoosieree.gitlab.io/-/blob/master/content/posts/2023-05-21-Stack-VM-Language.org https://gitlab.com/hoosieree/hoosieree.gitlab.io/-/blob/mast... (result is here: https://alexshroyer.com/posts/2023-05-21-Stack-VM-Language.html https://alexshroyer.com/posts/2023-05-21-Stack-VM-Language.h...) The svg images (which gitlab renders) are actually generated by a code block in the org-mode file: #+CAPTION: N times M compilers #+headers: :file ../images/n_times_m.svg :cmdline -Tsvg #+begin_src dot :exports results digraph { node [fontname="Comic Sans MS" shape=record]; L1[label="Language1"]; L2[label="Language2"]; node [shape=oval]; A1[label="Arch1"]; A2[label="Arch2"]; A3[label="Arch3"]; L1->A1; L1->A2; L1->A3; L2->A1; L2->A2; L2->A3; } #+end_src I put my cursor in there and hit Enter, and it generates the svg.
- mloncode 3y agoThis is cool, thanks for sharing. I’ll definitely check this out