TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mangle, a programming language for deductive database programming

187 pointsby aarroyocover 2 years ago

9 comments

triskaover 2 years ago
This seems already <i>almost</i> valid Prolog syntax, which is also a syntactic superset of Datalog.<p>The main question I have for implementors of Datalog and Prolog variants like this: If you are <i>that</i> close to using Prolog syntax, why not go all the way and rely fully on Prolog, a language for which a well-defined ISO standard and several interesting implementations already exist. One of the key benefits you get in this way is Prolog&#x27;s strength for meta-programming and reasoning about programs with the same formalism you use to state the specifications and queries. Abstract interpretation, query optimization etc. can be easily implemented in this way, instead of having to parse an additional formalism.<p>It may be possible to implement such Prolog-&quot;variants&quot; entirely within Prolog by defining suitable infix or prefix operators, or adding <i>conforming</i> extensions in implementations. A conforming extension is one that does not conflict with existing ISO syntax. For example, something that would be a syntax error in conforming Prolog implementations could be used as an implementation-specific extension.
评论 #33758781 未加载
评论 #33757749 未加载
评论 #33761205 未加载
burakemirover 2 years ago
This is my project! So soon ... I was considering a Show HN but wanted to wait until things like documentation are a bit more complete, but here we are.<p>Ask me anything.
评论 #33763453 未加载
groseover 2 years ago
Other resources for logic programming and Go:<p>ichiban&#x2F;prolog - ISO Prolog interpreter in pure Go, getting close to v1: <a href="https:&#x2F;&#x2F;github.com&#x2F;ichiban&#x2F;prolog" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ichiban&#x2F;prolog</a><p>trealla-prolog&#x2F;go - ISO Prolog interpreter embedded via WASM: <a href="https:&#x2F;&#x2F;github.com&#x2F;trealla-prolog&#x2F;go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;trealla-prolog&#x2F;go</a><p>guregu&#x2F;pengine - library for interfacing with Pengines (SWI-Prolog&#x27;s RPC protocol): <a href="https:&#x2F;&#x2F;github.com&#x2F;guregu&#x2F;pengine" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;guregu&#x2F;pengine</a><p>biscuit-auth&#x2F;biscuit-go - Biscuits are a fancy auth token with a little Datalog engine: <a href="https:&#x2F;&#x2F;github.com&#x2F;biscuit-auth&#x2F;biscuit-go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;biscuit-auth&#x2F;biscuit-go</a><p>I&#x27;m a big fan of logic programming. We&#x27;ve been seeing a small resurgence of interest in it (for example Yarn using Prolog made some waves) and I have some optimism for its future.
评论 #33762141 未加载
jitlover 2 years ago
Interesting; Google engineer previously published Datalog variants for BigQuery: <a href="https:&#x2F;&#x2F;research.google&#x2F;pubs&#x2F;pub43462&#x2F;" rel="nofollow">https:&#x2F;&#x2F;research.google&#x2F;pubs&#x2F;pub43462&#x2F;</a> &amp; <a href="https:&#x2F;&#x2F;logica.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;logica.dev&#x2F;</a><p>This new language seems similar to differential-Datalog (which is sadly in maintenance mode): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33521561" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33521561</a>
评论 #33782083 未加载
linkddover 2 years ago
Inventing a language seems to be a rite of passage for every engineer at google.<p>Go, Dart, Carbon, Mangle, am I missing some?<p>I&#x27;m not criticizing, I would not dare as I&#x27;m creating my own language as well :P
评论 #33757921 未加载
评论 #33759760 未加载
评论 #33757599 未加载
评论 #33758787 未加载
评论 #33761731 未加载
评论 #33761214 未加载
评论 #33757452 未加载
评论 #33758720 未加载
评论 #33757426 未加载
theodpHNover 2 years ago
Some of the other stuff looks intriguing, but regarding the claim that &quot;Unlike SQL, our Mangle rule projects_with_vulnerable_log4j has a name and can be referenced in other queries.&quot; goes, SQL in a VIEW or common table expression (CTE) can also be referenced in other queries.
评论 #33762101 未加载
评论 #33758883 未加载
JimmyRuskaover 2 years ago
RDFox looks like the best bet for datalog databases, it computes changes incrementally, also with aggregation extensions. Logicblox, Soufflé, datomic, inter4ql, corese are also worth a look. Looks like there&#x27;s a lot of innovation possible in the space, like distributed logic processing, incremental sorting, adding assert statements, figuring out why specific rules don&#x27;t match recursively, etc
评论 #33763049 未加载
UncleEntityover 2 years ago
I’m probably wrong (I’ve been deep diving into RDF triplestores lately) but I think sparql does all that and has a W3C specification.<p>Maybe the difference is you don’t have to convert your data into (subject, property, object) triples?<p>Been reading this hexastore paper and they seem to be trying to solve the same problems but I’m no data scientist so who knows.
评论 #33758914 未加载
sonicgear1over 2 years ago
Another useless and overly convoluted project just like all things google.