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

Feature request write family of predicates in the sandbox #7

Closed
ghost opened this issue Jul 25, 2018 · 3 comments
Closed

Feature request write family of predicates in the sandbox #7

ghost opened this issue Jul 25, 2018 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jul 25, 2018

Would it be possible to allow write inside the sandbox?
Currently these ISO core standard predicates are simply
not recognized:

grafik

But interestingly SWISH allows them;

grafik

@jariazavalverde
Copy link
Contributor

I just added read and write families of predicates. Currently, the user output is the console of the browser and the user input is the prompt. Also it's possible to create (virtual) files with open/[3-4]. Now I'm adding an interface for Node.js and for the DOM (html objects).

@ghost
Copy link
Author

ghost commented Mar 12, 2019

Thanks for the update. Is there a documentation? Do you already
support the ISO core write option variable_names/2 ? Do you
support write/1 only or also write_term/2, that takes an option list?

@jariazavalverde
Copy link
Contributor

jariazavalverde commented Mar 12, 2019

We'll document it throughout these weeks. The predicates added are:

  • current_input/1
  • current_output/1
  • set_input/1
  • set_output/2
  • open/[3-4]
  • close/[1-2]
  • get_char/[1-2]
  • get_code/[1-2]
  • put_char/[1-2]
  • put_code/[1-2]
  • nl/[0-1]
  • read/[1-2]
  • read_term/[2-3]
  • write/[1-2]
  • writeq/[1-2]
  • write_canonical/[1-2]
  • write_term/[2-3]

And soon the rest will be added (get_byte, put_byte, etc). read_term supports variables, variable_names and singletons.

@jariazavalverde jariazavalverde transferred this issue from tau-prolog/tau-prolog Oct 31, 2019
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