-
Notifications
You must be signed in to change notification settings - Fork 27
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
Investigate adding support for Prolog #211
Comments
Let me know if there's anything I can do to help! I'll take a look at what QuickJS is doing about terminal input and see if I can fix it on my end. |
Thanks heaps! For the way Runno currently works I don't think any changes will be necessary. It doesn't currently use my new WASI runtime (though I'd like it to!) |
@guregu It seems to run locally! I'm having difficulty understanding how things piece together in prolog programs. How would you expect a program to run in Runno? I've been reading "Learn Prolog Now" and it seems to separate knowledge bases from queries. It seems like maybe I should run the file, and then open the interpreter? But when I run their code examples they don't work. Do you have a good resource to learn Prolog that will run in Trealla? |
@taybenlor Nice! For resources, I'd recommend The Power of Prolog by @triska. He recently uploaded a very detailed video about how Prolog toplevels (REPLs) here: https://www.youtube.com/watch?v=op17-dlcSRQ. Power of Prolog targets Scryer Prolog, but Trealla Prolog is mostly compatible with it so it should generally work. I think it could work with the same layout and a small tweak. Instead of sending the code input to the stdin, you can "consult" (Prolog term for loading a file) the input and then provide the user with the prompt as normal to write queries themselves. Maybe even provide an extra input box for the query and the program code to allow for the user to specify a query they want to run. If you can use a virtual file system, you could for example write Let me know if that helps! There are some other ways to approach this too, so we should be able to find a way to get it working nicely. Also, if something seems broken it might be a bug in my WASI implementation so feel free to reach out! There are a few online REPLs that might provide some inspiration: |
See work here: https://github.com/guregu/trealla-js
Looks like this should actually be pretty doable. Trealla supports WASI as a target (https://github.com/trealla-prolog/trealla) and is already on WAPM (https://wapm.io/guregu/trealla).
The text was updated successfully, but these errors were encountered: