Live data from Hacker News

Prolog interpreter in Go

github.com

11–20 of 24 posts

Re: Prolog interpreter in Go

#11
post #6
post #5

The title of the repo is spells "interpreter" correctly, so this submission's title should be fixed.

Similarly it spells "Go" correctly :)

tl;dr - I'm upset because the raison d'etat for Go's name doesn't exist.

Correct, no -- practical, probably. No matter how many gophers swear that {searchterm} + go returns just as good of results as {searchterm}+golang, it just isn't true.

Maybe I'm just bitter because the reason Go was named Go was because -- and obviously I'm paraphrasing here... "we thought Oogle would be a really cool name for a debugger."

Years later, here I am stuck searching {some search term} + GOLANG and step debugging with GDB.

The worst part though is hearing people tell me, "Oh you know what, I realize how powerful printline statements and unit tests are for debugging! I don't even miss a debugger!" Or-- "have you tried GDB? Go Supports GDB! I haven't used it -- but it exists!" GDB is a god damn hate machine. And the chorus of "print statements are good enough" is motivated reasoning at its finest.

Re: Prolog interpreter in Go

#13
post #7

Wow, just last week I was thinking how useful having embedded prolog in Go would have been, for a very particular problems that maps very well in Prolog. I'm super excited by this!

What problems are they? I'm interested in Prolog but never encountered something I thought would be a good fit (or perhaps I'm not thinking about it the right way)

Re: Prolog interpreter in Go

#14
First of all, this is great work! Hopefully, it will implement the Warren Abstract Machine[1] in the future, since it generally leads to more efficient interpretation. E.g. both SICStus and SWI-Prolog implement a version of the WAM.

[1] https://en.wikipedia.org/wiki/Warren_Abstract_Machine

Re: Prolog interpreter in Go

#15
Prolog is my favorite example language I use to convey the concept of how different programming paradigms lend themselves to different types of problems. After learning the syntax and mechanics prolog seems like a ridiculous language that was written to win a drunken bet with a philosopher. but given the right problem it feels like using black magic.

Solving Einstein's riddle[1] is trivial in prolog for example. But perhaps only because we know that the answer can be determined from the premises.

1) http://en.m.wikipedia.org/wiki/Zebra_Puzzle

Re: Prolog interpreter in Go

#16
post #6

Earlier quoted context omitted.

Similarly it spells "Go" correctly :)

tl;dr - I'm upset because the raison d'etat for Go's name doesn't exist. Correct, no -- practical, probably. No matter how many gophers swear that {searchterm} + go returns just as good of results as {searchterm}+golang, it just isn't true. Maybe I'm just bitter because the reason Go was named Go was because -- and obviously I'm paraphrasing here... "we thought Oogle would be a really cool name for a debugger." Years…

The debugger on plan9, acid, is a work of art.

Re: Prolog interpreter in Go

#17
post #13
post #7

Wow, just last week I was thinking how useful having embedded prolog in Go would have been, for a very particular problems that maps very well in Prolog. I'm super excited by this!

What problems are they? I'm interested in Prolog but never encountered something I thought would be a good fit (or perhaps I'm not thinking about it the right way)

Some examples: Combinatorial optimization problems, timetabling tasks, reasoning engines, rule-based systems for the medical industry, recommender systems etc.

Re: Prolog interpreter in Go

#18

First of all, this is great work! Hopefully, it will implement the Warren Abstract Machine[1] in the future, since it generally leads to more efficient interpretation. E.g. both SICStus and SWI-Prolog implement a version of the WAM. [1] https://en.wikipedia.org/wiki/Warren_Abstract_Machine

SWI-Prolog implements a variant of the ZIP, not the WAM.

Re: Prolog interpreter in Go

#19
post #18

First of all, this is great work! Hopefully, it will implement the Warren Abstract Machine[1] in the future, since it generally leads to more efficient interpretation. E.g. both SICStus and SWI-Prolog implement a version of the WAM. [1] https://en.wikipedia.org/wiki/Warren_Abstract_Machine

SWI-Prolog implements a variant of the ZIP, not the WAM.

Ah, thanks for correcting me. I seem to remember that the documentation said WAM.

Re: Prolog interpreter in Go

#20

Prolog is my favorite example language I use to convey the concept of how different programming paradigms lend themselves to different types of problems. After learning the syntax and mechanics prolog seems like a ridiculous language that was written to win a drunken bet with a philosopher. but given the right problem it feels like using black magic. Solving Einstein's riddle[1] is trivial in prolog for example. But…

See also the SWI-Prolog example:

http://swish.swi-prolog.org/example/houses_puzzle.pl

Post reply on HN