run: support reading program from stdin / inline --program for one-shot queries #21
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-prolog#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
patch-prolog runrequires at least one.plfile path (files: Vec<PathBuf>,required = true). There is no way to feed a program on stdin or inline, which makes one-shot queries and tooling integration awkward — every ad-hoc test needs a temp file written to disk first.Use case
Iterating on snippets (REPL-less) and driving the engine from other tools. Today the loop is "write
/tmp/x.pl, invoke, repeat per goal." A stdin/inline path removes the temp-file dance.Suggested options (either or both)
-convention:patch-prolog run - --goal "..."(or read stdin when no file is given), so programs can be piped:--program '...'/--eval '...'for a snippet passed on the command line.Priority
Ergonomics, not correctness — the file interface works and loglings itself always has an exercise file on disk, so this mainly speeds up ad-hoc and tooling use. Lower priority than the parse-error issues.
Raised while building the
loglingsProlog exercises against the installed engine.#26