← Back to Community
Prolog support on repl.it
Profile icon
h
has Hacker Plan
Scoder12

Hey it me again back with another compilation. Today I compiled prolog to work on repl.it! All you have to do is fork the repl. When you run it you get a prolog shell. Enjoy!

Voters
Profile icon
gabrielmariani
Profile icon
ngbahbit
Profile icon
eriklance
Profile icon
Kinrany
Profile icon
PT1
Profile icon
unel
Profile icon
coecs381
Profile icon
rollingkeyboard
Profile icon
alescode
Profile icon
theangryepicbanana
Comments
hotnewtop
Profile icon
theangryepicbanana

Ah, thanks for reminding me about adding Prolog to repl.it. I had meant to try doing this a while back, but you seem to have beat me to it. Good job!

Profile icon
Scoder12
Profile icon
AmazingMech2418

For some reason, this doesn't seem to be working for me. I tried running a script and it gave me an existence_error... I also tried using install-pkg gprolog and that is giving me instantiation_errors for some reason, although if I run my program in another interpreter online, it works. But I want to share it on Repl.it, so do you know of any interpreters that would work?

Profile icon
Scoder12

@AmazingMech2418 can you share your repl?

Profile icon
AmazingMech2418
Profile icon
Scoder12

@AmazingMech2418 This seems to be due to implementation differences between gprolog and swi-prolog

Profile icon
AmazingMech2418

@Scoder12 Yeah, I think so...

Profile icon
WMeacham

Hi, when I try to type [user]., I get an error. Both on this version and also on the version that I forked into one of my own repl's. It can do basic statements like
5 is 3 + 2.
Returns true. But if I try to consult a file or enter [user], it fails. What am I doing wrong. And thanks for diving into this.

Profile icon
Scoder12

@WMeacham sorry I don't know much about prolog but you can try looking at documentation and questions for GNU proglog specifically because I think there are differences between versions.

Profile icon
WMeacham

@Scoder12 Not to worry. I appreciate you taking the first step. Now that I know it isn't an install issue, I'm pretty sure I have to modify the Path so it can find the executables. Those commands should work per the GNU Documentation. It just can't find them.

Thanks again! Only thing stopping me now is this old man remembering his Linux commands from a long time ago!