
Re: the graph
collection https://docs.racket-lang.org/graph/index.html
Would it be feasible to give this a functional interface that avoids copying the entire graph + properties for every operation?

I’m assuming there’s only an imperative interface to avoid burdening the system with functional updates of millions of vertices and edges. I’m just unsure if that burden has to be there.

@castro.mbithii has joined the channel

:+1: looks like I just jumped the gun on it. But yeah the IO problem is part of the reason why I’ve moved away from Haskell as my primary driver. Also I didn’t like the amount of scaffolding you have to run through once you start needing your own Monads.

@deactivateduser60718 I doubt the entire graph is copied. The reasonable thing to do is to share as much as possible.

Of course. But can you do that fairly easily with a functional interface?

There isn’t one, so I figured there must be a reason why.

I think most operations can be done in O(log(n)) where n is the size of the graph. FWIW see https://web.engr.oregonstate.edu/~erwig/papers/InductiveGraphs_JFP01.pdf

Yeah there could be a log of copying.

That is the right track. That is a great paper.

I believe it goes into a little bit of detail on why imperative graphs are “easier” to implement

Fantastic, thank you both. I’m considering adding a functional interface to unlike-assets
, and doing so depends on this.

@hrj.nzym has joined the channel