SWI-Prolog / packages-mqi

Machine Query Interface
18 stars 5 forks source link

Support STDIO interface in addition to sockets #6

Open EricZinda opened 2 years ago

EricZinda commented 2 years ago

From the SWI Prolog forum:

"Since this is a two-way, line-based text protocol, I think you’re missing something by not including a direct stdin/stdout interface. It should probably be the default for the arity-0 toplevel predicate unless you’ve specified otherwise in code, so you can use it as above. Requiring socket/network access to be able to use this makes for a significantly more difficult integration, depending on the language, but I can’t think of a single general-purpose language that doesn’t have a simple, builtin way to access standard input and output."

Initial thoughts: