- Created Saturday, March 19th 2016 @ 01:08:45
Can someone help out with the appropriate submission of prolog files.
What is the right file extension ? Because so far .pl and pro both trigger perl.
Based on the FAQ, I assume the compile command line is something like: swipl --goal=main --stand_alone=true -o myprog -c load.pl
DeveloperCreated Monday, March 21st 2016 @ 11:33:56
There is a bug in the compiler at the moment that causes this. Will be fixed tomorrow.
DeveloperCreated Tuesday, March 22nd 2016 @ 14:19:18
Should be fixed now. Let me know if there is any more trouble, I haven't been able to test fully because I have no working prolog bot. Also I updated the prolog information on the languages page, you should include a file called load.pl to make it work.
- Created Wednesday, March 23rd 2016 @ 11:40:49
Thanks, Jim, it looks like the system is working.
(Now i just need to make my code work!)
- Created Wednesday, March 23rd 2016 @ 12:41:59
The following code doesn't work. It doesn't even produce output to std_err. I am leaving it here as a starting point for others.
main :- write(user_error,"started\n"), prompt(_, ''), read_line_to_codes(user_input,Cs), !, ( Cs = end_of_file ; codes_to_words(Cs,Words), nth1(1,Words,Cmd), process_cmd(Cmd,Words), main ). codes_to_words(Cs,Words) :- atom_codes(A, Cs), atomic_list_concat(Words, ' ', A). process_cmd(settings,_Words). process_cmd(update,_Words). process_cmd(action,_Words) :- write("place_disc 0\n"), flush_output. process_cmd(_,_). % ignore unknown lines