Live data from Hacker News

I'm not mutable, I'm partially instantiated

blog.dnmfarrell.com

1–10 of 77 posts

Re: I'm not mutable, I'm partially instantiated

#2
I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language.

[1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

Re: I'm not mutable, I'm partially instantiated

#3
post #2

I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language. [1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

Here's the hacker news post: https://news.ycombinator.com/item?id=41831735

Re: I'm not mutable, I'm partially instantiated

#4
I don't get where the `-` comes from in `key-value` result lines after the "refactoring" title. I feel like it should stay a `,` like at the beginning. Can someone more knowledgeable in Prolog explain that? Is that because of an hidden use of this `to_list` predicate that comes later in the post?

Re: I'm not mutable, I'm partially instantiated

#5
post #4

I don't get where the `-` comes from in `key-value` result lines after the "refactoring" title. I feel like it should stay a `,` like at the beginning. Can someone more knowledgeable in Prolog explain that? Is that because of an hidden use of this `to_list` predicate that comes later in the post?

(The initial version of this comment missed the point of your question; sorry.) The author says:

> We also store pairs as the pair type (Key-Value), instead of two separate values. This makes easy to serialize a dictionary into a list of pairs, which are sortable using the builtin keysort/2.

`Key, Value` is two values, not one. I suspect something like `kv(Key, Value)` would work as well.

By the way, I disagree that the refactored version doesn't cut; `-> ;` is syntactic sugar over a cut.

Re: I'm not mutable, I'm partially instantiated

#6
post #2

I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language. [1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

[deleted]

Re: I'm not mutable, I'm partially instantiated

#7
post #2

I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language. [1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

Which is strange considering how old and limited Prolog in a sense is. I wonder why no superset ever gained traction and what it would look like. I imagine it fitting somewhere in the hierarchy

Theorem Prover ⊃ SMT Solver ⊃ SAT Solver

since

Theorem Prover ⊃ Prolog

Re: I'm not mutable, I'm partially instantiated

#8
post #4

I don't get where the `-` comes from in `key-value` result lines after the "refactoring" title. I feel like it should stay a `,` like at the beginning. Can someone more knowledgeable in Prolog explain that? Is that because of an hidden use of this `to_list` predicate that comes later in the post?

Operators like - are just an infix functor for a Prolog term with arity 2:

    ?- functor(123-"foo", Name, Arity, Type).
    Name = (-),
    Arity = 2,
    Type = compound.

    ?- 1-"foo" = '-'(1,"foo").
    true.
Functors like - only become arithmetic in combination with is:

    ?- A is '-'(42, 1).
    A = 41.
    
    ?- A is 42 - 1.
    A = 41.

Re: I'm not mutable, I'm partially instantiated

#9
post #2

I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language. [1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

Which is strange considering how old and limited Prolog in a sense is. I wonder why no superset ever gained traction and what it would look like. I imagine it fitting somewhere in the hierarchy Theorem Prover ⊃ SMT Solver ⊃ SAT Solver since Theorem Prover ⊃ Prolog

Learning curve perhaps? There doesn't have to be an overlap between people working on this and the tools you have mentioned

Re: I'm not mutable, I'm partially instantiated

#10
post #2

I've noticed quite a lot of Prolog content lately. I don't know if it's just a case of the Baader–Meinhof phenomenon, but it looks to me that recent article[1] about Prolog being able to improve LLM reasoning abilities renewed some interest in the language. [1] https://shchegrikovich.substack.com/p/use-prolog-to-improve-...

Which is strange considering how old and limited Prolog in a sense is. I wonder why no superset ever gained traction and what it would look like. I imagine it fitting somewhere in the hierarchy Theorem Prover ⊃ SMT Solver ⊃ SAT Solver since Theorem Prover ⊃ Prolog

limited in what sense?

prolog is turing complete.

Post reply on HN