News for hackers. Stuff that matters.
Re:Docable: Literate Runbooks and Interactive Tutorials from... by noworriesnate on Thursday September 24, 2020 @10:25AM (#24578881)
This is really, really well thought out! I've wanted to build something similar for a while, but didn't have the time.

This feels like what Jupyter notebooks, RMarkdown, Observable could have been if the designers had been focusing on multiple programming languages.

I really like that it supports Javascript in the browser and server-side execution.

Edit:

The big drawback for putting complex code in notebooks is that you can't debug it in your IDE. This feels like it could be a standard notebook format supported by lots of IDEs so you can debug scripts in many different languages.

Re:Docable: Literate Runbooks and Interactive Tutorials from... by peterwwillis on Thursday September 24, 2020 @12:39PM (#24580504)
> The big drawback for putting complex code in notebooks is that you can't debug it in your IDE.

I mean, that's one of the many drawbacks. Executing random independent snippets of code in different stages based on multiple variables leads to an insane amount of untestable code paths in an undefined an environment. I hope nobody depends on these for production.

Where it does seem to shine is as a sort of verbose user interface. You could use these to compose user guides to fill out forms and perform the tasks of complex workflows (in theory). But I think the snippets should still be one piece of code so you can actually develop/maintain/use it according to modern best practices.

POD documentation was good for this back in the day. Here's an example of using POD to actually define your program's input: https://metacpan.org/pod/Getopt::Euclid

Re:Docable: Literate Runbooks and Interactive Tutorials from... by leephillips on Thursday September 24, 2020 @10:30AM (#24578920)
The acronym “jupyter” is a mashup of the names of multiple programming languages.
Re:Docable: Literate Runbooks and Interactive Tutorials from... by noworriesnate on Thursday September 24, 2020 @10:32AM (#24578934)
Oh didn't realize that! Python always seemed like a first-class citizen but it's been a while since I messed with it so maybe it was how I installed Jupyter.
Re:Docable: Literate Runbooks and Interactive Tutorials from... by leephillips on Thursday September 24, 2020 @10:34AM (#24578964)
Well then this is going to blow your mind: https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
Re:Docable: Literate Runbooks and Interactive Tutorials from... by noworriesnate on Thursday September 24, 2020 @11:01AM (#24579252)
Ah right, I should have been more specific. I didn't realize the Jupyter name was a combination of programming language names, but I did know about kernels.

For some reason the non-Python kernels always felt like second class citizens, but I think that might have been because there were other notebooks for languages like R and Scala, and in those notebooks the language integration felt more natural.

Re:Docable: Literate Runbooks and Interactive Tutorials from... by leephillips on Thursday September 24, 2020 @11:14AM (#24579363)
Well, Python is privileged in that you have to install it to run the notebook. But when you are using the notebook, all the languages are the same; there’s nothing Pythony about it.