Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metta+> Imperative Commands Not Working with swipl-win #217

Open
TeamSPoon opened this issue Dec 11, 2024 · 4 comments
Open

metta+> Imperative Commands Not Working with swipl-win #217

TeamSPoon opened this issue Dec 11, 2024 · 4 comments

Comments

@TeamSPoon
Copy link
Collaborator

When running the MeTTa interpreter, I observe that imperative commands behave differently depending on whether I start with swipl-win or swipl. Specifically, commands like prolog. (to drop into the Prolog shell) and ls. (to list directory contents) work when using swipl but do not function as expected when using swipl-win.

Steps to Reproduce:

  1. Start the MeTTa interpreter with:
    • swipl -l prolog/metta_lang/metta_interp.pl (console environment).
    • swipl-win -l prolog/metta_lang/metta_interp.pl (graphical environment).
  2. At the metta+> prompt, try the following:
    • prolog. to enter the Prolog shell.
    • ls. to list directory contents.

Expected Behavior:
Commands like prolog. and ls. should function the same way regardless of whether swipl or swipl-win is used to start the MeTTa interpreter.

Actual Behavior:

  • When using swipl, these commands work as expected.
  • When using swipl-win, the commands fail to execute.

Additional Information:

  • The difference in behavior between swipl and swipl-win is unclear.
  • If additional configuration or setup is required for swipl-win, it is not mentioned in the documentation.

Request:
Please clarify whether swipl-win requires specific configuration to support these commands or if this is a limitation or bug. If it is a bug, a fix or workaround would be greatly appreciated.

@stassa
Copy link
Collaborator

stassa commented Dec 30, 2024

Can't reproduce exactly- repl starts but doesn't respond for me:

% Started graphical environment with swipl-win -l prolog/metta_lang/metta_interp.pl
1 ?- repl.

metta+>!(print abcd)
metta+>prolog
metta+>ls.
metta+>halt.
metta+>
true.

@stassa
Copy link
Collaborator

stassa commented Dec 30, 2024

Also, this keeps happening when I start with swipl-win -l prolog/metta_lang/metta_interp.pl:

mettalog_swipl-win_lines.mp4

It happens intermittently without apparent reason (no changes to the command line, happens from a clean section, no changes in code etc).

@TeamSPoon
Copy link
Collaborator Author

i can confirm it happens on my debian 12 linux

swipl-win -l prolog/metta_lang/metta_interp.pl

@TeamSPoon
Copy link
Collaborator Author

TeamSPoon commented Dec 30, 2024

happens = doesnt have any reply output .. looks like you will need to run somethinjg like ?- rtrace(repl). to debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants