Re:Ideas for DataScript 2
by CGamesPlay on Sunday August 14, 2022 @09:13AM
(#32458976)
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?
[ Parent
| on HN ]
Mozilla was working on the opposite, a Datalog of SQLite, with Mentat, now abandoned: https://github.com/mozilla/mentat
Strikes me as a basically sound idea and it would be lovely if someone picked up the ball.
It's a superset, but couldn't you just use Prolog?
E.g. GNU Prolog Compiler: http://gprolog.org/
> GNU Prolog accepts Prolog+constraint programs and produces native binaries (like gcc does from a C source). The obtained executable is then stand-alone. The size of this executable can be quite small since GNU Prolog can avoid to link the code of most unused built-in predicates. Beside the native-code compilation, GNU Prolog offers a classical interactive interpreter (top-level) with a debugger.
Re:Ideas for DataScript 2
by hex9893628af on Sunday August 14, 2022 @11:00AM
(#32459823)
No, the standard evaluation model of Prolog is top-down, while that of Datalog is bottom-up. As such, some queries will perform very differently between the two.
Re:Ideas for DataScript 2
by CGamesPlay on Sunday August 14, 2022 @10:47AM
(#32459698)
I’m looking for more of a library that integrates with other programs, not a standalone program itself. I’ve seen other prolog implementations that fit the bill but they seem to rely on parsing program text from a clean state—they don’t “remember” facts on their own.
https://xtdb.com maybe?
Re:Ideas for DataScript 2
by alex_hirner on Monday August 15, 2022 @03:30AM
(#32466841)
> write text datalog queries
you may be interested in https://github.com/sqwishy/owoof