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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Relic: Functional relational programming for Clojure(Script)

224 点作者 zonotope大约 2 年前

10 条评论

crabmusket大约 2 年前
Using the relational model for app data in memory is really interesting.<p>Martin Fowler wrote about doing that as a way to get around the &quot;object-relational mismatch&quot; issue[1]. Richard Fabian describes &quot;data-oriented design&quot; as having a lot of overlap with the relational model[2]. ECSes becoming very popular in game engines are basically in-memory relational databases where &quot;components&quot; are &quot;tables&quot;[3].<p>[1]: <a href="https:&#x2F;&#x2F;martinfowler.com&#x2F;bliki&#x2F;OrmHate.html" rel="nofollow">https:&#x2F;&#x2F;martinfowler.com&#x2F;bliki&#x2F;OrmHate.html</a><p>[2]: <a href="https:&#x2F;&#x2F;dataorienteddesign.com&#x2F;dodbook&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dataorienteddesign.com&#x2F;dodbook&#x2F;</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;SanderMertens&#x2F;ecs-faq#what-is-ecs">https:&#x2F;&#x2F;github.com&#x2F;SanderMertens&#x2F;ecs-faq#what-is-ecs</a>
评论 #34953836 未加载
评论 #34951692 未加载
评论 #34954278 未加载
Rodeoclash大约 2 年前
Clojure(script) always seems to me to be this hotbed of interesting ideas in programming. I.e. you&#x27;ll see something wild like this start here then eventually the concepts make their way out into regular JavaScript.<p>I&#x27;m almost starting to regret not picking Clojurescript for my app
评论 #34951014 未加载
评论 #34949971 未加载
评论 #34949970 未加载
prettyStandard大约 2 年前
This looks really interesting! As someone who has worked with relational databases and Clojure in the past, I can definitely see the appeal of a functional relational programming model.<p>I like that relic provides support for declarative data processing and declarative relational constraints. These are areas that can be tricky to handle when working with traditional relational databases, so it&#x27;s great to see a library that addresses these pain points.<p>The ability to use relic with reactive programming is also a big plus. I&#x27;m curious to see how this would work in practice, particularly in the context of an interactive application.<p>Overall, relic seems like a promising library for anyone looking to work with normalized data in Clojure. I&#x27;ll definitely be giving it a try on my next project!
joelittlejohn大约 2 年前
Dan recently recorded a session about Relic, if you&#x27;d like to hear him speak more about the origins of the library, some design choices, and some examples:<p><a href="https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=QsEJ5O2e4Es">https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=QsEJ5O2e4Es</a>
sesm大约 2 年前
I like how the typical JS-library-style README is put separately in a &#x27;Pitch&#x27; section.
Scarbutt大约 2 年前
I guess sqlite + honeysql would be an alternative. Curious to know why the author prefers the relations&#x2F;table&#x2F;codd model over graph-map-databases like datomic and thinks something like datomic &quot;feels out&quot; of &quot;out of the tarpit&quot;.
评论 #34950745 未加载
tantaman大约 2 年前
Beautiful. I&#x27;ve been noodling on exactly this same idea. So far I&#x27;ve explored using SQLite but it would be ideal if there was no SQL between me and my relations. Another direction I&#x27;ve taken is adding STM to JavaScript and implementing a JS api for querying relations.
wcerfgba大约 2 年前
How are updates triggered, what&#x27;s the mechanism? From the examples it seems like you don&#x27;t need to subscribe and provide a function to be called when changes happen, but then how does it work?
评论 #34949863 未加载
Funnyduck99大约 2 年前
I dont like clojure
评论 #34950149 未加载
brap大约 2 年前
What makes people see Lisp-like languages and think to themselves &quot;yep, this is how I want my code to look like&quot; is beyond me
评论 #34951048 未加载
评论 #34951734 未加载
评论 #34950789 未加载
评论 #34954864 未加载
评论 #34957572 未加载
评论 #34955550 未加载
评论 #34952732 未加载