4 ms·
Check out lit.sh, it's a super simple shell script that does what you're after: https://github.com/vijithassar/lit https://github.com/vijithassar/lit It's basi
by qbasic_forever 6y ago
Check out lit.sh, it's a super simple shell script that does what you're after: https://github.com/vijithassar/lit https://github.com/vijithassar/lit It's basically a one way markdown to commented source converter. One really slick thing is that since it just comments out the markdown you lose no information about line numbers and can interpret errors from your compiler, etc. with ease (something which is almost impossible with more complex literate programming systems like noweb).
- fjfaase 6y agoI would like to do a little more than this, as this script would still require you to enter the code fragments in an order in which they can be compiled. I also would like to use ellipses ('...') to allow to extend the definition of types and initialization functions. One of the ideas of LP is that you can present your code fragments in a non-linear fashion, explaining the code from inside-out and/or to delay the implementation details till the end. The problem with keeping the lines in sync, can also achieved by adding #line statements in the generated code.