Spent a bit of time this weekend adapting a 3d graph visualizer to render JGF files and am working on a tool to turn abstract syntax trees into JGF files. This way I can view code as a graph and work on tools to manipulate it at the graph layer instead of just text. Gonna work on better labelling and display next week and then work on connecting between source files and highlighting node types / quick searching them
@brandon do you have thoughts on how the transformation should work? VR gesture control is on the TODO list hut I'm not sure I'd want to dangle my hands in the air that long. I'm thinking operations would be around selecting nodes by type / label, graph traversal to "select" further nodes, then operations on the selected graph like renaming/replacing/duplicating.
@mauve I think of it like a graph database, so it should be able to do whatever a graph db can do, like EdgeDB. Queries, inserts, deletes, etc. Elements like cursors and selections are like functional lenses, which are essentially reified database queries (where you can use a query for both reading and modifying a selection).
@mauve I built a tool to visualize call graphs in D3, but there was just so much noise... But similarly, a feature I had originally envisioned was program slicing.
@j3rn Oo may I get a link? I was thinking I'd have each file rendered on a "layer" in 3d with calls linked between files.
@mauve I went looking, but it appears that I didn't preserve the code. It wasn't much, just a D3 force-directed graph. I've got a video, but it's too big for me to upload here.
A related thing that I was working on was Viz (https://github.com/J3RN/viz) which scans an Elixir codebase and generates a GraphViz DOT file (or JSON, or CSV), which you can then put in Vizi (pending better name, https://github.com/J3RN/vizi), which is just an HTML+JS wrapper around GraphViz compiled to WASM.
@mauve Viz does nesting of things based on namespace hierarchy, like what you mentioned. The biggest drawback to this whole approach is that GraphViz doesn't (AFAIK) have the concept of dynamically adding/removing nodes, and so it would totally re-render for each slice you took, potentially moving things all over the place.
Ideally something like D3 would be able to handle this, but I think I was overwhelmed trying to get D3 to do a bunch of fancy things.
@mauve This is the way. Until AR/VR can do this, meaning the software is available to do it, I have no use for those technologies.