News for hackers. Stuff that matters.
Re:Learn Prolog Now by njn on Monday December 24, 2018 @03:27PM (#18754107)
I was going through this recently because my brother is going through the CS program that I went through, which is the only time I've encountered anyone mention Prolog. I still can't really envision how to create comprehensive systems in this, but it seems the logic paradigm could be applied to some really useful new areas that it hasn't reached yet, similar to how the influence of functional languages is pretty much expected for any trendy new language today (Rust, ES6).
Re:Learn Prolog Now by Koshkin on Monday December 24, 2018 @03:31PM (#18754126)
I think it helps to think of Prolog as something similar to SQL. See, for example, https://stackoverflow.com/questions/2117651/comparing-sql-an....
Re:Learn Prolog Now by tom_mellior on Monday December 24, 2018 @07:50PM (#18755154)
It doesn't really help to think that way. The accepted answer to that StackOverflow question sounds very much like the poster didn't really know what Prolog is (and possibly confused it with Datalog).

Here is code to append two lists in Prolog:

    append([], Xs, Xs).
    append([X|Xs], Ys, [X|Zs]) :-
        append(Xs, Ys, Zs).
You can use this as follows ("?-" is the user input prompt, equations are the system's answers):

    ?- append([a,b], [c,d], Zs).
    Zs = [a, b, c, d].


    ?- append(Xs, Ys, [a,b,c]).
    Xs = [],Ys = [a, b, c] ;
    Xs = [a],Ys = [b, c];
    Xs = [a, b],Ys = [c];
    Xs = [a, b, c],Ys = [].
How would you express the notion of lists in SQL? How would you express the notion of appending two lists? And how would you express the notion of searching for all possible pairs of lists that, when appended, yield the list [a,b,c]?
Re:Learn Prolog Now by vmchale on Monday December 24, 2018 @07:53PM (#18755176)
> the influence of functional languages is pretty much expected for any trendy new language today (Rust

Rust is barely influenced by functional languages.

Re:Learn Prolog Now by nemaar on Tuesday December 25, 2018 @05:16AM (#18756818)
>Rust is barely influenced by functional languages.

That is arguable. Rust supports and in a lot of ways prefers functional solutions for problems, for example the iterator trait in std and a gazillion similar library APIs. Functional programming works very well with Rust's type system.

Re:Learn Prolog Now by ausjke on Monday December 24, 2018 @06:21PM (#18754839)
for expert system prolog is the king
Re:Learn Prolog Now by marcosdumay on Tuesday December 25, 2018 @01:43PM (#18758654)
Yes. But others (like Haskell) aren't much behind.