parinfer

shaunlebron 2017-06-19T17:32:34.992419Z

I actually thought a lot about this during parinfer development

shaunlebron 2017-06-19T17:33:14.006823Z

comments in the file were getting pretty long, and I felt that I could go the literate-programming route

shaunlebron 2017-06-19T17:33:55.022191Z

I ultimately decided to keep the file with minimal comments

shaunlebron 2017-06-19T17:36:23.076908Z

and instead opted to create a code.md that has a design-level narrative separate from the code, but actually links directly to functions and vars by name

mattly 2017-06-19T17:37:18.097759Z

we're doing something similar for the doc build system on my project at work

shaunlebron 2017-06-19T17:39:42.151341Z

@mattly: is it open?

mattly 2017-06-19T17:40:03.159129Z

no

dominicm 2017-06-19T17:41:49.197896Z

I think code.md has the documentation aspect of literate programming. But the tangle/weave aspect is useful, the order of understanding a program is not necessarily the order the program must be written in.

dominicm 2017-06-19T17:42:30.212539Z

I suppose if you start at code.md, it has the same effect :thinking_face:

mattly 2017-06-19T17:42:48.219221Z

in our case the doc system is more meant to tell a story about data as it flows from "a user did x" to "here's how it appears in the reports"

mattly 2017-06-19T17:45:12.273036Z

so it's like "here's how we ingest this patient data event", then "here's how it passes through ETL" and finally "here's how the reports and analytics tools use that in queries"

mattly 2017-06-19T17:45:31.280148Z

and the doc system pulls in from multiple code repositories to do that

shaunlebron 2017-06-19T17:46:29.301345Z

@mattly: that sounds really good

shaunlebron 2017-06-19T17:47:30.324101Z

i struggled at Stripe to understand the data flow between three iframes in our Stripe.js v3, and thought about writing something to document it in a similar way

mattly 2017-06-19T17:47:35.325906Z

@shaunlebron it's worked well for us, and helps us keep even non-engineer eyes on the process

shaunlebron 2017-06-19T17:47:57.334028Z

nice

mattly 2017-06-19T17:48:09.338396Z

because if there's a bug in that flow, no one is ever going to know from looking at the output

shaunlebron 2017-06-19T17:48:11.339238Z

more tools like that should be made

shaunlebron 2017-06-19T17:48:29.345682Z

yes!

mattly 2017-06-19T17:49:01.357145Z

I'm pushing to extract parts of the system and OSS it, but in all reality I think we're a year off from having the headspace to do that

shaunlebron 2017-06-19T17:49:53.376787Z

sounds like a big undertaking, honestly may be too specific for others?

shaunlebron 2017-06-19T17:50:03.380425Z

a blog post would be great though

mattly 2017-06-19T17:50:07.382064Z

yeah, that's part of it too

shaunlebron 2017-06-19T17:50:10.382869Z

just to show principles in action

mattly 2017-06-19T17:50:35.392353Z

hm, yeah, I'll bring that up

shaunlebron 2017-06-19T17:53:50.464451Z

@dominicm without reading the knuth’s paper, I’ve thought for a while that docs are a bit like tests, in that they fulfill a separate narrative and that they have to be written in parallel to—and in sync with—code

shaunlebron 2017-06-19T17:55:46.507742Z

maybe that’s not at all what he’s talking about, but I’m interested to see if they can really be unified in “literate”. But apart from execution order vs. reading order that literate addresses, I would go further and say that there is also a problem of certain reader abstractions not mapping 1-to-1 with the abstractions created in the code

shaunlebron 2017-06-19T17:56:36.526717Z

(this is all very hand-wavy in my head though)

dominicm 2017-06-19T18:20:19.056213Z

@shaunlebron I agree with all you are saying. I think it takes a lot of discipline in order to sync docs with code though. Knuth admits that he poorly documents code usually, but that his tool forces him too. He also created WEB, so it's no surprise he feels ecstatic when using it.

shaunlebron 2017-06-19T19:15:52.268239Z

i wanted to see an example of WEB in action. found tex.web rendered as a pdf here: http://brokestream.com/tex-web.html

mattly 2017-06-19T19:53:39.026298Z

in risk of getting ever-more off-topic for the channel, but chasing the topic-du-jour, do you know of any other kind of lightweight "text to various render methods" akin to say, asciidoc or org-mode but that give you more free-form elements for creating document strucutre?

dominicm 2017-06-19T19:57:51.113635Z

@mattly what do you mean by: > free-form elements for creating document structure asciidoctor supports a generic block, that can nest with different numbers of ----, I think that's what you mean, but uncertain.

mattly 2017-06-19T19:59:25.146053Z

hm. I guess what I mean is that I'd like to be able to register with the parser/renderer "block types" that get special treatment in the rendering process

dominicm 2017-06-19T20:02:13.208205Z

You can do that

dominicm 2017-06-19T20:02:33.215707Z

There's extensions & stuff. Very extensible

mattly 2017-06-19T20:02:57.224054Z

I'll take a deeper look at it, thanks

shaunlebron 2017-06-19T20:04:49.264247Z

clojurescript unraveled uses it: https://github.com/funcool/clojurescript-unraveled

mattly 2017-06-19T20:10:57.388813Z

oh, asciidoc has stem blocks that are more like what I want