Live data from Hacker News

Prolog Coding Horror

metalevel.at

31–40 of 88 posts

Re: Prolog Coding Horror

#32
post #29

Earlier quoted context omitted.

Everything, you heard the joke about those who don't know Lisp end up reinventing it, well, the same can be said for Prolog.

One doesn’t simply create a Warren Abstract Machine by accident

no, first one goes down some wrong avenues before backtracking

Re: Prolog Coding Horror

#33
post #3

What do people use Prolog for in the real world? I learned about it on a university course and it seems so esoteric compared to other things on the course. Like something invented just for computer scientists to enjoy.

There was a neat helicopter landing game written in prolog way back in the day

Re: Prolog Coding Horror

#34
post #3

What do people use Prolog for in the real world? I learned about it on a university course and it seems so esoteric compared to other things on the course. Like something invented just for computer scientists to enjoy.

Not used. Quote about prolog: The elegant solution is not efficient. The efficient solution is not elegant.

Re: Prolog Coding Horror

#35
I haven’t used Prolog, but I have a little experience with Erlang and a lot with Elixir. As I understand it, the early versions of Erlang were inspired by Prolog.

For those with familiarity with both Prolog and Erlang, can you comment on the similarities and differences between? Is/was Erlang basically Prolog with OTP bolted on?

Re: Prolog Coding Horror

#36
post #3

What do people use Prolog for in the real world? I learned about it on a university course and it seems so esoteric compared to other things on the course. Like something invented just for computer scientists to enjoy.

Everything, you heard the joke about those who don't know Lisp end up reinventing it, well, the same can be said for Prolog.

You can implement Prolog in Lisp trivially:

https://t3x.org/lisp64k/prolog.html

The linked code runs in this: Unix, DOS and CP/M

https://t3x.org/klisp/index.html

It will compile for CP/M and DOS (Turbo C), Unix, Windows and whatnot.

64k Lisp:

https://t3x.org/lisp64k/index.html

Zenlisp it's similar but almost gives an intro CS course (pre SICP) for the cheap implementing discrete Math and tons of stuff in pure Lisp, even rational and complex numbers. The end chapter it's about logic programmer of course.

https://t3x.org/zsp/index.html

Re: Prolog Coding Horror

#37
post #36

Earlier quoted context omitted.

Everything, you heard the joke about those who don't know Lisp end up reinventing it, well, the same can be said for Prolog.

You can implement Prolog in Lisp trivially: https://t3x.org/lisp64k/prolog.html The linked code runs in this: Unix, DOS and CP/M https://t3x.org/klisp/index.html It will compile for CP/M and DOS (Turbo C), Unix, Windows and whatnot. 64k Lisp: https://t3x.org/lisp64k/index.html Zenlisp it's similar but almost gives an intro CS course (pre SICP) for the cheap implementing discrete Math and tons of stuff in pure Lisp, e…

See also: Schelog¹.

1: https://ds26gte.github.io/schelog/index.html

Re: Prolog Coding Horror

#38
post #3

What do people use Prolog for in the real world? I learned about it on a university course and it seems so esoteric compared to other things on the course. Like something invented just for computer scientists to enjoy.

TerminusDb

Re: Prolog Coding Horror

#39

I haven’t used Prolog, but I have a little experience with Erlang and a lot with Elixir. As I understand it, the early versions of Erlang were inspired by Prolog. For those with familiarity with both Prolog and Erlang, can you comment on the similarities and differences between? Is/was Erlang basically Prolog with OTP bolted on?

Erlang has very little in common with Prolog, which is a language in an entirely different paradigm (logic programming).

Early versions of Erlang were implemented in Prolog, which is why Erlang's syntax looks a whole lot like Prolog's, but beyond that they're not very similar.

Re: Prolog Coding Horror

#40

I haven’t used Prolog, but I have a little experience with Erlang and a lot with Elixir. As I understand it, the early versions of Erlang were inspired by Prolog. For those with familiarity with both Prolog and Erlang, can you comment on the similarities and differences between? Is/was Erlang basically Prolog with OTP bolted on?

These two languages are completely different paradigms.
Post reply on HN