Prolog

Feb 11, 2008 19:10


Presently I'm not doing an assignment for my CSE 415 class. It's terrible. Evil. Prolog is ... I don't like it. It's Not Unix (tm). Here's a transcript of me struggling to exit it:

[duncan:18:59:11 0 ~/school/uw/wi08/cse415 !497]$ gprolog GNU Prolog 1.2.18 By Daniel Diaz Copyright (C) 1999-2004 Daniel Diaz | ?- exit quit ? ^D uncaught exception: error(syntax_error('user_input:2 (char:1) . or operator expected after expression'),read_term/3) | ?- ^C Prolog interruption (h for help) ? ^D a abort b break c continue e exit d debug t trace h/? help Prolog interruption (h for help) ? ^D a abort b break c continue e exit d debug t trace h/? help Prolog interruption (h for help) ? e [duncan:19:00:10 0 ~/school/uw/wi08/cse415 !497]$
Isn't that terrible? It traps C-c and ignores it. It traps C-d and treats it differently at different times. It doesn't respond logically to help[RET]. There's no mention that you have to terminate input with a trailing period. Sure, that's what SMTP uses. But what else does?

Here's how you load a file:

[duncan:19:05:08 0 ~/school/uw/wi08/cse415 !497]$ gprolog GNU Prolog 1.2.18 By Daniel Diaz Copyright (C) 1999-2004 Daniel Diaz | ?- consult(lab5). compiling /home/duncan/school/uw/wi08/cse415/lab5.pl for byte code... [ ... error messages omitted ... ] /home/duncan/school/uw/wi08/cse415/lab5.pl compiled, 71 lines read - 1052 bytes written, 60 ms yes | ?-
Ugh. I don't like Prolog. And our professor didn't even explain it well enough, so William and I ended up shooting ourselves in the feet.

There's other stuff for me to complain about, but I won't. Praeterition for the win, and all that.
Previous post Next post
Up