3 ms·
> There’s a gap between how often software engineers could use graphs and how little our programming ecosystems support them. Where are all the graph types? Th
by rdtsc 3y ago
> There’s a gap between how often software engineers could use graphs and how little our programming ecosystems support them. Where are all the graph types?
They've been there for quite a while :-) https://www.erlang.org/doc/man/digraph.html https://www.erlang.org/doc/man/digraph.html https://www.erlang.org/doc/man/digraph_utils https://www.erlang.org/doc/man/digraph_utils
And if you want to do some set theoretical stuff you're covered as well: https://www.erlang.org/doc/man/sofs.html https://www.erlang.org/doc/man/sofs.html
- ogogmad 3y agoHow flexible and performant is that in different situations?
- rdtsc 3y agoI had never used it, aside from a simple dependency checker. But I know the compiler and the Erlang types analyzer (dialyzer) uses them.
- DylanSp 3y agoErlang's briefly mentioned at the end of the article: > There are two other languages I found with graph types: Erlang and SWI-Prolog. I don’t know either language and cannot tell when they were added; with Erlang, at least, it was before 2008. I reached out to a person on the Erlang core language committee but did not hear back.
- rdtsc 3y agoOh I did miss that. Thanks for pointing it out.
- technojamin 3y agoElixir has a pretty nice graph library as well: https://hexdocs.pm/libgraph/api-reference.html https://hexdocs.pm/libgraph/api-reference.html I've used it to do some dependency resolution for operation ordering.
- rdtsc 3y agoThanks for sharing. That looks well done. It has some pathfinding algorithms and the reducer is very neat for traversing the graph. I like that it's based on maps, which could make it more performant than the ets based erlang digraph.