4 ms·
> Markdown can simply be code - the fenced code blocks are quite enjoyable to work with. Hmm, if a Markdown file can have code interspersed, then can't a code
by euroderf 4y ago
> Markdown can simply be code - the fenced code blocks are quite enjoyable to work with.
Hmm, if a Markdown file can have code interspersed, then can't a code file have Markdown interspersed, and the two interpretations of the file could in some sense be symmetric - and equally valid ?
Obv such "interspersions" exist in certain implementations, but I don't think such symmetries do, nor is there anything like a "standard" for it.
Literate programming using Markdown - who'da thunk it ?
Someone pls correct me if I'm OTL.
- cratermoon 4y agoIsn't that essentially what Jupyter does?
- benatkin 4y agoIt's in JSON at least by default. Here's an example: https://github.com/tensorflow/examples/blob/master/courses/udacity_deep_learning/1_notmnist.ipynb?short_path=bb28f96 https://github.com/tensorflow/examples/blob/master/courses/u...
- cratermoon 4y agoAh yes, it's stored as JSON, but look at all those "cell_type": "markdown", interspersed with the code cells. From the standpoint of a user, a Jupyter notebook is code and markdown interspersed.
- benatkin 4y agoYes, but support for showing the Markdown version is much more widespread. observablehq puts Markdown in JavaScript code. I think it works better with Markdown even if it wasn't supported in multiple places, but since it does, I think having Markdown be the container format is a clear winner. There is also MDX but I prefer stuff that displays in the rendered view as well as in the source. Of course the renderers can change, but that's slow. As for inverting them without losing the data, that seems possible and would be interesting to see.