asami

Asami, the graph database https://github.com/threatgrid/asami
2021-01-09T00:45:45.315100Z

cooked up that JS datalog thing - https://gist.github.com/alandipert/4e390808b5dcee9020b6622c0a24023e

2021-01-09T00:46:00.315400Z

no optimizations or anything (indexes, query planning)

2021-01-09T00:46:24.316Z

came out a little wordier than i'd hoped, not sure i arrived at the highest leverage representation of relations. but any thoughts or ideas for improvement would be most welcome

2021-01-09T00:47:04.316700Z

the algorithm is basically: map the clauses over the facts to get a set of relations. then join the relations, either cross-join or inner-join depending on whether or not they share variables

quoll 2021-01-09T00:54:38.317400Z

It’s always weird when a simple idea ends up taking a lot of space. It makes me feel suspicious of what I’ve done

➕ 1
quoll 2021-01-09T00:56:20.318600Z

The inner join is clear, but I’m so used to working with large data sets that the m×n algorithm makes me a bit uncomfortable. Your use case shouldn’t have an issue though

noprompt 2021-01-09T01:14:42.319Z

TIL about Proxy 🙂

noprompt 2021-01-09T01:15:10.319600Z

That’s pretty neat Alan. Borderline method_missing 🙂

🦜 1
2021-01-09T01:21:54.320100Z

between template literals and Proxy, ES6+ has job security

2021-01-09T01:23:12.320800Z

thanks for taking a look. i'll keep going towards the dom mgmt idea i have and post back if i arrive anywhere interesting. hope everyone has a great weekend!

👍 2