3 ms·
This is late, but I just saw this. Wow that’s a pretty wild idea. Quite interesting. I’m not sure what to consider “natural”. I know category theory (I’m a ph
by andyferris 2y ago
This is late, but I just saw this.
Wow that’s a pretty wild idea. Quite interesting.
I’m not sure what to consider “natural”. I know category theory (I’m a physicist by training, not CS, so I’m not talking Haskell or whatnot) tells us that these 2D drawings of computation graphs have a well-defined meaning (eg you can deform the lines continuously and it doesn’t change the result, etc). In particular, we have these monoidal categories where we can e.g. draw two lines in parallel to represent two pieces of data flowing.
The thing is the “monoid” can either by the product (two values in a struct, say) or a sum (two possible values in a variant) and you get the same “rules” for how to draw it. Back when I was drawing tensor network diagrams it would really tricky to include both monoids on the one diagram. You could kinda do it in 3D but that’s not natural or easy. What people do in practice (in flowcharts, etc) is we tend to have these AND and OR junctions (and their inverses) where a human can kinda infer what’s going on (e.g. does this split and join refer to two parallel computations or branching logic?).
I think both monoids are critical to expressing computation and I still don’t know what the “natural” yet “rigorous” way to draw these things is.