3 ms·
Maybe the author implies APL-style programming: in APL, your base datatypes are "array of number" or "array of character" and there's first class support for mu
by hoosieree 4y ago
Maybe the author implies APL-style programming: in APL, your base datatypes are "array of number" or "array of character" and there's first class support for multidimensional arrays and/or nested arrays. But the main thing is that all the operators take arrays as input and return arrays as output.
With "everything is a graph", all your operators would expect to consume and produce graphs. So you'd have operators for parent/sibling relationships, operators for various kinds of traversals, extracting graph shape information to build higher-level operators like subgraph isomorphism (or maybe that would be a built-in operator).
- woojoo666 4y agoSo the idea is to first define some static graphs and then use operators to construct larger (possibly dynamic) graphs? But to define those small static graphs in the first place, you have to either use key-value mappings (how Smalltalk/Javascript does it) or maybe RDF format or something.
- hoosieree 4y agoThat is how I imagine it, yeah. If I was designing an "APL for graphs" I would probably take a lot of inspiration from NetworkX[1]. Especially: generators for various graph types, the ability to read dicts/lists as graph data, and a huge suite of graph-related functions. But I would also want dedicated notation for the most common/composable operations like APL. I particularly like how Jq[2] "functions" are inherently combinators, and Jq has some nice semantics for mapping and filtering operations on trees, but I don't really like its syntax that much. [1]: https://networkx.org/documentation/stable/tutorial.html https://networkx.org/documentation/stable/tutorial.html [2]: https://stedolan.github.io/jq/ https://stedolan.github.io/jq/