News for hackers. Stuff that matters.
Re:The hunt for the missing data type by rdtsc on Monday March 04, 2024 @03:20PM (#39595502)
> 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_utils

And if you want to do some set theoretical stuff you're covered as well: https://www.erlang.org/doc/man/sofs.html

Re:The hunt for the missing data type by DylanSp on Monday March 04, 2024 @06:02PM (#39597340)
Erlang'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.

Re:The hunt for the missing data type by rdtsc on Monday March 04, 2024 @06:24PM (#39597545)
Oh I did miss that. Thanks for pointing it out.
Re:The hunt for the missing data type by ogogmad on Tuesday March 05, 2024 @04:13AM (#39601058)
How flexible and performant is that in different situations?
Re:The hunt for the missing data type by rdtsc on Tuesday March 05, 2024 @07:46AM (#39602605)
I had never used it, aside from a simple dependency checker. But I know the compiler and the Erlang types analyzer (dialyzer) uses them.
Re:The hunt for the missing data type by technojamin on Wednesday March 06, 2024 @02:33PM (#39620229)
Elixir has a pretty nice graph library as well: https://hexdocs.pm/libgraph/api-reference.html

I've used it to do some dependency resolution for operation ordering.

Re:The hunt for the missing data type by rdtsc on Wednesday March 06, 2024 @04:36PM (#39621859)
Thanks 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.