deactivateduser60718
2019-11-22 15:13:26

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?


deactivateduser60718
2019-11-22 15:14:27

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
2019-11-22 15:23:37

@castro.mbithii has joined the channel


artemchernyak
2019-11-22 16:05:28

:+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.


soegaard2
2019-11-22 18:06:20

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


deactivateduser60718
2019-11-22 18:23:43

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


deactivateduser60718
2019-11-22 18:24:03

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


soegaard2
2019-11-22 18:28:41

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


samdphillips
2019-11-22 18:29:06

Yeah there could be a log of copying.


samdphillips
2019-11-22 18:29:15

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


samdphillips
2019-11-22 18:30:20

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


deactivateduser60718
2019-11-22 18:34:45

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


hrj.nzym
2019-11-22 23:40:46

@hrj.nzym has joined the channel