Interesting, why a PHP wrapper to the graph-easy CLI rather than a perl cgi/fcgi/… to the graph-easy library?
edit: sending the graph info via GET is a bit risky though, browsers and servers tend to limit URL size so you might get truncation on the bigger graphs (IIRC IE is the biggest issue with ~1k URLs, not sure if pre-chrome Edge is better or the same, then it's mostly webservers which generally have an 8k default limit on the request-line).
Anyway good job, it certainly maximises usefulness for the complexity. Especially good call on using the codemirror editor, I'd have not thought of it but it makes the thing much nicer to use.
This is pretty cool! I probably would have never discovered graph-easy if it weren't for this.
One thing though, it doesn't handle errors that nicely, e.g. for input "a" it outputs "null". Nitpicking aside, it's neat.
Edit: I wonder what sort of heuristics graph-easy is using behind the scenes to decide where to place the clusters, etc., and how it can tell whether a particular input is feasible or not.
It should be relatively straightforward to implement this even without any server-side storage - serialize and urlencode the input to the URL hash and then read the hash on load. Modern browsers support very long URL hashes (~1MB in Firefox based on my test, even longer in Chrome)
On regular rendering, this does not render a box for the subgraph, plus, a and b are displayed in the same box, at least it should be in separated boxes.
Can't some reasonable person refresh our website so we would have more useful content like this? :-) also include Sketchviz https://news.ycombinator.com/item?id=21518152 don't include anything from haters though
reply