I've never used it in production, but I have a deep love of Prolog, just because of how different it is from any other programming language I've used. As a programming paradigm, it found it as eye-opening as functional programming. What I found interesting is that you are operating on logical statements and pattern matching, which often means that the same "function" can be used for multiple different things. For exa…
I always thought that pattern matching would be an excellent feature for other programming languages, but it seems that it hasn't become popular. Many strategies available to Prolog could become possible just by the addition of this feature. One possible implementation of the idea occurs with C++ templates specialized with numerical parameters. It also seems that Mathematica provides pattern matching, but I don't use…
I'm not mutable, I'm partially instantiated
41–50 of 77 posts
Re: I'm not mutable, I'm partially instantiated
#42I've never used it in production, but I have a deep love of Prolog, just because of how different it is from any other programming language I've used. As a programming paradigm, it found it as eye-opening as functional programming. What I found interesting is that you are operating on logical statements and pattern matching, which often means that the same "function" can be used for multiple different things. For exa…
Do you have a suggestion on where to / how to start learning Prolog beyond towers-of-hanoi? Prolog is basically the last language on my list of things I want to look at, but whenever I tried, I failed to find anything practical to do/try.
Re: I'm not mutable, I'm partially instantiated
#43I've never used it in production, but I have a deep love of Prolog, just because of how different it is from any other programming language I've used. As a programming paradigm, it found it as eye-opening as functional programming. What I found interesting is that you are operating on logical statements and pattern matching, which often means that the same "function" can be used for multiple different things. For exa…
Do you have a suggestion on where to / how to start learning Prolog beyond towers-of-hanoi? Prolog is basically the last language on my list of things I want to look at, but whenever I tried, I failed to find anything practical to do/try.
Re: I'm not mutable, I'm partially instantiated
#44I'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
Use Prolog to improve LLM's reasoning - https://news.ycombinator.com/item?id=41831735 - Oct 2024 (155 comments)
Re: I'm not mutable, I'm partially instantiated
#45Compare with a Promise. If you can check whether it resolved, you can see it mutate. If the only operation allowed is to await it then from the code’s point of view, it might be considered an immutable reference to the pending result.
Re: I'm not mutable, I'm partially instantiated
#46Earlier quoted context omitted.
Do you have a suggestion on where to / how to start learning Prolog beyond towers-of-hanoi? Prolog is basically the last language on my list of things I want to look at, but whenever I tried, I failed to find anything practical to do/try.
I’ve enjoyed https://www.metalevel.at/prolog but I’m not a Prolog Programmer.
Re: I'm not mutable, I'm partially instantiated
#47Partially instantiated data structures are also available in Haskell (via Laziness), in OCaml (via tail modulo cons, https://inria.hal.science/hal-03146495/document ) and Koka (via constructor contexts, https://dl.acm.org/doi/pdf/10.1145/3656398 )
Laziness and TMC are fundamentally different from partial instantiation in that they are implementation details, mostly/wholly invisible to the language semantics themselves. A key aspect of partial instantiation is that the "holes" may be filled in by a semantically unrelated piece of code, which is not the case for either laziness or TMC (wherein the contents data structure must be defined in one place, even if the…
Re: I'm not mutable, I'm partially instantiated
#48Re: I'm not mutable, I'm partially instantiated
#49I am actually working on a logical query language that's a successor to prolog here: https://memelang.net/02/ . Any feedback appreciated!
Re: I'm not mutable, I'm partially instantiated
#50I've never used it in production, but I have a deep love of Prolog, just because of how different it is from any other programming language I've used. As a programming paradigm, it found it as eye-opening as functional programming. What I found interesting is that you are operating on logical statements and pattern matching, which often means that the same "function" can be used for multiple different things. For exa…
I always thought that pattern matching would be an excellent feature for other programming languages, but it seems that it hasn't become popular. Many strategies available to Prolog could become possible just by the addition of this feature. One possible implementation of the idea occurs with C++ templates specialized with numerical parameters. It also seems that Mathematica provides pattern matching, but I don't use…
That list is roughly in order of how capable and useful the pattern matching is in each of those languages. Erlang was originally written in Prolog.
Also, I definitely agree it's a feature I miss everywhere when not using Erlang/Elixir.