Fork me on GitHub
#specter
<
2016-05-28
>
adambrosio18:05:59

out of curiosity, how was the name (specter) chosen?

nathanmarz18:05:58

inspect, introspect

adambrosio18:05:22

So at work we use om.next, and I saw under the readme’s future work you mention graphs I’ve not had the time to fully think this out, but I was wondering if you had spent any brain power on graphs, om.next & specter

adambrosio18:05:44

i can elaborate on what an om.next graph is if you aren’t aware

nathanmarz18:05:14

well I have my own internal specter graph navigators (on top of loom)

nathanmarz18:05:36

trying to get someone from the community to contribute an open-source version

nathanmarz18:05:54

there was someone at clojure west who was really interested but I haven't heard from him since

nathanmarz18:05:07

short summary of om.next graphs?

nathanmarz18:05:22

i only have a vague familiarity

adambrosio18:05:54

let me grab a snapshot from my app, probably be easier with some real data

nathanmarz18:05:07

btw I gave an example of my specter graph stuff during my clojure west talk: https://youtu.be/VTCy_DkAJGk?t=39m

adambrosio18:05:10

{:todos [[:todo/by-id 111] [:todo/by-id 222]]
 :todo/by-id {111 {:db/id 111 :todo/title [:string/by-id 112]}
              222 {:db/id 222 :todo/title [:string/by-id 223]}}

adambrosio18:05:26

so edges are called idents and take the form [:table-name id]

adambrosio18:05:00

and we usually want to perform operations like adding/removing a todo to both the :todos list and to the table :todo/by-id

adambrosio18:05:23

and editing them in the table, which could itself be an operation that involves modifying a todo’s title which is an ident

adambrosio18:05:34

anyway i dont know what im looking for as its very new to me, but we end up writing a lot of boilerplate to update this graph

nathanmarz18:05:25

yea, well it's kind of like manipulating a vector if you had to deal with the internal tree structure directly

nathanmarz18:05:43

I think loom internally implements graphs with maps but has a proper graph api that you can use

adambrosio18:05:56

so take a look at loom then?

nathanmarz18:05:24

I would start there, yea

adambrosio18:05:35

ok thanks, hadn’t heard of it before

nathanmarz18:05:47

or some sort of API where you do the basic manipulations / queries with a graph-oriented API

adambrosio18:05:49

be nice to not reinvent the graph

nathanmarz18:05:52

get-node, children, parents, etc.

nathanmarz18:05:15

then when you want to do more sophisticated stuff, you can do something similar like I've done with specter graph navigators