Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Prolog

Name: Anonymous 2011-09-19 9:55

Yes.

Name: Anonymous 2011-09-19 10:10

fag(x) :- op(x).

Name: Anonymous 2011-09-19 10:22

No.

Name: Anonymous 2011-09-19 10:37

Why do you need Prolog if you have the power of Lisp?

https://github.com/clojure/core.logic

Name: Anonymous 2011-09-19 11:05

>>4

Because Prolog statements are closed with a nice period instead of hundreds of 37 closing parentheses.

Name: Anonymous 2011-09-19 11:39

>>5
Parens are what makes things like Prolog embedded into Lisp possible in the first place. You need to pay for power. But if you use a decent editor that will close parens for you, it's a fairly small pay.

Name: Anonymous 2011-09-19 12:45

ITT newfags that don't realize that prolog is homoiconic

Name: Anonymous 2011-09-19 13:00

>>7 your dad is homoiconic.

Name: Anonymous 2011-09-19 13:01

>>4,6
You know, there is a reason why Lisp isn't successful.

Name: Anonymous 2011-09-19 13:08

>>5
statements

oh ho ho ho

Name: Anonymous 2011-09-19 13:21

>>9
Clojure is quite successful so far.

Name: Anonymous 2011-09-19 13:22

guys.

Prolog and Lisp go great together. They are like chocolate and peanut butter.

stop this religious nonsense. The real enemy is C++.

Name: Anonymous 2011-09-19 14:48

>>2
HAHAHAHAHAHAHAHAHAHAHAHAHA

Name: Anonymous 2011-09-19 20:47

>>12

Few dislike chocolate, many get anaphylactic shock from peanut and die.

Name: Anonymous 2011-09-20 18:25

Can anyone explain the multiple equality operators/predicates.
I'm having trouble with this:


sibling(A,B) :-
% A and B must be different entities
 parent(C,A),
 parent(C,B).


I tried with \=. \==, and none worked.
Thanks in advance.

Name: Anonymous 2011-09-20 18:35

>>15

parent(c,a).
parent(c,b).

sibling(A,B) :-
  A \== B,
  parent(C,A),
  parent(C,B).

?- sibling(a,a).
false.

What's the problem?

Name: Anonymous 2011-09-20 19:34

>>16
Doesn't work on gnuprolog, brother.

| ?- sibling(A,john).

A = anne

A = john

A = whore

A = bill

A = anne

A = john

A = whore

A = bill

John is apparently a sibling of itself, and the result is duplicated.

Don't change these.
Name: Email:
Entire Thread Thread List