3 ms·
I am super excited by https://observablehq.com https://observablehq.com which has made an out-of-the-box literate programming environment for Javascript zero co
by tlarkworthy 4y ago
I am super excited by https://observablehq.com https://observablehq.com which has made an out-of-the-box literate programming environment for Javascript zero configuration (like Knuth's it has a non-linear execution order). Since switching to literate programming I have found myself adopting a documentation-driven-development methodology, where I ponder about the purpose of the notebook in the introduction, and because I reread it every time I open the notebook, the clarity of the software goes up, which also feedbacks into the ongoing development process too.
It takes a little while before habits change, but I think I have learnt more in the last year at age 40 than I did in my first year of undergraduate aged 19.
An aspect of Observable which is particularly compelling since Knuth is the fact that inter-notebook dependencies are hyperlinks, so these are not standalone literate programming artifacts, but they are a graph of explanation too. You can learn a lot by surfing notebook dependencies. Bundling code with documentation is such a win.
The other thing about Observable is the cells are reactive, so your documentation is not necessarily static either. You can provide animated interactive explanations too.
More info on the different types of content you can embed
https://observablehq.com/@observablehq/cell-modes https://observablehq.com/@observablehq/cell-modes
More info on the spreadsheet like execution ordering:
https://observablehq.com/@observablehq/observables-not-javascript https://observablehq.com/@observablehq/observables-not-javas...
More info on the literate programming support
- lepineko 4y ago"non-linear execution order" ? I can't see how it's kind of spreadsheet moreover you don't really do metaprogramming BEFORE execution which is more what I understand about literate programming.
- tlarkworthy 4y agothe topological dependency order of cells is computed, and only (logically) downstream dependencies are recomputed on a code change. See https://observablehq.com/@observablehq/how-observable-runs https://observablehq.com/@observablehq/how-observable-runs
- hueyluey 4y agoIs "topological dependency order of cells" different from what an average person would understand from saying "dependency order of cells"?
- tlarkworthy 4y agoyeah it's the technical name for the intuitive sort order you need for a graph of dependencies.
- sph 4y agoSounds like an ad, it's probably worth disclosing that you seem to be affiliated with Observable. Correct me if I'm wrong.
- deleted 4y ago[deleted]
- tlarkworthy 4y agoI am a just fan and rapid user. I am so enthusiastic about it I am an (unpaid) ambassador. https://observablehq.com/ambassadors https://observablehq.com/ambassadors I am trying to build a serverless compute layer on top of observable. https://observablehq.com/@endpointservices/webcode https://observablehq.com/@endpointservices/webcode If I was shilling webcode.run then I would think a disclosure would be appropriate, but as I was just talking about how great Observable is as a literate programming env, I do not think I have anything to disclose.
- brabel 4y agoHm, do you know emacs with orgmode Babel[1]? This seems to be re-inventing that. https://orgmode.org/worg/org-contrib/babel/intro.html https://orgmode.org/worg/org-contrib/babel/intro.html
- tlarkworthy 4y agoKinda but observable is more because the notebooks cells reactively recompute. And it's written in javascript and ran in a browser so you have the languages proper development tooling integrated (e.g. chrome Dev tools). And you can easily share it as its the web.
- brabel 4y ago> observable is more Hm, that's really relative... on Babel, you can also have reactive cells, and while it's true that having Obervable run on the web + JS is great, I could say that Babel "is more" because it supports pretty much any language, not only JS, and does not require an internet connection to work.
- kwertyoowiyop 4y agoHow would programmers even keep themselves busy (I was going to type ‘get promoted’) if they stopped reinventing things badly?