TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ideas for DataScript 2

79 点作者 alex_hirner将近 3 年前

9 条评论

sekao将近 3 年前
Reactive updates is the big one, in my opinion. DataScript is a triumph and arguably is the reason why so many note-taking tools (Roam, Athens, Logseq, etc) are written in Clojure. But there are so many cases where it would be nice to react when some set of entities is changed.<p>I think what we need is to figure out how to combine DataScript with a rules engine. I wrote a rules engine and made a writeup that compares the two together: &quot;Using O&#x27;Doyle Rules as a poor man&#x27;s DataScript&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;oakes&#x2F;odoyle-rules&#x2F;blob&#x2F;master&#x2F;bench-src&#x2F;todos&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oakes&#x2F;odoyle-rules&#x2F;blob&#x2F;master&#x2F;bench-src&#x2F;...</a><p>Subscribing to individual entities is nice but with a rules engine you have so much more fine-grained control over your reactions. And with the RETE algorithm this can be done efficiently. Most libraries in this space just ignore it and make their own ad-hoc solution -- an informally-specified, bug-ridden, slow implementation of half of a rules engine.
评论 #32459580 未加载
评论 #32458546 未加载
jitl将近 3 年前
Notion alumnus Chet Corcos (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;ccorcos" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;ccorcos</a>) is working on a local-first database that matches a lot of these ideas:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ccorcos&#x2F;tuple-database" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ccorcos&#x2F;tuple-database</a>
jwr将近 3 年前
The big question is: if you don&#x27;t need queries (which I agree you don&#x27;t), then why bother with DataScript at all? Why not just store your data in native Clojure&#x2F;ClojureScript data structures, using the right structure for each thing and use a small number of data access functions, possibly maintaining an index or two?<p>This is what I did: migrated an app (arguably a fairly complex one) from DataScript to native Clojure data structures. Not because I didn&#x27;t like DataScript: I actually liked the idea a lot, but because I couldn&#x27;t justify the cost in performance and complexity (in my case, DataScript not handling nil values was a problem as well).
lilactown将近 3 年前
The &quot;Optimized B-Trees&quot; section I _think_ is suggesting to get rid of datoms, which I 100% agree with. I do not think they add anything at all; IME you can have a collection of all attributes indexed by entity ID and then have additional indexes on top of that collection.<p>My stupid question is: why even bother with B-Trees? I believe asami[0] stores everything in memory using Clojure maps &amp; sets.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;quoll&#x2F;asami" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;quoll&#x2F;asami</a>
评论 #32462908 未加载
areichert将近 3 年前
I know the founders of InstantDB [1] are using some of these ideas for inspiration :)<p>[1]: <a href="https:&#x2F;&#x2F;www.instantdb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.instantdb.com&#x2F;</a>
评论 #32460639 未加载
openfuture将近 3 年前
Very good pointers, match my thinking on the topics I had considered.<p>One thing though is that I&#x27;m not a fan of uuids, I think content addressing is sufficient if you build everything around that. Actually I feel all IDs can be content address and type&#x2F;name&#x2F;context. Ofc I&#x27;m approaching this slightly differently, I don&#x27;t care about web browsers but I care about p2p and replication..
评论 #32460572 未加载
CGamesPlay将近 3 年前
How come there is no SQLite of Datalog? You can find plenty of implementations of embedded datalog database in a specific language, where the query API is tied to the language. I want to write text datalog queries and access my database from multiple languages. Why doesn’t this exist?
评论 #32459662 未加载
评论 #32459483 未加载
评论 #32461867 未加载
评论 #32466841 未加载
stevesimmons将近 3 年前
Recognising this is a mainly Clojure audience, are there any Python equivalents of DataScript?
typingmonkey将近 3 年前
Sounds like the feature set of RxDB [1].<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pubkey&#x2F;rxdb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pubkey&#x2F;rxdb</a>
评论 #32458380 未加载