4 ms·
What would be the practical use cases of using something like this as a library in your application?
by mywaifuismeta 4y ago
What would be the practical use cases of using something like this as a library in your application?
- minxomat 4y agoIn modern contexts (outside of compilers): policy evaluation, see e.g. OPA's ReGo which uses Datalog enhanced with structured data support.
- nerdponx 4y agoWould you want to use a Prolog/Datalog for things like authorizing users in a RBAC system? I give the engine a bunch of rules and properties of things, and the engine figures out whether or not the user is authorized to perform some specific action.
- minxomat 4y agoThat's exactly what OPA does.
- jasonwatkinspdx 4y agoYou ever run into a situation with SQL where you're trying to do something that's sorta tree shaped, and it makes the code awkward even if you use say vendor extensions for recursive queries? Datalog excels at those sort of problems.
- mywaifuismeta 4y agoBut I still need to send a SQL query to the database. How does a Datalog engine in Rust help me?
- jasonwatkinspdx 4y agoYou put your data in the library to get your answer.
- adenozine 4y agoOh, well you’ll get to post something to HN that’s “written in Rust”, isn’t that enough? /s
- zozbot234 4y agoYou can do recursive queries in SQL via standard CTE's, no vendor extensions needed whatsoever.