Prolog language for PostgreSQL proof of concept
51–60 of 83 posts
Re: Prolog language for PostgreSQL proof of concept
#52Recently, I learned that PostgreSQL can integrate with many languages through plugins, such as PL/Python, pgrx (Rust), pgzx (Zig), and so on. I wonder if anyone is planning to write one for Java or C#, lol.
Re: Prolog language for PostgreSQL proof of concept
#53As a proof of concept, this looks very cool. Suggestion: add a short example to the README. I had one experience with Prolog in the 1980s that blew my mind. I had an IR&D project to build a complete prototype of an air/land battle simulator (yes, I was a defense contractor back then) in Common Lisp given 6 weeks of coverage to write it and demo it. After a month I was satisfied with the functionality and after demoin…
Re: Prolog language for PostgreSQL proof of concept
#54[flagged]
Re: Prolog language for PostgreSQL proof of concept
#55Recently, I learned that PostgreSQL can integrate with many languages through plugins, such as PL/Python, pgrx (Rust), pgzx (Zig), and so on. I wonder if anyone is planning to write one for Java or C#, lol.
Re: Prolog language for PostgreSQL proof of concept
#56If you're interested in this I would also recommend you check out Logica[0], which is a datalog-like language that is explicitly made to compile to SQL queries. 0: https://logica.dev/
I was wondering how this was possible and then found this monstrosity: https://colab.research.google.com/github/EvgSkv/logica/blob/... Click on the SQL tab.
Re: Prolog language for PostgreSQL proof of concept
#57If you're interested in this I would also recommend you check out Logica[0], which is a datalog-like language that is explicitly made to compile to SQL queries. 0: https://logica.dev/
I was wondering how this was possible and then found this monstrosity: https://colab.research.google.com/github/EvgSkv/logica/blob/... Click on the SQL tab.
Re: Prolog language for PostgreSQL proof of concept
#58Love this, I've long considered that this should've been made as Prolog and SQL are ternary logic and basically SQL derives from Datalog and it itself from Prolog. A table record can be taught as of as a Prolog fact, so this makes the WHERE clauses the predicates in the conjunction on the right-hand side of a rule. And then exhausting the goal is actually returning the result-set. Hope to see this develop even furthe…
Prolog's evaluation semantics are order-dependent, though. I've always thought this was the reason why the two language paradigms didn't see more merging than they did. There are some datalog+RDBMS hybrids but, as much as I'm not a fan of .NET, I think LINQ has seen the most success in this space.
Re: Prolog language for PostgreSQL proof of concept
#59As a proof of concept, this looks very cool. Suggestion: add a short example to the README. I had one experience with Prolog in the 1980s that blew my mind. I had an IR&D project to build a complete prototype of an air/land battle simulator (yes, I was a defense contractor back then) in Common Lisp given 6 weeks of coverage to write it and demo it. After a month I was satisfied with the functionality and after demoin…
This reminds me of an old idea I’ve toyed with. In a logic class in university we talked about how some logic is time dependent, like A is true 2 hours after B becomes true. I was inspired to try to think through a language like prolog that could model and solve these relations through time. Didn’t get far with it since it’s a hard problem and I had too many classes that term. I was thinking it would be useful for cl…
Re: Prolog language for PostgreSQL proof of concept
#60So, I expected this to actually query the DB using prolog (using the correspondence between relational algebra and logic programming). I mean, can those prolog stored procedures use the db as a source of facts for prolog, or otherwise write queries?