The Ciao Prolog Playground includes a number of areas, most of which are editable (note that the arrangement of the areas is configurable):
The preview area can also be shown as a single window in presentation mode (⛶ button, see below).
Collaboration sessions can be very useful for example in education environments. For example, students can be asked to write some code or write some document and can then show it to the class from their computer. Students can have, e.g., two playgrounds open, one in which they are doing their work, and another which is in a collaborative session with the instructor's computer, which is being shown on the projector (o shared online). A given student can paste his or her solution in the collaborative session and both the instructor and the student can make changes.
These links can be sent by email, embedded in other documents, etc. See also adding links to runnable examples and notebooks to arbitrary documents.
In addition, in the ... pull-down the following can be selected (in document mode, only the query time limit):
Also, in modes that include the LPTP theorem prover:
The playground has two sets of key bindings, which can be chosen at the bottom of the Edit menu: Emacs key bindings, and the OS key bindings. The latter are those of the system the playground is running on, shown in the menu as macOS, Windows, or GNU/Linux key bindings (e.g., Cmd-c and Cmd-v on a Mac, or Ctrl-c and Ctrl-v on Windows or GNU/Linux, to copy and paste). The Emacs ones are used by default on a Mac, where they do not get in the way of the OS ones, which use Cmd, and the OS ones elsewhere. The choice is kept by the browser, and also applies to the runnable code of the documents of the same site.
The Edit menu has the most used editing commands, and the menus and buttons show the keys of their commands in the set in use. The rest are listed below, classified by functionality.
On Windows or GNU/Linux, the Emacs key bindings use Ctrl for their Ctrl keys, so that the OS ones that use it (to copy, paste, etc.) are not available; and some of them, such as Ctrl-n or Ctrl-w, are kept by the browser for itself.
These commands and bindings, those of the Emacs set, are useful for editing and moving around in the editor area, top levels, etc. (with the OS key bindings, those of the system are used). Meta is Alt (Option on a Mac).
Moving around:
The region:
Killing and yanking (as cut and paste):
Kills are also copied to the clipboard, to paste them elsewhere. Text copied elsewhere is added to the kill ring by Ctrl-y, as in Emacs, if the browser lets the clipboard be read (it may ask for permission first, or show a Paste button to click; this is done only when something may have been copied since the last time, e.g., after going to another window); it can also be pasted as usual (e.g., Cmd-v on a Mac). With a region, each of the Meta keys can also be typed as Esc followed by the key, as in Esc + w.
Other editing:
The elements that the manuals define (predicates, properties, regular types, declarations, libraries) are completed, and described, in the editor (when editing a document, in its blocks of Ciao code) and in the top level:
The last two are also in the Edit menu. The manuals are those of the site from which the playground is served.
These commands perform Ciao or filesystem-related actions, with the keys of the Emacs set and those of the OS set (with Cmd on a Mac, Ctrl elsewhere):
These commands perform actions on the source code:
The top-level area includes some key bindings of its own:
Aborting a query fully terminates the Ciao worker executing the Ciao process in the browser, so it may take some time to reload dependencies after aborting. The code present in the left (or top) window will be reloaded to the top-level.
These are in the Emacs set only (with the OS key bindings, the commands are in the LPTP menu).
In this platform the Ciao system code (binaries) and libraries are downloaded into your browser and all code is executed locally. This has the advantage that no connection is required other than this initial download, no server is necessary, etc. Also note that with this approach no information about your code or document will be uploaded or gathered.
Please also be aware of some current limitations of the playground with respect to a full, native installation of the Ciao system:
Please ask us if some useful library or feature is missing; if technically possible, we will add it. In any case, for intensive use we recommend installing Ciao Prolog natively, for improved performance and full features.